kerbiii 5 Posted December 3, 2013 (edited) [cbox]- script pvpbet -1,{ OnPCKillEvent:if (strcharinfo(3) != "guild_vs2-2") end;if (killedrid==getcharid(0)) end;if (lastkilled==killedrid){set lkcount,lkcount+1;if (lkcount>=5){dispbottom "You have Lose";end;}else{getitem 7179,1;dispbottom "You have gained 1 money";end;}}else{set lastkilled,killedrid;set lkcount,1;getitem 7179,1;dispbottom "You have gained 1 money";end;}OnPCDieEvent:if (strcharinfo(3) != "guild_vs2-2") end;dispbottom "You have Lose";warp "Invek",146,164;end;}[/cbox] the crash happens when... scenario: 3 players consist of 1 shadow chaser, 1 killer, 1 victim when shadow chaser uses shadow formation to victim and the killer kill them both by using AoE skills the server crash maybe because the script dont knows who to give the prize whether the SC or the killer. and please help add announcement Edited December 3, 2013 by kerbiii Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted December 3, 2013 I haven't tested this, but it would seem that the warp command issued with the OnPCDieEvent label. I've added a sleep2 with a 100ms pause and organised your code a bit: - script pvpbet -1,{ OnPCKillEvent: if (strcharinfo(3) != "guild_vs2-2" || killedrid == getcharid(0)) { end; } if (lastkilled == killedrid){ set lkcount,lkcount+1; if (lkcount >= 5){ dispbottom "You have Lose"; } else { getitem 7179,1; dispbottom "You have gained 1 money"; } } else { set lastkilled,killedrid; set lkcount, 1; getitem 7179, 1; dispbottom "You have gained 1 money"; } end; OnPCDieEvent: if (strcharinfo(3) != "guild_vs2-2") { end; } dispbottom "You have Lose"; sleep2 100; warp "Invek", 146, 164; end; } In the future, I recommend that you use tabs to separate your code a bit. It's difficult to read otherwise. 1 kerbiii reacted to this Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted December 3, 2013 If this is actually in your script, it's no surprise that you're getting errors from loading it: </span></p><p> Quote Share this post Link to post Share on other sites
0 kerbiii 5 Posted December 3, 2013 If this is actually in your script, it's no surprise that you're getting errors from loading it: </span></p><p> its not on my script, but i cnt remove it when pasting it on cbox Quote Share this post Link to post Share on other sites
[cbox]- script pvpbet -1,{
OnPCKillEvent:
if (strcharinfo(3) != "guild_vs2-2") end;
if (killedrid==getcharid(0)) end;
if (lastkilled==killedrid){
set lkcount,lkcount+1;
if (lkcount>=5){
dispbottom "You have Lose";
end;
}
else{
getitem 7179,1;
dispbottom "You have gained 1 money";
end;
}
}
else{
set lastkilled,killedrid;
set lkcount,1;
getitem 7179,1;
dispbottom "You have gained 1 money";
end;
}
OnPCDieEvent:
if (strcharinfo(3) != "guild_vs2-2") end;
dispbottom "You have Lose";
warp "Invek",146,164;
end;
}[/cbox]
the crash happens when...
scenario:
3 players consist of 1 shadow chaser, 1 killer, 1 victim
when shadow chaser uses shadow formation to victim and the killer kill them both by using AoE skills the server crash
maybe because the script dont knows who to give the prize whether the SC or the killer.
and please help add announcement
Edited by kerbiiiShare this post
Link to post
Share on other sites