Jump to content
  • 0

required lvl and class


Cisqua

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

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

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

thanks!

Link to comment
Share on other sites

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.

×
×
  • Create New...