Jump to content
  • 0

Kill Counts Script NEED HELP


Question

Posted

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

5 answers to this question

Recommended Posts

Posted

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.

Posted

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 ??

Posted
** 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.

Posted (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 by Capuche

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...