Poison
New member
- Messages
- 45
- Points
- 0
- Github
- pois8n
- Emulator
How about adding argument options for this script command? What do you think guys?*donpcevent "<NPC object name>::<event label>";
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.
*donpcevent "<NPC object name>::<event label>",{<argument1>,<argument2>,...};
Script Example:
Code:
place,100,100,1%TAB%script%TAB%NPC%TAB%53,{ .@i = rand(1,2); if (.@i == 1) { donpcevent "NPC2::OnEmote",1; } if (.@i == 2) { donpcevent "NPC2::OnEmote",2; } end; } place,102,100,1%TAB%script%TAB%NPC2%TAB%53,{ end; OnEmote: if (getarg(0) == 1) { emotion 1; } if (getarg(0) == 2) { emotion 2; } end; }
Last edited by a moderator: