Jump to content
  • 0

Receive items when killing player


Question

Posted

I need a script that gives items whenever a player kills another player
1 kill = 1 item
3 kills = 3 items
5 kills = 5 items

I am using this script

-	script	PCKill	-1,{
OnPCKillEvent:
   if (killedrid == getcharid(3)) end;
   for(set .@i,0; .@i<getarraysize(.maps$); set .@i,.@i+1)
       if (strcharinfo(3)==.Maps$[.@i]) {
           if (.NoFarm) {
               if (killedrid == @last_kill) end;
               set @last_kill, killedrid; }
           if (.Item) getitem .Item, 1;
           if (.Cash$ != "") {
               setd .Cash$, getd(.Cash$)+1;
               dispbottom "Gained a kill point! Total: "+getd(.Cash$); }
           break; }
   end;

OnInit:
   setarray .Maps$[0],"prontera";
   set .NoFarm,0;            // End script for repeated kills? (1:yes / 0:no)
   set .Item, 607;            // 0 to disable
   set .Cash$, "";    // "" to disable
   end;
}

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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