Jump to content

louigui0224

Members
  • Posts

    139
  • Joined

  • Last visited

Everything posted by louigui0224

  1. Hello good day guys, I'm currently using a slotmachine NPC and I just returned to creating RO after 4years and still trying to remember things I have before but for now I need your help. I wanted to know if how can I put like a rarity on the rewards on the triple slot machine. For example first reward is TCG with 100% of chance then 2nd Poring coin with only 50% chance to receive, 3rd donation coin with 10% chance to receive. TIA. Here is the script: /* ============================================================= /* Slot Machine - Triple Slot Machine /* ============================================================= /* Version: v0.7 /* v0.1 - Original Script Created. /* v0.2 - Added Option for Triple Slot Machine with animations. /* v0.3 - Added support for item pricing &/or zeny pricing. /* v0.4 - Cleaned up script variables for easy editing. /* v0.5 - Tested out some new scripting methods with IF(THEN). /* v0.6 - Added option to change slot machine modes ingame. /* v0.7 - Added optional sound effects to slot machines. - NOTE /* ============================================================= /* Description /* ============================================================= /* This script will allow users to spend zeny &/or an item for a /* chance to win a prize from the slot machine. Currently there /* are 2 versions. First is a Single Slot Machine, where only 1 /* slot is rolled. Second is the Triple Slot machine, where 3 /* slots are rolled. For either version, SUCCESS must be the /* only thing displayed in order to win. /* ============================================================= /* NOTE - If using soundeffects you must add the ".wav" files /* provided in the ".rar" file to your: data/wav folder located /* in either your: ( Ragnarok folder ) OR ( .grf file ) /* ============================================================= /* Created By: GmOcean /* ===========================================================*/ prontera,152,176,4 script SlotMachine::1slot 563,{ if( getgmlevel() == 99 ) { mes "Welcome Administrator.","What would you like to do?"; menu "Play Game",-,"Change Slot Machine Mode",iMode; next; } switch( getd(".mode"+strnpcinfo(3)+"") ){ case 0: // Single Slot machine mode. mes "Do you want to play a game?"; if( !.payment ) { mes "It costs: "+ .ssm_payment_message$[0] +" to play."; } else if ( .payment == 1 ) { mes "It costs: "+ .ssm_payment_message$[1] +" to play."; } else if ( .payment == 2 ) { mes "It costs: "+ .ssm_payment_message$[0] +" & "+ .payment_message$[1] +" to play."; } if( select("YES:NO") == 2 || Zeny < .ssm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.ssm_payment[1]) < .ssm_payment[2] && .payment ){ close; } while( @menu == 1 ){ if( !.payment || .payment == 2 ) { Zeny -= .ssm_payment[0]; } if( .payment ) { delitem( .ssm_payment[1], .ssm_payment[2] ); } if( .soundeffects ) { soundeffect "se_cash_provider.wav",0; } .@a = rand(1,100); if( .@a < atoi(.ssm_animate$[0]) ){ .@a = 1; } else { .@a = 2; } .@b = 1; while( .@b < atoi(.ssm_animate$[.@a]) ) { cutin .ssm_animate$[3] + .@b,4; sleep2 ( ( atoi(.ssm_animate$[4]) * 1000 ) / atoi(.ssm_animate$[.@a]) ); .@b++; } if( .@a == 1 ){ cutin .ssm_animate$[3] + atoi(.ssm_animate$[.@a]),4; dispbottom "Failed"; } else { cutin .ssm_animate$[3] + atoi(.ssm_animate$[.@a]),4; if( !.prize || .prize == 2 ) { Zeny += .ssm_prize[0]; } if( .prize ) { getitem .ssm_prize[1], .ssm_prize[2]; } if( .soundeffects ){ soundeffect "rog_steal coin.wav",0; } } if( select("Another Round:I'm done") == 2 || Zeny < .ssm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.ssm_payment[1]) < .ssm_payment[2] && .payment ){ cutin "",255; close; } } end; case 1: // Triple Slot machine mode. mes "Do you want to play a game?"; if( !.payment ) { mes "It costs: "+ .tsm_payment_message$[0] +" to play."; } else if ( .payment == 1 ) { mes "It costs: "+ .tsm_payment_message$[1] +" to play."; } else if ( .payment == 2 ) { mes "It costs: "+ .tsm_payment_message$[0] +" & "+ .tsm_payment_message$[1] +" to play."; } if( select("YES:NO") == 2 || Zeny < .tsm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.tsm_payment[1]) < .tsm_payment[2] && .payment ){ close; } while( @menu == 1 ){ if( !.payment || .payment == 2 ) { Zeny -= .tsm_payment[0]; } if( .payment ) { delitem( .tsm_payment[1], .tsm_payment[2] ); } if( .soundeffects ) { soundeffect "se_cash_provider.wav",0; } // Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it. .@2 = rand(1,100); //Rolls dice for Slot 2 .@3 = rand(1,100); //Rolls dice for Slot 3 if( .@2 <= atoi(.tsm_animate$[0]) && .@3 <= atoi(.tsm_animate$[1]) ){ .@a = 8; } else if( .@2 <= atoi(.tsm_animate$[0]) && .@3 > atoi(.tsm_animate$[1]) ){ .@a = 6; } else if( .@2 > atoi(.tsm_animate$[0]) && .@3 <= atoi(.tsm_animate$[1]) ){ .@a = 4; } else { .@a = 2; } .@b = 1; while( .@b < atoi(.tsm_animate$[.@a+1]) ) { cutin .tsm_animate$[.@a] + .@b,4; sleep2 ( ( atoi(.tsm_animate$[10]) * 1000 ) / atoi(.tsm_animate$[.@a+1]) ); .@b++; } cutin .tsm_animate$[.@a] + atoi(.tsm_animate$[.@a+1]),4; if( .@a == 2 ){ if( !.prize || .prize == 2 ) { Zeny += .tsm_prize[0]; } if( .prize ) { getitem .tsm_prize[1], .tsm_prize[2]; } if( .soundeffects ){ soundeffect "rog_steal_coin.wav",1; } } else { dispbottom "Failed"; } if( select("Another Round:I'm done") == 2 || Zeny < .tsm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.tsm_payment[1]) < .tsm_payment[2] && .payment ){ cutin "",255; close; } } end; } OnSingleSlot: setd ".mode"+strnpcinfo(3)+"",0; end; OnTripleSlot: setd ".mode"+strnpcinfo(3)+"",1; end; iMode: next; mes "Which did you want to do?"; menu "Change THIS machine's mode:Change ALL machine's mode",-; if( @menu == 1 ) { next; mes "What mode would you like this machine to have?"; menu "Single Slot Machine Mode:Triple Slot Machine Mode",-; if( @menu == 1 ) { setd ".mode"+strnpcinfo(3)+"",0; } else { setd ".mode"+strnpcinfo(3)+"",1; } close; } else { next; mes "What mode would you like to change all slot machines to?"; menu "Single Slot Machine Mode:Triple Slot Machine Mode",-; if( @menu == 1 ) { donpcevent "::OnSingleSlot"; } else { donpcevent "::OnTripleSlot"; } close; } OnInit: // 0 = Disabled, 1 = Enabled. .soundeffects = 1; //[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ] setd ".mode"+strnpcinfo(3)+"",0; //[0] = Fail Rate //[1] = Fail (Do not change) //[2] = Success (Do not change) //[3] = File Name (Do not change) //[4] = Animation Time (Do not change, for best results ) setarray .ssm_animate$[0],"30","29","33","slot_","3"; //[0] = Fail Rate "Slot 2" //[1] = Fail Rate "Slot 3" //[2] = SSS (Do not change) //[3] = SSS_Count (Do not change) //[4] = SSF (Do not change) //[5] = SSF_Count (Do not change) //[6] = SFS (Do not change) //[7] = SFS_Count (Do not change) //[8] = SFF (Do not change) //[9] = SFF_Count (Do not change) //[10] = Animation Time (Do not change, for best results ) setarray .tsm_animate$[0],"30","30","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3"; // Prize Settings // Prize Type // 0 = Zeny, 1 = Item, 2 = Zeny&Item .prize = 2; // [0] = Zeny, [1] = Item ID, [2] = Item Amount; setarray .ssm_prize[0],125,501,10; setarray .tsm_prize[0],450,501,30; // Payment Settings // Payment Type // 0 = Zeny, 1 = Item, 2 = Zeny&Item .payment = 2; // [0] = Zeny, [1] = Item ID, [2] = Item Amount; setarray .ssm_payment[0],100,501,1; // Single Slot Machine Payment Price setarray .tsm_payment[0],300,501,3; // Triple Slot Machine Payment Price // DO NOT CHANGE BELOW // Payment Text Syntax setarray .ssm_payment_message$[0],""+ .ssm_payment[0] +" zeny",""+ getitemname(.ssm_payment[1]) +" x"+ .ssm_payment[2] +""; setarray .tsm_payment_message$[0],""+ .tsm_payment[0] +" zeny",""+ getitemname(.tsm_payment[1]) +" x"+ .tsm_payment[2] +""; end; } //Duplicates prontera,154,176,4 duplicate(1slot) SlotMachine#2slot 563 prontera,156,176,4 duplicate(1slot) SlotMachine#3slot 563 Here is the line: // Prize Settings // Prize Type // 0 = Zeny, 1 = Item, 2 = Zeny&Item .prize = 2; // [0] = Zeny, [1] = Item ID, [2] = Item Amount; setarray .ssm_prize[0],125,1161,30,501,1; setarray .tsm_prize[0],450,1161,30,501,1;
  2. Hello guys, may I request for job_exp.txt which can support upto lvl 750? I tried to follow the guide but I was unable to reach level 750 and 1st transcedent jobs are stuck to lvl 0 and can't go higher. please. Thanks.
  3. Hi @Technoken thank you so much for your reply but the thing is im having an error while compiling already followed everything... check this image.
  4. I just did a git clone to the rathena in github but how can i set it up without the rathena 10 sln? i already tried to do it again..i just received same result in tortoise svn.
  5. Hi guys...i already ask for emistry to help me with this script and it was successful but now my problem is i dont know how to put in the script that when the script is activated thats the time when the monster will summon in the map and when the npc will off it will remove all the monster and also kick the players in the map...here is the script. prontera,156,165,4 script Coupon Farmer 436,{ mes "[Quest]"; mes callfunc("F_Hi"); mes "I can warp you to the jungle coupon."; next; menu "Yes, Warp me",-,"Leave",M_EXIT; mes "[Quest]"; mes "Okay all i need to have is just"; next; mes "[Quest]"; mes "1 million of zeny"; next; mes "[Quest]"; mes "Do you have all the item?"; next; menu "Yes",-,"No",M_EXIT; if (Zeny < 1000000) GOTO L_NOITEM; set Zeny,Zeny-1000000; warp "moc_ruins" ,0,0; mes "[Quest]"; mes "Thank you very much!"; mes callfunc("F_Bye"); close; L_NOITEM: mes "[Quest]"; mes "Sorry you don't have zeny."; emotion e_sry; close; M_EXIT: mes "[Quest]"; mes callfunc("F_Bye"); close; OnInit: waitingroom "Donation Farmzone 2 Hours",0; OnMinute00: if (( gettime(DT_DAYOFWEEK) == SATURDAY || gettime(DT_DAYOFWEEK) == SUNDAY ) && (( gettime(DT_HOUR) >= 11 && gettime(DT_HOUR) < 12 ) || ( gettime(DT_HOUR) >= 18 && gettime(DT_HOUR) < 19 )) ) { enablenpc strnpcinfo(3); } else { disablenpc strnpcinfo(3); } end;
  6. my server already running for 2 months and i just noticed now that my server doesnt have @adjgmlvl...
  7. I dont understand how to edit those codes you sent..but actually my plan for the time is going to be 11am to 12pm and 6pm-8pm sat sunday.
  8. but there is no time to the one that you edit sir @Emistry
  9. already did it but its not working.here is the script. prontera,156,165,4 script Coupon Farmer 436,{ OnHour11: OnHour18: If(gettime(DT_DAYOFWEEK) == SATURDAY || gettime(DT_DAYOFWEEK) == SUNDAY) enablenpc "Coupon Farmer"; end; OnHour12: OnHour19: If(gettime(DT_DAYOFWEEK) == SATURDAY || gettime(DT_DAYOFWEEK) == SUNDAY) disablenpc "Coupon Farmer"; end; mes "[Quest]"; mes callfunc("F_Hi"); mes "I can warp you to the jungle coupon."; next; menu "Yes, Warp me",-,"Leave",M_EXIT; mes "[Quest]"; mes "Okay all i need to have is just"; next; mes "[Quest]"; mes "1 million of zeny"; next; mes "[Quest]"; mes "Do you have all the item?"; next; menu "Yes",-,"No",M_EXIT; if (Zeny < 1000000) GOTO L_NOITEM; set Zeny,Zeny-1000000; warp "moc_ruins" ,0,0; mes "[Quest]"; mes "Thank you very much!"; mes callfunc("F_Bye"); close; L_NOITEM: mes "[Quest]"; mes "Sorry you don't have zeny."; emotion e_sry; close; M_EXIT: mes "[Quest]"; mes callfunc("F_Bye"); close; OnInit: waitingroom "Donation Farmzone 2 Hours",0; end; }
  10. where should i add this sir??inside the script(in which part should i add this code?) or do i need to create another .txt and load it?
  11. I\m trying to edit the npc but i dont know how to put the schedule to this npc...i want this npc to show every weekends..by 11am-1pm and after 1pm it will hide and will show again by 6pm-8pm sat sun...is that possible? //===== eAthena Script ======================================= //= Quests: Archangel Wings, Archdemon Wings, Deviling Wings, Little Angel Wings //============================================================ prontera,156,165,4 script Coupon Farmer 436,{ mes "[Quest]"; mes callfunc("F_Hi"); mes "I can warp you to the jungle coupon."; next; menu "Yes, Warp me",-,"Leave",M_EXIT; mes "[Quest]"; mes "Okay all i need to have is just"; next; mes "[Quest]"; mes "1 million of zeny"; next; mes "[Quest]"; mes "Do you have all the item?"; next; menu "Yes",-,"No",M_EXIT; if (Zeny < 1000000) GOTO L_NOITEM; set Zeny,Zeny-1000000; warp "moc_ruins" ,0,0; mes "[Quest]"; mes "Thank you very much!"; mes callfunc("F_Bye"); close; L_NOITEM: mes "[Quest]"; mes "Sorry you don't have zeny."; emotion e_sry; close; M_EXIT: mes "[Quest]"; mes callfunc("F_Bye"); close; OnInit: waitingroom "Donation Farmzone 2 Hours",0; end; }
  12. any chance to do this to hollgrehen refiner? failure, the equipment is not destroyed; rather, its refine level decreases by 1
  13. This is what i put...and it says 0 row affected...and when i tried to search there are still +20 items in the inventory...and when i logged ingame the items still hase refines. UPDATE inventory INNER JOIN item_db ON inventory.nameid = item_db.id SET inventory.refine=0 WHERE item_db.type IN (256,32,2,1,64,16,512); Bump. already done i type just a very simple code.. UPDATE inventory SET inventory.refine=0 UPDATE cart_inventory SET cart_inventory.refine=0 UPDATE storage SET storage.refine=0
  14. so before changing eerything. UPDATE inventory INNER JOIN item_db_re ON inventory.nameid = item_db_re.id(So just change item_db_re to item_db_pre?) and everything is ok beside from changing the cartinventory and storage? SET inventory.refine=0 WHERE item_db_re.type IN ({4);
  15. what do you mean by " And yes you can also use the item_db_pre. Don't forget there are multiple tables for items: storage, cart_inventory, inventory, etc. " @Jey
  16. so for example since the armor is type 4 i should put UPDATE inventory INNER JOIN item_db_re ON inventory.nameid = item_db_re.id SET inventory.refine=0 WHERE item_db_re.type IN ({4); is this correct?? by the way im using pre-re...should i use item_db_pre??? @Ninja
  17. is there anyway to change all the refine of all the items of all the accounts in mysql or phpmyadmin?
  18. Applying diff patch in putty or linux...already checked the one in the wiki but i can't understand it..can you guys please tell me the step by step process...thanks
  19. All in one npc card remove problems...i'm wondering because when i tried to remove cards the listing of items in card remove is different..example.the armor will show in accessory tab and weapon in armor and armor in weapon in the choices of card remove in all in one.what seems to be the problem?
  20. Thak already done hahaha before your asnwer..but thanks again.
  21. I have a stat seller and i 'm wondering because whenever my player reset their stats all of the stat point that they buy is removed......hlep me please.
  22. I'm Using pre-re actually..i haven't touched the refine_db and the items yet...
  23. REfine on weapon and armor bonus is not adding, i haven't edit anything in the refine_db but everytime i upgrade the weapon and armor there is no bonus aded in the stats...what seems to be the problem?
  24. // ....... 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 - script MVP Summoner -1,{ goto L_Start; OnInit: getmapxy .@map$, .@x, .@y, 1; 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, 1000000000; // 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, 1000; // 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], 0; // 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, 0; // item id use for summon any Group 1 monster - 674 - mithil coin set .group1itemamount, 1; // amount of items to summon a Group 1 monster set .group1cost, 0; // 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, 1814,// Moonlight Flower 1491,// Dokebi // --------- // 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, 100; // 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, 50; // amount of items to summon a Group 3 monster set .group3cost, 300000000; // 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, 0; 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 ,1; 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; } prt_in,164,26,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("force_1-1") +"]", "MVP Room 2 ["+ getmapusers("force_2-1") +"]", "MVP Room 3 ["+ getmapusers("force_3-1") +"]", "MVP Room 4 ["+ getmapusers("force_4-1") +"]", "MVP Room 5 ["+ getmapusers("force_5-1") +"]", if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) { if ( .inuseid[.@room] == getcharid(.type[.@room]) ) { if ( getvariableofnpc(.killmonster,"MVP Summoner") && getmapusers("force_0"+ .@room) == 0 ) killmonsterall "foce_0"+ .@room; warp "force_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("force_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 "force_0"+ .@room, 0,0; killmonsterall "force_0"+ .@room; donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap"; end; } force_1-1,100,99,4 duplicate(MVP Summoner) MVP Summoner#1 116 force_2-1,100,99,4 duplicate(MVP Summoner) MVP Summoner#2 116 force_3-1,100,99,4 duplicate(MVP Summoner) MVP Summoner#3 116 force_4-1,100,99,4 duplicate(MVP Summoner) MVP Summoner#4 116 force_5-1,100,99,4 duplicate(MVP Summoner) MVP Summoner#5 116 force_1-1 mapflag nowarpto force_2-1 mapflag nowarpto force_3-1 mapflag nowarpto force_4-1 mapflag nowarpto force_5-1 mapflag nowarpto force_1-1 mapflag nogo force_2-1 mapflag nogo force_3-1 mapflag nogo force_4-1 mapflag nogo force_5-1 mapflag nogo force_1-1 mapflag nojump force_2-1 mapflag nojump force_3-1 mapflag nojump force_4-1 mapflag nojump force_5-1 mapflag nojump force_1-1 mapflag nomemo force_2-1 mapflag nomemo force_3-1 mapflag nomemo force_4-1 mapflag nomemo force_5-1 mapflag nomemo force_1-1 mapflag noteleport force_2-1 mapflag noteleport force_3-1 mapflag noteleport force_4-1 mapflag noteleport force_5-1 mapflag noteleport force_1-1 mapflag nosave SavePoint force_2-1 mapflag nosave SavePoint force_3-1 mapflag nosave SavePoint force_4-1 mapflag nosave SavePoint force_5-1 mapflag nosave SavePoint force_1-1 mapflag nopenalty force_2-1 mapflag nopenalty force_3-1 mapflag nopenalty force_4-1 mapflag nopenalty force_5-1 mapflag nopenalty force_1-1 mapflag nowarp force_2-1 mapflag nowarp force_3-1 mapflag nowarp force_4-1 mapflag nowarp force_5-1 mapflag nowarp I can't click the npc here, what seems to be the problem?
×
×
  • Create New...