rathena/doc/whisper_sys.txt
euphyy 727327df6f * 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://svn.code.sf.net/p/rathena/svn/trunk@16358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-01 02:39:47 +00:00

41 lines
1.5 KiB
Plaintext

//===== 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;
}