Jump to content

  •  





Upcoming Update [2]

Posted by Ind, 25 May 2013 · 897 views

Following up on my previous entry, Upcoming Update,
this is quite taking longer than I expected, to show some movement/give you guys another sneak peek:
the upcoming universal queue script commands that the new battleground scripts (for the new BG Queue) will be using (can be used for anything else as well, e.g. custom events)
10 new script commands
  • queue()
    • creates a new queue instance, returns created queue id
      set .@id,queue();
  • queuesize(<queue_id>)
    • returns the amount of entries in queue instance of <queue_id>.
      set .@length,queuesize(.@queue_id);
  • queueadd(<queue_id>,<var_id>)
    • adds <var_id> to queue of <queue_id>, returns 1 if <var_id> is already present in the queue, 0 otherwise.
      queueadd(.@queue_id,.@var_id);
  • queueremove(<queue_id>,<var_id>)
    • removes <var_id> from queue of <queue_id>, returns 1 if <var_id> is not present in the queue, 0 otherwise.
      queueremove(.@queue_id,.@var_id);
  • queueopt(<queue_id>,<optionType>,{Optional <option val>})
    • modifies <queue_id>'s <optionType>, when <option val> is not present, <optionType> is removed from <queue_id>, when present it modifies <queue_id>'s <optionType> with the new <option val> value.
      Currently 3 options are available, HQO_OnDeath, HQO_OnLogout, HQO_OnMapChange (the constant names are not final).
      queueopt(.@queue_id,HQO_OnDeath,"MyNPC::MyOnQueueMemberDeathEventName");
      It allows you to hook npc events to be triggered by specific actions that may happen to a player in the queue (when the queue in question is used for account ids)
  • queuedel(<queue_id>)
    • deletes <queue_id> returns 1 when <queue_id> is not found, 0 otherwise.
      queuedel(.@queue_id);
  • queueiterator(<queue_id>)
    • creates a new queue iterator instance, a queue iterator is not a reference to a queue's actual members, it copies the queues members when initialized, this way you can loop through them even if you remove them from the queue
      set .@it,queueiterator(.@queue_id);
  • qicheck(<queue_iterator_id>)
    • checks whether there is a next member in the iterator's queue, 1 when it does, 0 otherwise.
      qicheck(.@queue_iterator_id);
  • qiget(<queue_iterator_id>)
    • obtains the next member in the iterator's queue, returns the next member's id or 0 when it doesnt exist.
      for( set .@elem,qiget(.@queue_iterator_id); qicheck(.@queue_iterator_id); set .@elem,qiget(.@queue_iterator_id) )
  • qiclear(<queue_iterator_id>)
    • deletes a queue iterator from memory, returns 1 when it fails, 0 otherwise.
      qiclear(.@queue_iterator_id)
Sample Usage:
/* say create a queue */
set .@id,queue();
queueadd(.@id,getcharid(3));
/* ... add as many entries ... (no limit) */
if( queuesize(.@id) == 999 ) {
	/* whatever */
}
/* anywhere in the code */
set .@it,queueiterator(.@id);
for( set .@elem,qiget(.@it); qicheck(.@it); set .@elem,qiget(.@it) ) {
	//do anything e.g.
	/* attachrid .@elem; */
	/* mes "ID:"+.@elem; */
}
qiclear(.@it);





Master Ind stop posting you make me crazy so I want this update.  Please release it =x

 

Love your work.=)

gogo Master Ind   we want the Update :)

Pretty! You Amazed me! :)

Waaaiting.. Wait.. I can't wait anymore for this D: it looks so cool!

Quote : Benjamin Franklin

Tricks and treachery are the practice of fools, that don't have brains enough to be honest.”

Quote : Winston Churchill

Success is not final, failure is not fatal: it is the courage to continue that counts.”

Quote : Ezra Taft Benson

Pride is concerned with who is right. Humility is concerned with what is right.”

Quote : A.S. G 00

...people who misuse their intelligence, who get caught up in their own assumptions and prejudices, and lose sight of the truth. This leads to misunderstanding and discord, and then conflict is created.”

Recent Comments

About Station H

The past has shown that my excessive privacy had its drawbacks, one in particular allowed misinformation regarding me and my actions to scatter with ease. In this page I intend to log about any action I take regarding Hercules, and maybe some other stuff too, filter by tags if you're looking for something specific.

January 2025

S M T W T F S
   1234
5678910 11
12131415161718
19202122232425
262728293031 

Latest Visitors