fusqueta Posted December 3, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 32 Reputation: 0 Joined: 10/26/20 Last Seen: February 13, 2021 Share 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 Link to comment Share on other sites More sharing options...
0 Poring King Posted December 4, 2020 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share 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 Link to comment Share on other sites More sharing options...
0 fusqueta Posted December 4, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 32 Reputation: 0 Joined: 10/26/20 Last Seen: February 13, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
0 Poring King Posted December 4, 2020 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 1016 Reputation: 191 Joined: 11/27/14 Last Seen: February 15 Share 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 Link to comment Share on other sites More sharing options...
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 fusquetaLink to comment
Share on other sites
3 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.