summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt84
1 files changed, 49 insertions, 35 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 218bb4803..f5fdab851 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2777,6 +2777,7 @@ See 'getequipid' for a full list of valid equipment slots.
Given the database ID number of an item, this function will return the
text stored in the 'japanese name' field (which, in Hercules, stores an
English name the players would normally see on screen).
+Return "null" if no such item exist.
---------------------------------------
@@ -3181,30 +3182,28 @@ Valid types are :
This function returns specified information about the current system time.
-Valid types are listed in const.txt:
- 1 - SECOND - Seconds (of a minute)
- 2 - MINUTE - Minutes (of an hour)
- 3 - HOUR - Hour (of a day)
- 4 - WEEKDAY - Week day (0 for Sunday, 6 is Saturday)
- - Additional: (SUNDAY,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY)
- 5 - DAYOFMONTH - Day of the month.
- 6 - MONTH - Number of the month.
- - Additional: ( JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER)
- 7 - YEAR - Year.
- 8 - DAYOFYEAR - Day of the year.
+Valid types:
+ 1 - GETTIME_SECOND - Seconds (of a minute)
+ 2 - GETTIME_MINUTE - Minutes (of an hour)
+ 3 - GETTIME_HOUR - Hour (of a day)
+ 4 - GETTIME_WEEKDAY - Week day (0 for Sunday, 6 is Saturday)
+ - Additional: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY
+ 5 - GETTIME_DAYOFMONTH - Day of the month.
+ 6 - GETTIME_MONTH - Number of the month.
+ - Additional: JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER
+ 7 - GETTIME_YEAR - Year
+ 8 - GETTIME_DAYOFYEAR - Day of the year.
It will only return numbers based on types.
Example :
- if ( gettime(WEEKDAY) == SATURDAY ) {
+ if (gettime(GETTIME_WEEKDAY) == SATURDAY) {
mes "It's a Saturday. I don't work on Saturdays.";
+ } else if (gettime(GETTIME_MONTH) == JANUARY) {
+ mes "It's January. I don't work on January.";
+ } else if (gettime(GETTIME_MONTH) == OCTOBER && gettime(GETTIME_DAYOFMONTH) == 31) {
+ mes "It's Halloween.";
}
- else if ( gettime(MONTH) == JANUARY ) {
- mes "It's a January. I don't work on January.";
- }
- else if ( gettime(MONTH) == OCTOBER && gettime(DAYOFMONTH) == 31 ) {
- mes "It's a Halloween.";
- }
-
+
---------------------------------------
*gettimestr(<format string>,<max length>)
@@ -3249,6 +3248,8 @@ Currently being used in the PVP scripts to check if a PVP room is full of
not, if the number returned it equal to the maximum allowed it will not
let you enter.
+Return -1 if the map name is invalid.
+
---------------------------------------
*getareausers({"<map name>",}{<x1>,<y1>,<x2>,<y2>})
@@ -7578,7 +7579,7 @@ OnClock0600:
end;
OnInit:
// setting correct mode upon server start-up
- if(gettime(3)>=6 && gettime(3)<18) end;
+ if (gettime(GETTIME_HOUR) >= 6 && gettime(GETTIME_HOUR) < 18) end;
OnClock1800:
night;
end;
@@ -8964,17 +8965,21 @@ Returns the amount of entries in the queue instance of <queue_id>.
---------------------------------------
-*queueadd(<queue_id>,<var_id>);
+*queueadd(<queue_id>, <var_id>);
+
+Adds <var_id> to queue of <queue_id>.
-Adds <var_id> to queue of <queue_id>, returning 1 if <var_id> is already
-present in the queue, otherwise returning 0.
+Returns false if <var_id> couldn't be added (was already present in the queue),
+true otherwise.
---------------------------------------
-*queueremove(<queue_id>,<var_id>);
+*queueremove(<queue_id>, <var_id>);
-Removes <var_id> from queue of <queue_id>, returning 1 if <var_id> is not
-present in the queue, otherwise returning 0.
+Removes <var_id> from queue of <queue_id>.
+
+Returns false if <var_id> couldn't be removed (wasn't present in the queue),
+true otherwise.
---------------------------------------
@@ -8984,20 +8989,26 @@ 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.
+Returns true on success, false on failure.
+
Currently 3 options are available:
-HQO_OnDeath (1), HQO_OnLogout (2), HQO_OnMapChange (3)
+- QUEUEOPT_DEATH (1)
+- QUEUEOPT_LOGOUT (2)
+- QUEUEOPT_MAPCHANGE (3)
-Note: The constant names are not final.
+When the QUEUEOPT_MAPCHANGE event is triggered, it sets a temp char var
+@Queue_Destination_Map$ with the destination map name.
Example:
- queueopt(.@queue_id,0,"MyNPC::MyOnQueueMemberDeathEventName");
+ queueopt(.@queue_id, QUEUEOPT_DEATH, "MyNPC::MyOnQueueMemberDeathEventName");
---------------------------------------
*queuedel(<queue_id>);
-Deletes <queue_id> and returns 1 when <queue_id> is not found, otherwise
-0 is returned.
+Deletes the queue <queue_id>.
+
+Returns false if the queue wasn't found, true otherwise.
---------------------------------------
@@ -9011,8 +9022,10 @@ even if you remove them from the queue.
---------------------------------------
*qicheck(<queue_iterator_id>);
-checks whether there is a next member in the iterator's queue, 1 when
-it does, 0 otherwise.
+
+Checks whether the current member in the iterator's queue exists.
+
+Returns 1 when it does, 0 otherwise.
---------------------------------------
@@ -9030,8 +9043,9 @@ Example:
*qiclear(<queue_iterator_id>);
-Deletes a queue iterator from memory and returns 1 when it fails,
-otherwise 0 is returned.
+Deletes a queue iterator from memory.
+
+Returns false when it fails, otherwise 1 is returned.
---------------------------------------
//=====================================