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/whisper_sys.txt | |
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/whisper_sys.txt')
-rw-r--r-- | doc/whisper_sys.txt | 70 |
1 files changed, 41 insertions, 29 deletions
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 |