diff options
author | euphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-01 02:39:47 +0000 |
---|---|---|
committer | euphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-01 02:39:47 +0000 |
commit | 85b119962ce618097aa58e513975e4454cc15610 (patch) | |
tree | 47eea241d6fa81804196ecf5766288e8a4bdbcd2 /doc | |
parent | 20ea235901d685237af6317d54f8087ab10a8e48 (diff) | |
download | hercules-85b119962ce618097aa58e513975e4454cc15610.tar.gz hercules-85b119962ce618097aa58e513975e4454cc15610.tar.bz2 hercules-85b119962ce618097aa58e513975e4454cc15610.tar.xz hercules-85b119962ce618097aa58e513975e4454cc15610.zip |
* Fixed Elemental Sword database entry, bugreport:6134
* Clarified documentation for "doevent" and "donpcevent", as per bugreport:428 (doc\script_commands.txt)
* A major cleanup/rewrite of the "Whisper System" documentation (doc\whisper_sys.txt)
* A few other minor documentation corrections
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16358 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ea_job_system.txt | 4 | ||||
-rw-r--r-- | doc/mob_db_mode_list.txt | 2 | ||||
-rw-r--r-- | doc/script_commands.txt | 25 | ||||
-rw-r--r-- | doc/whisper_sys.txt | 70 |
4 files changed, 59 insertions, 42 deletions
diff --git a/doc/ea_job_system.txt b/doc/ea_job_system.txt index 50fc399e8..3fd7e9bb9 100644 --- a/doc/ea_job_system.txt +++ b/doc/ea_job_system.txt @@ -1,5 +1,5 @@ -//===== Athena Doc=== ===================================== -//= rAthena Job System +//===== Athena Doc========================================= +//= eAthena Job System //===== By ================================================ //= Skotlex //===== Version =========================================== diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt index c2d55f35c..34a5dac89 100644 --- a/doc/mob_db_mode_list.txt +++ b/doc/mob_db_mode_list.txt @@ -7,7 +7,7 @@ //========================================================= //= 1.0 - Standardized doc file //===== Description ======================================= -//= A reference description of eA's mob_db 'mode' field +//= A reference description of rAthena's mob_db 'mode' field //========================================================= Bit Legend: diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 6ce6b186f..ffdd16061 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -5390,11 +5390,13 @@ while hidden then revealing.... you can wonder around =P *doevent "<NPC object name>::<event label>"; This command will start a new execution thread in a specified NPC object at the -specified label. The execution of the script running this command will not stop. -No parameters may be passed with a doevent call. +specified label. The execution of the script running this command will not stop, +and the event called by the 'doevent' command will not run until the invoking +script has terminated. No parameters may be passed with a doevent call. The script of the NPC object invoked in this manner will run as if it's been -invoked by the RID that was active in the script that issued a 'doevent'. +invoked by the RID that was active in the script that issued a 'doevent'. As +such, the command will not work if an RID is not attached. place,100,100,1%TAB%script%TAB%NPC%TAB%53,{ mes "This is what you will see when you click me"; @@ -5412,13 +5414,16 @@ invoked by the RID that was active in the script that issued a 'doevent'. *donpcevent "{NPC NAME}::<event label>"; -This command invokes the event label code within an another NPC or NPCs. If -event label has the form "NpcName::OnLabel", then only given NPC's event label -will be invoked (much like 'goto' into another NPC). If the form is "::OnLabel" -(NpcName omitted), the event code of all NPCs with given label will be invoked, -one after another. In both cases the invoked script will run without an attached -RID, whether or not the invoking script was attached to a player. The event -label name is required to start with On. +This command invokes the event label code within an another NPC or NPCs. It +starts a separate instance of execution, and the invoking NPC will resume +execution its immediately. + +If the supplied event label has the form "NpcName::OnLabel", then only given +NPC's event label will be invoked (much like 'goto' into another NPC). If the +form is "::OnLabel" (NPC name omitted), the event code of all NPCs with given +label will be invoked, one after another. In both cases the invoked script +will run without an attached RID, whether or not the invoking script was +attached to a player. The event label name is required to start with "On". This command can be used to make other NPCs act, as if they were responding to the invoking NPC's actions, such as using an emotion or talking. diff --git a/doc/whisper_sys.txt b/doc/whisper_sys.txt index 7f4091408..e9353de75 100644 --- a/doc/whisper_sys.txt +++ b/doc/whisper_sys.txt @@ -1,29 +1,41 @@ -Adapted from: http://www.eathena.ws/board/index.php?showtopic=42659 -Copied by: Massdriller -Post made by: lordalfa - -As requested by MassDriller, I made this piece of code to allow you to whisper your NPCS and let them execute some commands for you. - -An example of what you can do with it, before you eventually go on reading. - -Let's say you prepared a special NPC called NPCCommander. -You whisper to NPCCommander in Game with formatted instructions like these: - -//============================================================ - -[To NPC:NPCCommander] Report#Killstealing#Lordalfa - -//============================================================ - -Now what happens is that this code allows you to trigger a Label called "OnWhisperGlobal" into that NPC and execute some code, passing it The values you just input. - -Values will be passed into Temp string Variables called @whispervar0$, @whispervar1$ and so on.. -In the example above: - -@whispervar0$ would contain the word "Report" -@whispervar1$ would contain the word "KillStealing" -@whispervar2$ would contain the word "Lordalfa" - -so you might prepare the NPC Label to process these Variables and give Executing Character a Feedback ( via dispbottom "message" for example ) - -Now , it's allowed to use up to 10 commands in a Row, separed by "#" character, they will be splitted and passed to the NPC Label in their respective variables, for you to process them. +//===== Athena Doc ======================================== +//= NPC Whisper System +//===== By ================================================ +//= lordalfa, Massdriller +//===== Version =========================================== +//= 1.1 +//========================================================= +//= 1.1 - Cleanup. [Euphy] +//===== Description ======================================= +//= A description of rAthena's NPC whispering system. +//========================================================= + +This piece of code to allows characters to execute events in NPCs by whispering +them up to ten parameters. The NPC must have an "OnWhisperGlobal" label, or an +"event not found" error will result. + + NPC:<NPC Name> <String>{#String 2{#...{#String 10}}} + +The whispered strings are separated by the "#" character, and are each stored +into separate temporary character string variables: + + @whispervar0$, @whispervar1$, ... @whispervar9$ + +--------------------------------------------------------------------------------- + +Below is an example of how this feature might be used. +You whisper an NPC "NPCCommander" in-game with the following instructions: + + NPC:NPCCommander Report#Killstealing#Lordalfa + +The parameters are passed on to the "OnWhisperGlobal" label of the NPC, and can +be processed accordingly: + + - script NPCCommander -1,{ + OnWhisperGlobal: + // The following code will inform player "Lordalfa" that he has been + // reported for killstealing. + if (@whispervar0$ == "Report") + message @whispervar2$,"You have been reported for "+@whispervar1$+"."; + end; + }
\ No newline at end of file |