Jump to content

Question

Posted (edited)

Hello rA :)

i would like to request pvp points system that goes like this

the points only works on this map : pvp_y_1-2

if player 1 killed player 2 , player 1 get's 1 cash point from player 2

and disp bottom for player 1 "1 You Gained 1 Cash Points from " Name of Killed " .

disp bottom for player 2 "You Lost 1 Cash Point from " Name of Killer ".

if player 2 doesn't have any cash points then player 1 disp bottom " Sorry no cash points on the " name of killed " .

add emoticon : e_meh for the killer and e_sob for the dead player.

lastly to avoid spamming there will be a delay of 3 mins before 1 player kills the same player for the cash point .

Thanks ,

SlashGeeGee

Edited by SlashGeeGee

9 answers to this question

Recommended Posts

Posted

- 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;
}

- script PVPPOINTS -1,{
OnPCKillEvent:
getmapxy.@map$,.@x,.@y,0;
if(getcharid(3)==killedrid) end;
if(.@map$ != "pvp_y_1-2") end;

set .@player1, getcharid(3);
set .@player2, killedrid;

attachrid(.@player2);
set .@player2points, #CASHPOINTS;
if(.@player2points) {
 set #CASHPOINTS, #CASHPOINTS - 1;
 dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid);
}
 emotion e_sob,1;

attachrid(.@player1);
if(.@player2points) {
 set #CASHPOINTS, #CASHPOINTS + 1;
 dispbottom "You Gained 1 Cash Points from "+rid2name(killedrid);
}
else
 dispbottom "Sorry no cash points on the "+rid2name(killedrid);
 emotion e_meh,1;
end;
}

Thanks Guys :D

tested it and works fine :)

DONE ! /no1

  • Upvote 1
  • 0
Posted
On 5/6/2012 at 1:52 PM, Lilith said:

- 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;
}
 

 

wt if map guild_vs3 & pvp_y_1-2??? how to create 2 map?? :(

  • 0
Posted
18 minutes ago, ShahLegends said:

wt if map guild_vs3 & pvp_y_1-2??? how to create 2 map?? :(

 

if( strcharinfo(3) == "mapname" || strcharinfo(3) == "mapname" || strcharinfo(3) == "mapname" )

Posted
- script PVPPOINTS -1,{
OnPCKillEvent:
getmapxy.@map$,.@x,.@y,0;
if(getcharid(3)==killedrid) end;
if(.@map$ != "pvp_y_1-2") end;

set .@player1, getcharid(3);
set .@player2, killedrid;

attachrid(.@player2);
set .@player2points, #CASHPOINTS;
if(.@player2points) {
 set #CASHPOINTS, #CASHPOINTS - 1;
 dispbottom "You Lost 1 Cash Point from "+rid2name(killerrid);
}
 emotion e_sob,1;

attachrid(.@player1);
if(.@player2points) {
 set #CASHPOINTS, #CASHPOINTS + 1;
 dispbottom "You Gained 1 Cash Points from "+rid2name(killedrid);
}
else
 dispbottom "Sorry no cash points on the "+rid2name(killedrid);
 emotion e_meh,1;
end;
}

Posted
- 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;
}

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