itsmeyoe Posted March 28, 2020 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
0 Emistry Posted April 10, 2020 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
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 itsmeyoe1 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.