Cisqua Posted February 7, 2013 Posted February 7, 2013 anyone can modify this script.. if baselvl 90 below and job class not 2nd job like champion lord knight the npc will not count if kill or die.. so all novice will not counted on this script.. - script job_pvp -1,{ OnInit: // only 1 config lol set .gmnokill, 10; // GMs are not suppose to kill players. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off if ( .gmnokill <= 0 ) set .gmnokill, 101; // prevent bug end; OnPCKillEvent: if ( strcharinfo(3) != "guild_vs3" ) end; else if ( getgmlevel() >= .gmnokill ) end; query_sql "insert delayed into pvp_record values ( now() , "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ getcharid(0, rid2name(killedrid) ) +", '"+ escape_sql(rid2name(killedrid)) +"' )"; if ( $pvprank_lastsaved$ != gettimestr("%Y_%m",15) ) { query_sql "insert delayed into pvpladder_archive select now(), name, kills, deaths, class from pvpladder order by kills desc limit 10"; query_sql "delete from pvpladder"; set $pvprank_lastsaved$, gettimestr("%Y_%m",15); donpcevent "PvP Ladder::OnInit"; } attachrid killedrid; if ( pvprank_lastsaved$ != $pvprank_lastsaved$ ) { set pvprank_lastsaved$, $pvprank_lastsaved$; set @pvpl_deaths, 0; set @pvpl_kills, 0; } set @pvpl_deaths, @pvpl_deaths +1; query_sql "replace delayed into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @pvpl_kills +", "+ @pvpl_deaths +", "+ class +" )"; if ( killerrid == getcharid(3) ) end; // kill himself(like grandcross) doesn't add kills count attachrid killerrid; if ( pvprank_lastsaved$ != $pvprank_lastsaved$ ) { set pvprank_lastsaved$, $pvprank_lastsaved$; set @pvpl_deaths, 0; set @pvpl_kills, 0; } set @pvpl_kills, @pvpl_kills +1; query_sql "replace delayed into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @pvpl_kills +", "+ @pvpl_deaths +", "+ class +" )"; donpcevent "PvP Ladder::OnInit"; end; OnPCLoadMapEvent: if ( strcharinfo(3) != "guild_vs3" || @pvpl_kills || @pvpl_deaths ) end; query_sql "select kills, deaths from pvpladder where char_id = "+ getcharid(0), @pvpl_kills, @pvpl_deaths; end; } Quote
Ajjwidjdneidjenw Posted February 7, 2013 Posted February 7, 2013 - script job_pvp -1,{ OnInit: // only 1 config lol set .gmnokill, 10; // GMs are not suppose to kill players. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off if ( .gmnokill <= 0 ) set .gmnokill, 101; // prevent bug end; OnPCKillEvent: if ( strcharinfo(3) != "guild_vs3" || (Class > 4000 && Class < 4023) || BaseLevel < 90) end; else if ( getgmlevel() >= .gmnokill ) end; query_sql "insert delayed into pvp_record values ( now() , "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ getcharid(0, rid2name(killedrid) ) +", '"+ escape_sql(rid2name(killedrid)) +"' )"; if ( $pvprank_lastsaved$ != gettimestr("%Y_%m",15) ) { query_sql "insert delayed into pvpladder_archive select now(), name, kills, deaths, class from pvpladder order by kills desc limit 10"; query_sql "delete from pvpladder"; set $pvprank_lastsaved$, gettimestr("%Y_%m",15); donpcevent "PvP Ladder::OnInit"; } attachrid killedrid; if ( pvprank_lastsaved$ != $pvprank_lastsaved$ ) { set pvprank_lastsaved$, $pvprank_lastsaved$; set @pvpl_deaths, 0; set @pvpl_kills, 0; } set @pvpl_deaths, @pvpl_deaths +1; query_sql "replace delayed into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @pvpl_kills +", "+ @pvpl_deaths +", "+ class +" )"; if ( killerrid == getcharid(3) ) end; // kill himself(like grandcross) doesn't add kills count attachrid killerrid; if ( pvprank_lastsaved$ != $pvprank_lastsaved$ ) { set pvprank_lastsaved$, $pvprank_lastsaved$; set @pvpl_deaths, 0; set @pvpl_kills, 0; } set @pvpl_kills, @pvpl_kills +1; query_sql "replace delayed into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql(strcharinfo(0)) +"', "+ @pvpl_kills +", "+ @pvpl_deaths +", "+ class +" )"; donpcevent "PvP Ladder::OnInit"; end; OnPCLoadMapEvent: if ( strcharinfo(3) != "guild_vs3" || @pvpl_kills || @pvpl_deaths ) end; query_sql "select kills, deaths from pvpladder where char_id = "+ getcharid(0), @pvpl_kills, @pvpl_deaths; end; } 1 Quote
Question
Cisqua
anyone can modify this script.. if baselvl 90 below and job class not 2nd job like champion lord knight the npc will not count if kill or die..
so all novice will not counted on this script..
2 answers 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.