luisdgs19 Posted January 8, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 30 Reputation: 2 Joined: 12/26/12 Last Seen: July 28, 2014 Share Posted January 8, 2013 I'm trying to make a script that each time you kill the monster with the id 1769 on the map aev_fild01 the server adds the amount of kills to a character variable.I tried doing it this way. -<tab>script<tab>-1,{ OnNPCKillEvent: <tab>doSomething; } But it doesn't work, could you guys help me Quote Link to comment Share on other sites More sharing options...
Euphy Posted January 8, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted January 8, 2013 Basic_Scripting - script #test -1,{ OnNPCKillEvent: if (killedrid == 1769 && strcharinfo(3) == "aev_fild01") set Var, Var+1; end; } Best to just spawn the monsters with an event label, though, as OnNPCKillEvent will trigger for all mob kills. Quote Link to comment Share on other sites More sharing options...
Magnetix Posted January 8, 2013 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 446 Reputation: 30 Joined: 12/08/11 Last Seen: October 13, 2024 Share Posted January 8, 2013 (edited) you can see an example here Edit:oh... it's the same with Euphy's.. Edited January 8, 2013 by Magnetix Quote Link to comment Share on other sites More sharing options...
luisdgs19 Posted January 8, 2013 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 30 Reputation: 2 Joined: 12/26/12 Last Seen: July 28, 2014 Author Share Posted January 8, 2013 Basic_Scripting - script #test -1,{ OnNPCKillEvent: if (killedrid == 1769 && strcharinfo(3) == "aev_fild01") set Var, Var+1; end; } Best to just spawn the monsters with an event label, though, as OnNPCKillEvent will trigger for all mob kills. How do i make a mob generate an event on killed ?? Quote Link to comment Share on other sites More sharing options...
Euphy Posted January 8, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted January 8, 2013 ** Create a permanent monster spawn:<map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%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. Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 8, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 8, 2013 (edited) https://rathena.svn....pt_commands.txt (temporary) *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; or (permanent) <map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>} Example: splendide,237,143,5, script mlkjhg 456,{ monster "splendide",237,143,"--ja--",1002,1,"mlkjhg::OnMyMobDead"; end; OnMyMobDead: dispbottom "Quack quack goes a duck!"; end; } Edit : >.< Edited January 8, 2013 by Capuche Quote Link to comment Share on other sites More sharing options...
Question
luisdgs19
I'm trying to make a script that each time you kill the monster with the id 1769 on the map aev_fild01 the server adds the amount of kills to a character variable.I tried doing it this way.
But it doesn't work, could you guys help me
Link to comment
Share on other sites
5 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.