summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--doc/script_commands.txt173
-rw-r--r--doc/whisper_sys.txt2
3 files changed, 93 insertions, 83 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index a0fdb7bbe..c655c8c51 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/18
+ * Documentation update on NPC whisper and rid2name. [Lance]
* Fixed event_kill_pc to behave like what it should instead of another replication
of event_death. Added script function rid2name to convert bl ids to name. [Lance]
* Recoded setmobdata script function. Fixed mob_damage typo sd -> mvp_sd. [Lance]
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 7ed01c0d5..738b13584 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -361,9 +361,9 @@ would not know what character to work on if there's no RID.
Unless you use 'attachrid' to explicitly attach a character to the script first.
Whenever we say 'invoking character', we mean 'the character who's RID is
-attached to the running script. The script function "playerattached" can be
-used to check which is the currently attached player to the script (it will
-return 0 if the there is no player attached or the attached player no longer
+attached to the running script. The script function "playerattached" can be
+used to check which is the currently attached player to the script (it will
+return 0 if the there is no player attached or the attached player no longer
is logged on to the map-server).
Item and pet scripts
@@ -438,7 +438,7 @@ Variable scope is defined by a prefix before the variable name:
is, not triggered by a specific character object.
"#" - A permanent account-based variable.
They are stored with all the account data in "save\accreg.txt" in TXT
- versions and in the SQL versions in the 'global_reg_value' table using
+ versions and in the SQL versions in the 'global_reg_value' table using
type 2.
"##" - A permanent account-based variable stored by the login server.
They are stored in "save\account.txt" and in the SQL versions in the
@@ -454,30 +454,30 @@ is a file you should read, since it also allows you to replace lots of numbered
arguments for many commands with easier to read text. The special variables most
commonly used are all permanent character-based variables:
-StatusPoint - Amount of status points remaining.
-BaseLevel - Current base level
-SkillPoint - Amount of skill points remaining
-Class - Current job
-Upper - 1 if the character is an advanced job class.
-Zeny - Current amount of zeny
-Sex - Character's gender, 0 if female, 1 if male.
-Weight - The weight the character currently carries.
-MaxWeight - The maximum weight the character can carry.
-JobLevel - Character's job level
+StatusPoint - Amount of status points remaining.
+BaseLevel - Current base level
+SkillPoint - Amount of skill points remaining
+Class - Current job
+Upper - 1 if the character is an advanced job class.
+Zeny - Current amount of zeny
+Sex - Character's gender, 0 if female, 1 if male.
+Weight - The weight the character currently carries.
+MaxWeight - The maximum weight the character can carry.
+JobLevel - Character's job level
BaseExp - The amount of base experience points the character has.
- Notice that it's zero (or close) if the character just got a level.
-JobExp - Same for job levels
-NextBaseExp - Amount of experience points needed to reach the next base level.
-NextJobExp - Same for job levels.
-Hp - Current amount of hit points.
-MaxHp - Maximum amount of hit points.
-Sp - Current spell points.
-MaxSp - Maximum amount of spell points.
+ Notice that it's zero (or close) if the character just got a level.
+JobExp - Same for job levels
+NextBaseExp - Amount of experience points needed to reach the next base level.
+NextJobExp - Same for job levels.
+Hp - Current amount of hit points.
+MaxHp - Maximum amount of hit points.
+Sp - Current spell points.
+MaxSp - Maximum amount of spell points.
BaseJob - This is sneaky, apparently meant for baby class support.
This will supposedly equal Job_Acolyte regardless of whether the
character is an acolyte or a baby acolyte, for example.
Karma - The character's karma. Karma system is not fully functional, but
- this doesn't mean this doesn't work at all. Not tested.
+ this doesn't mean this doesn't work at all. Not tested.
Manner - The character's manner rating. Becomes negative if the player
utters words forbidden through the use of 'manner.txt' client-side
file.
@@ -695,7 +695,7 @@ Returns the ID of the player currently attached to the script. It will return
0 if noone is attached, or if the attached player no longer exists on the map
server. It is wise to check for the attached player in script functions that
deal with timers as there's no guarantee the player will still be logged on
-when the timer triggers. Note that the ID of a player is actually their
+when the timer triggers. Note that the ID of a player is actually their
account ID.
-------------------------
@@ -1841,9 +1841,9 @@ adding up strings:
*countitem2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
*countitem2("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>)
-
-Expanded version of 'countitem' function, used for created/carded/forged items.
-
+
+Expanded version of 'countitem' function, used for created/carded/forged items.
+
This function will return the number of items for the specified item ID and
other parameters that the invoking character has in the inventory.
Check 'getitem2' to understand the arguments of the function.
@@ -1893,7 +1893,7 @@ is defined in "db/const.txt".
For reference, in there these things are defined:
StatusPoint, BaseLevel, SkillPoint, Class, Upper, Zeny, Sex, Weight, MaxWeight,
-JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp,
+JobLevel, BaseExp, JobExp, NextBaseExp, NextJobExp, Hp, MaxHp, Sp, MaxSp,
BaseJob, Karma, Manner, bVit, bDex, bAgi, bStr, bInt, bLuk
All of these also behave as variables, but don't expect to be able to just 'set'
@@ -1942,8 +1942,8 @@ if guild or party number is requested. If a name is specified and the character
is not found, 0 is returned.
If getcharid(0) returns a zero, the script got called not by a character and
-doesn't have an attached RID. Note that this will cause the map server to
-print "player not attached!" error messages, so it is preferred to use
+doesn't have an attached RID. Note that this will cause the map server to
+print "player not attached!" error messages, so it is preferred to use
"playerattached" to check for the character attached to the script.
if (getcharid(2)) mes "Only members of a guild are allowed beyond this point!";
@@ -2196,7 +2196,7 @@ see 'getequipid'. Function originally used by the refining NPCs:
mes "[Refiner]";
mes "That's a fine hat you are wearing there...";
close;
-
+
---------------------------------------
@@ -3384,7 +3384,8 @@ You can see the full list of available effect types you can possibly inflict in
It is pretty certain that addressing the target by an ID number will not
currently work due to a bug.
- ---------------------------------------
+
+---------------------------------------
*callshop "<shop name>",<flag>;
@@ -3974,7 +3975,7 @@ online.
These functions return the characters (shild/mother/father) ID
if (getmotherid()) mes "Oh... I know your mother's ID:"+getmotherid();
-
+
---------------------------------------
*getitemname(<item id>)
@@ -4602,23 +4603,23 @@ nighttime will persist if the server restarts during the night, if the automated
day/night switching is turned off in the configuration files. Figure it out on
your own:
--%TAB%script%TAB%DayNight%TAB%-1,{
+-%TAB%script%TAB%DayNight%TAB%-1,{
- end;
+ end;
-OnClock0300:
+OnClock0300:
-OnClock0800:
+OnClock0800:
-OnInit:
+OnInit:
set $@minutesfrommidnight, gettime(3)*60+gettime(2);
-
+
set $@night_start, 180; // 03:00
set $@night_end, 480; // 08:00
-
+
if ($@minutesfrommidnight>=$@night_start && $@minutesfrommidnight<$@night_end) goto StartNight;
-
+
goto StartDay;
StartNight:
night;
@@ -4864,14 +4865,14 @@ set @i, distance(100,200,101,202);
---------------------------------------
*query_sql "your MySQL query", <array name>
-
+
Returns up to 127 values into array.
Example:
query_sql "SELECT name FROM 'char' ORDER BY fame DESC LIMIT 5", @most_fame_dude$;
mes "Hall Of Fame: TOP5";
-mes "1."+@most_fame_dude$[0]; // Will return a person with the biggest fame value.
+mes "1."+@most_fame_dude$[0]; // Will return a person with the biggest fame value.
mes "2."+@most_fame_dude$[1];
mes "3."+@most_fame_dude$[2];
mes "4."+@most_fame_dude$[3];
@@ -4923,42 +4924,50 @@ Example:
set @i, petstat(PET_CLASS);
Whew.
-What's about all of them.
-
----------------------------------------
-
-*setitemscript(<ItemID>,<"{ new item script }">)
-
-Set a new script bonus to the Item. Very useful for game events.
-
-Example:
-setitemscript 2637,"{ bonus bDamageWhenUnequip,40; if(isequipped(2236)==0)end; if(getskilllv(26)){skill 40,1;}else{skill 26,1+isequipped(2636);} }";
-
----------------------------------------
-
-*disguise <Monster ID>;
-*undisguise;
-
-This command disgueses current player with a monster sprite.
-The disguise is disappearing on re-login or on 'undisguise' command.
-
-Note: It doesn't work with "Pets with equipment on"
-Note: If u're a Sniper, u'd get an old Falcon over your head
-Note: You can kill yourself with some skills
-Note: Monsters of your type could heal you
-
-Example:
-disquise 1002; //Yay! You're a Poring!!!
-next;
-undisquise; //Yay!!!! You're a human again!!
-
----------------------------------------
-
-*nude;
-
-This command will unequip anything equipped on the invoking character.
-
-It is not required to do this when changing jobs since 'jobchange' will unequip
-everything not equippable by the new job class anyway.
-
----------------------------------------
+What's about all of them.
+
+---------------------------------------
+
+*setitemscript(<ItemID>,<"{ new item script }">)
+
+Set a new script bonus to the Item. Very useful for game events.
+
+Example:
+setitemscript 2637,"{ bonus bDamageWhenUnequip,40; if(isequipped(2236)==0)end; if(getskilllv(26)){skill 40,1;}else{skill 26,1+isequipped(2636);} }";
+
+---------------------------------------
+
+*disguise <Monster ID>;
+*undisguise;
+
+This command disgueses current player with a monster sprite.
+The disguise is disappearing on re-login or on 'undisguise' command.
+
+Note: It doesn't work with "Pets with equipment on"
+Note: If u're a Sniper, u'd get an old Falcon over your head
+Note: You can kill yourself with some skills
+Note: Monsters of your type could heal you
+
+Example:
+disquise 1002; //Yay! You're a Poring!!!
+next;
+undisquise; //Yay!!!! You're a human again!!
+
+---------------------------------------
+
+*nude;
+
+This command will unequip anything equipped on the invoking character.
+
+It is not required to do this when changing jobs since 'jobchange' will unequip
+everything not equippable by the new job class anyway.
+
+---------------------------------------
+
+*rid2name(rid)
+
+Converts rid to name. Note: The player/monster/NPC must be online/enabled.
+Good for PCKillEvent where you can convert 'killedrid' to the name of the player.
+
+Note: rid2name may not produce correct character names since rid = account id.
+ It will return the current online character of the account only.
diff --git a/doc/whisper_sys.txt b/doc/whisper_sys.txt
index a303d6f05..347fe1c51 100644
--- a/doc/whisper_sys.txt
+++ b/doc/whisper_sys.txt
@@ -11,7 +11,7 @@ You whisper to NPCCommander in Game with formatted instructions like these:
//============================================================
-[To NPCCommander] Report,Killstealing,Lordalfa
+[To NPC:Commander] Report#Killstealing#Lordalfa
//============================================================