Jump to content

Louis T Steinhil

Members
  • Content Count

    138
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Louis T Steinhil

  1. Can't seem to find older versions of vs. Any compiler you know for windows?
  2. oh sorry i forgot to mention, I'm using latest 3ceam on Visual Studios 2017
  3. Does anyone know how to compile in the latest versions?
  4. Sir Nihad I just noticed the item_db.conf you shared, it ends with: { Id: 18872 AegisName: "Snake_H
  5. Hello my client (2014-10-22b) crashes when i change gender to female of any job. How to fix this? i already patched custom job.
  6. Since @mail is not yet working on 2015 , is there anyway to get the item from sendmail (https://rathena.org/...-scriptcommand/) source? Like @getmail custom command which you'll get the item / zennies immediately?
  7. still hoping for a surprise update of something.
  8. any way to fix when doing crit the animation of skill are gone? And can i exclude asura from magic critical strike?
  9. Anyone can help me with this? Or any of it is possible?
  10. Client crashes when you turn on autoattack then @warp to any map. I'm using 2015-11-04
  11. OH Cool I'll take a look at it htanks evil <3
  12. Is there a script that attaches bonus stats(example: bonus Str + 1 on someone who killed an Mvp) on characters?
  13. It will just show the rates you have when you login. I'll attach an image later. That's what is shown when you login. It's an announcement, I was able to just screenshot the one in the chat bar. i don't think it is working, i tried it but no exp bonus not like field manual.
  14. I'll try it again on the new git. You're using the latest revision?
  15. yes i created the table. It just doesn't throw the values to the database server. the kills deaths and the ratings.
  16. Hello how can I make it restart to day 1 after 1 month passed? And also make it per i.p. Example of my daily reward:
  17. There's a post in rathena alike but it's not compatible in hercules, can anyone help? // -------------- PVP RATING (SQL ONLY)! ----------------- // // ---- by Kubix. /* tables: CREATE TABLE `pk_rating` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `char_id` varchar(30) NOT NULL, `kill_count` int(11) NOT NULL, `die_count` int(11) NOT NULL, `score` int(11) NOT NULL, `league` varchar(30) NOT NULL, PRIMARY KEY (`id`) ); */ - script PvP_FunctionS -1,{ OnPCKillEvent: getmapxy .@charmap$,.@x,.@y,0; if(strcharinfo(3) == "prontera") end; for(set .@i,0; .@i <=getarraysize($Rating_Location$); set .@i,.@i+1){ if(.@charmap$ == $Rating_Location$[.@i]){ callfunc "Announcing"; // announce function callfunc "PKGetRating"; // rating function end; } } end; OnMKReset: set @MultiKIll, 0; end; } - script PvP_FunctionSS -1,{ OnPCDieEvent: if(strcharinfo(3) == "prontera") end; if((killerrid == getcharid(0)) || (killerrid < 150000)) end; getmapxy .@charmap$,.@x,.@y,0; for(set .@i,0; .@i <=getarraysize($Rating_Location$); set .@i,.@i+1){ if(.@charmap$ == $Rating_Location$[.@i]){ if((killerrid == getcharid(0)) || (killerrid < 150000)) end; sleep2 500; deltimer "PvP_FunctionS::OnMKReset"; if(@MultiKill > 0)set @MultiKill, 0; if(@KillingSpree > 0)set @KillingSpree, 0; if(@PKKills >0)set @PKKills, 0; callfunc "PKTakeRating"; // end; } } end; } - script PvP_LogoutEvent -1,{ OnPCLogoutEvent: if(strcharinfo(3) == "prontera") end; getmapxy .@charmap$,.@x,.@y,0; for(set .@i,0; .@i <=getarraysize($Rating_Location$); set .@i,.@i+1){ if(.@charmap$ == $Rating_Location$[.@i]){ if(@MultiKill > 0)set @MultiKill, 0; if(@KillingSpree > 0)set @KillingSpree, 0; if(@PKKills >0)set @PKKills, 0; deltimer "PvP_FunctionS::OnMKReset"; end; } } end; } function script PKGetRating { set PKRatingF, 0; set @PKKills, @PKKills + 1; set PKRatingF, PKRatingF + 2 * (rand(2,3) + @PCKills); set MPKAcc, MPKAcc + 2 * (rand(2,3) + @PCKills); // rating set PCKills, PCKills + 1; // kills callfunc "PKLeagues"; dispbottom "[PK Manager]: +[ "+PKRatingF+" ] rating."; query_sql "UPDATE `pk_rating` SET `kill_count` = '"+PCKills+"', `score` = '"+MPKAcc+"' WHERE `char_id` = '"+strcharinfo(0)+"'"; end; } function script PKTakeRating { set PKRatingF, 0; // set @PKDies, @PKDies + 1; // set PKRatingF, PKRatingF - 2 * (rand(2,3) + @PCDies); set MPKAcc, MPKAcc - 2 * (rand(2,3) + @PCDies); // rating set PCDies, PCDies + 1; // deaths callfunc "PKLeagues"; dispbottom "[PK Manager]: [ "+PKRatingF+" ] rating."; query_sql "UPDATE `pk_rating` SET `die_count` = '"+PCDies+"', `score` = '"+MPKAcc+"' WHERE `char_id` = '"+strcharinfo(0)+"'"; end; } // PK Top prontera,130,191,6 script PvP Rating 857,{ mes "[PK Manager]"; mes "Can I help you??"; mes "I can show players with rating more than 0"; mes "Your Rating : " + MPKAcc; for(@i = 0; @i < getarraysize($LeagueName$); @i ++){ if($LeagueName$[@i] != "") { if(MPKAcc > $MinRating[@i] && MPKAcc < $MaxRating[@i]) cutin $CutinName$[@i], 2; } } next; if(select("> PK TOP:> Cancel") == 2) { close2; cutin "", 255; end; } query_sql "SELECT `char_id`,`kill_count`,`die_count`,`score`,`league` FROM `pk_rating` ORDER BY `score` DESC LIMIT 10", .@cname$, .@kcount, .@dcount, .@rscore, .@leaguel$; mes "Name/Kills/Deaths/Score/Division"; for(set .i, 0; .i < 10; set .i, .i + 1) { if(.@cname$[.i] != "" && .@rscore[.i] > 0) { mes "" + (.i+1) + ".^FF0000" + .@cname$[.i] + "^000000/" + .@kcount[.i] + "/" + .@dcount[.i] + "/^6699DD" + .@rscore[.i] + "^000000/^0000FF" + .@leaguel$[.i] + "^000000."; } else { mes (.i+1)+".Empty"; } } close2; cutin "", 255; end; OnInit: // === Settings set $FirstBlood, 0; set $Sound, 0; set $Announce, 1; setarray $KS_Ann$[0],"IS ON A KILLING SPREE!!!","IS ON A RAMPAGE!!!","IS UNSTOPPABLE!!!","IS DOMINATING!!!","IS G-G-G-GODLIKE!!!","IS LEGENDARY!!!"; setarray $MK_Ann$[0],"HAS SCORED A DOUBLE KILL!!!","HAS SCORED A TRIPLE KILL!!!","HAS SCORED A QUADRA KILL!!!","HAS SCORED A PENTA KILL!!!!"; setarray $Rating_Location$[0], "pvp_n_5-5"; // add your locations setarray $LeagueName$[0], "Bronze","Silver","Gold","Platinum","Diamond"; // add you divisions setarray $MinRating[0], 0, 1300, 1600, 1900, 2200; // min. rating for division setarray $MaxRating[0], 1299, 1599, 1899, 2199, 100000; // max. rating for division setarray $CutinName$[0], "1-1","2-1","3-1","4-1","5-1"; // cutin names for divisions // === end of settings while(1) { query_sql "SELECT `char_id`,`score` FROM `pk_rating` ORDER BY `score` DESC LIMIT 1", .@char_id$, .@score; if(.@char_id$ == "" || .@score <= 0) waitingroom "[ PvP Rating ]", 0; else waitingroom "[PK]: Best: " + .@char_id$ + " ["+.@score+"] ", 0; sleep 60000; delwaitingroom; } } function script Announcing { if(!$FirstBlood){ set $FirstBlood,1; if($Announce) announce strcharinfo(0) + " HAS DRAW A FIRST BLOOD!",bc_map|bc_red; if($Sound){ soundeffectall "firstblood.wav",strcharinfo(3); } } set @KillingSpree, @KillingSpree +1; set @MultiKill, @MultiKill +1; deltimer "PvP_FunctionS::OnMKReset"; addtimer 10000, "PvP_FunctionS::OnMKReset"; if($Announce){ switch(@KillingSpree){ case 0: case 1: case 2: break; case 3: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 4: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 5: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 6: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 7: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; } } if(@KillingSpree >= 3 && @KillingSpree <= 7){ if($Sound) soundeffectall "killingspree"+@KillingSpree+".wav", 0, strcharinfo(3); } if($Announce){ switch(@MultiKill){ case 0: case 1: break; case 2: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; case 3: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; case 4: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; case 5: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; } } sleep2 1500; if(@MultiKill >= 2 && @MultiKill <= 5) { if($Sound) soundeffectall "multikill"+@MultiKill+".wav", 0, strcharinfo(3); } if(@KillingSpree < 3){ if($Announce) mapannounce strcharinfo(3),strcharinfo(0)+" HAS SLAIN A "+rid2name(killedrid),bc_all; } if($Sound){ soundeffectall "slain.wav",0,strcharinfo(3); } if(@KillingSpree >= 7){ if($Announce) mapannounce strcharinfo(3),strcharinfo(0)+" IS LEGENDARY!!!",bc_all; if($Sound){ soundeffectall "legendary.wav",0,strcharinfo(3); } } if(@MultiKill > 5) set @MultiKill, 0; return; } // leagues function script PKLeagues { query_sql "SELECT `league` FROM `pk_rating` WHERE `char_id` = '"+strcharinfo(0)+"'", .@league$; for(@i = 0; @i < getarraysize($LeagueName$); @i ++){ if($LeagueName$[@i] != "") { if(MPKAcc > $MinRating[@i] && MPKAcc < $MaxRating[@i] && .@league$ != $LeagueName$[@i]){ if(.@league$ == "Diamond") return; query_sql "UPDATE `pk_rating` SET `league` = '"+$LeagueName$[@i]+"' WHERE `char_id` = '"+strcharinfo(0)+"'"; dispbottom "[PvP Info] : Your new Division : " + $LeagueName$[@i] + " Division."; cutin "1", 4; sleep2 2000; cutin $CutinName$[@i], 4; sleep2 3000; cutin "", 255; } } } return; } https://rathena.org/board/topic/101681-sql-pvp-rating-php/
  18. Can anyone help to make this one compatible with hercules? It doesn't seem to update on mysql. (Script is not mine.) // -------------- PVP RATING (SQL ONLY)! ----------------- // // ---- by Kubix. /* tables: CREATE TABLE `pk_rating` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `char_id` varchar(30) NOT NULL, `kill_count` int(11) NOT NULL, `die_count` int(11) NOT NULL, `score` int(11) NOT NULL, `league` varchar(30) NOT NULL, PRIMARY KEY (`id`) ); */ - script PvP_FunctionS -1,{ // Create Database Table: OnPCKillEvent: getmapxy .@charmap$,.@x,.@y,0; if(strcharinfo(3) == "prontera") end; for(set .@i,0; .@i <=getarraysize($Rating_Location$); set .@i,.@i+1){ if(.@charmap$ == $Rating_Location$[.@i]){ callfunc "Announcing"; // announce function callfunc "PKGetRating"; // rating function end; } } end; OnMKReset: set @MultiKill, 0; end; } - script PvP_FunctionSS -1,{ OnPCDieEvent: if(strcharinfo(3) == "prontera") end; if((killerrid == getcharid(0)) || (killerrid < 150000)) end; getmapxy .@charmap$,.@x,.@y,0; for(set .@i,0; .@i <=getarraysize($Rating_Location$); set .@i,.@i+1){ if(.@charmap$ == $Rating_Location$[.@i]){ if((killerrid == getcharid(0)) || (killerrid < 150000)) end; sleep2 500; deltimer "PvP_FunctionS::OnMKReset"; if(@MultiKill > 0)set @MultiKill, 0; if(@KillingSpree > 0)set @KillingSpree, 0; if(@PKKills >0)set @PKKills, 0; callfunc "PKTakeRating"; // end; } } end; } - script PvP_LogoutEvent -1,{ OnPCLogoutEvent: if(strcharinfo(3) == "prontera") end; getmapxy .@charmap$,.@x,.@y,0; for(set .@i,0; .@i <=getarraysize($Rating_Location$); set .@i,.@i+1){ if(.@charmap$ == $Rating_Location$[.@i]){ if(@MultiKill > 0)set @MultiKill, 0; if(@KillingSpree > 0)set @KillingSpree, 0; if(@PKKills >0)set @PKKills, 0; deltimer "PvP_FunctionS::OnMKReset"; end; } } end; } function script PKGetRating { set PKRatingF, 0; set @PKKills, @PKKills + 1; set PKRatingF, PKRatingF + 2 * (rand(2,3) + @PCKills); set MPKAcc, MPKAcc + 2 * (rand(2,3) + @PCKills); // rating set PCKills, PCKills + 1; // kills callfunc "PKLeagues"; dispbottom "[PK Manager]: +[ "+PKRatingF+" ] rating."; query_sql "UPDATE `pk_rating` SET `kill_count` = '"+PCKills+"', `score` = '"+MPKAcc+"' WHERE `char_id` = '"+strcharinfo(0)+"'"; end; } function script PKTakeRating { set PKRatingF, 0; // set @PKDies, @PKDies + 1; // set PKRatingF, PKRatingF - 2 * (rand(2,3) + @PCDies); set MPKAcc, MPKAcc - 2 * (rand(2,3) + @PCDies); // rating set PCDies, PCDies + 1; // deaths callfunc "PKLeagues"; dispbottom "[PK Manager]: [ "+PKRatingF+" ] rating."; query_sql "UPDATE `pk_rating` SET `die_count` = '"+PCDies+"', `score` = '"+MPKAcc+"' WHERE `char_id` = '"+strcharinfo(0)+"'"; end; } // PK Top prontera,130,191,6 script PvP Rating 4_BOARD3,{ mes "[PK Manager]"; mes "Can I help you??"; mes "I can show players with rating more than 0"; mes "Your Rating : " + MPKAcc; for(@i = 0; @i < getarraysize($LeagueName$); @i ++){ if($LeagueName$[@i] != "") { if(MPKAcc > $MinRating[@i] && MPKAcc < $MaxRating[@i]) cutin $CutinName$[@i], 2; } } next; if(select("> PK TOP:> Cancel") == 2) { close2; cutin "", 255; end; } query_sql "SELECT `char_id`,`kill_count`,`die_count`,`score`,`league` FROM `pk_rating` ORDER BY `score` DESC LIMIT 10", .@cname$, .@kcount, .@dcount, .@rscore, .@leaguel$; mes "Name/Kills/Deaths/Score/Division"; for(set .i, 0; .i < 10; set .i, .i + 1) { if(.@cname$[.i] != "" && .@rscore[.i] > 0) { mes "" + (.i+1) + ".^FF0000" + .@cname$[.i] + "^000000/" + .@kcount[.i] + "/" + .@dcount[.i] + "/^6699DD" + .@rscore[.i] + "^000000/^0000FF" + .@leaguel$[.i] + "^000000."; } else { mes (.i+1)+".Empty"; } } close2; cutin "", 255; end; OnInit: // === Settings set $FirstBlood, 0; set $Sound, 0; set $Announce, 1; setarray $KS_Ann$[0],"is on a killngspree!","is on a rampage!","is unstoppable!!!","is dominating!","is G-G-G-Godlike!","IS LEGENDARY!"; setarray $MK_Ann$[0],"HAS SCORED A DOUBLE KILL!","HAS SCORED A TRIPLE KILL!","HAS SCORED AN ULTRA KILL!","HAS SCORED A RAMPAGE!"; setarray $Rating_Location$[0], "pvp_n_5-5","prontera"; // add your locations setarray $LeagueName$[0], "Bronze","Silver","Gold","Platinum","Diamond"; // add you divisions setarray $MinRating[0], 0, 1300, 1600, 1900, 2200; // min. rating for division setarray $MaxRating[0], 1299, 1599, 1899, 2199, 100000; // max. rating for division setarray $CutinName$[0], "1-1","2-1","3-1","4-1","5-1"; // cutin names for divisions // === end of settings while(1) { query_sql "SELECT `char_id`,`score` FROM `pk_rating` ORDER BY `score` DESC LIMIT 1", .@char_id$, .@score; if(.@char_id$ == "" || .@score <= 0) waitingroom "[ PvP Rating ]", 0; else waitingroom "[PK]: Best: " + .@char_id$ + " ["+.@score+"] ", 0; sleep 60000; delwaitingroom; } } function script Announcing { if(!$FirstBlood){ set $FirstBlood,1; if($Announce) announce strcharinfo(0) + " has draw a first blood!",bc_map|bc_red; //if($Sound){ //soundeffectall "firstblood.wav",strcharinfo(3); //} } set @KillingSpree, @KillingSpree +1; set @MultiKill, @MultiKill +1; deltimer "PvP_FunctionS::OnMKReset"; addtimer 10000, "PvP_FunctionS::OnMKReset"; if($Announce){ switch(@KillingSpree){ case 0: case 1: case 2: break; case 3: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 4: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 5: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 6: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; case 7: mapannounce strcharinfo(3),strcharinfo(0)+" " +$KS_Ann$[@KillingSpree -3],bc_all; break; } } if(@KillingSpree >= 3 && @KillingSpree <= 7){ //if($Sound) soundeffectall "killingspree"+@KillingSpree+".wav", 0, strcharinfo(3); } if($Announce){ switch(@MultiKill){ case 0: case 1: break; case 2: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; case 3: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; case 4: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; case 5: mapannounce strcharinfo(3),strcharinfo(0)+" " +$MK_Ann$[@MultiKill -2],bc_all; break; } } sleep2 1500; if(@MultiKill >= 2 && @MultiKill <= 5) { //if($Sound) soundeffectall "MultiKill"+@MultiKill+".wav", 0, strcharinfo(3); } if(@KillingSpree < 3){ if($Announce) mapannounce strcharinfo(3),strcharinfo(0)+" HAS SLAIN A "+rid2name(killedrid),bc_all; } //if($Sound){ //soundeffectall "slain.wav",0,strcharinfo(3); //} if(@KillingSpree >= 7){ if($Announce) mapannounce strcharinfo(3),strcharinfo(0)+" IS LEGENDARY!!!",bc_all; //if($Sound){ //soundeffectall "legendary.wav",0,strcharinfo(3); //} } if(@MultiKill > 5) set @MultiKill, 0; return; } // leagues function script PKLeagues { query_sql "SELECT `league` FROM `pk_rating` WHERE `char_id` = '"+strcharinfo(0)+"'", .@league$; for(@i = 0; @i < getarraysize($LeagueName$); @i ++){ if($LeagueName$[@i] != "") { if(MPKAcc > $MinRating[@i] && MPKAcc < $MaxRating[@i] && .@league$ != $LeagueName$[@i]){ if(.@league$ == "Diamond") return; query_sql "UPDATE `pk_rating` SET `league` = '"+$LeagueName$[@i]+"' WHERE `char_id` = '"+strcharinfo(0)+"'"; dispbottom "[PvP Info] : Your new Division : " + $LeagueName$[@i] + " Division."; cutin "1", 4; sleep2 2000; cutin $CutinName$[@i], 4; sleep2 3000; cutin "", 255; } } } return; }
  19. Hello guys I would like to make my waiting room to have a countdown from until when my pvp/mvp top event will end. (pvp script is not mine, credits to the owner.) Note: Pvp ends on saturdays and starts on mondays. //===== rAthena Script ======================================= // Ranking Script //===== By: ================================================== //= Masao //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= Any rAthena SVN //===== Description: ========================================= //= An simple Ranker Script which lists PvP Kills & Deaths, //= MvP kills and Emperium kills. //= //= Resets all the Rankings every Monday and on every Sunday //= the Top Player of each Ranking List receives a Prize. //===== Additional Comments: ================================= //= 1.0 First Version. //============================================================ - script ranker_funcs -1,{ OnInit: // Create Database Table: query_sql "CREATE TABLE IF NOT EXISTS `ranker` (`char_id` int(11) unsigned NOT NULL default '0' PRIMARY KEY, `name` varchar(30) NOT NULL default '', `pvp_kills` smallint(4) unsigned NOT NULL default '0', `pvp_deaths` smallint(4) unsigned NOT NULL default '0', `emp_breaks` smallint(4) unsigned NOT NULL default '0', `mvp_kills` smallint(4) unsigned NOT NULL default '0')"; setarray .mvps[0],1511,1647,1785,1630,1039,1874,2068,1272,1719,1046,1389,1112,1115,1418,1871,1252,1768,1086,1885,1649,1651,1832,1492,1734,1251,1779,1688,2156,1646,1373,1147,1059,1150,2022,1087,1190,1038,1157,1159,2087,2165,1623,1650,1583,1708,1312,1751,1685,1648,1917,1658; end; OnPCDieEvent: if(getgmlevel() < 40) { getmapxy .@m$,.@x,.@y,0; if(.@m$ == "rwc03" || .@m$ == "rwc02" || .@m$ == "guild_vs1-1" || .@m$ == "rwc01") { set @i,killerrid; query_sql "SELECT `char_id` FROM `char` WHERE `account_id` = '"+@i+"'",@cid; query_sql "SELECT `char_id` FROM `ranker` WHERE `char_id` = '"+@cid+"'",@cid2; if(!@cid2) { query_sql "INSERT `ranker` (`char_id`,`name`,`pvp_kills`,`pvp_deaths`,`emp_breaks`,`mvp_kills`) VALUES ('"+@cid+"','"+escape_sql(strcharinfo(0))+"','0','0','0','0')"; } query_sql "UPDATE `ranker` SET `pvp_kills` = `pvp_kills` + 1 WHERE `char_id` = '"+@cid+"'"; } } end; OnPCKillEvent: if(getgmlevel() < 40) { getmapxy .@m$,.@x,.@y,0; if(.@m$ == "rwc03" || .@m$ == "rwc02" || .@m$ == "guild_vs1-1" || .@m$ == "rwc01") { set @j,killedrid; query_sql "SELECT `char_id` FROM `char` WHERE `account_id` = '"+@j+"'",@cid3; query_sql "SELECT `char_id` FROM `ranker` WHERE `char_id` = '"+@cid3+"'",@cid4; if(!@cid4) { query_sql "INSERT `ranker` (`char_id`,`name`,`pvp_kills`,`pvp_deaths`,`emp_breaks`,`mvp_kills`) VALUES ('"+@cid3+"','"+escape_sql(strcharinfo(0))+"','0','0','0','0')"; } query_sql "UPDATE `ranker` SET `pvp_deaths` = `pvp_deaths` + 1 WHERE `char_id` = '"+@cid3+"'"; } } end; OnNPCKillEvent: if(getgmlevel() < 40) { for(set.@i,0; .@i <= 51; set .@i,.@i+1) { if(.mvps[.@i] == killedrid) { query_sql "SELECT `char_id` FROM `ranker` WHERE `char_id` = '"+getcharid(0)+"'",@cid; if(!@cid) { query_sql "INSERT `ranker` (`char_id`,`name`,`pvp_kills`,`pvp_deaths`,`emp_breaks`,`mvp_kills`) VALUES ('"+getcharid(0)+"','"+escape_sql(strcharinfo(0))+"','0','0','0','0')"; } query_sql "UPDATE `ranker` SET `mvp_kills` = `mvp_kills` + 1 WHERE `char_id` = '"+getcharid(0)+"'"; } } } end; OnClock0001: // Clear variables and Table every Monday: if(gettime(4) == 1) { set $@pvpp,0; set $@mvpp,0; set $@empp,0; query_sql "TRUNCATE TABLE `ranker`"; } end; } prontera,164,174,4 script Ranker 859,{ set .@n$,"[Ranker]"; mes .@n$; mes "Hello "+strcharinfo(0)+","; mes "what can i do for you today?"; next; menu "PvP Ranking",-,"MvP Ranking",L_M,"Emperium Ranking",L_E,"Collect Prize",L_CP,"Cancel",L_C; mes .@n$; mes "Would you like to see the Top 10 PvP Ranking or your personal Ranking?"; next; menu "Top 10",-,"Your current PvP Kills / Deaths",L_PvPPP; query_sql "SELECT `name`, `pvp_kills`, `pvp_deaths` FROM `ranker` ORDER BY `pvp_kills` DESC LIMIT 10",@name$,@pvp_kills,@pvp_deaths; mes .@n$; mes "Pos. Name | Kills | Deaths"; mes "1. "+@name$[0]+" | "+@pvp_kills[0]+" | "+@pvp_deaths[0]+""; mes "2. "+@name$[1]+" | "+@pvp_kills[1]+" | "+@pvp_deaths[1]+""; mes "3. "+@name$[2]+" | "+@pvp_kills[2]+" | "+@pvp_deaths[2]+""; mes "4. "+@name$[3]+" | "+@pvp_kills[3]+" | "+@pvp_deaths[3]+""; mes "5. "+@name$[4]+" | "+@pvp_kills[4]+" | "+@pvp_deaths[4]+""; mes "6. "+@name$[5]+" | "+@pvp_kills[5]+" | "+@pvp_deaths[5]+""; mes "7. "+@name$[6]+" | "+@pvp_kills[6]+" | "+@pvp_deaths[6]+""; mes "8. "+@name$[7]+" | "+@pvp_kills[7]+" | "+@pvp_deaths[7]+""; mes "9. "+@name$[8]+" | "+@pvp_kills[8]+" | "+@pvp_deaths[8]+""; mes "10. "+@name$[9]+" | "+@pvp_kills[9]+" | "+@pvp_deaths[9]+""; close; L_PvPPP: query_sql "SELECT `pvp_kills`, `pvp_deaths` FROM `ranker` WHERE `name` = '"+escape_sql(strcharinfo(0))+"'",@pvp_kills,@pvp_deaths; if(!@pvp_kills && !@pvp_deaths) { mes .@n$; mes "Sorry but you haven't killed any Players yet."; close; } mes .@n$; mes "Name | Kills | Deaths"; mes ""+strcharinfo(0)+" | "+@pvp_kills+" | "+@pvp_deaths+""; close; L_M: mes .@n$; mes "Would you like to see the Top 10 MvP Ranking or your personal Ranking?"; next; menu "Top 10",-,"Your current MvP Kills",L_MvPPP; query_sql "SELECT `name`, `mvp_kills` FROM `ranker` ORDER BY `mvp_kills` DESC LIMIT 10",@name$,@mvp_kills; mes .@n$; mes "Pos. Name | Kills"; mes "1. "+@name$[0]+" | "+@mvp_kills[0]+""; mes "2. "+@name$[1]+" | "+@mvp_kills[1]+""; mes "3. "+@name$[2]+" | "+@mvp_kills[2]+""; mes "4. "+@name$[3]+" | "+@mvp_kills[3]+""; mes "5. "+@name$[4]+" | "+@mvp_kills[4]+""; mes "6. "+@name$[5]+" | "+@mvp_kills[5]+""; mes "7. "+@name$[6]+" | "+@mvp_kills[6]+""; mes "8. "+@name$[7]+" | "+@mvp_kills[7]+""; mes "9. "+@name$[8]+" | "+@mvp_kills[8]+""; mes "10. "+@name$[9]+" | "+@mvp_kills[9]+""; close; L_MvPPP: query_sql "SELECT `mvp_kills` FROM `ranker` WHERE `name` = '"+escape_sql(strcharinfo(0))+"'",@mvp_kills; if(!@mvp_kills) { mes .@n$; mes "Sorry but you haven't killed any MvP's yet."; close; } mes .@n$; mes "Name | Kills"; mes ""+strcharinfo(0)+" | "+@mvp_kills+""; close; L_E: mes .@n$; mes "Would you like to see the Top 10 Empe Rranking or your personal Ranking?"; next; menu "Top 10",-,"Your current Emp. Kills",L_EMPPP; query_sql "SELECT `name`, `emp_breaks` FROM `ranker` ORDER BY `emp_breaks` DESC LIMIT 10",@name$,@emp_breaks; mes .@n$; mes "Pos. Name | Kills"; mes "1. "+@name$[0]+" | "+@emp_breaks[0]+""; mes "2. "+@name$[1]+" | "+@emp_breaks[1]+""; mes "3. "+@name$[2]+" | "+@emp_breaks[2]+""; mes "4. "+@name$[3]+" | "+@emp_breaks[3]+""; mes "5. "+@name$[4]+" | "+@emp_breaks[4]+""; mes "6. "+@name$[5]+" | "+@emp_breaks[5]+""; mes "7. "+@name$[6]+" | "+@emp_breaks[6]+""; mes "8. "+@name$[7]+" | "+@emp_breaks[7]+""; mes "9. "+@name$[8]+" | "+@emp_breaks[8]+""; mes "10. "+@name$[9]+" | "+@emp_breaks[9]+""; close; L_EMPPP: query_sql "SELECT `emp_breaks` FROM `ranker` WHERE `name` = '"+escape_sql(strcharinfo(0))+"'",@emp_breaks; if(!@emp_breaks) { mes .@n$; mes "Sorry but you haven't killed any Emperiums yet."; close; } mes .@n$; mes "Name | Kills"; mes ""+strcharinfo(0)+" | "+@emp_breaks+""; close; L_CP: if(gettime(4) != 0) { mes .@n$; mes "Sorry but the prizes can only be collected during Sundays."; close; } query_sql "SELECT `name` FROM `ranker` ORDER BY `pvp_kills` DESC LIMIT 1",@name$; query_sql "SELECT `name` FROM `ranker` ORDER BY `mvp_kills` DESC LIMIT 1",@name1$; query_sql "SELECT `name` FROM `ranker` ORDER BY `emp_breaks` DESC LIMIT 1",@name2$; if((strcharinfo(0) != @name$[0]) && (strcharinfo(0) != @name1$[0]) && (strcharinfo(0) != @name2$[0])) { mes .@n$; mes "I'm sorry but you're not in the first Position of any Ranking!"; close; } if((strcharinfo(0) == @name$[0]) && ($@pvpp != 1)) { mes .@n$; mes "Congratulations!"; mes "You're this weeks Number 1 PvP Killer!"; mes "You've been rewarded with 500 Cashpoints."; set #CASHPOINTS,#CASHPOINTS+500; set $@pvpp,1; close; } else if((strcharinfo(0) == @name1$[0]) && ($@mvpp != 1)) { mes .@n$; mes "Congratulations!"; mes "You're this weeks Number 1 MvP Killer!"; mes "Here is your Prize and have fun with it."; getitem 12103,3; // Bloody Branch 3ea. set $@mvpp,1; close; } else if((strcharinfo(0) == @name2$[0]) && ($@empp != 1)) { mes .@n$; mes "Congratulations!"; mes "You're this weeks Number 1 Emp. Killer!"; mes "Here is your Prize and have fun with it."; getitem 14288,2; // Guardian Stone Repairkit 2ea. set $@empp,1; close; } mes .@n$; mes "I'm sorry but it seems like you've already collected your Prize this week."; close; L_C: mes .@n$; mes "Ok, bye."; close; OnInit: while(1) { delwaitingroom; waitingroom "Pvp ends on saturdays",0; sleep 1000; } } function script ranker_woe { if(getgmlevel() < 40) { query_sql "SELECT `char_id` FROM `ranker` WHERE `char_id` = '"+getcharid(0)+"'",@cid; if(!@cid) { query_sql "INSERT `ranker` (`char_id`,`name`,`pvp_kills`,`pvp_deaths`,`emp_breaks`,`mvp_kills`) VALUES ('"+getcharid(0)+"','"+escape_sql(strcharinfo(0))+"','0','0','0','0')"; } query_sql "UPDATE `ranker` SET `emp_breaks` = `emp_breaks` + 1 WHERE `char_id` = '"+getcharid(0)+"'"; } end; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.