WillJocker
-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by WillJocker
-
-
20 hours ago, Angeluz said:
my bad
- script KillMon2Cash -1,{ OnNPCKillEvent: .@gettimetick = gettimetick(2); if (rand(100) < 1 && .@gettimetick > @delay) { getitem 50001,1; @delay = .@gettimetick + 60; // 60 seconds } end; OnInit: bindatcmd "check", "KillMon2Cash::OnCheckTime"; end; OnCheckTime: message strcharinfo(0),"Next drop in "+ ( @delay - gettimetick(2) ) + " seconds."; end; }
in the first drop looks like this:can adjust for the first one to appear, for example: Drop available now
after passing the 60s it looks like this
counting negative
-
On 1/22/2023 at 12:34 PM, Angeluz said:
maybe something like that
- script KillMon2Cash -1,{ OnNPCKillEvent: .@gettimetick = gettimetick(2); if (rand(100) < 1 && .@gettimetick > @delay) { getitem 50001,1; @delay = .@gettimetick + 60; // 60 seconds } end; OnInit: bindatcmd "check", "KillMon2Cash::OnCheckTime"; end; OnCheckTime: message strcharinfo(0),"Next drop in "+ ( @delay - .@gettimetick ) + " seconds."; end; }
time error
-
On 1/17/2023 at 11:48 AM, Emistry said:
- script KillMon2Cash -1,{ OnNPCKillEvent: .@gettimetick = gettimetick(2); if (rand(100) < 1 && .@gettimetick > @delay) { getitem 50001,1; @delay = .@gettimetick + 60; // 60 seconds } end; }
Hello @Emistry! good day!
How do I add a command, example: @check, and the command says how much time is left for a new drop? plss
-
On 7/25/2022 at 12:53 AM, mR L said:
Here ~// ....... if your server has { Overwriting user function [int__] } don't blame me .......... function script int__ { set .@num, atoi(getarg(0)+""); if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0); set .@l, getstrlen(.@num+""); for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) { set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$; if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$; } return .@num$; } //===== eAthena Script ====================================== //= Private MVP/Branch Room //===== By: =============================================== //= by ~AnnieRuru~ //===== Current Version: ====================================== //= 1.4a //===== Compatible With: ===================================== //= rathena 16819 //===== Description: ========================================= //= Player can rent MVP room for the player him/herself, for party or for guilds //===== Topic ================================================= //= http://www.eathena.ws/board/index.php?showtopic=187654 //===== Additional Comments: ================================== //= 1.0 //= ---- break the tradition which a script only for a player, or only for a party. //= now 1 room can be use for party and another room can use for guilds. //= ---- timeout feature to prevent player owns the room indefinitely, //= by create a new account and sit/@at'ing inside overnight. //= ---- can disable mvp/boss summon via configuration and becomes a branch room script. //= ---- a double check to prevent players rent all the rooms for himself. //= 1.0a //= ---- fix a critial bug that the time count too fast -_-" //= 1.1 //= ---- added item cost to rent or to summon //= ---- added a config to limit summoning per session //= ---- added flood control option //= 1.2 //= ---- rewrite the waitingroom counter //= ---- optimize the script in a way can add custom summon group //= ---- add config to kill the monsters if the room just being left empty //= ---- add GM can kick room in use //= ---- add able to spawn in numbers //= ---- add limitspawn can configure to negative to limit spawn in that group instead of individual one //= 1.3 //= ---- fix chatroom countdown issue due to rev13269 //= ---- fix a bug if 2 people rent a room at same time, the later 1 will get the room //= ---- add a feature so the GM can know how long the room has rented or abandoned //= 1.4 //= ---- update with new mvp and mini bosses //= ---- fix an exploit if server allow to use @mail, player can send item/zeny away to prevent item/zeny deletion when registering the room //= ---- players die inside mvp room shouldn't lose exp //= 1.4a //= ---- fix this to use in rathena //======================================================== // This is the shop for this Branch room IF you already enable it. Can sell whatever things you want. - shop MVP room#branch -1,604:100000,12103:1000000 - script MVP Summoner -1,{ goto L_Start; OnInit: getmapxy .@map$, .@x, .@y, BL_NPC; if ( .@map$ == "" ) { // Config --------------------------------------------------------------------------------------- // Time for rent a room IN MINUTES. When time out, players inside the room will kick out. Do Not set this as 0 set .timeout, 60; // if the room left empty for # minutes, will be treated as give up the room. Do Not set this as 0 set .nobodygiveup, 5; // NOTE : The script only search item OR zeny. if you specify item amount, then it will ask for the item. If item amount is 0, then it will ask for zeny. // the cost to rent a room set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin set .rentitemamount, 0; // amount of items to rent a room set .rentcost, 10000000; // otherwise, zeny cost to rent a room // limit each room can only summon 1 monster at a time. (only the Summoning option) // Turn it off (0) means the player can summon a lot of monsters as long as the player has enough zeny/item. High rate server players love the room with a lot MVPs // Turn it on (1) means the player have to kill existing monster before can summon a new one. Low rate server player prefer to take out MVP 1 by 1 set .floodcontrol, 0; // if .floodcontrol is turn off, your players might experience lag if they summoned too many MVPs // so what is the maximum input to limit your players summon too many ? set .inputlimit, 30; // If the room has left over monsters while nobody in the room and the room not give up yet, shall we kill monsters in empty room ? set .killmonster, 1; // Default is yes // Options menu setting for MVP Summoner NPC. set .@menu[0], 1; // Turn Heal option On/Off set .@menu[1], 1; // Turn Group 1 summons On/Off -> MVP set .@menu[2], 1; // Turn Group 2 summons On/Off -> mini boss set .@menu[3], 0; // Turn Group 3 summons On/Off set .@menu[4], 0; // Turn Group 4 summons On/Off set .@menu[5], 0; // Turn Group 5 summons On/Off set .@menu[6], 0; // Turn Group 6 summons On/Off set .@menu[7], 0; // Turn Group 7 summons On/Off set .@menu[8], 0; // Turn Group 8 summons On/Off set .@menu[9], 0; // Turn Group 9 summons On/Off set .@menu[10], 0; // Sell shop items options On/Off ( shop npc above ) // set respawn point when they leave the room. Obviously warp to the Private MVP Room Warper npc set .respawnmap$, "prontera"; // Note : "SavePoint" does NOT work set .respawnx, 156; set .respawny, 191; // The minimum GM level can kick a room in use set .gmlvlkick, 80; // .limitspawn in previous revision changed to .grouplimit . // it is for limit each monster spawn per session, prevent them only killing same monster again and again // Now you can configure one group has limited summon, and another group has unlimited summon // Tips: if you server has an insane custom MVP, you can put your custom mob to Group 3~9 with insane item cost, and limit only 1 summon per session // .grouplimit use amount, means if group1limit set to 10, then each session can only summon up to 10 amount of that kind of monster. 0 is unlimited // --------- // Group 1 -> MVP // --------- set .group1name$, "MVP"; // Group 1 name set .group1itemid, 674; // item id use for summon any Group 1 monster - 674 - mithil coin set .group1itemamount, 0; // amount of items to summon a Group 1 monster set .group1cost, 10000000; // if no item is specify, zeny cost to summon a Group 1 monster set .group1limit, 0; // limit of summon of Group 1 monster per session, prevent them only killing same monster again and again setarray .group1id, 1511,// Amon Ra 1647,// Assassin Cross Eremes 1785,// Atroce 1630,// Bacsojin 1039,// Baphomet 1874,// Beelzebub 1272,// Dark Lord 1719,// Datale 1046,// Doppelgangger 1389,// Dracula 1112,// Drake 1115,// Eddga 1418,// Evil Snake Lord 1871,// Fallen Bishop 1252,// Garm 1768,// Gloom Under Night 1086,// Golden Thief Bug 1885,// Gopinich 1649,// High Priest Magaleta 1651,// High Wizard Katrinn 1832,// Ifrit 1492,// Incantation Samurai 1734,// Kiel D-01 1251,// Knight of Windstorm 1779,// Ktullanux 1688,// Lady Tanee 1646,// Lord Knight Seyren 1373,// Lord of Death 1147,// Maya 1059,// Mistress 1150,// Moonlight Flower 1087,// Orc Hero 1190,// Orc Lord 1038,// Osiris 1157,// Pharaoh 1159,// Phreeoni 1623,// RSX 0806 1650,// Sniper Shecil 1583,// Tao Gunka 1708,// Thanatos 1312,// Turtle General 1751,// Valkyrie Randgris 1685,// Vesper 1648,// Whitesmith Harword 1917,// Wounded Morroc 1658;// Ygnizem // --------- // Group 2 -> mini boss // --------- set .group2name$, "Mini-Boss"; // Group 2 name set .group2itemid, 674; // item id use for summon any Group 2 monster - 674 - mithil coin set .group2itemamount, 0; // amount of items to summon a Group 2 monster set .group2cost, 5000000; // if no item is specify, zeny cost to summon a Group 2 monster set .group2limit, 0; // limit of summon of Group 2 monster per session, prevent them only killing same monster again and again setarray .group2id, 1096,// Angeling 1388,// Archangeling 1795,// Bloody Knight 1830,// Bow Guardian 1839,// Byorgue 1309,// Cat O' Nine Tail 1283,// Chimera 1302,// Dark Illusion 1198,// Dark Priest 1582,// Deviling 1091,// Dragon Fly 1093,// Eclipse 1205,// Executioner 1783,// Galion 1592,// Gangster 1120,// Ghostring 1259,// Gryphon 1720,// Hydro 1090,// Mastering 1289,// Maya Purple 1262,// Mutant Dragon 1203,// Mysteltainn 1870,// Necromancer 1295,// Owl Baron 1829,// Sword Guardian 1204,// Tirfing 1089,// Toad 1092,// Vagabond Wolf 1765;// Valkyrie // --------- // Group 3 // --------- set .group3name$, "Poring-Family"; // Group 3 name set .group3itemid, 674; // item id use for summon any Group 3 monster - 12109 - Poring box set .group3itemamount, 0; // amount of items to summon a Group 3 monster set .group3cost, 1000000; // if no item is specify, zeny cost to summon a Group 3 monster set .group3limit, 0; // limit of summon of Group 3 monster per session, prevent them only killing same monster again and again setarray .group3id, 1002,// Poring 1113,// Drops 1031,// Poporing 1242,// Marin 1062,// Santa Poring 1613,// Metaling 1784,// Stapo 1090,// Mastering 1096,// Angeling 1120,// Ghostring 1582,// Deviling 1388,// Arc Angeling 1502;// Pori Pori // --------- // Group 4 // --------- set .group4name$, ""; // Group 4 name set .group4itemid, 0; // item id use for summon any Group 4 monster set .group4itemamount, 0; // amount of items to summon a Group 4 monster set .group4cost, 0; // if no item is specify, zeny cost to summon a Group 4 monster set .group4limit, 0; // limit of summon of Group 4 monster per session, prevent them only killing same monster again and again setarray .group4id, 1001, 1002; // --------- // Group 5 // --------- set .group5name$, ""; // Group 5 name set .group5itemid, 0; // item id use for summon any Group 5 monster set .group5itemamount, 0; // amount of items to summon a Group 5 monster set .group5cost, 0; // if no item is specify, zeny cost to summon a Group 5 monster set .group5limit, 0; // limit of summon of Group 5 monster per session, prevent them only killing same monster again and again setarray .group5id, 1001, 1002; // --------- // Group 6 // --------- set .group6name$, ""; // Group 6 name set .group6itemid, 0; // item id use for summon any Group 6 monster set .group6itemamount, 0; // amount of items to summon a Group 6 monster set .group6cost, 0; // if no item is specify, zeny cost to summon a Group 6 monster set .group6limit, 0; // limit of summon of Group 6 monster per session, prevent them only killing same monster again and again setarray .group6id, 1001, 1002; // --------- // Group 7 // --------- set .group7name$, ""; // Group 7 name set .group7itemid, 0; // item id use for summon any Group 7 monster set .group7itemamount, 0; // amount of items to summon a Group 7 monster set .group7cost, 0; // if no item is specify, zeny cost to summon a Group 7 monster set .group7limit, 0; // limit of summon of Group 7 monster per session, prevent them only killing same monster again and again setarray .group7id, 1001, 1002; // --------- // Group 8 // --------- set .group8name$, ""; // Group 8 name set .group8itemid, 0; // item id use for summon any Group 8 monster set .group8itemamount, 0; // amount of items to summon a Group 8 monster set .group8cost, 0; // if no item is specify, zeny cost to summon a Group 8 monster set .group8limit, 0; // limit of summon of Group 8 monster per session, prevent them only killing same monster again and again setarray .group8id, 1001, 1002; // --------- // Group 9 // --------- set .group9name$, ""; // Group 9 name set .group9itemid, 0; // item id use for summon any Group 9 monster set .group9itemamount, 0; // amount of items to summon a Group 9 monster set .group9cost, 0; // if no item is specify, zeny cost to summon a Group 9 monster set .group9limit, 0; // limit of summon of Group 9 monster per session, prevent them only killing same monster again and again setarray .group9id, 1001, 1002; // Config Ends ------------------------------------------------------------------------ if ( .timeout == 0 ) set .timeout, 60; if ( .nobodygiveup == 0 ) set .nobodygiveup, 5; if ( .inputlimit < 1 ) set .inputlimit, 1; if ( .rentitemid && .rentitemamount ) { if ( getitemname(.rentitemid) == "null" ) { debugmes "Private MVP Room: Rent a room is using invalid item id."; } } set .@i, 1; while ( .@i <= 9 ) { if ( .@menu[.@i] && getd(".group"+ .@i +"itemid") && getd(".group"+ .@i +"itemamount") ) { if ( getitemname( getd(".group"+ .@i +"itemid") ) == "null" ) { debugmes "Private MVP Room: Group no. "+ .@i +" is using invalid item id."; } } set .@i, .@i +1 ; } set .menu$, ( (.@menu[0])?"Heal":"" )+":"+( (.@menu[1])?"Summon "+ .group1name$:"" )+":"+( (.@menu[2])?"Summon "+ .group2name$:"" )+":"+( (.@menu[3])?"Summon "+ .group3name$:"" )+":"+( (.@menu[4])?"Summon "+ .group4name$:"" )+":"+( (.@menu[5])?"Summon "+ .group5name$:"" )+":"+( (.@menu[6])?"Summon "+ .group6name$:"" )+":"+( (.@menu[7])?"Summon "+ .group7name$:"" )+":"+( (.@menu[8])?"Summon "+ .group8name$:"" )+":"+( (.@menu[9])?"Summon "+ .group9name$:"" )+":"+( (.@menu[10])?"Buy branches":"" )+":Leave this room:Give up this room"; set .@i, 1; while ( .@i <= 9 ) { setd ".group"+ .@i +"idsize", getarraysize( getd(".group"+ .@i +"id") ); if ( .@menu[.@i] && getd(".group"+ .@i +"limit") <= 0 ) { set .@j, 0; while ( .@j < getd(".group"+ .@i +"idsize") ) { setd ".group"+ .@i +"menu$", getd(".group"+ .@i +"menu$") + getmonsterinfo( getd(".group"+ .@i +"id["+ .@j +"]"), 0) +":"; set .@j, .@j +1 ; } } set .@i, .@i +1 ; } } else { sleep 1; mapannounce .@map$, "Admin has refresh the server, please register the room again.", 1; mapwarp .@map$, .respawnmap$, .respawnx, .respawny; } end; L_Start: // I hate gotos ... but ... set .@dif, strnpcinfo(2); if ( .remind[.@dif] == 0 ) { set .remind[.@dif], 1; initnpctimer; } mes "[MVP Summoner]"; mes "Hi, what can I do for you ?"; next; switch ( select(.menu$) ) { case 1: mes "[MVP Summoner]"; if ( mobcount("this","") > 0 ) { mes "I cannot offer heal service when there are monsters around."; close; } sc_end sc_stone; sc_end sc_slowdown; sc_end sc_freeze; sc_end sc_sleep; sc_end sc_curse; sc_end sc_silence; sc_end sc_confusion; sc_end sc_blind; sc_end sc_bleeding; sc_end sc_decreaseagi; sc_end sc_poison; sc_end sc_hallucination; sc_end sc_stripweapon; sc_end sc_striparmor; sc_end sc_striphelm; sc_end sc_stripshield; sc_end sc_changeundead; sc_end sc_orcish; sc_end sc_berserk; sc_end sc_ske; sc_end sc_swoo; sc_end sc_ska; percentheal 100,100; specialeffect2 7; mes "You have completely healed."; close; default: set .@group, @menu -1; if ( .floodcontrol && mobcount("this","") > 0 ) { mes "[MVP Summoner]"; mes "I cannot summon another monster when there are monsters around."; close; } else if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) { mes "[MVP Summoner]"; mes "The cost to summon a "+ getd(".group"+ .@group +"name$") +" is "+ getd(".group"+ .@group +"itemamount") +" "+ getitemname( getd(".group"+ .@group +"itemid") ) +"."; if ( getd(".group"+ .@group +"limit") < 0 ) mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) ) )+") more summons for this group."; next; } else if ( getd(".group"+ .@group +"cost") ) { mes "[MVP Summoner]"; mes "The cost to summon a "+ getd(".group"+ .@group +"name$") +" is "+ callfunc("int__", getd(".group"+ .@group +"cost") ) +" zeny."; if ( getd(".group"+ .@group +"limit") < 0 ) mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) ) )+") more summons for this group."; next; } else if ( getd(".group"+ .@group +"limit") < 0 ) { mes "[MVP Summoner]"; mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) ) )+") more summons for this group."; next; } if ( getd(".group"+ .@group +"limit") < 0 && getd(".group"+ .@group +"limit"+ .@dif) >= ~getd(".group"+ .@group +"limit")+1 ) { mes "[MVP Summoner]"; mes "I'm sorry, but you can't summon any more monster for this group."; close; } else if ( getd(".group"+ .@group +"limit") > 0 ) { for ( set .@i, 0; .@i < getd(".group"+ .@group +"idsize"); set .@i, .@i +1 ) set .@menu$, .@menu$ +( ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") >= getd(".group"+ .@group +"limit") )?"^999999":"^000000" )+ getmonsterinfo( getd(".group"+ .@group +"id["+ .@i +"]"), 0) +" ("+ ( ( getd(".group"+ .@group +"limit") - getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") <= 0 )?0:( getd(".group"+ .@group +"limit") - getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") ) ) +")"+":"; set .@menu, select(.@menu$) -1; } else set .@menu, select( getd(".group"+ .@group +"menu$") ) -1; mes "[MVP Summoner]"; if ( .floodcontrol == 0 && .inputlimit > 1 ) { mes "Input an amount of monsters to summon."; next; input .@amount; if ( .@amount == 0 ) close; else if ( .@amount > .inputlimit ) set .@amount, .inputlimit; mes "[MVP Summoner]"; } else set .@amount, 1; if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) { if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) { mes "You don't have enough "+ getitemname( getd(".group"+ .@group +"itemid") ) +" to summon a "+ getd(".group"+ .@group +"name$") +"."; close; } } else if ( getd(".group"+ .@group +"cost") ) { if ( zeny < getd(".group"+ .@group +"cost") * .@amount ) { mes "You don't have enough zeny to summon a "+ getd(".group"+ .@group +"name$") +"."; close; } } if ( .floodcontrol && mobcount("this","") > 0 ) { mes "I cannot summon another monster when there are monsters around."; close; } else if ( getd(".group"+ .@group +"limit") > 0 ) { if ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") >= getd(".group"+ .@group +"limit") ) { mes "I'm sorry, but you already summoned that monster too much. Try summon another."; close; } else if ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) { mes "The amount you input is more than the limit you can summon. Try reduce the amount."; close; } } else if ( getd(".group"+ .@group +"limit") < 0 ) { if ( getd(".group"+ .@group +"limit"+ .@dif) >= ~getd(".group"+ .@group +"limit")+1 ) { mes "I'm sorry, but you can't summon any more monster for this group."; close; } else if ( getd(".group"+ .@group +"limit"+ .@dif) + .@amount > ~getd(".group"+ .@group +"limit")+1 ) { mes "The amount you input is more than the limit you can summon. Try reduce the amount."; close; } } mes "Summoning "+ .@amount +" "+ getmonsterinfo( getd(".group"+ .@group +"id["+ .@menu +"]"), 0) +"."; mes "Ok, get ready ?"; close2; if ( .floodcontrol && mobcount("this","") > 0 ) end; if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) { if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) end; delitem getd(".group"+ .@group +"itemid"), getd(".group"+ .@group +"itemamount") * .@amount; } else if ( getd(".group"+ .@group +"cost") ) { if ( zeny < getd(".group"+ .@group +"cost") * .@amount ) end; set zeny, zeny - getd(".group"+ .@group +"cost") * .@amount; } if ( getd(".group"+ .@group +"limit") > 0 ) { if ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) end; setd ".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]", getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") + .@amount; } else if ( getd(".group"+ .@group +"limit") < 0 ) { if ( getd(".group"+ .@group +"limit"+ .@dif) + .@amount > ~getd(".group"+ .@group +"limit")+1 ) end; setd ".group"+ .@group +"limit"+ .@dif, getd(".group"+ .@group +"limit"+ .@dif) + .@amount; } monster "this", 0, 0, "--ja--", getd(".group"+ .@group +"id["+ .@menu +"]"), .@amount; end; case 11: if ( mobcount("this","") > 0 ) { mes "[MVP Summoner]"; mes "I cannot offer this service when there are monsters around."; close; } close2; callshop "MVP room#branch", 0; end; case 12: mes "[MVP Summoner]"; mes "Are you sure you want to leave this room ?"; mes "If this room left empty for more than "+ .nobodygiveup +" minutes, you lost ownership for this room."; if ( select( "Yes:No") == 2 ) close; warp .respawnmap$, .respawnx, .respawny; end; case 13: mes "[MVP Summoner]"; getmapxy .@map$, .@x, .@y, BL_NPC; if ( getmapusers(.@map$) > 1 ) { mes "There are still some players in this room. Make sure you are the last member in this room to use this option."; close; } mes "Are you sure you want to give up this room ?"; if ( .rentcost ) mes "You will need to pay again to enter this room."; next; if ( select( "Yes:No" ) == 2 ) close; warp .respawnmap$, .respawnx, .respawny; set .remaintime[.@dif], -1; end; } close; OnEnterMap: set .@dif, strnpcinfo(2); set .remind[.@dif], 0; for ( set .@i, 1; .@i <= 9; set .@i, .@i +1 ) deletearray getd(".group"+ .@i +"limit"+ .@dif), getd(".group"+ .@i +"idsize"); set .nobodycounter[.@dif], 0; getmapxy .@map$, .@x, .@y, BL_NPC; set .starttime[.@dif], gettimetick(2); do { set .remaintime[.@dif], .timeout * 60 + .starttime[.@dif] - gettimetick(2); set .@hour[.@dif], .remainTime[.@dif] / 3600 ; set .@min[.@dif], .remainTime[.@dif] % 3600 / 60 ; set .@sec[.@dif], .remainTime[.@dif] % 3600 % 60 ; delwaitingroom strnpcinfo(0); waitingroom "Time Left = "+( ( .@hour[.@dif] )?( .@hour[.@dif] +":"):"" )+( ( .@min[.@dif] < 10 )?"0"+ .@min[.@dif]: .@min[.@dif] )+":"+( ( .@sec[.@dif] < 10 )?"0"+ .@sec[.@dif]: .@sec[.@dif] ), 0; if ( getmapusers(.@map$) ) set .nobodycounter[.@dif], 0; else { set .nobodycounter[.@dif], .nobodycounter[.@dif] +1 ; if ( .nobodycounter[.@dif] > .nobodygiveup * 60 ) break; } sleep 995; } while ( .remaintime[.@dif] > 1 ); set .remaintime[.@dif], 0; delwaitingroom "MVP Summoner#"+ .@dif; mapwarp .@map$, .respawnmap$, .respawnx, .respawny; end; OnTimer100: stopnpctimer; npctalk "Hi ~ the bubble above my head is the countdown for using this room."; sleep 2000; npctalk "Sometimes, I can skip for about 1 second in the countdown."; sleep 3000; npctalk "That is because the server is experiencing minor lag problem."; sleep 3000; npctalk "So, don't complain about me cheated for the countdown ~ ^.^"; sleep 3000; npctalk "Have a nice day ~"; end; } prontera,148,174,5 script Private MVP Room 621,{ mes "[Private MVP Room]"; mes "Please select a private MVP room."; if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) mes "The cost to rent a room for "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes is "+ getvariableofnpc(.rentitemamount, "MVP Summoner") +" "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +"."; else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) mes "The cost to rent a room for "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes is "+ callfunc("int__", getvariableofnpc(.rentcost, "MVP Summoner") ) +" zeny."; else mes "You can only use the room for only "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes."; mes " "; for ( set .@i, 1; .@i <= 8; set .@i, .@i +1 ) { if ( getvariableofnpc(.remaintime[.@i],"MVP Summoner") ) { switch ( .type[.@i] ) { case 1: set .@color$, "^EE8800"; break; case 2: set .@color$, "^70CC11"; break; case 3: set .@color$, "^0000FF"; break; default: set .@color$, "^000000"; } mes "Room #"+ .@i +" = "+ .@color$ + .whoinuse$[.@i] +"^000000"; } } next; set .@room, select("MVP Room 1 ["+ getmapusers("06guild_01") +"]", "MVP Room 2 ["+ getmapusers("06guild_02") +"]", "MVP Room 3 ["+ getmapusers("06guild_03") +"]", "MVP Room 4 ["+ getmapusers("06guild_04") +"]", "MVP Room 5 ["+ getmapusers("06guild_05") +"]", "MVP Room 6 ["+ getmapusers("06guild_06") +"]", "MVP Room 7 ["+ getmapusers("06guild_07") +"]", "MVP Room 8 ["+ getmapusers("06guild_08") +"]"); if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) { if ( .inuseid[.@room] == getcharid(.type[.@room]) ) { if ( getvariableofnpc(.killmonster,"MVP Summoner") && getmapusers("06guild_0"+ .@room) == 0 ) killmonsterall "06guild_0"+ .@room; warp "06guild_0"+ .@room, 0,0; end; } else { mes "[Private MVP Room]"; switch ( .type[.@room] ) { case 1: set .@color$, "^EE8800Party "; break; case 2: set .@color$, "^70CC11Guild "; break; case 3: set .@color$, "^0000FFPlayer "; } mes "This room is reserved for "; mes .@color$ + .whoinuse$[.@room] +"^000000 ."; if ( getgmlevel() < getvariableofnpc(.gmlvlkick,"MVP Summoner") ) { mes "Please select another."; close; } mes " "; mes "Currently there are "+ getmapusers("06guild_0"+ .@room) +" players"; mes "in that room."; set .@remaintime, getvariableofnpc(.remaintime[.@room],"MVP Summoner"); mes "It still has "+( .@remaintime /60 )+"mn "+( .@remaintime %60 )+"s left."; set .@nobodycounter, getvariableofnpc(.nobodycounter[.@room],"MVP Summoner"); if ( .@nobodycounter ) mes "And have left empty for "+( .@nobodycounter /60 )+"mn "+( .@nobodycounter %60 )+"s."; mes "Kick them ?"; next; if ( select ( "No:Yes" ) == 1 ) close; set getvariableofnpc(.remaintime[.@room],"MVP Summoner"), -1; mes "[Private MVP Room]"; mes "Room#"+ .@room +" is empty now."; close; } } mes "[Private MVP Room]"; if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) { if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) { mes "You don't have enough "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +" to rent a room."; close; } } else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) { if ( zeny < getvariableofnpc(.rentcost, "MVP Summoner") ) { mes "You don't have enough zeny to rent a room."; close; } } mes "You reserve this room for ..."; next; set .@type, select("For my party members", "For my guild members", "For personal account use" ); if ( getcharid(.@type) == 0 ) { mes "[Private MVP Room]"; mes "You do not own a "+( (.@type == 1)?"Party":"Guild" )+"."; close; } else if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) { if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) { mes "You don't have enough "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +" to rent a room."; close; } } else if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) { mes "[Private MVP Room]"; mes "I'm sorry, somebody else has already register this room faster than you."; close; } for ( set .@i, 1; .@i <= 8; set .@i, .@i +1 ) { if ( getvariableofnpc(.remaintime[.@i],"MVP Summoner") && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) { mes "[Private MVP Room]"; mes "You already rented Room#"+ .@i +". Use that room instead."; close; } } set .type[.@room], .@type; set .inuseid[.@room], getcharid(.@type); set .whoinuse$[.@room], strcharinfo( (.@type == 3)?0:.@type ); if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) { if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) end; delitem getvariableofnpc(.rentitemid, "MVP Summoner"), getvariableofnpc(.rentitemamount, "MVP Summoner"); } else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) { if ( zeny < getvariableofnpc(.rentcost, "MVP Summoner") ) end; set zeny, zeny - getvariableofnpc(.rentcost, "MVP Summoner"); } warp "06guild_0"+ .@room, 0,0; killmonsterall "06guild_0"+ .@room; donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap"; end; } 06guild_01,49,49,4 duplicate(MVP Summoner) MVP Summoner#1 116 06guild_02,49,49,4 duplicate(MVP Summoner) MVP Summoner#2 116 06guild_03,49,49,4 duplicate(MVP Summoner) MVP Summoner#3 116 06guild_04,49,49,4 duplicate(MVP Summoner) MVP Summoner#4 116 06guild_05,49,49,4 duplicate(MVP Summoner) MVP Summoner#5 116 06guild_06,49,49,4 duplicate(MVP Summoner) MVP Summoner#6 116 06guild_07,49,49,4 duplicate(MVP Summoner) MVP Summoner#7 116 06guild_08,49,49,4 duplicate(MVP Summoner) MVP Summoner#8 116 06guild_01 mapflag nowarpto 06guild_02 mapflag nowarpto 06guild_03 mapflag nowarpto 06guild_04 mapflag nowarpto 06guild_05 mapflag nowarpto 06guild_06 mapflag nowarpto 06guild_07 mapflag nowarpto 06guild_08 mapflag nowarpto 06guild_01 mapflag nomemo 06guild_02 mapflag nomemo 06guild_03 mapflag nomemo 06guild_04 mapflag nomemo 06guild_05 mapflag nomemo 06guild_06 mapflag nomemo 06guild_07 mapflag nomemo 06guild_08 mapflag nomemo 06guild_01 mapflag noteleport 06guild_02 mapflag noteleport 06guild_03 mapflag noteleport 06guild_04 mapflag noteleport 06guild_05 mapflag noteleport 06guild_06 mapflag noteleport 06guild_07 mapflag noteleport 06guild_08 mapflag noteleport 06guild_01 mapflag nosave SavePoint 06guild_02 mapflag nosave SavePoint 06guild_03 mapflag nosave SavePoint 06guild_04 mapflag nosave SavePoint 06guild_05 mapflag nosave SavePoint 06guild_06 mapflag nosave SavePoint 06guild_07 mapflag nosave SavePoint 06guild_08 mapflag nosave SavePoint 06guild_01 mapflag nopenalty 06guild_02 mapflag nopenalty 06guild_03 mapflag nopenalty 06guild_04 mapflag nopenalty 06guild_05 mapflag nopenalty 06guild_06 mapflag nopenalty 06guild_07 mapflag nopenalty 06guild_08 mapflag nopenalty
Nice nice nice! very nice
please, is there a way to change it not to count in the mvp rank? inside this room
-
-
On 7/23/2022 at 12:36 AM, mR L said:
Hi! Could you please adjust this script so that instead of zenny you need to use a certain item to invoke MVP?
Thanks -
-
On 3/29/2022 at 7:08 PM, Poring King said:
Name is : CoolEvent Corp. Employee ( PRO Style - Coupon ) HOT!DROP TABLE IF EXISTS `reward_codes`; DROP TABLE IF EXISTS `reward_logs`; CREATE TABLE IF NOT EXISTS `reward_codes` ( `promo` VARCHAR(26) NOT NULL DEFAULT '', `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', `item_name` VARCHAR(50) NOT NULL DEFAULT '', `amount` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `time_created` DATETIME NOT NULL DEFAULT '00-00-0000 00:00:00', `limit` INT(10) UNSIGNED NOT NULL DEFAULT '0', `pool` INT(10) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`promo`) ) ENGINE = MYISAM; CREATE TABLE IF NOT EXISTS `reward_logs` ( `account_id` int(11) unsigned NOT NULL default '0', `last_ip` BINARY( 9 ) NOT NULL, `code` VARCHAR( 26 ) NOT NULL, `redeem_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `claim` INT( 10 ) NOT NULL, PRIMARY KEY (`code`) ) ENGINE = MYISAM;
error in database, #1067 - Valor padrão (default) inválido para 'time_created'
invalid format `time_created` DATETIME NOT NULL DEFAULT '00-00-0000 00:00:00',
. Help plis? -
On 3/26/2022 at 5:42 AM, mR L said:
https://github.com/rathena/rathena/blob/master/npc/custom/events/devil_square.txt
Can you make this ds available for the current version of the emulator?
-
Can you help me please?
I'm with the () ARENA MASTER ... but it's not counting the kill ranking, only death, and it's giving an error in the map-server.1.6 but it's not counting the kill ranking, only death, and it's giving an error in the map-server.. print, please help!
//===== rAthena Script ======================================= //= Arena Master //===== By =================================================== //= llchrisll //===== Version ============================================== //= 1.0 - Initial Version // Added Multi Kill & SoundEffects // Added Bounty & Promotion Feature // Fully tested & Rewritten most of the code // - Since it didn't wanted to work like I wanted // - Couldn't test the Party PvP option though. // Added a bonus at the bounty feature // - If an player gains a "$@bty_bon_start" spree, "$@bty_bonus" // will be given to the player, who kill him/her. //= 1.1 - Fixed an Bounty bug - Thanks to raijin91 // = Also the bounty bonus wasn't added, kinda forgot that it seems // - Changed the First Blood part // - Changed the Chat blocking part // - Shorted the sphree part a bit, still testing it. // - Added an Cost Multiplier for the shop to adjust the prices for Mid Rate and higher Servers. // - Added another function to get the map users in each room and each pvp. //= 1.2 - Compatible with rAthena // - Fixed some bugs //= 1.3 - Made the Sphree Announcer dynamically // - Made modification regarding the sphree ranking, removed doPromote; function // - Shorted the ranking display choices //= 1.4 - Moved writeStats; into the kill part, bug with Logout prevented from saving in ranking // - Fixed an bug with "First Blood" announcer // - Updated the MvP Ranker to rAthena, @getmonsterinfo has an check for MvP EXP now // - Removed limitation to MvP Arena, against every MvP useable now // - Fixed Ranking bug, didn't save Kills and stuff correctly. // - Added an addtional Player Counter for each PvP Room // - Added Class Limitation regarding 3rd Jobs // - Fixed an bug with Auto-Resurrect on Deathmatch Maps // - Fixed another Ranking bug, didn't display correctly //= 1.5 - Added Custom Bounty Map Feature, see line around '861' // - Added to the Bounty Hunter an Locater, which locates the player... // - Fixed an bug about the Bounty Hunter, forgot to reset the @hunt variable // - Removed First Blood completely // - Removed Chat Block part completely + OnPCMapLoadEvent // - Fixed an Arena Shop bug by using $@arena_pay = 2 (Permanent Price Array) - Thanks to Lelantos for the bug report // - Rewrote the whole check at the Party PvP, also fixxed the check for // online party member counting > misplaced the variables for "isloggedin" ... - Thanks to Lelantos for the bug report //= 1.6 - Reduced PvP Rooms by adding Map Rotation Settings; Fixed Maps + Random Map each Day + Specific Map on an specific Day // - Removed the Player Limitation except Party PvP // - Reduced GvG Maps to 3 // - Removed the functions getPvPMapUsers and getPartyMapUsers // - Added an announcer on Room Entry // - Added in Party PvP an display how many parties are in which room before joining // - Fixed minor bugs // - Exchanged #CASHPOINTS Reward with Custom Variable Support, you can decide now // - Modified the Arena Shop Multiplier by using an array to decide it for each Item seperatly // - Moved the Arena Shop Config to the Arena Master NPC and made $@arena_ to .arena_ or .@arena_ variables //= 1.7 - Fixed PvP KIll Announcer and Kill display message // - Changed `hscore` to `hstreak` (confused people) // - Fixed typo at PvP Deathmatch warp "$dmpvp$" > "$@dmpvp$" // - Added some lines for the dynamic Map setting // - Fixed a typo in mapannounce (Thanks to Questune09 for the bug report) //= 1.8 - Moved the writeStats use on killing to when the player dies or logs out (lessens SQL usage) // - Added OnPCLogoutEvent seperately // - Removed some left over messages I missed to delete with last update // - Removed MvP Ranker // - Fixed an issue the Shop, which made it possible buy items without cost //===== Tested With ========================================== //= rAthena 03/29/2021 Revision //= GIT Hash: 47c471e3d0e7997ae605ebf45760349f3b25d365 //===== Description ========================================== //= PvP / GvG Arenas with ranking ladder //= PvP Types: // - Normal // - Dispell: You'll be dispelled on Room entry. // - Deathmatch: You'll be auto resurrect when you die. // If you type @die, get comaed and similar, you'll be warped to your save point. // - Party PvP: 2vs2, 3vs3, 4vs4, 5vs5 // ----------------------------------------------- //= GvG: 3 Arenas, the default guild_vs1 - guild_vs3. //===== Comments & Credits ============================================= // = Thanks to Lelantos for the idea of the Custom Bounty Map Feature // = Thanks to Vayrus for the bug reports. //===== MySQL Entries ======================================== /* // v1.0 DROP TABLE IF EXISTS `arena_master`; CREATE TABLE `arena_master` ( `char_id` int(10) unsigned NOT NULL, `kills` smallint(5) unsigned DEFAULT '0', `death` smallint(5) unsigned DEFAULT '0', `hstreak` smallint(5) unsigned DEFAULT '0', `bounty` smallint(5) unsigned DEFAULT '0', `bounty_pts` smallint(5) unsigned DEFAULT '0', `killer` smallint(5) unsigned DEFAULT '0', `domi` smallint(5) unsigned DEFAULT '0', `mega` smallint(5) unsigned DEFAULT '0', `unstopp` smallint(5) unsigned DEFAULT '0', `wicked` smallint(5) unsigned DEFAULT '0', `monster` smallint(5) unsigned DEFAULT '0', `godlike` smallint(5) unsigned DEFAULT '0', `holys` smallint(5) unsigned DEFAULT '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM; */ //============================================================ // ================= Arena Master ================== // prontera,164,163,5 script Arena Master 808,{ mes .n$; mes "Hello, "+strcharinfo(0)+"!"; if(getgmlevel() > 79) if(select("- GM Menu:- Player Menu") == 1) goto GM_Menu; if($@pvpgvg_load == 1) { mes "I'm sorry, but the Arena and it's features are not available yet. Try again in a few minutes please."; close; } mes "How can I help you?"; mes "Ranking Status: "+ ( ($@pvptable)?"Enabled":"Disabled"); next; switch(select("- Arenas:- Rankings:- Arena Shop:- Information:- Nevermind")) { // Arenas case 1: set @sphr,0; set @bty,0; set @killct,0; mes .n$; mes "In which arena do you want to fight?"; next; switch(select("- PvP:- GvG:- Nevermind")) { // PvP case 1: mes .n$; mes "Please choose the PvP Type:"; mes "In the \"()\" stands, if 3rd Jobs, only 3rd Jobs or All Jobs are allowed to enter."; next; switch($@class_disp[$disppvp_map]) { case 0: set .@m_pvpdisp$,"No 3rd Jobs"; break; case 1: set .@m_pvpdisp$,"Only 3rd Jobs"; break; case 2: set .@m_pvpdisp$,"All Jobs"; break; } switch($@class_n[$npvp_map]) { case 0: set .@m_pvpn$,"No 3rd Jobs"; break; case 1: set .@m_pvpn$,"Only 3rd Jobs"; break; case 2: set .@m_pvpn$,"All Jobs"; break; } switch($@class_dm[$dmpvp_map]) { case 0: set .@m_pvpdm$,"No 3rd Jobs"; break; case 1: set .@m_pvpdm$,"Only 3rd Jobs"; break; case 2: set .@m_pvpdm$,"All Jobs"; break; } switch(select("- PvP Dispell ["+getmapusers($@disppvp$[$disppvp_map])+"] ("+.@m_pvpdisp$+"):- Normal PvP ["+getmapusers($@npvp$[$npvp_map])+"] ("+.@m_pvpn$+"):- PvP Deathmatch["+getmapusers($@dmpvp$[$dmpvp_map])+"] ("+.@m_pvpdm$+"):- Party PvP")) { // PvP Dispell case 1: mes .n$; if($@class_disp[$disppvp_map] == 0 && eaclass()&EAJL_THIRD) { mes "I'm sorry, but 3rd Classes are not allowed in this PvP Room."; close; } else if($@class_disp[$disppvp_map] == 1 && !(eaclass()&EAJL_THIRD)) { mes "I'm sorry, but only 3rd Classes are allowed in this PvP Room."; close; } mes "I'll warp you now to the PvP Room, also remove all your buffs."; close2; sc_end SC_ALL; // Remove every kind of buff warp $@disppvp$[$disppvp_map],0,0; announce "["+strcharinfo(0)+"] has entered the PvP Dispell Arena!",0; end; //PvP Normal case 2: mes .n$; if($@class_n[$npvp_map] == 0 && eaclass()&EAJL_THIRD) { mes "I'm sorry, but 3rd Classes are not allowed in this PvP Room."; close; } else if($@class_n[$npvp_map] == 1 && !(eaclass()&EAJL_THIRD)) { mes "I'm sorry, but only 3rd Classes are allowed in this PvP Room."; close; } mes "I'll warp you now to the Normal PvP Room."; close2; warp $@npvp$[$npvp_map],0,0; announce "["+strcharinfo(0)+"] has entered the Normal PvP Arena",0; end; // PvP DM case 3: mes .n$; if($@class_dm[$dmpvp_map] == 0 && eaclass()&EAJL_THIRD) { mes "I'm sorry, but 3rd Classes are not allowed in this PvP Room."; close; } else if($@class_dm[$dmpvp_map] == 1 && !(eaclass()&EAJL_THIRD)) { mes "I'm sorry, but only 3rd Classes are allowed in this PvP Room."; close; } mes "I'll warp you now to the PvP Deathmatch Room."; close2; set @dm,1; warp $@dmpvp$[$dmpvp_map],0,0; announce "["+strcharinfo(0)+"] has entered the PvP Deathmatch Arena!",0; end; // Party PvP case 4: mes .n$; if(!getcharid(1)) { mes "I'm sorry, but you are not in a party."; mes "Please come back as soon you have found one."; close; } if(getpartyleader(getcharid(1)) != strcharinfo(0)) { mes "I'm sorry, but only your leader can register your party."; close; } mes "Parties in Rooms:"; mes "2vs2: "+getmapusers($@pt2pvp$[$pt2pvp_map])/2; mes "3vs3: "+getmapusers($@pt3pvp$[$pt3pvp_map])/3; mes "4vs4: "+getmapusers($@pt4pvp$[$pt4pvp_map])/4; mes "5vs5: "+getmapusers($@pt5pvp$[$pt5pvp_map])/5; next; mes .n$; set @pty_id,getcharid(1); getpartymember(@pty_id,1); getpartymember(@pty_id,2); set @ptymem,$@partymembercount; copyarray @ptymemid[0],$@partymembercid,@ptymem; // Char ID copyarray @ptymemaid[0],$@partymemberaid,@ptymem; // Account ID set .@pt_ct,0; for ( set .@pm,0; .@pm < @ptymem; set .@pm,.@pm + 1) if( isloggedin(@ptymemaid[.@pm],@ptymemid[.@pm]) == 1) set .@pt_ct,.@pt_ct + 1; if(.@pt_ct < 2) { mes "It seems like you don't the required members for the Party vs Party Mode."; mes "You need at least two players, which have to be online, to be able to participate."; close; } set .@pt,.@pt_ct; mes "Chosen Party vs Party Mode:"; mes .@pt+"vs"+.@pt+" Party PvP"; mes "Class Restriction:"; switch( getd("$@class_p"+.@pt+"["+getd("$pt"+.@pt+"pvp_map")+"]") ) { case 0: mes "No 3rd Jobs allowed"; break; case 1: mes "Only 3rd Jobs allowed"; break; case 2: mes "All Jobs allowed"; break; } next; mes .n$; if(getmapusers(getd("$@pt"+.@pt+"pvp$["+getd("$pt"+.@pt+"pvp_map")+"]")) >= (.@pt+.@pt)) { mes "I'm sorry, but the "+.@pt+"vs"+.@pt+" Arena is already full."; mes "Please come back later."; close; } getpartymember(@pty_id,1); getpartymember(@pty_id,2); set @ptymem,$@partymembercount; copyarray @ptymemid[0],$@partymembercid,@ptymem; // Char ID copyarray @ptymemaid[0],$@partymemberaid,@ptymem; // Account ID for ( set .@pm,0; .@pm < @ptymem; set .@pm,.@pm + 1) if(isloggedin(@ptymemaid[.@pm],@ptymemid[.@pm]) == 1) if(getd("$@class_p"+.@pt+"["+getd("$pt"+.@pt+"pvp_map")+"]") == 0 && eaclass()&EAJL_THIRD) { mes "I'm sorry, but 3rd Classes are not allowed in this PvP Room."; close; } else if(getd("$@class_p"+.@pt+"["+getd("$pt"+.@pt+"pvp_map")+"]") == 1 && !(eaclass()&EAJL_THIRD)) { mes "I'm sorry, but only 3rd Classes are allowed in this PvP Room."; close; } mes "I'll warp your party now."; mes "Good luck."; close2; warpparty getd("$@pt"+.@pt+"pvp$["+getd("$pt"+.@pt+"pvp_map")+"]"),0,0,@pty_id; announce "The Party ["+getpartyname(getcharid(1))+"] has entered the "+.@pt+"vs"+.@pt+" Party PvP Arena!",0; end; } break; // GvG case 2: mes .n$; if(!getcharid(2)) { mes "I'm sorry, but you are not in a guild."; close; } mes "Please choose the room you want to join:"; next; set .@rchoi,select("- GvG 1 ["+getmapusers($@gvgr$[0])+"]:- GvG 2 ["+getmapusers($@gvgr$[1])+"]:- GvG 3 ["+getmapusers($@gvgr$[2])+"]") - 1; mes .n$; mes "I will warp you now."; close2; warp $@gvgr$[.@rchoi],0,0; end; // Nevermind case 3: break; } close; // Ranking case 2: mes .n$; if(!$@pvptable) { mes "I'm sorry, the ranking system is offline and thus I can't show you any ranking."; close; } mes "Which ranking do you wanna see?"; next; set .@rank,select("- Kills:- Deaths:- Highest Streak:- Killing Sphree:- Dominating:- Mega Kill:- Unstoppable:- Wicked Sick:- Monster Kill:- GodLike:- Holy Sh1t"); if(.@rank > 3 && .@rank < 12) // PvP Sphree Ranker set .@listr$,$@sphree_rank$[.@rank-4]; else { // PvP General K/D/Highest Streak Rankers setarray .@db_rank$[0],"kills","death","hstreak"; set .@listr$,.@db_rank$[.@rank-1]; } mes .n$; mes "Which list do you want to see?"; next; set .@limit,select("- Top 5:- Top 10:- Top 15:- Top 20:- Top 25:- Top 30:- Nevermind") * 5; if(.@limit == 35) goto R_Bye; mes .n$; mes "Ranking:"; switch(.@rank) { case 1: mes set(.@rankn$,"Top "+.@limit+" Killers"); set .@rankt$,"Kills"; break; case 2: mes set(.@rankn$,"Top "+.@limit+" Victims"); set .@rankt$,"Deaths"; break; case 3: mes set(.@rankn$,"Top "+.@limit+" Highest Streak"); set .@rankt$,"Highest Streak"; break; default: mes set(.@rankn$,"Top "+.@limit+" "+$@sphree_names$[@rank-4]+" Rankers"); set .@rankt$,$@sphree_names$[.@rank-4]+"s"; break; } mes "Correct?"; next; if(select("- Yes:- No") == 2) goto R_Bye; mes .n$; mes "I will now list the ranking in your Chat Box."; close2; dispbottom "======= "+.@rankn$+" ==========="; dispbottom "Player Name: "+.@rankt$; if(query_sql("SELECT `char_id` , `"+.@listr$+"` FROM `arena_master` WHERE `"+.@listr$+"` > 0 ORDER BY `"+.@listr$+"` DESC LIMIT "+.@limit,.@ch_id,.@sh_r) == 0) { dispbottom "No Player found."; end; } for( set .@r,0; .@r < getarraysize(.@sh_r); set .@r,.@r + 1) { query_sql "SELECT `name` FROM `char` WHERE `char_id` = '"+.@ch_id[.@r]+"'",.@ch_na$; dispbottom .@ch_na$+": "+.@sh_r[.@r]; } end; // Arena Shop case 3: mes .n$; mes "Hello, I can sell your useful items for the daily PvP need and more."; mes "Depending on the bounty, I will open the respective shop."; switch($@bty_type) { case 0: next; mes .n$; mes "I'm sorry, but the bounty feature is not enabled."; close; case 1: dispbottom "[Arena Shop]: I will now open the Bounty Shop, which uses \"Zeny\" as payment."; break; case 2: dispbottom "[Arena Shop]: I will now open the Bounty Shop, which uses \""+$@bty_cvard$+"\" as payment."; dispbottom "[Arena Shop]: You have "+getd(""+$@bty_cvarn$)+" "+$@bty_cvard$+"."; break; case 3: set @pts,0; dispbottom "[Arena Shop]: I will now open the Bounty Shop, which uses \"Bounty Points\" as payment."; query_sql "SELECT `bounty_pts` FROM `arena_master` WHERE `char_id` = '"+getcharid(0)+"'",@pts; dispbottom "[Arena Shop]: You have "+@pts+" Bounty Points."; break; } close2; callshop "Arena_Shop",1; npcshopattach "Arena_Shop"; end; OnBuyItem: for( set .@s,0; .@s < getarraysize(@bought_nameid); set .@s,.@s + 1) for( set .@i,0; .@i < getarraysize(.arena_sh); set .@i,.@i + 1) if(@bought_nameid[.@s] == .arena_sh[.@i]) if(checkweight(@bought_nameid[.@s],@bought_quantity[.@s]) == 1) { set .@c_item,(@bought_quantity[.@s]*.arena_ar[.@i]); set .@total,(.@total + .@c_item); break; } else { dispbottom "[Arena Shop]: You have reached your weight limit, lose some weight and come back please."; end; } switch($@bty_type) { case 1: if(Zeny >= .@total) set Zeny,Zeny - .@total; else { dispbottom "[Arena Shop]: You don't have enough Zeny."; end; } break; case 2: if(getd(""+$@bty_cvarn$) >= .@total) setd(""+$@bty_cvarn$),getd(""+$@bty_cvarn$) - .@total; else { dispbottom "[Arena Shop]: You don't have enough "+$@bty_cvard$+", currently "+getd(""+$@bty_cvarn$)+"."; end; } break; case 3: if(@pts >= .@total) query_sql "UPDATE `arena_master` SET `bounty_pts` = `bounty_pts` - "+.@total+" WHERE `char_id` = '"+getcharid(0)+"'"; else { dispbottom "[Arena Shop]: You don't have enough Bounty Points, currently "+@pts; end; } break; } for ( set .@b,0; .@b < getarraysize(@bought_nameid); set .@b,.@b + 1) getitem @bought_nameid[.@b],@bought_quantity[.@b]; deletearray @bought_nameid[0],getarraysize(@bought_nameid); deletearray @bought_quantity[0],getarraysize(@bought_quantity); end; // Information case 4: mes .n$; mes "What do you want to know about?"; next; switch(select("- PvP:- GvG:- Sphree:- Ranking:- Bounty Feature:- Nevermind")) { case 1: mes "[=== PvP ===]"; mes "PvP Types:"; mes " - Normal"; mes " - Dispell"; mes " - Deathmatch"; mes " - Party PvP:"; mes " - 2vs2"; mes " - 3vs3"; mes " - 4vs4"; mes " - 5vs5"; next; mes "[=== PvP ===]"; mes "Dispell PvP:"; mes " - You'll be dispelled, when you enter the room."; mes " "; mes "Deathmatch PvP:"; mes " - You'll be auto-resurrect on death, except you type @die, get comaed or similar, then you'll be warped to your savepoint."; close; case 2: mes "[=== GvG ===]"; mes "In these rooms, you can see what WoE would look like."; close; case 3: mes "[=== Sphree ===]"; mes "Sphree - Required Kills."; for ( set .@s,0; .@s < getarraysize($@sphree_names$); set .@s,.@s + 1) mes $@sphree_names$[.@s] +" - "+$@sphree_kills[.@s]; next; mes "[=== Sphree ===]"; mes "For each sphree you accomplish, except First Blood, you gain an point for the bounty feature, if it has been activated."; mes "For more ask me about the Bounty Feature."; next; mes "[=== Sphree ===]"; mes "Also there is the Multi Kill Sphrees, but you won't recieve points for them."; mes "The time span you can achieve them is "+ $@multi/1000+" seconds."; next; mes "[=== Sphree ===]"; mes "In this time you, if you kill"; mes " - one more player = Double Kill"; mes " - two more players = Triple Kill"; mes " - three or more players = Ultra Kill"; close; case 4: mes "[=== Ranking ===]"; mes "Kills, Deaths, Sphree Counts (like Killing Sphree), the highest kill count till you died and lists it in either a Top 5, 10, 15, 20, 25 or a Top 30 List with the wanted information you have chosen."; close; case 5: mes .n$; if(!$@bty_type) { mes "This feature isn't activate."; close; } mes "Current Bounty Reward: "+ $@bty_price + " " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?$@bty_cvard$:"Bounty Points") ); mes "Also an Shop exists so you can prepare you for battle easier."; mes "Next is an Bounty Bonus, which automatically activates when someone reaches "+$@bty_bon_start+" kills."; mes "An announce will be displayed, to stop him and that you get an bonus to the bounty price, which depends on the bounty type."; mes "Current Bonus is: "+$@bty_bonus+" " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?$@bty_cvard$:"Bounty Points") ); mes "Also there is an Bounty Bonus Multiplier, but the value of that will stay an secret."; next; mes .n$; mes "The bounty depends on your victims sphree."; mes "Here is a list of them:"; mes " "; mes "Sphree - Points"; for ( set .@s,0; .@s < getarraysize($@sphree_names$); set .@s,.@s + 1) mes $@sphree_names$[.@s] +" - "+.@s; next; case 6: break; } // Nevermind case 5: break; } R_Bye: mes .n$; mes "Okay, see ya."; close; // GM Menu GM_Menu: mes "How can I help you?"; next; switch(select("- Table Settings:- Debug State:- Nevermind")) { case 1: mes .n$; mes "Table Status: "+( ($@pvptable == 1)?"":"Not ")+"Installed"; mes "What do you want to do?"; next; if($@pvptable == 1) { switch(select("- Erase Content from Table:- Delete Table completely:- Nevermind")) { case 1: mes .n$; mes "Are you sure, that you want to delete the rankings from the tables?"; if(select("- Yes:- No") - 1) close; next; mes .n$; mes "Here we go!"; query_sql "TRUNCATE TABLE `arena_master`"; break; case 2: mes .n$; mes "Are you sure, that you want to delete the whole table from the database?"; if(select("- Yes:- No") - 1) close; next; mes .n$; mes "Here we go!!!"; query_sql "DROP TABLE IF EXISTS `arena_master`"; set $@pvp_table,0; break; case 3: break; } } else if($@pvptable == 0) { if(select("- Create Tables:- Nevermind") - 1) close; mes .n$; mes "Are you sure, that you want to create the tables for the rankings?"; if(select("- Yes:- No") - 1) close; next; mes .n$; mes "Here we go!"; query_sql "CREATE TABLE `arena_master` ( `char_id` int(10) unsigned NOT NULL, `kills` smallint(5) unsigned DEFAULT '0', `death` smallint(5) unsigned DEFAULT '0', `hstreak` smallint(5) unsigned DEFAULT '0', `bounty` smallint(5) unsigned DEFAULT '0', `bounty_pts` smallint(5) unsigned DEFAULT '0', `killer` smallint(5) unsigned DEFAULT '0', `domi` smallint(5) unsigned DEFAULT '0', `mega` smallint(5) unsigned DEFAULT '0', `unstopp` smallint(5) unsigned DEFAULT '0', `wicked` smallint(5) unsigned DEFAULT '0', `monster` smallint(5) unsigned DEFAULT '0', `godlike` smallint(5) unsigned DEFAULT '0', `holys` smallint(5) unsigned DEFAULT '0')"; set $@pvp_table,1; break; } close; case 2: mes .n$; mes "Debug State: "+( ($arena_debug == 1)?"Online":"Offline"); mes "Do you want to change it?"; if(select("- Yes:- No") - 1) close; next; mes .n$; mes "Debug State has been turned "+ ( (!$arena_debug)?"on":"off")+"."; set $arena_debug,!$arena_debug; break; case 3: break; } close; OnLoading: set .n$,"["+strnpcinfo(1)+"]"; while($@pvpgvg_load) { delwaitingroom; waitingroom "Arena: Closed",0; sleep 2000; } delwaitingroom; announce "PvP/GvG Arena is now opened.",0; waitingroom "PvP/GvG Arena: Open",0; if($arena_debug) debugmes "Main OnInit Loaded, continuing with Arena Shop"; if($@bty_type) { // If Bounty is enabled // Shop Items: PvP useful stuff, like Elements, Boxes and Food // These will be used for all shops, but the prices depends on the Bounty Type you have set. setarray .arena_sh[0],12020, // [0] == Cursed Water 12028, // [1] == Box of Thunder 12029, // [2] == Box of Gloom 12030, // [3] == Box of Resentment 12031, // [4] == Box of Drowsiness 12032, // [5] == Box of Stroms 12033, // [6] == Box of Sunlight 12034, // [7] == Box of Panting 12108, // [8] == Scroll Package 12215, // [9] == LV 10 Blessing Scroll 12216, // [10] == LV 10 Agi Scroll 12217, // [11] == LV 5 Aspersio Scroll 12218, // [12] == LV 5 Assumptio Scroll 12219, // [13] == LV 10 Wind Walker Scroll 12075, // [14] == Steamed Tongue 12080, // [15] == Dragon Breath Cocktail 12085, // [16] == Immortal Stew 12090, // [17] == Steamed Desert Scorpions 12095, // [18] == Hwergelmir's Tonic 12100, // [19] == Cooked Nice Tail's Tails 12114, // [20] == Elemental Converter[Fire] 12115, // [21] == Elemental Converter[Water] 12116, // [22] == Elemental Converter[Earth] 12117, // [23] == Elemental Converter[Wind] 12118, // [24] == Fireproof Potion 12119, // [25] == Coldproof Potion 12120, // [26] == Earthproof Potion 12121, // [27] == Thunderproof Potion 13543, // [28] == Chemical Protection Helm Scroll Box 13544, // [29] == Chemical Protection Shield Scroll Box 13545, // [30] == Chemical Protection Armor Scroll Box 13546, // [31] == Chemical Protection Weapon Scroll Box 13547, // [32] == Repair Weapon Scroll Box 14593; // [33] == Mystical Amplification Scroll // Prices: // Two ways of doing so: // - Per formula // - Per Array // You can determine for each currency the way of calculation and prices. // If you want to use the formula, set ".@arena_pay" to 1. // If you wanna use the array, set ".@arena_pay" to 2, // but remember to put the prices for all items, also there is no multiplier added for this. set .@arena_pay,1; // Cost Multiplier: // The value here will multiply the costs in the shop. // Fill in the index of the item array for which Item you want to use the multiplier. // * Suggested Values: // - Minimum: 1 // - Maximum: 10 // Note: On Mid Rate and High Rate Servers, it's easy to gain money very fast. // So I added this to only increase the costs in the shop, but not the gain per kill. // Note2: NEVER PUT '0' ALSO I DIDN'T ADD AN PREVENTION IF YOU GO HIGHER THAN '10'!!! setarray .@arena_multi[0],1, // [0] 2, // [1] 2, // [2] 2, // [3] 2, // [4] 2, // [5] 2, // [6] 2, // [7] 4, // [8] 4, // [9] 4, // [10] 4, // [11] 4, // [12] 4, // [13] 5, // [14] 5, // [15] 5, // [16] 5, // [17] 5, // [18] 5, // [19] 3, // [20] 3, // [21] 3, // [22] 3, // [23] 1, // [24] 1, // [25] 1, // [26] 1, // [27] 4, // [28] 4, // [29] 4, // [30] 4, // [31] 3, // [32] 2; // [33] if(.@arena_pay == 1) { // ============== * By Formula * ================ // Note: If the formula results in a decimal number it will be degraded. for ( set .@s,0; .@s < getarraysize(.arena_sh); set .@s,.@s + 1) { // =============== Zeny Formula ========== // // Default: (($@bty_price+(.@s*($@bty_price/10)))/2)*.@arena_multi // Base Price = $@bty_price, "Bonus" = + (Index ID* ($@bty_price/10))/2 // Example: 5000 + (4(=Index of 12031)*(5000/10=500) > 7000/2 = 3500 Zeny for 12031 // With Multiplier: ".@arena_multi[4] = 5": 3500 * 5 = 17500 if($@bty_type == 1) set .@arena_fo,(($@bty_price+(.@s*($@bty_price/10)))/2)*.@arena_multi[.@s]; // =============== Custom Points Formula ========== // // Default: (($@bty_price+.@s)/2)*.@arena_multi // Base Price = $@bty_price, "Bonus" = + Index ID/2 // Example: 2 + 4(=Index of 12031) > 6/2 = 3 Custom Points for 12031 // With Multiplier: ".@arena_multi[4] = 5": 3 * 5 = 15 else if($@bty_type == 2) set .@arena_fo,(($@bty_price+.@s)/2)*.@arena_multi[.@s]; // =============== Bounty Points Formula ========== // // Default: (($@bty_price+(.@s*10))/2)*.@arena_multi // Base Price = $@bty_price, "Bonus" = + (Index ID* 10)/2 // Example: 5 + (4(=Index of 12031)*10) > 45/2 = 22 Bounty Points for 12031 // With Multiplier: ".@arena_multi[4] = 5": 22 * 5 = 110 else if($@bty_type == 3) set .@arena_fo,(($@bty_price+(.@s*10))/2)*.@arena_multi[.@s]; // =============== Adding the price (calculated by the formula) to the array ========== // setarray .arena_ar[.@s],.@arena_fo; } // Price Array } else setarray .arena_ar[0],100, // [0] 100, // [1] 100, // [2] 100, // [3] 100, // [4] 100, // [5] 100, // [6] 100, // [7] 100, // [8] 100, // [9] 100, // [10] 100, // [11] 100, // [12] 100, // [13] 100, // [14] 100, // [15] 100, // [16] 100, // [17] 100, // [18] 100, // [19] 100, // [20] 100, // [21] 100, // [22] 100, // [23] 100, // [24] 100, // [25] 100, // [26] 100, // [27] 100, // [28] 100, // [29] 100, // [30] 100, // [31] 100, // [32] 100; // [33] npcshopdelitem "Arena_Shop",512; // Adding Items and Prices to the Shop for ( set .@s,0; .@s < getarraysize(.arena_sh); set .@s,.@s + 1) npcshopadditem "Arena_Shop",.arena_sh[.@s],.arena_ar[.@s]; if($arena_debug) debugmes "Arena Shop loaded - Items: "+getarraysize(.arena_sh)+", Prices: "+getarraysize(.arena_ar); } end; } // =============== Bounty Shop =========== // - shop Arena_Shop -1,512:-1 // =============== Main Settings ===============// - script PvPGvGMain -1,{ end; OnInit: freeloop(1); // =============== Ranking Check & Debug Messages ================// set $@pvpgvg_load,1; //set $arena_debug,1; initnpctimer; if($arena_debug) debugmes "====== Arena Master - Debug initiate... ========"; if(query_sql("SHOW TABLES LIKE 'arena_master'",.@pvptab) == 0) set $@pvptable,0; else set $@pvptable,1; donpcevent "Arena Master::OnLoading"; // ============== Sphree Settings ============// setarray $@sphree_names$[0],"Killing Sphree","Dominating","Mega Kill","Unstoppable","Wicked Sick","Monster Kill","GodLike","Holy Sh1t"; setarray $@sphree_kills[0],3,5,7,9,11,13,15,17; // Kills required for each sphree. setarray $@sphree_wav$[0],"killingspree","dominating","megakill","unstoppable","wickedsick","monsterkill","godlike","holyshit"; // WAV file names setarray $@sphree_rank$[0],"killer","domi","mega","unstopp","wicked","monster","godlike","holys"; // Variable Names for the ranking of each sphree set $@multi,5000; // Time Span for chance to gain Multi-Kill in milliseconds. if($arena_debug) debugmes "PvP Sphree Names loaded: "+getarraysize($@sphree_names$); if($arena_debug) debugmes "PvP Sphree Kills loaded: "+getarraysize($@sphree_kills); if($arena_debug) debugmes "PvP Sphree WAV Names loaded: "+getarraysize($@sphree_wav$); if($arena_debug) debugmes "PvP Sphree Ranking Names loaded: "+getarraysize($@sphree_rank$); // ============== Bounty Settings =========// // Bounty Type: // * 0 = Off // * 1 = Zeny // * 2 = Custom Points // * 3 = Bounty Points set $@bty_type,2; if($@bty_type) { set $@bty_bonus,5; // Bonus, if you kill an player set $@bty_bon_start,4; //which has achieved an spree of "$@bty_bon_start" set $@bty_bonus_multi,1; // Use Bonus Multiplier depending on the Bounty Type? See seperate sections below set $@bty_bonus_m,1000; // Multiplier for Bounty Bonus // Custom Points Settings set $@bty_cvard$,"Cash Points"; // What to display for players set $@bty_cvarn$,"#CASHPOINTS"; // Actual Variable Name // =============== Zeny ========== // if($@bty_type == 1) set $@bty_price,5000; // Zeny per Sphree // =============== Custom Points ========== // else if($@bty_type == 2) set $@bty_price,2; // Custom Points per Sphree // =============== Bounty Points ========== // else if($@bty_type == 3) set $@bty_price,5; // Bounty Points per Sphree // Custom Bounty Maps // = Maps on which you also can gain the reward // 1 = On // 0 = Off, ordinary ones set $@bty_cmap,1; if($@bty_cmap == 1) { // Map Type: // 1 = Every Map with PvP/GvG Mapflags // 2 = Specific (Array below) set $@bty_cmap_type,2; if($@bty_cmap_type == 2) { // Map Array // Put the either the whole map name // or a part of it to add more maps with the part containing setarray $@bty_cmaps$[0],"prt_fild08","prt_gld"; // Which map is a PvP/GvG Map? // 6 = PvP // 9 = GvG // Note: In the same order as above setarray $@bty_cmap_pg[0],6,9; } // Party Usage // 1 = No parties Allowed // 2 = Parties allowed setarray $@bty_cmap_pty,2,1; // Mapflags setarray $@bty_cmapfl[0],0, //mf_nomemo // 1, //mf_noteleport 2, //mf_nosave 3, //mf_nobranch 4, //mf_nopenalty 5, //mf_nozenypenalty 11, //mf_notrade // 13, //mf_nowarp // 22, //mf_nogo 33, //mf_noreturn // 34, //mf_nowarpto // 35, //mf_nightmaredrop 38, //mf_nodrop 41, //mf_novending 44, //mf_noexppenalty 14, //mf_partylock 7; //mf_pvp_noparty // ======= Auto Mapflag Adding ===============// for ( set .@m,0; .@m < getarraysize($@bty_cmaps$); set .@m,.@m + 1 ) { if($arena_debug) debugmes "Mapflag set at "+$@bty_cmaps$[.@m] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize($@bty_cmapfl); set .@mf,.@mf + 1 ) { if(($@bty_cmapfl[.@mf] == 14 || $@bty_cmapfl[.@mf] == 7) && $@bty_cmap_pty[.@m] == 1) continue; setmapflag $@bty_cmaps$[.@m],$@bty_cmapfl[.@mf]; if($arena_debug) debugmes "Mapflag "+ $@bty_cmapfl[.@mf] +" set at "+$@bty_cmaps$[.@m] + " complete"; } // PvP or GvG Mapflag setmapflag $@bty_cmaps$[.@m],$@bty_cmap_pg[.@m]; if($arena_debug) debugmes "Mapflag "+ $@bty_cmap_pg[.@m] +" set at "+$@bty_cmaps$[.@m] + " complete"; } } } if($arena_debug) debugmes "Bounty Shop - Currency: " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?$@bty_cvard$:"Bounty Points") ) + ", Basic Price: "+ $@bty_price; // Bounty Calculation: // Scroll down till the line with "function getBounty {" if($arena_debug) debugmes "Bounty Type loaded: "+$@bty_type; // ============ GvG Settings ============// setarray $@gvgr$[0],"guild_vs1","guild_vs2","guild_vs3"; if($arena_debug) debugmes "Guild Maps loaded: "+getarraysize($@gvgr$); // Party Usage // 1 = No parties Allowed // 2 = Parties allowed setarray $@gvg_pty[0],2,2,2; // ======== Mapflags ======== // // If you want you can add more mapflags setarray .gvg_mf[0],0, //mf_nomemo 1, //mf_noteleport 2, //mf_nosave 3, //mf_nobranch 4, //mf_nopenalty 5, //mf_nozenypenalty 9, //mf_gvg 11, //mf_notrade 13, //mf_nowarp 15, //mf_noicewall 22, //mf_nogo 33, //mf_noreturn 34, //mf_nowarpto 35, //mf_nightmaredrop 38, //mf_nodrop 41, //mf_novending 44, //mf_noexppenalty 14, //mf_partylock 10; //mf_gvg_noparty if($arena_debug) debugmes "Guild Mapflags loaded: "+getarraysize(.gvg_mf); if($arena_debug) debugmes "Array Reading of GvG Maps complete"; for ( set .@m,0; .@m < getarraysize($@gvgr$); set .@m,.@m + 1 ) { if($arena_debug) debugmes "Mapflag set at "+$@gvgr$[.@m] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.gvg_mf); set .@mf,.@mf + 1 ) { if((.gvg_mf[.@mf] == 14 || .gvg_mf[.@mf] == 10) && .gvg_pty[.@m] == 2) continue; setmapflag $@gvgr$[.@m],.gvg_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .gvg_mf[.@mf] +" set at "+$@gvgr$[.@m] + " complete"; } } if($arena_debug) debugmes "Guild Mapflag loading completed"; // ============ PvP Settings ============// // = You can use your own Maps as you like, even reduce or put more // = These below are the default PvP Maps // ====== Dispell PvP ==========// setarray $@disppvp$[1],"pvp_y_1-1","pvp_y_1-4","pvp_y_1-2","pvp_y_1-3","pvp_y_1-5"; if($arena_debug) debugmes "PvP Dispell Maps loaded: "+(getarraysize($@disppvp$)-1); // ================== Normal Maps ================// setarray $@npvp$[1],"pvp_y_2-1","pvp_y_2-4","pvp_y_2-2","pvp_y_2-3","pvp_y_2-5"; if($arena_debug) debugmes "PvP Normal Maps loaded: "+(getarraysize($@npvp$)-1); // ================== Deathmatch Maps ================// setarray $@dmpvp$[1],"pvp_y_3-1","pvp_y_3-4","pvp_y_3-2","pvp_y_3-3","pvp_y_3-5"; if($arena_debug) debugmes "PvP DM Maps loaded: "+(getarraysize($@dmpvp$)-1); // ========= 2vs2 Party PvP ==========// setarray $@pt2pvp$[1],"pvp_y_4-1","pvp_y_4-4","pvp_y_4-2","pvp_y_4-3","pvp_y_4-5"; if($arena_debug) debugmes "Party PvP 2vs2 Maps loaded: "+(getarraysize($@pt2pvp$)-1); // ========= 3vs3 Party PvP ==========// setarray $@pt3pvp$[1],"pvp_y_5-1","pvp_y_5-4","pvp_y_5-2","pvp_y_5-3","pvp_y_5-5"; if($arena_debug) debugmes "Party PvP 3vs3 Maps loaded: "+(getarraysize($@pt3pvp$)-1); // ========= 4vs4 Party PvP ==========// setarray $@pt4pvp$[1],"pvp_y_6-1","pvp_y_6-4","pvp_y_6-2","pvp_y_6-3","pvp_y_6-5"; if($arena_debug) debugmes "Party PvP 4vs4 Maps loaded: "+(getarraysize($@pt4pvp$)-1); // ========= 5vs5 Party PvP ==========// setarray $@pt5pvp$[1],"pvp_y_7-1","pvp_y_7-4","pvp_y_7-2","pvp_y_7-3","pvp_y_7-5"; if($arena_debug) debugmes "Party PvP 5vs5 Maps loaded: "+(getarraysize($@pt5pvp$)-1); // ======= Party Usage ========== // 1 = No parties Allowed // 2 = Parties allowed setarray .disp_pty[1],2,2,2,2,2; setarray .n_pty[1],2,2,2,2,2; setarray .dm_pty[1],2,2,2,2,2; // ============= Class Limitation ========// // * Values: // 0 = No 3rd Job Allowed // 1 = Only 3rd Job Allowed // 2 = All // -------------------------------------- // * Dispell PvP Rooms setarray $@class_disp[1],2,2,2,2,2; // * Normal PvP Rooms setarray $@class_n[1],2,2,2,2,2; // * Deathmatch PvP Rooms setarray $@class_dm[1],2,2,2,2,2; // * Party PvP 2vs2 Rooms setarray $@class_p2[1],2,2,2,2,2; // * Party PvP 3vs3 Rooms setarray $@class_p3[1],2,2,2,2,2; // * Party PvP 4vs4 Rooms setarray $@class_p4[1],2,2,2,2,2; // * Party PvP 5vs5 Rooms setarray $@class_p5[1],2,2,2,2,2; //============================== // ===== Map Rotation ====== // // 1 = Fixed Map (Always Default) // 2 = Random each Day // 3 = Each specific Day an specific Map set .pvp_map,3; // ===== 1: Fixed Map (Always Default) ======== // // Type the Index of $@<Type>pvp$ for the Map to be used set $disppvp_map,2; set $npvp_map,3; set $dmpvp_map,1; set $pt2pvp_map,4; set $pt3pvp_map,4; set $pt4pvp_map,4; set $pt5pvp_map,4; // ===== 3: Specific Day ======== // if(.pvp_map == 3) { // > Chose your time in the same row as the $@pvp_maps$ order // > Values for the Array: // MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY // ============================== // setarray $@disppvp_day[1],MONDAY,MONDAY,WEDNESDAY,SATURDAY,TUESDAY; setarray $@npvp_day[1],TUESDAY,SATURDAY,WEDNESDAY,THURSDAY,MONDAY; setarray $@dmpvp_day[1],WEDNESDAY,MONDAY,SUNDAY,TUESDAY,FRIDAY; setarray $@pt2pvp_day[1],FRIDAY,TUESDAY,SATURDAY,MONDAY,TUESDAY; setarray $@pt3pvp_day[1],FRIDAY,TUESDAY,SATURDAY,MONDAY,TUESDAY; setarray $@pt4pvp_day[1],FRIDAY,TUESDAY,SATURDAY,MONDAY,TUESDAY; setarray $@pt5pvp_day[1],FRIDAY,TUESDAY,SATURDAY,MONDAY,TUESDAY; } // ======== Mapflags ======== // // If you want to add more mapflags, // add them before the last two, which are for allowing party or not setarray .pvp_mf[0],0, //mf_nomemo 1, //mf_noteleport 2, //mf_nosave 3, //mf_nobranch 4, //mf_nopenalty 5, //mf_nozenypenalty 11, //mf_notrade 13, //mf_nowarp 22, //mf_nogo 33, //mf_noreturn 34, //mf_nowarpto 35, //mf_nightmaredrop 38, //mf_nodrop 41, //mf_novending 44, //mf_noexppenalty 14, //mf_partylock 7; //mf_pvp_noparty if($arena_debug) debugmes "PvP Mapflags loaded: "+(getarraysize(.pvp_mf)-1); function writeStats; if($arena_debug) debugmes "Write Stats Function loaded."; function getBounty; function writeBounty; if($arena_debug) debugmes "Bounty Function loaded."; function PVP_BTY_CMAP; if($arena_debug) debugmes "Custom Bounty Map Function loaded."; stopnpctimer; set .time,getnpctimer(0); if($arena_debug) debugmes "Loading Time: "+.time+" seconds."; freeloop(0); set $@pvpgvg_load,0; OnClock0001: freeloop(1); setarray .@pre$[0],"disp","n","dm","pt2","pt3","pt4","pt5"; if(.pvp_map == 2) { if($arena_debug) debugmes "Random Map Rotation:"; announce "[Arena Master]: New Day, new Battlefield!!! Random Map rotation has been loaded!",bc_all; for ( set .@l,0; .@l < getarraysize(.@pre$); set .@l,.@l + 1) { if($arena_debug) debugmes ".@pre$ = "+.@pre$[.@l]; if($arena_debug) debugmes "Array Size: $@"+.@pre$[.@l]+"pvp$ = "+getarraysize(getd("$@"+.@pre$[.@l]+"pvp$")); setd("$"+.@pre$[.@l]+"pvp_map"),rand(1,getarraysize(getd("$@"+.@pre$[.@l]+"pvp$"))-1); if($arena_debug) debugmes "$"+.@pre$[.@l]+"pvp_map = "+getd("$"+.@pre$[.@l]+"pvp_map"); if($arena_debug) debugmes "$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_map")+"] == "+getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_map")+"]"); if(!getd("$"+.@pre$[.@l]+"pvp_last") || getd("$"+.@pre$[.@l]+"pvp_last") != getd("$"+.@pre$[.@l]+"pvp_map")) { setd("$"+.@pre$[.@l]+"pvp_last"),getd("$"+.@pre$[.@l]+"pvp_map"); mapannounce getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_last")+"]"),"[Arena Master]: Duo the map change I will move every player from the current map to the new map in 3 seconds!",bc_all,0xFF0000; sleep 3000; mapwarp getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_last")+"]"),getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_map")+"]"),0,0; } } } else if(.pvp_map == 3) { if($arena_debug) debugmes "Specific Day an Specific Map:"; announce "[Arena Master]: New Day, new Battlefield!!! Map selection depending on the day has been loaded!",bc_all; for ( set .@l,0; .@l < getarraysize(.@pre$); set .@l,.@l + 1) { if($arena_debug) debugmes ".@pre$ = "+.@pre$[.@l]; if($arena_debug) debugmes "Previous Map: "+getd("$"+.@pre$[.@l]+"pvp_map"); // Saving the previous Map if($arena_debug) debugmes "Saving Previous Map: "+getd("$@"+.@pre$[.@l]+"pvp_last"); setd("$"+.@pre$[.@l]+"pvp_last"),getd("$"+.@pre$[.@l]+"pvp_map"); for ( set .@t,1; .@t < getarraysize(getd("$@"+.@pre$[.@l]+"pvp$")); set .@t,.@t + 1) { if($arena_debug) debugmes "Checking Day of ["+.@t+"]: "+getd("$@"+.@pre$[.@l]+"pvp_day["+.@t+"]")+" == "+gettime(DT_DAYOFWEEK); if(getd("$@"+.@pre$[.@l]+"pvp_day["+.@t+"]") == gettime(DT_DAYOFWEEK)) { setd("$"+.@pre$[.@l]+"pvp_map"),.@t; if($arena_debug) debugmes "Day Check passed: "+getd("$"+.@pre$[.@l]+"pvp_map")+" == "+.@t; mapannounce getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_last")+"]"),"[Arena Master]: Duo the map change I will move every player from the current map to the new map in 3 seconds!",bc_all,0xFF0000; sleep 3000; mapwarp getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_last")+"]"),getd("$@"+.@pre$[.@l]+"pvp$["+getd("$"+.@pre$[.@l]+"pvp_map")+"]"),0,0; } } } } if($arena_debug) debugmes "OnClock0001 and/or OnInit loaded, Auto Mapflag adding now...."; // ======= Auto Mapflag Adding ===============// // ======= Dispell PvP ===============// if($arena_debug) debugmes "Mapflag set at "+$@disppvp$[$disppvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if((.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) && .disp_pty[.@m] == 2) continue; setmapflag $@disppvp$[$disppvp_map],.pvp_mf[.@mf]; if($disppvp_map != $disppvp_last) removemapflag $@disppvp$[$disppvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@disppvp$[$disppvp_map] + " complete"; } if($arena_debug) debugmes "PvP Dispell Mapflags loaded."; // ======= Normal PvP ===============// if($arena_debug) debugmes "Mapflag set at "+$@npvp$[$npvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if((.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) && .n_pty[.@m] == 2) continue; setmapflag $@npvp$[$npvp_map],.pvp_mf[.@mf]; if($npvp_map != $npvp_last) removemapflag $@npvp$[$npvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@npvp$[$npvp_map] + " complete"; } if($arena_debug) debugmes "PvP Normal Mapflags loaded."; // ======= Deathmatch PvP ===============// if($arena_debug) debugmes "Mapflag set at "+$@dmpvp$[$dmpvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if((.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) && .dm_pty[.@m] == 2) continue; setmapflag $@dmpvp$[$dmpvp_map],.pvp_mf[.@mf]; if($dmpvp_map != $dmpvp_last) removemapflag $@dmpvp$[$dmpvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@dmpvp$[$dmpvp_map] + " complete"; } if($arena_debug) debugmes "PvP DM Mapflags loaded."; // ============== Party 2vs2 =================// if($arena_debug) debugmes "Mapflag set at "+$@pt2pvp$[$pt2pvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if(.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) continue; setmapflag $@pt2pvp$[$pt2pvp_map],.pvp_mf[.@mf]; if($pt2pvp_map != $pt2pvp_last) removemapflag $@pt2pvp$[$pt2pvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@pt2pvp$[$pt2pvp_map] + " complete"; } if($arena_debug) debugmes "Party 2v2 PvP Mapflags loaded."; // ============== Party 3vs3 =================// if($arena_debug) debugmes "Mapflag set at "+$@pt3pvp$[$pt3pvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if(.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) continue; setmapflag $@pt3pvp$[$pt3pvp_map],.pvp_mf[.@mf]; if($pt3pvp_map != $pt3pvp_last) removemapflag $@pt3pvp$[$pt3pvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@pt3pvp$[$pt3pvp_map] + " complete"; } if($arena_debug) debugmes "Party 3v3 PvP Mapflags loaded."; // ============== Party 4vs4 =================// if($arena_debug) debugmes "Mapflag set at "+$@pt4pvp$[$pt4pvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if(.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) continue; setmapflag $@pt4pvp$[$pt4pvp_map],.pvp_mf[.@mf]; if($pt4pvp_map != $pt4pvp_last) removemapflag $@pt4pvp$[$pt4pvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@pt4pvp$[$pt4pvp_map] + " complete"; } if($arena_debug) debugmes "Party 4v4 PvP Mapflags loaded."; // ============== Party 5vs5 =================// if($arena_debug) debugmes "Mapflag set at "+$@pt5pvp$[$pt5pvp_map] + " initiate..."; for ( set .@mf,0; .@mf < getarraysize(.pvp_mf); set .@mf,.@mf + 1 ) { if(.pvp_mf[.@mf] == 14 || .pvp_mf[.@mf] == 7) continue; setmapflag $@pt5pvp$[$pt5pvp_map],.pvp_mf[.@mf]; if($pt5pvp_map != $pt5pvp_last) removemapflag $@pt5pvp$[$pt5pvp_last],.pvp_mf[.@mf]; if($arena_debug) debugmes "Mapflag "+ .pvp_mf[.@mf] +" set at "+$@pt5pvp$[$pt5pvp_map] + " complete"; } freeloop(0); if($arena_debug) debugmes "Party 5v5 PvP Mapflags loaded."; if($arena_debug) debugmes "PvP Mapflags loaded."; end; OnPCLogoutEvent: if($@pvptable) { if(@killct) writeStats(@killct,1); if($@bty_type) writeBounty(@sphr,getcharid(0)); } end; OnPCKillEvent: if(PVP_BTY_CMAP() == 0) end; set .@v,killedrid; mapannounce strcharinfo(3),strcharinfo(0) + " has killed "+rid2name(.@v)+"!!!!!",0; set @killct,@killct + 1; if($arena_debug) { debugmes "[Arena]: Showing debug messages"; for ( set .@l,0; .@l < getarraysize($@sphree_kills); set .@l,.@l + 1) debugmes "[Arena]: Sphree Kills Array - Index #"+.@l+": "+$@sphree_kills[.@l]; for ( set .@l,0; .@l < getarraysize($@sphree_names$); set .@l,.@l + 1) debugmes "[Arena]: Sphree Names Array - Index #"+.@l+": "+$@sphree_names$[.@l]; for ( set .@l,0; .@l < getarraysize($@sphree_wav$); set .@l,.@l + 1) debugmes "[Arena]: Sphree WAV Names Array - Index #"+.@l+": "+$@sphree_wav$[.@l]; debugmes "[Arena]: Kill Counter Check and announces..."; debugmes "[Arena]: Kills: "+@killct+", Arraysize $@sphree_kills: "+getarraysize($@sphree_kills)+", last sphree kills: "+$@sphree_kills[getarraysize($@sphree_kills)-1]; } // Checking if the kill counter is below the last sphree number if(@killct <= $@sphree_kills[getarraysize($@sphree_kills)-1]) { if($arena_debug) debugmes "[Arena]: Kills is less than last sphree kill."; // Looping through the array to check for the sphree kill for ( set .@k,0; .@k < getarraysize($@sphree_kills); set .@k,.@k + 1) { if($arena_debug) debugmes "[Arena]: Array Index:"+.@k+", Array Content: "+$@sphree_kills[.@k]; if(@killct == $@sphree_kills[.@k]) { if($arena_debug) debugmes "[Arena]: "+@killct+", "+$@sphree_kills[.@k]; mapannounce strcharinfo(3),strcharinfo(0) + " is now on "+$@sphree_names$[.@k]+"!!!!",0; soundeffectall $@sphree_wav$[.@k]+".wav",0,strcharinfo(3); setd("@"+$@sphree_rank$[.@k]),getd("@"+$@sphree_rank$[.@k]) + 1; // Ranking Variable break; } } // Checking if the kill counter is above the last sphree number } else if(@killct >= $@sphree_kills[getarraysize($@sphree_kills)-1]) { mapannounce strcharinfo(3),strcharinfo(0) + " is now on "+$@sphree_names$[getarraysize($@sphree_names$)-1]+"!!!!",0; soundeffectall $@sphree_wav$[getarraysize($@sphree_wav$)-1]+".wav",0,strcharinfo(3); } if($arena_debug) debugmes "[Arena]: Check Done"; set @prokill,@prokill + 1; set @mkillct,@mkillct + 1; deltimer strnpcinfo(0)+"::OnMultiSpan"; addtimer $@multi,strnpcinfo(0)+"::OnMultiSpan"; if(@mkillct >= 4) sleep2 500; // Slowing down multi-kill sound effects if(@mkillct == 2) { mapannounce strcharinfo(3),strcharinfo(0) + " has made an Double Kill!!!!",0; soundeffectall "doublekill.wav",0,strcharinfo(3); } else if(@mkillct == 3) { mapannounce strcharinfo(3),strcharinfo(0) + " has made an Triple Kill!!!!",0; soundeffectall "triplekill.wav",0,strcharinfo(3); } else if(@mkillct >= 4) { mapannounce strcharinfo(3),strcharinfo(0) + " has made an Ultra Kill!!!!",0; soundeffectall "ultrakill.wav",0,strcharinfo(3); } if($@pvptable && $@bty_type) { if(@killct >= $@bty_bon_start) { if(!@hunt) { announce "Bounty Hunter: Oh My God!!! Someone stop "+strcharinfo(0)+" please!!! I'll give you a bonus of "+($@bty_bonus*$@bty_bonus_m)+" " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?$@bty_cvard$:"Bounty Points") ) + " on "+ ( (Sex)?"his":"her") +" head!!",0; sleep2 2500; setarray .@pvp_pre$[0],"disp","n","dm","pt2","pt3","pt4","pt5"; setarray .@pvp_n$[0],"Dispell","Normal","Deathmatch","Party 2vs2","Party 3vs3","Party 4vs4","Party 5vs5"; for ( set .@l,0; .@l < getarraysize(.@pvp_pre$); set .@l,.@l + 1) for ( set .@m,1; .@m < getarraysize(getd("$@"+.@pvp_pre$[.@l]+"pvp$")); set .@m,.@m + 1) if(strcharinfo(3) == getd("$@"+.@pvp_pre$[.@l]+"pvp$["+.@m+"]")) { announce "Bounty Hunter: "+( (Sex)?"He":"She")+" is in the ["+.@pvp_n$[.@l]+" Arena]!!!",0; break; } for ( set .@m,0; .@m < getarraysize($@gvgr$); set .@m,.@m + 1) if(strcharinfo(3) == $@gvgr$[.@m]) { announce "Bounty Hunter: "+( (Sex)?"He":"She")+" is in the [Guild Room "+(.@m+1)+"]!!!",0; break; } if($@bty_cmap) for ( set .@m,0; .@m < getarraysize($@bty_cmaps$); set .@m,.@m + 1) if(compare(strcharinfo(3),$@bty_cmaps$[.@m]) == 1) { announce "Bounty Hunter: "+( (Sex)?"He":"She")+" is on the map ["+$@bty_cmaps$[.@m]+"]!!!",0; break; } set @hunt,1; } set @sphr,@killct + $@bty_bonus; } if(query_sql("SELECT `bounty` FROM `arena_master` WHERE `char_id` = '"+getcharid(0,rid2name(.@v))+"'",.@bty) != 0) getBounty(.@bty,.@v); writeBounty(@sphr,getcharid(0)); } if(@killct%5==0) message strcharinfo(0),"Defeated Players: "+@killct; end; OnPCDieEvent: if(PVP_BTY_CMAP() == 0) end; // ===== Should affects you only, if you warped to an player via @warpto/@goto or were @recall-ed // ==== so you won't recieve a value for @map, which is required for the respawn in DM Maps if(!@dm) if(strcharinfo(3) == $@dmpvp$[$dmpvp_map]) set @dm,1; if($@pvptable) { writeStats(@killct,1); if($@bty_type) writeBounty(@sphr,getcharid(0)); } set @sphr,0; set @killct,0; if(@dm) { if($arena_debug) debugmes "KillerRid: "+killerrid+", KilledRid: "+killedrid; sleep2 1300; if(killerrid != 0 && killerrid != getcharid(3)) { warp strcharinfo(3),0,0; if(HP == 0) atcommand "@alive"; percentheal 100,100; } else warp "SavePoint",0,0; } set @hunt,0; end; OnMultiSpan: set @mkillct,0; end; function writeStats { if(!$@pvptable) return; // To be save :O set .@k,getarg(0); // Kills set .@d,getarg(1); // Deaths if(query_sql("SELECT `char_id` FROM `arena_master` WHERE `char_id` = '"+getcharid(0)+"'",.@c_id) != 0) { if(.@k > query_sql("SELECT `hstreak` FROM `arena_master` WHERE `char_id` = '"+getcharid(0)+"'",.@hstreak)) set .@hstreak,.@k; // Adding General Kill/Death/Highstreak Values query_sql "UPDATE `arena_master` SET `kills` = `kills` + "+.@k+" , `death` = `death` + "+.@d+" , `hstreak` = '"+.@hstreak+"' , `killer` = `killer` + "+@killer+" , `domi` = `domi` + "+@domi+" , `mega` = `mega` + "+@mega+" , `unstopp` = `unstopp` + "+@unstopp+" , `wicked` = `wicked` + "+@wicked+" , `monster` = `monster` + "+@monster+" , `godlike` = `godlike` + "+@godlike+" , `holys` = `holys` + "+@holys+" WHERE `char_id` = '"+getcharid(0)+"'"; // Reseting Ranking Variables for ( set .@l,0; .@l < getarraysize($@sphree_rank$); set .@l,.@l + 1) setd("@"+$@sphree_rank$[.@l]),0; } else query_sql "INSERT INTO `arena_master` ( `char_id` , `kills` , `death` , `hstreak` , `killer` , `domi` , `mega` , `unstopp` , `wicked` , `monster` , `godlike` , `holys` ) VALUES ( '"+getcharid(0)+"' , '"+@k+"' , '"+@d+"' , '"+@k+"' , '"+@killer+"' , '"+@domi+"' , '"+@mega+"' , '"+@unstopp+"' , '"+@wicked+"' , '"+@monster+"' , '"+@godlike+"' , '"+@holys+"' )"; return; } function getBounty { // getarg(0) == Last Sphree of Victim // getarg(1) == RID of Victim if(!getarg(0)) return; // No Sphree = No Bounty ;I // Calculation: // Exchange the */+ with the symbol you want, // but note that it can be exploited if you change it too much, // like 8 (Sphree Index)*$@bty_price (Custom Points,5) = 40 Custom Points // If Bounty Bonus Multiplier is active if($@bty_bonus_multi == 1) set .@bty_b_gain,$@bty_bonus*$@bty_bonus_m; else set .@bty_b_gain,$@bty_bonus; if(getarg(0) >= $@bty_bon_start) mapannounce strcharinfo(3),"Bounty Hunter: "+strcharinfo(0)+" has ended "+rid2name(getarg(1))+"'s Spree and was rewarded with additional "+.@bty_b_gain+" " + ( ($@bty_type == 1)?"Zeny": ( ($@bty_type == 2)?$@bty_cvard$:"Bounty Points") ),0; switch($@bty_type) { // Bounty Reward Type case 1: // Zeny set Zeny,Zeny + ($@bty_price*getarg(0)) + .@bty_b_gain; dispbottom "Bounty Hunter: You have recieved "+($@bty_price*getarg(0)+.@bty_b_gain)+" Zeny for killing "+rid2name(getarg(1))+"."; break; case 2: // Custom Points setd(""+$@bty_cvarn$),getd(""+$@bty_cvarn$) + ($@bty_price+getarg(0)) + .@bty_b_gain; dispbottom "Bounty Hunter: You have recieved "+($@bty_price+getarg(0)+.@bty_b_gain)+" "+$@bty_cvard$+" for killing "+rid2name(getarg(1))+"."; dispbottom "You have now "+getd(""+$@bty_cvarn$)+" "+$@bty_cvard$+"."; break; case 3: // Bounty Points query_sql "UPDATE `arena_master` SET `bounty_pts` = `bounty_pts` + "+($@bty_price+getarg(0)+.@bty_b_gain)+" WHERE `char_id` = '"+getcharid(0)+"'"; dispbottom "Bounty Hunter: You have recieved "+($@bty_price+getarg(0)+.@bty_b_gain)+" Bounty Points for killing "+rid2name(getarg(1))+"."; break; } writeBounty(0,getcharid(0,rid2name(getarg(1)))); return; } function writeBounty { // getarg(0) == Kills // getarg(1) == Character ID query_sql "UPDATE `arena_master` SET `bounty` = '"+getarg(0)+"' WHERE `char_id` = '"+getarg(1)+"'"; return; } function PVP_BTY_CMAP { // Regular Maps in $@<.>pvp$ & $@gvgr$ array setarray .@pvp_pre$[0],"disp","dm","n","pt2","pt3","pt4","pt5"; for ( set .@l,0; .@l < getarraysize(.@pvp_pre$); set .@l,.@l + 1) for ( set .@m,1; .@m < getarraysize(getd("$@"+.@pvp_pre$[.@l]+"pvp$")); set .@m,.@m + 1) if(strcharinfo(3) == getd("$@"+.@pvp_pre$[.@l]+"pvp$["+.@m+"]")) return 1; for ( set .@m,0; .@m < getarraysize($@gvgr$); set .@m,.@m + 1) if(strcharinfo(3) == $@gvgr$[.@m]) return 1; // Mapflag if($@bty_cmap_type == 1) if(getmapflag(strcharinfo(3),mf_pvp) == 1 && getmapflag(strcharinfo(3),mf_gvg) == 1) return 1; // Custom Maps else if($@bty_cmap_type == 2) { // One Map if(getarraysize($@bty_cmaps$) == 1) if(compare(strcharinfo(3),$@bty_cmaps$[0]) == 1) return 1; // Array else if(getarraysize($@bty_cmaps$) > 1) for ( set .@m,0; .@m < getarraysize($@bty_cmaps$); set .@m,.@m + 1) if(compare(strcharinfo(3),$@bty_cmaps$[.@m]) == 1) return 1; } return 0; } // =========== End of Function ========== }
and
CREATE TABLE `arena_master` ( `char_id` int(10) unsigned NOT NULL, `kills` smallint(5) unsigned DEFAULT '0', `death` smallint(5) unsigned DEFAULT '0', `hstreak` smallint(5) unsigned DEFAULT '0', `bounty` smallint(5) unsigned DEFAULT '0', `bounty_pts` smallint(5) unsigned DEFAULT '0', `killer` smallint(5) unsigned DEFAULT '0', `domi` smallint(5) unsigned DEFAULT '0', `mega` smallint(5) unsigned DEFAULT '0', `unstopp` smallint(5) unsigned DEFAULT '0', `wicked` smallint(5) unsigned DEFAULT '0', `monster` smallint(5) unsigned DEFAULT '0', `godlike` smallint(5) unsigned DEFAULT '0', `holys` smallint(5) unsigned DEFAULT '0', PRIMARY KEY (`char_id`) ) ENGINE=MyISAM;
How to set Delay from get item...
in Scripting Support
Posted
thx! very nicee