Jump to content

dhaisuke

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by dhaisuke

  1. Hi Chatter boy, what changes you've made?
  2. Hi guys, need some assitance how can i add @joinevent in my dice script //########################################################################## //By: ____ _ __ __ ____ _____ # // | \ ___ __ __ _ | | \ \ / /_ _ _ / ___\ / ____| # // | || | / _ \\ \ / /| || | \ \ / /| || \ | || | ___ | (___ # // | || || __/ \ \/ / | || |__ \ \/\/ / | || \| || |___|\ \___ \ # // __|____/__\___|__\__/__|_||____|_____\_/\_/__|_||_|\__|_\_____/_____) | # //|_____________________________________________________________________/ # // # //########################################################################## // # //== Dice Event # // # //########################################################################## // # //== Automatically starts a dice event every 30 minutes of every hour # // # //== Prize- Change 13723 to any item ID you want the winner to recieved # // # // Code Modify by : WordsUp // Credit still for mAisakaTaiga //########################################################################## - script Dice#announcer -1,{ OnInit: disablenpc "prtevent"; hideonnpc "Dice#evnt1"; bindatcmd("channeljoin",strnpcinfo(0)+"::OnChannelJoin"); end; OnMinute10: announce "Dice: We are going to have a Dice event.",0; sleep2 10000; announce "Dice: For those who wants to join, Please proceed to the center of Prontera and enter the Warp Portal.",0; sleep2 10000; announce "Dice: After 1 Minute the Portal will close.",0; sleep2 10000; announce "Dice: So please go to the middle of Prontera and enter the Warp Portal now if you want to join.",0; enablenpc "prtevent"; initnpctimer; end; OnTimer30000: announce "Dice: Last 30 seconds.",0; sleep2 5000; announce "Dice: If you want to join please enter the Warp Portal beside me here in Prontera.",0; end; OnTimer50000: announce "Dice: Last 10 seconds.",0; end; OnTimer55000: announce "Dice: 5.",0; end; OnTimer56000: announce "Dice: 4.",0; end; OnTimer57000: announce "Dice: 3.",0; end; OnTimer58000: announce "Dice: 2.",0; end; OnTimer59000: announce "Dice: 1.",0; end; OnTimer60000: announce "Dice: Time's up.",0; end; OnTimer61000: disablenpc "prtevent"; OnChannelJoin: donpcevent "Dice#evnt1::OnEnable"; stopnpctimer; end; OnTimer62000: announce "Dice: The next Dice event will begin after 30 minutes.",0; end; } //-------------------------------------------------- prontera,155,181,0 warp prtevent 2,2,quiz_01,204,90 //-------------------------------------------------- quiz_01,204,93,6 script Dice#evnt1 715,{ //-------------------------------------------------- mes "[Dice]"; mes "Please tell me your name"; next; input .@name$; if(.@name$ != strcharinfo(0)) { mes "[Dice]"; mes "Are you sure thats your character name?"; close; } mes "[Dice]"; mes "Congrats. You've won."; close2; announce "Dice: We have a winner, "+.@name$+".",0; getitem 969,10; warp "prontera",155,182; hideonnpc "Dice#evnt1"; end; OnEnable: mapannounce "quiz_01","Dice: We are about to start the Dice event.",0; sleep2 10000; mapannounce "quiz_01","Dice: But before we start the event here's how to play the game. . .",0; sleep2 10000; mapannounce "quiz_01","Dice: I'm only gonna say this once so read carefully.",0; sleep2 10000; mapannounce "quiz_01","Dice: I'm going to pick a number, 1 to 4. Then I'll do a count down from 5 to 0.",0; sleep2 10000; mapannounce "quiz_01","Dice: All you have to do is go to the box of the number you want.",0; sleep2 10000; mapannounce "quiz_01","Dice: Example, If I get the number of 4, All the players standing on numbers 1 to 3 will be warped back to town.",0; sleep2 10000; mapannounce "quiz_01","Dice: We will do it again and again until we only have 1 player left on the map.",0; sleep2 10000; mapannounce "quiz_01","Dice: Oh yeah! Before I forget you MUST GO INSIDE THE BOX, because if you're caught standing on the stairs you'll be automatically disqualified.",0; sleep2 10000; mapannounce "quiz_01","Dice: That's that.. Now let's play...",0; sleep2 10000; goto L_Start; end; L_Start: if(getmapusers("quiz_01") == 1) goto L_Champ; if(getmapusers("quiz_01") == 0) goto L_None; if(getmapusers("quiz_01") > 1) { announce "Dice: . . . . .",0; set $@number, rand(1,4); sleep2 10000; announce "Dice: I have a number now. Please go to the box of the number you want.... GO!",0; sleep2 10000; announce "Dice: 5",0; sleep2 5000; announce "Dice: 4",0; sleep2 4000; announce "Dice: 3",0; sleep2 3000; announce "Dice: 2",0; sleep2 2000; announce "Dice: 1",0; sleep2 1000; announce "Dice: Time's up.",0; donpcevent "evnt#1::OnEnable"; announce "Dice: Winning number "+$@number+".",0; if(($@number != 1) && ($@number != 2) && ($@number != 3)) goto L_Lose1; if(($@number != 1) && ($@number != 2) && ($@number != 4)) goto L_Lose2; if(($@number != 1) && ($@number != 3) && ($@number != 4)) goto L_Lose3; if(($@number != 2) && ($@number != 3) && ($@number != 4)) goto L_Lose4; end; } L_Lose1: areawarp "quiz_01",183,81,191,60,"prontera",155,182; areawarp "quiz_01",195,81,203,60,"prontera",155,182; areawarp "quiz_01",207,81,215,60,"prontera",155,182; goto L_Start; end; L_Lose2: areawarp "quiz_01",183,81,191,60,"prontera",155,182; areawarp "quiz_01",195,81,203,60,"prontera",155,182; areawarp "quiz_01",219,81,227,60,"prontera",155,182;; goto L_Start; end; L_Lose3: areawarp "quiz_01",183,81,191,60,"prontera",155,182; areawarp "quiz_01",207,81,215,60,"prontera",155,182; areawarp "quiz_01",219,81,227,60,"prontera",155,182; goto L_Start; end; L_Lose4: areawarp "quiz_01",195,81,203,60,"prontera",155,182; areawarp "quiz_01",207,81,215,60,"prontera",155,182; areawarp "quiz_01",219,81,227,60,"prontera",155,182; goto L_Start; end; L_Champ: mapannounce "quiz_01","Dice: Come to me and tell me your name.",0; hideoffnpc "Dice#evnt1"; end; L_None: announce "No One Enters the Dice Event. Closed",0; hideonnpc "Dice#evnt1"; end; } - script evnt#1 -1,{ OnEnable: areawarp "quiz_01",182,94,228,88,"prontera",155,182; areawarp "quiz_01",185,87,188,82,"prontera",155,182; areawarp "quiz_01",197,87,200,82,"prontera",155,182; areawarp "quiz_01",209,87,212,82,"prontera",155,182; areawarp "quiz_01",221,87,224,82,"prontera",155,182; end; } // -- Mapflags quiz_01 mapflag nowarp quiz_01 mapflag nowarpto quiz_01 mapflag noteleport quiz_01 mapflag nosave quiz_01 mapflag nomemo quiz_01 mapflag nobranch quiz_01 mapflag noloot quiz_01 mapflag noskill quiz_01 mapflag nopenalty
  3. Thank you Sir. i'll try this one
  4. Hi Guys, can anyone help me to add npc that players can view the next floating rate time?. i'm using nanakiwurtz floating rates and it's working fine. - script FloatingRates -1,{ OnInit: set $floatingrate, rand(0,23); set $defaultbrate,5000;//my server rate is 5000 set $defaultjrate,5000;//my server rate is 5000 set $defaultdrate,10000;//my server common item drop rate is 10000 set $defaultccdrate,100000;//my server common card drop rate is 100000 set $defaultcbdrate,30000;//my server card boss rate is 30000 end; OnMinute00: if (gettime(3)!=$floatingrate) end; set $floatingrate, rand(0,23); set $@brate,rand(7500,10000);//i want it raise by 50% - 100% from default set $@jrate,rand(7500,10000);//i want it raise by 50% - 100% from default set $@drate,rand(15000,20000);//i want it raise by 50% - 100% from default set $@ccdrate,rand(150000,200000);//i want it raise by 50% - 100% from default set $@cbdrate,rand(37500,45000);//i want it raise by 25% - 50% from default //Base exp setbattleflag("base_exp_rate",$@brate); //Job exp setbattleflag("job_exp_rate",$@jrate); //Drops setbattleflag("item_rate_common",$@drate); setbattleflag("item_rate_heal",$@drate); setbattleflag("item_rate_use",$@drate); setbattleflag("item_rate_equip",$@drate); setbattleflag("item_rate_card",$@ccdrate); setbattleflag("item_rate_card_boss",$@cbdrate); announce "ADMINS PROUDLY PRESENTS!",bc_all; sleep 3000; announce "Super Rates Event Time!!!",bc_all; sleep 3000; announce "LOOK! THE RATES CHANGED!: Base:"+($@brate/100)+"x Job:"+($@jrate/100)+"x Drop:"+($@drate/100)+"x",bc_all; sleep 3000; announce "Run!'cause this will last 1 hour only!!!",bc_all; initnpctimer; set .Event,1; atcommand "@reloadmobdb"; end; } OnTimer3600000: // After 1 hour set .Event,0; setbattleflag "base_exp_rate",$defaultbrate; setbattleflag "job_exp_rate",$defaultjrate; setbattleflag("item_rate_common",$defaultdrate); setbattleflag("item_rate_heal",$defaultdrate); setbattleflag("item_rate_use",$defaultdrate); setbattleflag("item_rate_equip",$defaultdrate); setbattleflag("item_rate_card",$defaultccdrate); setbattleflag("item_rate_card_boss",$defaultcbdrate); atcommand "@reloadmobdb"; announce "Rates Changed Back to normal!",bc_all; end; OnPcLoginEvent: if (.Event == 1) dispbottom "Super rates Event currently active!"; end; } Thank you in advance.
  5. /** * Default Magical Reflection Behavior * - When reflecting, reflected damage depends on gears caster is wearing, not target (official) * - When disabled damage depends on gears target is wearing, not caster. (old/eathena) * @values 1 (enabled) or 0 (disabled) **/ #define MAGIC_REFLECTION_TYPE 1 /** * Spirit Sphere Limitation **/ #define MAX_SPIRITBALL 15 /** * when enabled, reflect damage doesn't bypass devotion (and thus damage is passed to crusader) * uncomment to enable **/ //#define DEVOTION_REFLECT_DAMAGE /** * No settings past this point Try this one.
  6. Hi Radian, this changes can be done in SRC if someone else do like in rathena devotion_rdamage
  7. Hi Guys need some help im using 2013-08-07 client i configure my Thor Patcher and its configure correctly to the patch but my problem is after the patch is completed the Game.exe is not launching anyone can help me with this im using Thor 2.5.x.x //It used to store information such as last patch id etc, status_file=ragna.dat //grf_file - [Relative Address] grf_file=ragna.grf //client_file - [Relative Address] //It's GAME EXE not patcher's client_file=RO.exe //client_parameter - [self Explained] client_parameter=-1sak1
  8. Can anyone have an NPC like this? War of Emperium Supplies 20,000,000z Registration Fee every War of Emperium. Supplies cannot be consumed in any maps except War of Emperium maps. Supplies cannot be placed in cart, mailbox, storage and character bounded items. All registration will be reset after War of Emperium @guildremoval You can remove the WoE Supplies every non-WoE time.@guildrefill Available to those guild who will apply for it. A command where you can get an amount of supplies by typing the command anywhere. Can only use on War of Emperium time. Cool-down is 5 minutes. All the supplies you get from the very start will restore to default amount. --Supplies List Potions (Default) Green Potion x 10 Light Blue Potion x 50 Light White Potion x 100 --Priest/High Priest Holy Water x 3 Red Gemstone x 25 Blue Gemstone x 25 Yellow Gemstone x 25 --Hunter/Sniper Trap x 30 --Assassin Cross Poison Bottle x 2 Professor CobWeb x 25 Red Gemstone x 25 Blue Gemstone x 25 Yellow Gemstone x 25 -- Alchemist/Creator Fire Bottle x 10 Acid Bottle x 10 Plant Bottle x 10 Condensed White Potion x 25
  9. put your custom prontera in your GRF Server Side: for example: custom_prontera.gat custom_prontera.rws custom_prontera.gnd after merging cusom_prontera in your grf Client Side: edit your mapcache.dat using mapcache and add custom_prontera.gat
  10. can you post the .act and .spr for the filename of your firewolf?
  11. hi anyone have easter egg like in alena sprite? can anyone share it to me thank you http://rathena.org/board/topic/62612-showcase-dl-alenas-ro-sprites/
  12. hi Sir it is a custom job how can it relate to group id? my problem is Hi I have my custom Job Hokage, its now working but my next problem is when Monster Attack my custom or I attack monster its crashes the server can anyone help me with this
  13. Hi Guys I have already my custom job, but when attacking its show a sword, what I want is to disable attack when change into my custom job
  14. Hi Sir Neo i follow your tutorial n how to add custom job but no error in recomplie but when i try to @jobchange its says failed is there i need to add? i also use the http://rathena.org/wiki/Custom_Jobs but still failed can you please help me my client 2012-06-17 i already apply the patch
  15. Hi guys I need help for my card remover I use script of ~AnnieRuru~ http://www.eathena.w...pic=244658&st=0 //===== eAthena Script ====================================== //= Unique Card Remover //===== By: ================================================= //= ~AnnieRuru~ //===== Current Version: ==================================== //= 1.2a //===== Compatible With: ==================================== //= eAthena 14919 Trunk SQL/TXT //===== Description: ======================================== //= can take individual card //===== Topic: ============================================== //= http://www.eathena.ws/board/index.php?showtopic=244658 //===== Additional Comments: ================================ //= its very lame idea //=========================================================== prontera,152,183,5 script card remover 100,{ // 0 - only cards are allow to taken out, 1 - can take out both cards and enchantment item set .@unslot_all, 1; set .@zeny, 0; // require zeny for the service // setarray .@item1, 501,1; // need 1 red potion // setarray .@item2, 502,2; // need 2 orange potions // setarray .@item3, 0,0; // setarray .@item4, 0,0; // setarray .@item5, 0,0; mes "[Card Remover]"; if ( Weight *10 / MaxWeight >= 9 ) { mes "you're overWeight. Spare some inventory space to continue"; close; } if ( Zeny < .@zeny ) { mes "require "+ .@zeny +" Zeny for this service"; close; } for ( set .@i, 1; getitemname( getd(".@item"+ .@i ) ) != "null"; set .@i, .@i +1 ) { if ( countitem( getd(".@item"+ .@i ) ) < getd(".@item"+ .@i +"[1]") ) { mes "I require the following items for this service"; for ( set .@i, 1; getitemname( getd(".@item"+ .@i ) ) != "null"; set .@i, .@i +1 ) mes getd(".@item"+ .@i +"[1]") +"x "+ getitemname( getd(".@item"+ .@i ) ); close; } } mes "select an equipment to be removed"; next; for ( set .@i, 1; .@i <= 10; set .@i, .@i +1 ) set .@menu$, .@menu$ +( ( getequipid(.@i) == -1 )?"":getequipname(.@i) )+":"; set .@eq, select(.@menu$); mes "[Card Remover]"; set .@card1, getequipcardid( .@eq, 0 ); if ( .@card1 == 254 || .@card1 == 255 ) { mes "it is a signed item"; close; } mes "select a card to be taken out"; next; set .@menu$, "All:"; if ( .@unslot_all == 1 ) set .@s, 4; else set .@s, getitemslots( getequipid(.@eq) ); for ( set .@i, 0; .@i < .@s; set .@i, .@i +1 ) set .@menu$, .@menu$ +( getequipcardid( .@eq, .@i )?getitemname( getequipcardid( .@eq, .@i ) ):"" )+":"; set .@card, select(.@menu$) -1; mes "[Card Remover]"; if ( .@unslot_all == 1 && .@card == 0 ) set .@card, 5; switch ( callfunc("successremovecards2", .@eq, .@card ) ) { case -4: case 6: mes "there is no card can be taken out"; close; case 0: if ( Zeny < .@zeny ) { mes "require "+ .@zeny +" Zeny for this service"; close; } for ( set .@i, 1; getitemname( getd(".@item"+ .@i ) ) != "null"; set .@i, .@i +1 ) { if ( countitem( getd(".@item"+ .@i ) ) < getd(".@item"+ .@i +"[1]") ) { mes "I require the following items for this service"; for ( set .@i, 1; getitemname( getd(".@item"+ .@i ) ) != "null"; set .@i, .@i +1 ) mes getd(".@item"+ .@i +"[1]") +"x "+ getitemname( getd(".@item"+ .@i ) ); close; } } set Zeny, Zeny - .@zeny; for ( set .@i, 1; getitemname( getd(".@item"+ .@i ) ) != "null"; set .@i, .@i +1 ) delitem getd(".@item"+ .@i ), getd(".@item"+ .@i +"[1]"); mes "uncard service successful"; close; case 7: mes "I'm sorry, I'm unable to uncard a rented item"; close; case 8: case 9: mes "you're overWeight. Spare some inventory space to continue"; close; default: mes "error"; close; } close; } /* //callfunc "successremovecards2", <equipment slot> {, <card placement> }; getarg(5) == equipment slot getarg(1) == optional parameter, default 0 0 or not specify - return all the cards but not enchantment item 1 - only return the card in slot#1 2 - only return the card in slot#2 3 - only return the card in slot#3 4 - only return the card in slot#4 { or enchantment item } 5 - return all cards and enchantment item the function return :- -4 : that slot has no card or enchantment item -3 : invalid card placement -2 : invalid equipment slot -1 : no item equip on the slot 0 : function successful 1 : invalid card id at card slot #1 2 : invalid card id at card slot #2 3 : invalid card id at card slot #3 4 : invalid card id at card slot #4 5 : it is a signed item 6 : the item has no slot 7 : the item has expire value 8 : player is overWeight 90% 9 : player carry more than 96 types of items */ function script successremovecards2 { if ( Weight *10 / MaxWeight >= 9 ) return 8; set .@slot, getarg(0); switch ( .@slot ) { case 1: set .@equipped, 256; break; case 2: set .@equipped, 16; break; case 3: set .@equipped, 32; break; case 4: set .@equipped, 2; break; case 5: set .@equipped, 4; break; case 6: set .@equipped, 64; break; case 7: set .@equipped, 8; break; case 8: set .@equipped, 128; break; case 9: set .@equipped, 512; break; case 10: set .@equipped, 1; break; default: return -2; } getinventorylist; // this is the only way to retrieve item with expiration -_-" set .@i, 0; while ( .@i < @inventorylist_count && @inventorylist_equip[.@i] & .@equipped == 0 ) set .@i, .@i +1 ; set .@id, @inventorylist_id[.@i]; set .@ref, @inventorylist_refine[.@i]; set .@card1, @inventorylist_card1[.@i]; set .@card2, @inventorylist_card2[.@i]; set .@card3, @inventorylist_card3[.@i]; set .@card4, @inventorylist_card4[.@i]; set .@expire, @inventorylist_expire[.@i]; set .@total, @inventorylist_count; deletearray @inventorylist_id, @inventorylist_count; deletearray @inventorylist_amount, @inventorylist_count; deletearray @inventorylist_equip, @inventorylist_count; deletearray @inventorylist_refine, @inventorylist_count; deletearray @inventorylist_identify, @inventorylist_count; deletearray @inventorylist_attribute, @inventorylist_count; deletearray @inventorylist_card1, @inventorylist_count; deletearray @inventorylist_card2, @inventorylist_count; deletearray @inventorylist_card3, @inventorylist_count; deletearray @inventorylist_card4, @inventorylist_count; deletearray @inventorylist_expire, @inventorylist_count; if ( @inventorylist_count > 96 ) return 9; set @inventorylist_count, 0; set .@cardplacement, getarg(1, 0); if ( .@i == .@total ) return -1; else if ( getitemslots(.@id) == 0 && .@cardplacement == 0 ) return 6; else if ( .@expire ) return 7; else if ( .@card1 == 254 || .@card1 == 255 ) return 5; else if ( .@card1 && getitemname(.@card1) == "null" ) return 1; else if ( .@card2 && getitemname(.@card2) == "null" ) return 2; else if ( .@card3 && getitemname(.@card3) == "null" ) return 3; else if ( .@card4 && getitemname(.@card4) == "null" ) return 4; switch ( .@cardplacement ) { case 0: set .@slots, getitemslots(.@id); set .@i, 1; while ( .@i <= .@slots ) { if ( getd(".@card"+ .@i ) ) { getitem getd(".@card"+ .@i ), 1; set .@c, .@c +1 ; } set .@i, .@i +1 ; } if ( .@c == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,0,( .@slots < 2 )?.@card2:0,( .@slots < 3 )?.@card3:0,( .@slots < 4 )?.@card4:0; break; case 1: if ( .@card1 == 0 ) return -4; getitem .@card1, 1; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 1: getitem2 .@id,1,1,.@ref,0,0,.@card2,.@card3,.@card4; break; case 2: getitem2 .@id,1,1,.@ref,0,.@card2,0,.@card3,.@card4; break; case 3: getitem2 .@id,1,1,.@ref,0,.@card2,.@card3,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,.@card2,.@card3,.@card4,0; break; } break; case 2: if ( .@card2 == 0 ) return -4; getitem .@card2, 1; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 1: case 2: getitem2 .@id,1,1,.@ref,0,.@card1,0,.@card3,.@card4; break; case 3: getitem2 .@id,1,1,.@ref,0,.@card1,.@card3,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,.@card1,.@card3,.@card4,0; break; } break; case 3: if ( .@card3 == 0 ) return -4; getitem .@card3, 1; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 1: case 2: case 3: getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card4,0; break; } break; case 4: if ( .@card4 == 0 ) return -4; getitem .@card4, 1; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,0; break; case 5: set .@i, 1; while ( .@i <= 4 ) { if ( getd(".@card"+ .@i ) ) { getitem getd(".@card"+ .@i ), 1; set .@c, .@c +1 ; } set .@i, .@i +1 ; } if ( .@c == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,0,0,0,0; break; default: return -3; } unequip .@slot; return 0; } /* // callfunc "failedremovecards2", <equipment slot>, <type> {, <card placement> }; getarg(0) == equipment slot getarg(1) :- 0 - will destroy all, the equipment, the cards and the item enchantment 1 - will keep the equipment, but destroy the cards and item enchantment 2 - will keep all the cards, but destroy the equipment and enchantment item 3 - will keep all the cards and enchantment item, but destroy the equipment 4 - only destroy the card or enchantment item on the card placement, keep everything else getarg(2) == optional parameter, default 0 0 or not specify :- if getarg(1) == 4, only destroy the cards, but keep the equipment and item enchantment else, follow like what getarg(1) says 1 -> 4 :- if getarg(1) == 4 - only destroy this card and the slot, keep everything else else, follow like what getarg(1) says 5 :- follow getarg(1) == 1; the function return :- -5 : invalid type -4 : that slot has no card or enchantment item -3 : invalid card placement -2 : invalid equipment slot -1 : no item equip on the slot 0 : function successful 1 : invalid card id at card slot #1 2 : invalid card id at card slot #2 3 : invalid card id at card slot #3 4 : invalid card id at card slot #4 5 : it is a signed item 6 : the item has no slot 7 : the item has expire value 8 : player is overWeight 90% 9 : player carry more than 96 types of items */ function script failedremovecards2 { if ( Weight *10 / MaxWeight >= 9 ) return 8; set .@slot, getarg(0); if ( .@slot == 1 ) set .@equipped, 256; switch ( .@slot ) { case 1: set .@equipped, 256; break; case 2: set .@equipped, 16; break; case 3: set .@equipped, 32; break; case 4: set .@equipped, 2; break; case 5: set .@equipped, 4; break; case 6: set .@equipped, 64; break; case 7: set .@equipped, 8; break; case 8: set .@equipped, 128; break; case 9: set .@equipped, 512; break; case 10: set .@equipped, 1; break; default: return -2; } getinventorylist; // this is the only way to retrieve item with expiration -_-" set .@i, 0; while ( .@i < @inventorylist_count && @inventorylist_equip[.@i] & .@equipped == 0 ) set .@i, .@i +1 ; set .@id, @inventorylist_id[.@i]; set .@ref, @inventorylist_refine[.@i]; set .@card1, @inventorylist_card1[.@i]; set .@card2, @inventorylist_card2[.@i]; set .@card3, @inventorylist_card3[.@i]; set .@card4, @inventorylist_card4[.@i]; set .@expire, @inventorylist_expire[.@i]; set .@total, @inventorylist_count; deletearray @inventorylist_id, @inventorylist_count; deletearray @inventorylist_amount, @inventorylist_count; deletearray @inventorylist_equip, @inventorylist_count; deletearray @inventorylist_refine, @inventorylist_count; deletearray @inventorylist_identify, @inventorylist_count; deletearray @inventorylist_attribute, @inventorylist_count; deletearray @inventorylist_card1, @inventorylist_count; deletearray @inventorylist_card2, @inventorylist_count; deletearray @inventorylist_card3, @inventorylist_count; deletearray @inventorylist_card4, @inventorylist_count; deletearray @inventorylist_expire, @inventorylist_count; if ( @inventorylist_count > 96 ) return 9; set @inventorylist_count, 0; set .@cardplacement, getarg(2, 0); if ( .@i == .@total ) return -1; else if ( getitemslots(.@id) == 0 && .@cardplacement == 0 ) return 6; else if ( .@expire ) return 7; else if ( .@card1 == 254 || .@card1 == 255 ) return 5; else if ( .@card1 && getitemname(.@card1) == "null" ) return 1; else if ( .@card2 && getitemname(.@card2) == "null" ) return 2; else if ( .@card3 && getitemname(.@card3) == "null" ) return 3; else if ( .@card4 && getitemname(.@card4) == "null" ) return 4; set .@type, getarg(1); switch ( .@type ) { case 0: delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; unequip .@slot; return 0; case 1: delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,0,0,0,0; unequip .@slot; return 0; case 2: if ( .@card1 == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 0: getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; break; case 1: getitem2 .@id,1,1,.@ref,0,0,.@card2,.@card3,.@card4; break; case 2: getitem2 .@id,1,1,.@ref,0,0,0,.@card3,.@card4; break; case 3: getitem2 .@id,1,1,.@ref,0,0,0,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,0,0,0,0; } unequip .@slot; return 0; case 3: set .@i, 1; set .@slots, getitemslots(.@id); while ( .@i <= 4 ) { if ( getd(".@card"+ .@i ) ) { getitem getd(".@card"+ .@i ), 1; set .@c, .@c +1 ; } set .@i, .@i +1 ; } if ( .@c == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; unequip .@slot; return 0; case 4: break; default: return -5; } switch ( .@cardplacement ) { case 0: set .@slots, getitemslots(.@id); set .@i, 1; while ( .@i <= .@slots ) { if ( getd(".@card"+ .@i ) ) { set .@c, .@c +1 ; } set .@i, .@i +1 ; } if ( .@c == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,0,( .@slots < 2 )?.@card2:0,( .@slots < 3 )?.@card3:0,( .@slots < 4 )?.@card4:0; break; case 1: if ( .@card1 == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 1: getitem2 .@id,1,1,.@ref,0,0,.@card2,.@card3,.@card4; break; case 2: getitem2 .@id,1,1,.@ref,0,.@card2,0,.@card3,.@card4; break; case 3: getitem2 .@id,1,1,.@ref,0,.@card2,.@card3,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,.@card2,.@card3,.@card4,0; break; } break; case 2: if ( .@card2 == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 1: case 2: getitem2 .@id,1,1,.@ref,0,.@card1,0,.@card3,.@card4; break; case 3: getitem2 .@id,1,1,.@ref,0,.@card1,.@card3,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,.@card1,.@card3,.@card4,0; break; } break; case 3: if ( .@card3 == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; switch ( getitemslots(.@id) ) { case 1: case 2: case 3: getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,0,.@card4; break; case 4: getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card4,0; break; } break; case 4: if ( .@card4 == 0 ) return -4; delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,0; break; case 5: delitem2 .@id,1,1,.@ref,0,.@card1,.@card2,.@card3,.@card4; getitem2 .@id,1,1,.@ref,0,0,0,0,0; break; default: return -3; } unequip .@slot; return 0; } I already change the configuration to allow to take out both cards and enchantment // 0 - only cards are allow to taken out, 1 - can take out both cards and enchantment item set .@unslot_all, 1; but when I try it in my server its say there is no card can be taken out please help
  16. Hi I have custom BG that made by miss Anniru this is the concept of my Custom BG • automatically announce for evey 2 hrs • They need to register in npc in 5 minutes • after 5 minutes if the team is not equal the game will still start can someone help to make 1 NPC to randomly change the team? because as of now the set up is they need to register with 2 npc red and blue - script bg_pvp_round#control -1,{ OnInit: .minplayer2start = 1; // number of players to start this event automatically .winningscore = 2; // how many rounds to win .eventlasting = 20*60; // event last 20 minutes or the system abort itself .registerlasting = 5*60; // 5 minutes to join setarray .rewardwin, 501,10, 502,5, 503,3; // reward to winning team setarray .rewardlose, 501,5, 502,3, 503,1; // reward to losing team .rewardwinsize = getarraysize( .rewardwin ); .rewardlosesize = getarraysize( .rewardlose ); .teamname$[1] = "Red"; .teamname$[2] = "Blue"; bindatcmd "bgpvp", strnpcinfo(0)+"::OnCommand", 99, 100; end; OnCommand: if ( compare( .@atcmd_parameters$, "on" ) ) { if ( .start ) dispbottom "Battle Ground DeathMatch System already started."; else goto L_Start; } else if ( compare( .@atcmd_parameters$, "off" ) ) { if ( !.start ) dispbottom "Battle Ground DeathMatch System not yet start."; else { .gmname$ = strcharinfo(0); .start = 0; .skip = 1; awake strnpcinfo(0); end; } } else if ( !.start ) dispbottom "Battle Ground DeathMatch System is currently not running."; dispbottom "Use "+ .@atcmd_command$ +" on to start the event."; dispbottom "Use "+ .@atcmd_command$ +" off to abort this event"; end; OnStart: if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) announce "[ Battle Ground DeathMatch System ] Blue Team : "+ getwaitingroomstate( 0, .bluenpcname$ ) + "/" + .minplayer2start + ". Red Team : "+ getwaitingroomstate( 0, .rednpcname$ ) + "/" + .minplayer2start, bc_all, 0x00CED1; else awake strnpcinfo(0); end; OnClock0000: OnClock0200: OnClock0400: OnClock0600: OnClock0800: OnClock1000: OnClock1200: OnClock1400: OnClock1600: OnClock1800: OnClock2000: OnClock2200: L_Start: if ( .start ) end; announce "[ Battle Ground DeathMatch System ] Event is now Open ! Come to prontera to join !", bc_all, 0x00CED1; enablenpc .rednpcname$; enablenpc .bluenpcname$; donpcevent .rednpcname$ +"::OnStart"; donpcevent .bluenpcname$ +"::OnStart"; .start = 1; sleep .registerlasting * 1000; if ( !.start ) { delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; disablenpc .rednpcname$; disablenpc .bluenpcname$; announce "[ Battle Ground DeathMatch System ] "+ .gmname$ +" has aborted this Event !", bc_all, 0x00CED1; .skip = 0; end; } else if ( !getwaitingroomstate( 0, .rednpcname$ ) || !getwaitingroomstate( 0, .bluenpcname$ ) ) { delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; disablenpc .rednpcname$; disablenpc .bluenpcname$; announce "[ Battle Ground DeathMatch System ] One side has 0 player. Can not start the Event.", bc_all, 0x00CED1; .start = .skip = 0; end; } .start = 2; announce "[ Battle Ground DeathMatch System ] Battleground has started", bc_all, 0x00CED1; .red = waitingroom2bg( "bat_b01", 61,150, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); copyarray .team1aid, $@arenamembers, $@arenamembersnum; .team1count = .life[1] = $@arenamembersnum; .blue = waitingroom2bg( "bat_b01", 327,150, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); copyarray .team2aid, $@arenamembers, $@arenamembersnum; .team2count = .life[2] = $@arenamembersnum; delwaitingroom .rednpcname$; delwaitingroom .bluenpcname$; disablenpc .rednpcname$; disablenpc .bluenpcname$; callsub L_setwall; bg_updatescore "bat_b01", 0, 0; bg_warp .red, "bat_b01", 61,150; bg_warp .blue, "bat_b01", 327,150; sleep 4000 * !.skip; mapannounce "bat_b01", "Kill all opponent team to gain 1 point, score "+ .winningscore +" points to win !", 0; sleep 2000 * !.skip; while (1) { for ( .@i = 5; .@i > 0; .@i-- ) { mapannounce "bat_b01", "["+ .@i +"]", 0; sleep 1000 * !.skip; } if ( .score[1] == .winningscore -1 && .score[2] == .winningscore -1 ) mapannounce "bat_b01", "Final Round start!", 0; else mapannounce "bat_b01", "Round "+ .round++ +" start!", 0; callsub L_delwall; .life[1] = .team1count; .life[2] = .team2count; sleep .eventlasting * 1000 * !.skip; bg_updatescore "bat_b01", .score[1], .score[2]; if ( .score[1] == .winningscore || .score[2] == .winningscore || !.winside ) break; .winside = 0; sleep 5000 * !.skip; callsub L_make_player_move; bg_warp .red, "bat_b01", 61,150; bg_warp .blue, "bat_b01", 327,150; callsub L_setwall; sleep 1000 * !.skip; } if ( .winside ) { mapannounce "bat_b01", " "+ .teamname$[ .winside ] +" side wins !", bc_all; callsub L_reward, .winside, .rewardwin, .rewardwinsize; callsub L_reward, ( .winside == 1 )? 2:1, .rewardlose, .rewardlosesize; } else if ( .start ) mapannounce "bat_b01", "[ Battle Ground DeathMatch System ] Time Out. Aborting the match.", bc_all; else mapannounce "bat_b01", "[ Battle Ground DeathMatch System ] "+ .gmname$ +" has aborted this Event !", bc_all, 0x00CED1; sleep 5000; callsub L_make_player_move; bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_destroy .red; bg_destroy .blue; callsub L_delwall; deletearray .team1aid; deletearray .team2aid; .round = .winside = .skip = .score[1] = .score[2] = .team1count = .team2count = .life[1] = .life[2] = .start = 0; end; L_reward: .@size = getarraysize( getd(".team"+ getarg(0) +"aid") ); for ( .@i = 0; .@i < .@size; .@i++ ) for ( .@j = 0; .@j < getarg(2); .@j += 2 ) getitem getelementofarray( getarg(1), .@j ), getelementofarray( getarg(1), .@j +1 ), getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); return; L_setwall: setwall "bat_b01", 58,153, 6, 6, 0, "bg_pvp_round_red_1"; setwall "bat_b01", 64,153, 6, 4, 0, "bg_pvp_round_red_2"; setwall "bat_b01", 64,147, 6, 2, 0, "bg_pvp_round_red_3"; setwall "bat_b01", 58,147, 6, 0, 0, "bg_pvp_round_red_4"; setwall "bat_b01", 324,153, 6, 6, 0, "bg_pvp_round_blue_1"; setwall "bat_b01", 330,153, 6, 4, 0, "bg_pvp_round_blue_2"; setwall "bat_b01", 330,147, 6, 2, 0, "bg_pvp_round_blue_3"; setwall "bat_b01", 324,147, 6, 0, 0, "bg_pvp_round_blue_4"; return; L_delwall: delwall "bg_pvp_round_red_1"; delwall "bg_pvp_round_red_2"; delwall "bg_pvp_round_red_3"; delwall "bg_pvp_round_red_4"; delwall "bg_pvp_round_blue_1"; delwall "bg_pvp_round_blue_2"; delwall "bg_pvp_round_blue_3"; delwall "bg_pvp_round_blue_4"; return; L_make_player_move: for ( .@j = 1; .@j <= 2; .@j++ ) { for ( .@i = 0; .@i < getd(".team"+ .@j +"count"); .@i++ ) { attachrid getd(".team"+ .@j +"aid["+ .@i +"]" ); setoption Option_Xmas | Option_Invisible, 0; pcblockmove getcharid(3), 0; } } return; OnRedQuit: callsub L_quit, 1, 2; OnBlueQuit: callsub L_quit, 2, 1; L_quit: percentheal 100, 100; setoption Option_Xmas | Option_Invisible, 0; pcblockmove getcharid(3), 0; while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; .life[ getarg(0) ]--; if ( !getd(".team"+ getarg(0) +"count") ) { mapannounce "bat_b01", "All "+ .teamname$[ getarg(0) ] +" team members has Quit !", bc_all, 0xff3333; // purposely use different color .score[ getarg(1) ] = .winningscore; .winside = getarg(1); .skip = 1; awake strnpcinfo(0); } else if ( !.life[ getarg(0) ] ) { .winside = getarg(1); mapannounce "bat_b01", " "+ .teamname$[ getarg(1) ] +" team has defeated the opponent team, "+ .teamname$[ getarg(1) ] +" team score a point !", bc_all; .score[ getarg(1) ]++; awake strnpcinfo(0); } end; OnRedDead: callsub L_dead, 1, 2; OnBlueDead: callsub L_dead, 2, 1; L_dead: .life[ getarg(0) ]--; if ( !.life[ getarg(0) ] ) { .winside = getarg(1); mapannounce "bat_b01", " "+ .teamname$[ getarg(1) ] +" team has defeated the opponent team, "+ .teamname$[ getarg(1) ] +" team score a point !", bc_all; .score[ getarg(1) ]++; awake strnpcinfo(0); } sleep2 1250; percentheal 100,100; if ( getcharid(4) ) { setoption Option_Xmas | Option_Invisible, 1; pcblockmove getcharid(3), 1; } end; } prontera,155,182,5 script Red side 100,{ end; OnInit: sleep 1; set getvariableofnpc( .rednpcname$, "bg_pvp_round#control" ), strnpcinfo(0); disablenpc strnpcinfo(0); end; OnStart: waitingroom "Red side", getvariableofnpc( .minplayer2start, "bg_pvp_round#control" ) +1, "bg_pvp_round#control::OnStart", 1; end; } prontera,158,182,5 script Blue side 100,{ end; OnInit: sleep 1; set getvariableofnpc( .bluenpcname$, "bg_pvp_round#control" ), strnpcinfo(0); disablenpc strnpcinfo(0); end; OnStart: waitingroom "Blue side", getvariableofnpc( .minplayer2start, "bg_pvp_round#control" ) +1, "bg_pvp_round#control::OnStart", 1; end; } bat_b01 mapflag battleground 2 bat_b01 mapflag nosave SavePoint bat_b01 mapflag nowarp bat_b01 mapflag nowarpto bat_b01 mapflag noteleport bat_b01 mapflag nomemo bat_b01 mapflag nopenalty bat_b01 mapflag nobranch bat_b01 mapflag noicewall
  17. Hi Miss AnnieRuru how to make only 1 npc and randomize change the team red or blue? because some if my player abusing it they only go for 1 color
  18. Hi Sir Sir its not announcing the Item Name, but it announce the pcs, of item
  19. Hi Sir Missingno what I want is to change the announce of item giver instead of announcing the package set, I want to announce the item and the amount of the items that is given to the player for example: announce Player has rewarded Yggdrassil Berry 10pcs for Winning Event!
×
×
  • Create New...