itsmeyoe Posted March 28, 2020 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 54 Reputation: 1 Joined: 05/19/12 Last Seen: March 17, 2023 Share Posted March 28, 2020 (edited) Please Help. I want to put penalty when player killing the same person 10x -30 #pvppoints, 1 minute mute then warp save point. - script pvppoint -1,{ OnInit: set .killaddpoint, 1; //points to add when kill set .diedeductpoint, 1; //points to deduct when died setarray .points,"#pvppoints","PVP Points";end; OnPCKillEvent: if(!getmapflag(strcharinfo(3),mf_pvp)) end; if(getcharid(3)==killedrid) end; set #pvppoints, #pvppoints+.killaddpoint; dispbottom "You killed "+rid2name(killedrid)+" you gained "+.killaddpoint+" PVP Points."; dispbottom "You got total "+#pvppoints+" Points."; attachrid(killedrid); set #pvppoints, #pvppoints-.diedeductpoint; dispbottom "You are killed by "+rid2name(killerrid)+" you lost "+.diedeductpoint+" PVP Points."; dispbottom "You got total "+#pvppoints+" Points."; end; } Edited March 28, 2020 by itsmeyoe Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted April 10, 2020 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 10, 2020 try - script pvppoint -1,{ OnInit: .same_kill_count = 10; .same_kill_point_penalty = -30; .killaddpoint = 1; //points to add when kill .diedeductpoint = 1; //points to deduct when died end; OnPCKillEvent: if(getcharid(3) == killedrid || !getmapflag(strcharinfo(3),mf_pvp)) end; if (!LAST_KILLEDRID || LAST_KILLEDRID == killedrid) { LAST_KILLEDRID = killedrid; LAST_KILLEDRID_COUNT++; if (LAST_KILLEDRID_COUNT >= .same_kill_count) { addtimer (60 * 1000), strnpcinfo(3)+"::OnWarp"; #pvppoints -= .same_kill_point_penalty; dispbottom "You killed "+rid2name(killedrid)+" "+.same_kill_count+" times, hence you gained "+.same_kill_point_penalty+" PVP Points."; dispbottom "You got total "+#pvppoints+" Points."; end; } } else LAST_KILLEDRID_COUNT = 1; #pvppoints += .killaddpoint; dispbottom "You killed "+rid2name(killedrid)+" you gained "+.killaddpoint+" PVP Points."; dispbottom "You got total "+#pvppoints+" Points."; attachrid(killedrid); #pvppoints -= .diedeductpoint; dispbottom "You are killed by "+rid2name(killerrid)+" you lost "+.diedeductpoint+" PVP Points."; dispbottom "You got total "+#pvppoints+" Points."; end; OnWarp: if (getmapflag(strcharinfo(3),mf_pvp)) { warp "SavePoint", 0, 0; } end; } Quote Link to comment Share on other sites More sharing options...
Question
itsmeyoe
Please Help. I want to put penalty when player killing the same person 10x -30 #pvppoints, 1 minute mute then warp save point.
- script pvppoint -1,{
OnInit:
set .killaddpoint, 1; //points to add when kill
set .diedeductpoint, 1; //points to deduct when died
setarray .points,"#pvppoints","PVP Points";end;
OnPCKillEvent:
if(!getmapflag(strcharinfo(3),mf_pvp)) end;
if(getcharid(3)==killedrid) end;
set #pvppoints, #pvppoints+.killaddpoint;
dispbottom "You killed "+rid2name(killedrid)+" you gained "+.killaddpoint+" PVP Points.";
dispbottom "You got total "+#pvppoints+" Points.";
attachrid(killedrid);
set #pvppoints, #pvppoints-.diedeductpoint;
dispbottom "You are killed by "+rid2name(killerrid)+" you lost "+.diedeductpoint+" PVP Points.";
dispbottom "You got total "+#pvppoints+" Points.";
end;
}
Edited by itsmeyoeLink to comment
Share on other sites
1 answer 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.