root/doc/whisper_sys.txt @ 3

Revision 1, 1.4 kB (checked in by jinshiro, 17 years ago)
Line 
1Adapted from: http://eathena.deltaanime.net/board/index.php?showtopic=42659
2Copied by: Massdriller
3Post made by: lordalfa
4
5As requested by MassDriller, I made this piece of code to allow you to whisper your NPCS and let them execute some commands for you.
6
7An example of what you can do with it, before you eventually go on reading.
8
9Let's say you prepared a special NPC called NPCCommander.
10You whisper to NPCCommander in Game with formatted instructions like these:
11
12//============================================================
13
14[To NPC:Commander]       Report#Killstealing#Lordalfa
15
16//============================================================
17
18Now 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.
19
20Values will be passed into Temp string Variables called @whispervar0$, @whispervar1$ and so on..
21In the example above:
22
23@whispervar0$ would contain the word "Report"
24@whispervar1$ would contain the word "KillStealing"
25@whispervar2$ would contain the word "Lordalfa"
26
27so you might prepare the NPC Label to process these Variables and give Executing Character a Feedback ( via dispbottom "message" for example )
28
29Now , 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.
Note: See TracBrowser for help on using the browser.