fusqueta Posted December 3, 2020 Posted December 3, 2020 (edited) We have a field to call a function on monster death: <map name>{,<x>{,<y>{,<xs>{,<ys>}}}}%TAB%monster%TAB%<monster name>{,<monster level>}%TAB%<mob id>,<amount>{,<delay1>{,<delay2>{,<event>{,<mob size>{,<mob ai>}}}}} Event is a script event to be executed when the mob is killed. The event must be in the form "NPCName::OnEventName" to execute, and the event name label should start with "On". As with all events, if the NPC is an on-touch NPC, the player who triggers the script must be within 'trigger' range for the event to work. I want to call a event(or a function) with arguments/parameter like callfunc( "function",$parameter); Is it possible? Edited December 3, 2020 by fusqueta Quote
0 Poring King Posted December 4, 2020 Posted December 4, 2020 7 hours ago, fusqueta said: We have a field to call a function on monster death: <map name>{,<x>{,<y>{,<xs>{,<ys>}}}}%TAB%monster%TAB%<monster name>{,<monster level>}%TAB%<mob id>,<amount>{,<delay1>{,<delay2>{,<event>{,<mob size>{,<mob ai>}}}}} Event is a script event to be executed when the mob is killed. The event must be in the form "NPCName::OnEventName" to execute, and the event name label should start with "On". As with all events, if the NPC is an on-touch NPC, the player who triggers the script must be within 'trigger' range for the event to work. I want to call a event(or a function) with arguments/parameter like callfunc( "function",$parameter); Is it possible? NPC Function Scriptfunction%TAB%script%TAB%<function name>%TAB%{<code>} This is how you call a NPC function inside NPC scriptfunction TestFunction; This is how you call a NPC function inside the item_db script sectioncallfunc( "function",$parameter); Quote
0 fusqueta Posted December 4, 2020 Author Posted December 4, 2020 38 minutes ago, Poring King said: NPC Function Scriptfunction%TAB%script%TAB%<function name>%TAB%{<code>} This is how you call a NPC function inside NPC scriptfunction TestFunction; This is how you call a NPC function inside the item_db script sectioncallfunc( "function",$parameter); But I want to call a function from mobdeath event inside *monster command, not from item_db ty, anyway Quote
0 Poring King Posted December 4, 2020 Posted December 4, 2020 Just now, fusqueta said: But I want to call a function from mobdeath event inside *monster command, not from item_db ty, anyway Already give you answer OnMobDead: function TestFunction; Do this after the function end; Quote
Question
fusqueta
We have a field to call a function on monster death:
<map name>{,<x>{,<y>{,<xs>{,<ys>}}}}%TAB%monster%TAB%<monster name>{,<monster level>}%TAB%<mob id>,<amount>{,<delay1>{,<delay2>{,<event>{,<mob size>{,<mob ai>}}}}}
I want to call a event(or a function) with arguments/parameter like callfunc( "function",$parameter);
Is it possible?
Edited by fusqueta3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.