Erba Posted January 26, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Share Posted January 26, 2014 (edited) Hello, i am using this kind of PVP Warper with PVP Ladder Script, the script is originally created by Sir Brian this script doesnt have any errors but it doesnt add kills or deaths when a player kills or dies inside a pvp or gvg mapflag. i am using rathena 16797.. Help is greatly appreciated thank you! prontera,161,187,5 script PVP Master 86,{ mes "[PvP Warper]"; if(.locked){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]")) { case 1: // VIEW STATUS mes "Your PvP stats are:"; query_sql ("SELECT `char`.`kills` FROM `char` WHERE `char`.`char_id` = "+ getcharid(0), .@kills); query_sql ("SELECT `char`.`deaths` FROM `char` WHERE `char`.`char_id` = "+ getcharid(0), .@deaths); mes "^009500 Kills: " + .@kills; mes "^FF0000 Deaths: " + .@deaths; break; default: break; 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 (getmapusers("guild_vs3") > 99) callsub S_full; if (!getcharid(2)) { mes " "; mes "Please join a guild before entering..."; close; } 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: getmapxy(.@map$,.@x,.@y, 0); set .@killer$, strcharinfo(0); if( getmapflag(.@map$,mf_gvg) ) { // on GVG maps, and during WoE 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 "+ rid2name(killedrid) +". [Total Kills = "+ .@kills +"]"; if (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 +"]"; } } else if( getmapflag(.@map$,mf_pvp) ) { // on PVP and Battleground maps dispbottom "You have killed "+ rid2name(killedrid) +"."; if (attachrid(killedrid)) { dispbottom "You have been killed by "+ .@killer$ +"."; } } end; Edited January 26, 2014 by Erba Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 27, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 27, 2014 this script is expecting the `char` table already has `kills` and `deaths` column make sure that you have run 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`;also, your getmapflag mf_gvg inside OnPCKillEvent seems to be doing correctlybut mf_pvp doesn't add the query_sql stuffs ... Quote Link to comment Share on other sites More sharing options...
Erba Posted January 27, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Author Share Posted January 27, 2014 this script is expecting the `char` table already has `kills` and `deaths` column make sure that you have run 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`;also, your getmapflag mf_gvg inside OnPCKillEvent seems to be doing correctlybut mf_pvp doesn't add the query_sql stuffs ... i successfully added those sql queries in my phpmyadmin database mam annie but still the problem is that it doesnt add a Kills or Deaths upon pvping in PVP or GVG arenas Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted January 27, 2014 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted January 27, 2014 spoon feed [paste=8fxz3irmld9] 1 Quote Link to comment Share on other sites More sharing options...
Erba Posted January 28, 2014 Group: Members Topic Count: 84 Topics Per Day: 0.02 Content Count: 550 Reputation: 9 Joined: 11/06/12 Last Seen: August 14, 2014 Author Share Posted January 28, 2014 sorry im not that good in making scripts specially when dealing with sql queries , and thankyou for spoon feeding me mam, thank you again ill try this later Quote Link to comment Share on other sites More sharing options...
Question
Erba
Hello, i am using this kind of PVP Warper with PVP Ladder Script, the script is originally created by Sir Brian
this script doesnt have any errors but it doesnt add kills or deaths when a player kills or dies inside a pvp or gvg mapflag.
i am using rathena 16797..
Help is greatly appreciated thank you!
Edited by ErbaLink to comment
Share on other sites
4 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.