c2greentea Posted August 31, 2014 Group: Members Topic Count: 68 Topics Per Day: 0.02 Content Count: 173 Reputation: 0 Joined: 06/07/14 Last Seen: December 17, 2014 Share Posted August 31, 2014 My PVP script is the one below. How am I able to add variable "streaks" in it? Both for pvp stats and dispbottom on OnPCKillEvent? /* alter table `char` add `kills` int(11) unsigned not null default 0 after unban_time, add `deaths` int(11) unsigned not null default 0 after `kills`; */ prontera,161,187,5 script PVP Master 86,{ mes "[PvP Warper]"; if ( agitcheck() || agitcheck2() ) { mes "Sorry, PVP Rooms are Locked During WOE."; close; } mes "Which arena do you want to go to?"; switch ( select ( "View PvP stats of my Char", "PVP Square ["+ getmapusers("cell_game") +"/100]", "PVP NoPotion ["+ getmapusers("cell_game2") +"/100]", "Non Donator PVP ["+ getmapusers("cell_game3") +"/100]", "GvG Arena [^FF0000" + getmapusers("guild_vs3") + "^000000/100]" ) ) { default: // VIEW STATUS mes "Your PvP stats are:"; query_sql "select kills, deaths from `char` where char_id = "+ getcharid(0), .@kills, .@deaths; mes "^009500 Kills: " + .@kills; mes "^FF0000 Deaths: " + .@deaths; close; case 2: // PVP Square if (getmapusers("cell_game") > 99) callsub S_full; warp "cell_game",0,0; end; case 3: // PVP NoPotion if (getmapusers("cell_game2") > 99) callsub S_full; warp "cell_game2",0,0; end; case 4: // Non Donator PVP if (getmapusers("cell_game3") > 99) callsub S_full; warp "cell_game3",0,0; end; case 5: // GVG if ( !getcharid(2) ) { mes " "; mes "Please join a guild before entering..."; close; } if (getmapusers("guild_vs3") > 99) callsub S_full; warp "guild_vs3",0,0; end; } close; S_full: mes " "; mes "I'm sorry, this arena is full. Please try again later..."; close; OnInit: waitingroom "Special PVP/GVG",0; end; //====================================== // OnPCKillEvent //====================================== OnPCKillEvent: .@map$ = strcharinfo(3); .@killer$ = strcharinfo(0); .@killed$ = rid2name( killedrid ); // if ( killedrid == getcharid(3) ) end; // suicide seems to be counted in this script ... if ( getmapflag( .@map$, mf_gvg ) || getmapflag( .@map$, mf_gvg_castle ) || getmapflag( .@map$, mf_pvp ) ) { // on PVP/GVG maps, and during WoE // getmapflag( .@map$, mf_battleground ) // <-- left this one out ? XD query_sql "update `char` set kills = kills +1 where char_id = "+ getcharid(0); query_sql "select kills from `char` where char_id = "+ getcharid(0), .@kills; dispbottom "You have killed "+ .@killed$ +". [Total Kills = "+ .@kills +"]"; attachrid killedrid; query_sql "update `char` set deaths = deaths +1 where char_id = "+ getcharid(0); query_sql "select deaths from `char` where char_id = "+ getcharid(0), .@deaths; dispbottom "You have been killed by "+ .@killer$ +". [Total Deaths = "+ .@deaths +"]"; } end; } Quote Link to comment Share on other sites More sharing options...
Question
c2greentea
My PVP script is the one below. How am I able to add variable "streaks" in it? Both for pvp stats and dispbottom on OnPCKillEvent?
Link to comment
Share on other sites
0 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.