Jump to content
  • 0

PVP SYSTEM CAN YOU EDIT THIS ONE


Question

Posted

Instead of cash player will receive GOLD and will decrease gold when killed


- script PvP_System -1,{
OnPCKillEvent:
if(strcharinfo(3) != "pvp_y_1-2") end;
if(@LastKilled == killedrid) end;
set .@Killer,getcharid(3);
set .@Killed,killedrid;
detachrid;
if(attachrid(.@Killed)){
if(#CASHPOINTS){
 dispbottom "You Lost 1 Cash Point from "+rid2name(.@Killer);
 set #CASHPOINTS,#CASHPOINTS-1;
 emotion e_sob,1;
 detachrid;
 if(attachrid(.@Killer)){
  dispbottom "You Gained 1 Cash Points from "+rid2name(.@Killed);
  emotion e_meh,1;
  set #CASHPOINTS,#CASHPOINTS+1;
  set @LastKilled,.@Killed;
  attachnpctimer;
  initnpctimer;
 }
} else {
 emotion e_sob,1;
 detachrid;
 if(attachrid(.@Killer)){
  dispbottom "Sorry no cash points on the "+rid2name(.@Killed);
  emotion e_meh,1;
  set @LastKilled,.@Killed;
  attachnpctimer;
  initnpctimer;
 }
}
}
end;
OnTimer180000:
set @LastKilled,0;
stopnpctimer;
detachnpctimer;
end;
}

2 answers to this question

Recommended Posts

Posted

Try This

- script PvP_System -1,{
OnPCKillEvent:
if(strcharinfo(3) != "pvp_y_1-2") end;
if(@LastKilled == killedrid) end;
set .@Killer,getcharid(3);
set .@Killed,killedrid;
detachrid;
if(attachrid(.@Killed)){
if(countitem(969)){
 dispbottom "You Lost 1 Gold from "+rid2name(.@Killer);
 delitem 969,1;
 emotion e_sob,1;
 detachrid;
 if(attachrid(.@Killer)){
  dispbottom "You Gained 1 gold from "+rid2name(.@Killed);
  emotion e_meh,1;
  getitem 969,1;
  set @LastKilled,.@Killed;
  attachnpctimer;
  initnpctimer;
 }
} else {
 emotion e_sob,1;
 detachrid;
 if(attachrid(.@Killer)){
  dispbottom "Sorry no gold on the "+rid2name(.@Killed);
  emotion e_meh,1;
  set @LastKilled,.@Killed;
  attachnpctimer;
  initnpctimer;
 }
}
}
end;
OnTimer180000:
set @LastKilled,0;
stopnpctimer;
detachnpctimer;
end;
}

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