Jump to content

Critica

Members
  • Posts

    223
  • Joined

  • Last visited

Everything posted by Critica

  1. -%tab%script%tab%INSERTNPCNAMEHERE%tab%-1,{ end; OnNPCKillEvent: switch(rand(10)){ case 1: getitem xx, amount; end; default: end; } end; } how can make this script do 2 random chance? like for the first few items chances are 10% then the 2nd list items have 5% chance..?
  2. okk.. i tried it,, put " . " to every " @ " on the script except those, but know im getting stuck and this debug error data: variable name='@ca_list' now every @ca_list i removed the " . " but still getting stack after clicking the cards.. help...?
  3. ok i understand now why the players are able to dupe,, im sorry again.. is there anyone here able to teach me which lines are to change, i really dont know much anything about scripting.. i can only do the basic.. if someone could help me correct the script that would be grateful.. thank you, sorry for my english.
  4. nguild_pay,124,58,1 script Special Compound 952,{ //nguild,124,58,0 script Card Compounder 100,{ set .n$,"["+strnpcinfo(1)+"]"; // ======== Requirement Settings: ============ // = Format: // - .requ[0],<ID>,<Amount>; // = ID: // - 0 = Nothing/Disabled // - 1 = Zeny // - 2 = #CASHPOINTS // - 3 = Custom Variable > Search & Replace "custom_points" with your variable // - 501 and higher means Item ID // Amount should be obvious . setarray .requ[0],2,100; // Default: 2,100 = 100x Cash Points // GM Settings & Testing Help if(getgmlevel() > 0) { if(.requ[0] == 1) { mes "Zeny:"; input @zeny,.requ[1],1000000; // 1m Zeny if(@zeny == 0) set @zeny,.requ[1]; set Zeny,@zeny*4; } else if(.requ[0] == 2) { mes "Cash Points:"; input @cash,.requ[1],10000; // 10k Cash Points if(@cash == 0) set @cash,.requ[1]; set #CASHPOINTS,@cash*4; } else if(.requ[0] == 3) { mes "Custom Points:"; input @custom,.requ[1],2000; if(@custom == 0) set @custom,.requ[1]; set custom_points,@custom*4; } else if(.requ[0] > 500) { mes getitemname(.requ[0])+":"; input @item,.requ[1],10000; if(@item == 0) set @item,.requ[1]; getitem .requ[0],@item*4; } next; mes "Balances:"; mes "Zeny: "+ Zeny; mes "Cash Points: "+#CASHPOINTS; mes "Custom Points: "+custom_points; set @debug,1; next; } mes .n$; mes "Hello, how can I help you?"; next; switch(select("- Compound Cards:- Information:- Nothing")) { case 1: mes .n$; mes "Please choose the item you want to compound cards on from your inventory:"; next; getinventorylist; deletearray @eq_list[0],128; deletearray @ca_list[0],128; deletearray @ca_am[0],128; deletearray @eq_ref[0],128; deletearray @eq_c1[0],128; deletearray @eq_c2[0],128; deletearray @eq_c3[0],128; deletearray @eq_c4[0],128; set @card1,0; set @card2,0; set @card3,0; set @card4,0; set @it_m$,""; set @e,0; // Reset Array Position for ( set @i,0; @i < @inventorylist_count; set @i,@i + 1) { // Looping through the Items // Available Equipment if( (getiteminfo(@inventorylist_id[@i],2) == 4 || getiteminfo(@inventorylist_id[@i],2) == 5) && getitemslots(@inventorylist_id[@i]) > 0 && @inventorylist_identify[@i] == 1 && @inventorylist_equip[@i] == 0) { // Item ID setarray @eq_list[@e],@inventorylist_id[@i]; if(@debug) dispbottom "Equip Name: "+getitemname(@inventorylist_id[@i])+" ["+@inventorylist_id[@i]+"]"; // Does the items have an refine? setarray @eq_ref[@e],@inventorylist_refine[@i]; // Does the items already have cards compounded? setarray @eq_c1[@e],@inventorylist_card1[@i]; if(@debug) dispbottom "Card 1: "+ getitemname(@inventorylist_card1[@i])+" ["+@inventorylist_card1[@i]+"]"; setarray @eq_c2[@e],@inventorylist_card2[@i]; if(@debug) dispbottom "Card 2: "+ getitemname(@inventorylist_card2[@i])+" ["+@inventorylist_card2[@i]+"]"; setarray @eq_c3[@e],@inventorylist_card3[@i]; if(@debug) dispbottom "Card 3: "+ getitemname(@inventorylist_card3[@i])+" ["+@inventorylist_card3[@i]+"]"; setarray @eq_c4[@e],@inventorylist_card4[@i]; if(@debug) dispbottom "Card 4: "+ getitemname(@inventorylist_card4[@i])+" ["+@inventorylist_card4[@i]+"]"; if(@debug) dispbottom "------------------------------------------------------"; if(@debug) dispbottom "Array Sizes: Card 1: "+getarraysize(@eq_c1)+" - Card 2: "+getarraysize(@eq_c2)+" - Card 3: "+getarraysize(@eq_c3)+" - Card 4: "+getarraysize(@eq_c4); if(@debug) dispbottom "============================================="; if(@debug) dispbottom " "; // Menu Creation set @it_m$,@it_m$ + "- (+"+@inventorylist_refine[@i]+") " + getitemname(@inventorylist_id[@i])+" ["+getitemslots(@inventorylist_id[@i])+"]" + ( (@inventorylist_id[@i+1])?":":""); // New Array Position: // getarraysize would be bugged if an entry would be 0 // since it won't be counted as a valid value set @e,@e + 1; } // Available Cards if(getiteminfo(@inventorylist_id[@i],2) == 6) { setarray (@ca_list[getarraysize(@ca_list)],@inventorylist_id[@i]); setarray (@ca_am[getarraysize(@ca_am)],@inventorylist_amount[@i]); } } // Menu Selection set @id,select(@it_m$) - 1; set @max_c,getitemslots(@eq_list[@id]); if(getd("@eq_c"+@max_c+"["+@id+"]") > 0) { mes .n$; mes "Each slot is in usage already, please uncompound the current cards and try again."; close; } set @cards,0; set @slots,@max_c; set @c,1; while(@c <= @max_c) { if(getd("@eq_c"+@c+"["+@id+"]") == 0) { set @ca_m$,""; for ( set @l,0; @l < getarraysize(@ca_list); set @l,@l + 1) set @ca_m$,@ca_m$ + "- "+getitemname(@ca_list[@l]) + " ("+@ca_am[@l]+")" + ( (@ca_list[@l+1])?":":""); mes .n$; mes "Slots left: "+@slots; next; if(prompt(@ca_m$) != 255) { setd("@card"+@c),@ca_list[@menu-1]; if(@ca_am[@menu-1] == 1) { deletearray @ca_list[@menu-1],1; deletearray @ca_am[@menu-1],1; } else setarray @ca_am[@menu-1],@ca_am[@menu-1] - 1; } else setd("@card"+@c),0; if(getd("@card"+@c) != 0) set @cards,@cards + 1; } set @slots,@slots - 1; set @c,@c + 1; } mes .n$; mes "You will recieve the following Item:"; mes "Name: 1x +"+@eq_ref[@id]+" "+ getitemname(@eq_list[@id]) + " with these cards:"; if(!@cards) { // No new Cards inserted! mes "Error: No Cards inserted."; close; } if(@card1) mes "Card 1: "+ getitemname(@card1)+" ["+@card1+"]"; if(@card2) mes "Card 2: "+ getitemname(@card2)+" ["+@card2+"]"; if(@card3) mes "Card 3: "+ getitemname(@card3)+" ["+@card3+"]"; if(@card4) mes "Card 4: "+ getitemname(@card4)+" ["+@card4+"]"; if(.requ[0] > 0) { set @cost,.requ[1]*@cards; mes " "; mes "Therefore I require"; mes @cost + ( (.requ[0] > 500)?"x ":" ") + ( (.requ[0] == 1)?"Zeny" (.requ[0] == 2)?"Cash Points" (.requ[0] > 3)?getitemname(.requ[0]):"Custom Points"))); mes "Proceed?"; if(select("- Yes:- No") - 1) close; if(.requ[0] == 1 && Zeny < @cost ) { mes "I'm sorry, but you don't have the required Zeny for inserting "+@cards+" Cards."; mes "You'll need "+@cost+" Zeny."; close; } else if(.requ[0] == 2 && #CASHPOINTS < @cost) { mes "I'm sorry, but you don't have the required Cash Points for inserting "+@cards+" Cards."; mes "You'll need "+@cost+" Cash Points."; close; } else if(.requ[0] == 3 && custom_points < @cost) { mes "I'm sorry, but you don't have the required Custom Points for inserting "+@cards+" Cards."; mes "You'll need "+@cost+" Custom Points."; close; } else if(.requ[0] > 500 && countitem(.requ[0]) < @cost) { mes "I'm sorry, but you don't have the required "+getitemname(.requ[0])+" for inserting "+@cards+" Cards."; mes "You'll need "+@cost+" "+getitemname(.requ[0])+"."; close; } } // If there are cards inserted already, // re-add them also else they will be deleted // and only the new card will be added. if(!@card1 && @eq_c1[@id]) set @card1,@eq_c1[@id]; if(!@card2 && @eq_c2[@id]) set @card2,@eq_c2[@id]; if(!@card3 && @eq_c3[@id]) set @card3,@eq_c3[@id]; if(!@card4 && @eq_c4[@id]) set @card4,@eq_c4[@id]; delitem2 @eq_list[@id],1,1,@eq_ref[@id],0,@eq_c1[@id],@eq_c2[@id],@eq_c3[@id],@eq_c4[@id]; getitem2 @eq_list[@id],1,1,@eq_ref[@id],0,@card1,@card2,@card3,@card4; for ( set @c,1; @c <= @max_c; set @c,@c+1) if(getd("@card"+@c)) delitem getd("@card"+@c),1; if(.requ[0] == 1) set Zeny,Zeny - @cost; else if(.requ[0] == 2) set #CASHPOINTS,#CASHPOINTS - @cost; else if(.requ[0] == 3) set custom_points,custom_points - @cost; else if(.requ[0] > 500) delitem .requ[0],.requ[1]; close; case 2: mes .n$; mes "I am able to insert cards in any equipment you want."; if(.requ[0] == 0) close; mes "The only thing I require is"; mes .requ[1] + ( (.requ[0] > 500)?"x ":" ") + ( (.requ[0] == 1)?"Zeny" (.requ[0] == 2)?"Cash Points" (.requ[0] > 3)?getitemname(.requ[0]):"Custom Points"))); mes "for each card you inserted."; close; case 3: close; } } after using it for the 2nd time, on the 2nd slot (my HG slot is 2) i get that error.. causing the cards to be dupped.. help me fix this Plssssssssssssssssssssssssssss? thank you!
  5. Anyone else here tried the card compound?? im getting a bug, where the cards were getting dupped if compounded on the 2nd slot... i got a map error buildin_countitem: Invalid '2' script:delitem: failed to delete 1 item (blah blah blah.. )
  6. hahaa!! greaaaaaaaat!! thanks bRo! ur awsome (DOne)
  7. Hey Euphy, i just notice, after i choose the item, i get stucked i cant, move, need to relog again.. function script JobBox { setarray .@Jobs$[0], "Valkyrie Package Set STR:Valkyrie Package Set AGI:Valkyrie Package Set VIT:Valkyrie Package Set INT:Valkyrie Package Set DEX:Valkyrie Package Set LUK"; setarray .@Items[0], 13634, 13636, 503, 13637, 13638, 13639; set .@menu$,""; for(set .@i,0; .@i<getarraysize(.@Jobs$); set .@i,.@i+1) set .@menu$, .@menu$+.@Jobs$[.@i]; getitem .@Items[select(.@menu$)], 1; end; } here's my script. can u fix it?? thanks
  8. i tried it, but.. it doesnt work...
  9. thanks Euphy, there's some mistake in the script, but i got it all figured out.. it worked as i expected. you're always helping me,, thanks again
  10. hi guys, can anyone script this bonus? its like a 3rd job ticket where when u use it, it will allow you tho choose what kind of job you want. but for me, i would like to make it as an item too choose, when a box is click, a list of item to choose will show.. anyone pls?? thanks
  11. Hey.. im getting a lot or errors using 3ceam,, can you help me..?
  12. sorry for the late reply, its seem everything is working! thank you guyS!
  13. were do i put this? item bonus? or script?
  14. im using it as an item, unconsumable "11" kinda like this (just a test) 501,Red_Potion,Red Potion,11,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ atcommand "@slaveclone Critica1"; },{},{} i have this custom bonus script with timer a timer bonus3 bCloneAid,n,x,y; n/10% chance to spawn a clone of yourself while attacking x: ATF_FLAGS (ATF_WEAPON|ATF_LONG = spawn while attacking with long range) but this will only summon the clone, if attacking the character is attacking... ok forget about the time.. is it possible to summon only 1 clone.. like if item is used again the frst clone summoned will die...?
  15. is there a way that it could only summon 1 clone? im trying to put this on item bonus, but i want it to summon only 1 if used again the first will die.. is this possible...? thanks n advance
  16. are you asking for the script? or do you have it..?
  17. about this.. // Display some mob info next to their name? (add as needed) // (does not works on guardian or emperium) // 1: Display mob HP (Hp/MaxHp format) // 2: Display mob HP (Percent of full life format) // 4: Display mob's level show_mob_info: 1 is there a way that in certain maps, mobs HP wont show? like for example on MvP maps, mob HP's wont show.. but in other map its normal... thanks!!
  18. Hi Flaid sorry for the late reply, it worked but is it possible to limit the summon by only 1? (the 1st summon will die when "item" is used again) and is it also possible to put a timer on it? (on how long will the clone appear) Thanks Bro!
  19. Would this bonus item possible? for ex. if a status skill is active like (berserk, increase agi, adrenaline rush etc) there is a chance to get bonus stats. kinda like "if a skill is active, you gain bonus" is this possible...? anybody, help me please
  20. //===== eAthena Script ======================================= //= Lottery Script //===== By: ================================================== //= acky - [email protected] //===== Current Version: ===================================== //= 1.2.1a //===== Compatible With: ===================================== //= Any eAthena Version //===== Description: ========================================= //= Daily lottery draw. //===== Additional Comments: ================================= //= Numbers drawn daily (Time is configured line 29) //= *Added GM-Riggability //= *Ability to renew ticket //= *Improved interface //= *Fixed minor bug where first load didn't work. //= 1.2.1a fix due to new script engine //============================================================ prontera,1,1,1 script lotterygenerator 111,{ OnInit: set $L_TicketPrice,4750; // TICKET COST set $L_Prize_Money,5000000; // JACKPOT AMOUNT set $L_Prize_Money_Small,1000000; // SECONDARY PRIZE if ($LID == 0) goto L_GenID; end; //Modify for own time OnClock2045: // CHECKS IF LOTTERY IS RIGGED if ($L_Rigged == 1) goto L_Rigged_Draw; // GENERATES RANDOM NUMBERS 1-40 Pick1: set $LW1,rand (1,40); Pick2: set $LW2,rand (1,40); if ($LW2 == $LW1) goto Pick2; Pick3: set $LW3,rand (1,40); if ($LW3 == $LW2) goto Pick3; if ($LW3 == $LW1) goto Pick3; Pick4: set $LW4,rand (1,40); if ($LW4 == $LW2) goto Pick4; if ($LW4 == $LW1) goto Pick4; if ($LW4 == $LW3) goto Pick4; Pick5: set $LW5,rand (1,40); if ($LW5 == $LW1) goto Pick5; if ($LW5 == $LW2) goto Pick5; if ($LW5 == $LW3) goto Pick5; if ($LW5 == $LW4) goto Pick5; Pick6: set $LW6,rand (1,40); if ($LW6 == $LW1) goto Pick6; if ($LW6 == $LW2) goto Pick6; if ($LW6 == $LW3) goto Pick6; if ($LW6 == $LW4) goto Pick6; if ($LW6 == $LW5) goto Pick6; // BROADCASTS DRAW L_Broadcast: Announce "Lottery: Welcome to tonight's lotto draw!",8; Announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]",8; Announce "Congratulations to the winners of tonight!",8; // GENERATES DRAW ID CODE L_GenID: set $LID2,$LID; // SETS TOMORROW'S ID NUMBER set $LID,rand (100000,999999); end; // SETS DRAW TO RIGGED NUMBERS L_Rigged_Draw: set $LW1,$LR1; set $LW2,$LR2; set $LW3,$LR3; set $LW4,$LR4; set $LW5,$LR5; set $LW6,$LR6; set $L_Rigged,0; goto L_Broadcast; } // BEGIN LOTTERY SCRIPT - script lottery 76,{ L_Begin: mes "[Lottery]"; mes "Winning Lotto Numbers ("+$LID2+"):"; mes "^0000FF[" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]^000000"; if ($LID > 99999) mes "Your Ticket ("+#LID+"):"; if ($LID > 99999) mes "^FF0000[" + #LW1 + "] [" + #LW2 + "] [" + #LW3 + "] [" + #LW4 + "] [" + #LW5 + "] [" + #LW6 + "]^000000"; mes "Next Draw-ID: ^FF0000" + $LID + "^000000."; next; if (getgmlevel() > 90) goto L_GM; menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"Cancel",L_Cancel; // PURCHASE TICKET L_Buy: if (#LID == $LID && #L1 != 0) goto L_DoubleTicket; mes "[Lottery]"; mes "Tickets cost ^0000FF" + $L_TicketPrice + "z^000000."; mes "The Jackpot is ^FF0000" + $L_Prize_Money + "z^000000."; next; menu "Buy Ticket",-,"Cancel",L_Cancel; if (zeny < $L_TicketPrice) goto L_NoZeny; set zeny,zeny-$L_TicketPrice; mes "[Lottery]"; mes "Would you like your numbers hand picked or computer generated?"; next; menu "Computer Generated",L_ComputerGen,"Hand Picked",L_HandPick,"Renew Ticket",L_Renew; // RENEW LAST TICKET L_Renew: if ($LID < 99999) goto L_Invalid; set #LID,$LID; goto L_Confirm2; L_ComputerGen: // SELECTS RANDOM NUMBERS set @L1,0; set @L2,0; set @L3,0; set @L4,0; set @L5,0; set @L6,0; Pick1: set @L1,rand (1,40); Pick2: set @L2,rand (1,40); if (@L2 == @L1) goto Pick2; Pick3: set @L3,rand (1,40); if (@L3 == @L2) goto Pick3; if (@L3 == @L1) goto Pick3; Pick4: set @L4,rand (1,40); if (@L4 == @L2) goto Pick4; if (@L4 == @L1) goto Pick4; if (@L4 == @L3) goto Pick4; Pick5: set @L5,rand (1,40); if (@L5 == @L1) goto Pick5; if (@L5 == @L2) goto Pick5; if (@L5 == @L3) goto Pick5; if (@L5 == @L4) goto Pick5; Pick6: set @L6,rand (1,40); if (@L6 == @L1) goto Pick6; if (@L6 == @L2) goto Pick6; if (@L6 == @L3) goto Pick6; if (@L6 == @L4) goto Pick6; if (@L6 == @L5) goto Pick6; mes "[Lottery]"; mes "The computer has selected the following numbers:"; mes "^0000FF" + @L1 + " " + @L2 + " " + @L3 + " " + @L4 + " " + @L5 + " " + @L6 + "^000000"; next; menu "Confirm",L_Confirm,"Re-Generate",L_ComputerGen; // HAND PICK LOTTERY NUMBERS L_HandPick: mes "[Lottery]"; mes "Please pick your numbers (1-40):"; set @L1,0; set @L2,0; set @L3,0; set @L4,0; set @L5,0; set @L6,0; Input1: input @L1; if (@L1 < 1 || @L1 > 40) goto Input1; mes @L1; Input2: input @L2; if (@L2 < 1 || @L2 > 40) goto Input2; if (@L2 == @L1) goto Input2; mes @L2; Input3: input @L3; if (@L3 < 1 || @L3 > 40) goto Input3; if (@L3 == @L1) goto Input3; if (@L3 == @L2) goto Input3; mes @L3; Input4: input @L4; if (@L4 < 1 || @L4 > 40) goto Input4; if (@L4 == @L1) goto Input4; if (@L4 == @L2) goto Input4; if (@L4 == @L3) goto Input4; mes @L4; Input5: input @L5; if (@L5 < 1 || @L5 > 40) goto Input5; if (@L5 == @L1) goto Input5; if (@L5 == @L2) goto Input5; if (@L5 == @L3) goto Input5; if (@L5 == @L4) goto Input5; mes @L5; Input6: input @L6; if (@L6 < 1 || @L6 > 40) goto Input6; if (@L6 == @L1) goto Input6; if (@L6 == @L2) goto Input6; if (@L6 == @L3) goto Input6; if (@L6 == @L4) goto Input6; if (@L6 == @L5) goto Input6; mes @L6; next; mes "[Lottery]"; mes "Your numbers are:"; mes "^0000FF" + @L1 + " " + @L2 + " " + @L3 + " " + @L4 + " " + @L5 + " " + @L6 + "^000000"; next; menu "Confirm",L_Confirm,"Re-Pick",L_HandPick; L_Confirm: set #LW1,@L1; set #LW2,@L2; set #LW3,@L3; set #LW4,@L4; set #LW5,@L5; set #LW6,@L6; set #LID,$LID; L_Confirm2: mes "[Lottery]"; mes "The live broadcasted draw is at 9pm."; mes "You can claim your ticket between then and the next draw."; next; mes "[Lottery]"; mes "Good luck!"; close; L_Claim: // CHECKS TICKET VALIDILITY if (#LID != $LID2) goto L_Invalid; // CHECKS HOW MANY NUMBERS MATCHED set @LPrize,0; if (#LW1 == $LW1) set @LPrize,@LPrize+1; if (#LW1 == $LW2) set @LPrize,@LPrize+1; if (#LW1 == $LW3) set @LPrize,@LPrize+1; if (#LW1 == $LW4) set @LPrize,@LPrize+1; if (#LW1 == $LW5) set @LPrize,@LPrize+1; if (#LW1 == $LW6) set @LPrize,@LPrize+1; if (#LW2 == $LW1) set @LPrize,@LPrize+1; if (#LW2 == $LW2) set @LPrize,@LPrize+1; if (#LW2 == $LW3) set @LPrize,@LPrize+1; if (#LW2 == $LW4) set @LPrize,@LPrize+1; if (#LW2 == $LW5) set @LPrize,@LPrize+1; if (#LW2 == $LW6) set @LPrize,@LPrize+1; if (#LW3 == $LW1) set @LPrize,@LPrize+1; if (#LW3 == $LW2) set @LPrize,@LPrize+1; if (#LW3 == $LW3) set @LPrize,@LPrize+1; if (#LW3 == $LW4) set @LPrize,@LPrize+1; if (#LW3 == $LW5) set @LPrize,@LPrize+1; if (#LW3 == $LW6) set @LPrize,@LPrize+1; if (#LW4 == $LW1) set @LPrize,@LPrize+1; if (#LW4 == $LW2) set @LPrize,@LPrize+1; if (#LW4 == $LW3) set @LPrize,@LPrize+1; if (#LW4 == $LW4) set @LPrize,@LPrize+1; if (#LW4 == $LW5) set @LPrize,@LPrize+1; if (#LW4 == $LW6) set @LPrize,@LPrize+1; if (#LW5 == $LW1) set @LPrize,@LPrize+1; if (#LW5 == $LW2) set @LPrize,@LPrize+1; if (#LW5 == $LW3) set @LPrize,@LPrize+1; if (#LW5 == $LW4) set @LPrize,@LPrize+1; if (#LW5 == $LW5) set @LPrize,@LPrize+1; if (#LW5 == $LW6) set @LPrize,@LPrize+1; if (#LW6 == $LW1) set @LPrize,@LPrize+1; if (#LW6 == $LW2) set @LPrize,@LPrize+1; if (#LW6 == $LW3) set @LPrize,@LPrize+1; if (#LW6 == $LW4) set @LPrize,@LPrize+1; if (#LW6 == $LW5) set @LPrize,@LPrize+1; if (#LW6 == $LW6) set @LPrize,@LPrize+1; if (@LPrize == 6) goto LWinBig; if (@LPrize > 3 && @LPrize < 6) goto LWinSmall; // NO WINNER mes "[Lottery]"; mes "Bad luck, it appears you do not hold a winning ticket."; next; mes "[Lottery]"; mes "Better luck next time!."; close; // MATCHED ALL SIX LWinBig: mes "[Lottery]"; mes "You have matched all six numbers!"; mes "Jackpot!"; mes "You've won ^0000FF" + $L_Prize_Money + "z^000000."; set zeny,zeny+$L_Prize_Money; Announce "Lottery: " + strcharinfo(0) + " has won the JACKPOT of " + $L_Prize_Money + "z!",8; set #LID,0; close; // MATCHED AT LEAST 4 LWinSmall: mes "[Lottery]"; mes "You have matched at least 4 numbers!"; mes "You've won ^0000FF" + $L_Prize_Money_Small + "z^000000."; set zeny,zeny+$L_Prize_Money_Small; Announce "Lottery: " + strcharinfo(0) + " has won a prize of " + $L_Prize_Money_Small + "z!",8; set #LID,0; close; // NO ZENY L_NoZeny: mes "[Lottery]"; mes "You can't afford a lottery ticket."; close; // INVALID TICKET L_Invalid: mes "[Lottery]"; mes "I'm sorry but it appears that you have an invalid ticket."; close; // DOUBLE TICKET L_DoubleTicket: mes "[Lottery]"; mes "It appears that you already have a ticket for today."; mes "You may only purchase one ticket per draw."; close; L_Cancel: mes "[Lottery]"; mes "Come back soon!"; close; // GM MENU (Lets you manually do draws) L_GM: menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"[GM]Do Draw Now",-,"[GM]Rig the Lottery",L_GM_Rig,"Cancel",L_Cancel; // CHECKS IF LOTTERY IS RIGGED if ($L_Rigged == 1) goto L_Rigged_Draw; // GENERATES RANDOM NUMBERS 1-40 GMPick1: set $LW1,rand (1,40); GMPick2: set $LW2,rand (1,40); if ($LW2 == $LW1) goto GMPick2; GMPick3: set $LW3,rand (1,40); if ($LW3 == $LW2) goto GMPick3; if ($LW3 == $LW1) goto GMPick3; GMPick4: set $LW4,rand (1,40); if ($LW4 == $LW2) goto GMPick4; if ($LW4 == $LW1) goto GMPick4; if ($LW4 == $LW3) goto GMPick4; GMPick5: set $LW5,rand (1,40); if ($LW5 == $LW1) goto GMPick5; if ($LW5 == $LW2) goto GMPick5; if ($LW5 == $LW3) goto GMPick5; if ($LW5 == $LW4) goto GMPick5; GMPick6: set $LW6,rand (1,40); if ($LW6 == $LW1) goto GMPick6; if ($LW6 == $LW2) goto GMPick6; if ($LW6 == $LW3) goto GMPick6; if ($LW6 == $LW4) goto GMPick6; if ($LW6 == $LW5) goto GMPick6; // BROADCASTS DRAW L_Broadcast: Announce "Lottery: Welcome to the special GM's lotto draw!",8; Announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]",8; Announce "Congratulations to the winners!",8; // GENERATES DRAW ID CODE L_GenID: set $LID2,$LID; // SETS TOMORROW'S ID NUMBER set $LID,rand (100000,999999); close; // SETS DRAW TO RIGGED NUMBERS L_Rigged_Draw: set $LW1,$LR1; set $LW2,$LR2; set $LW3,$LR3; set $LW4,$LR4; set $LW5,$LR5; set $LW6,$LR6; set $L_Rigged,0; goto L_Broadcast; // ALLOWS GM TO DO A RIGGED DRAW L_GM_Rig: mes "[Lottery]"; mes "Please pick your numbers (1-40):"; set $LR1,0; set $LR2,0; set $LR3,0; set $LR4,0; set $LR5,0; set $LR6,0; GMInput1: Input $LR1; if ($LR1 < 1 || $LR1 > 40) goto GMInput1; mes $LR1; GMInput2: Input $LR2; if ($LR2 < 1 || $LR2 > 40) goto GMInput2; if ($LR2 == $LR1) goto GMInput2; mes $LR2; GMInput3: Input $LR3; if ($LR3 < 1 || $LR3 > 40) goto GMInput3; if ($LR3 == $LR1) goto GMInput3; if ($LR3 == $LR2) goto GMInput3; mes $LR3; GMInput4: Input $LR4; if ($LR4 < 1 || $LR4 > 40) goto GMInput4; if ($LR4 == $LR1) goto GMInput4; if ($LR4 == $LR2) goto GMInput4; if ($LR4 == $LR3) goto GMInput4; mes $LR4; GMInput5: Input $LR5; if ($LR5 < 1 || $LR5 > 40) goto GMInput5; if ($LR5 == $LR1) goto GMInput5; if ($LR5 == $LR2) goto GMInput5; if ($LR5 == $LR3) goto GMInput5; if ($LR5 == $LR4) goto GMInput5; mes $LR5; GMInput6: Input $LR6; if ($LR6 < 1 || $LR6 > 40) goto GMInput6; if ($LR6 == $LR1) goto GMInput6; if ($LR6 == $LR2) goto GMInput6; if ($LR6 == $LR3) goto GMInput6; if ($LR6 == $LR4) goto GMInput6; if ($LR6 == $LR5) goto GMInput6; mes $LR6; next; mes "[Lottery]"; mes "Lottery rigged for next draw."; set $L_Rigged,1; close; } prontera,141,182,5 duplicate(lottery) Lottery 76 help me change the price to cash pls. thank you. =)
  21. My server is a high rate server, so i have this @warp command.. but some players are abusing this command, players who knows how to use #warp, are warping my newbies into jail... and most of the players dont even know about this.... this is really annoying, is there a way i could prevent those players using #command? the only way i know how to fix this is by removing the @warp command.. but is there any other way?
  22. item bonus script that will let you summon your own clone if used.. is this possible? using call func..? or however u do it.. can anyone help me pls.? thank you
  23. //===== eAthena Script ======================================= //= Scavenger Hunt NPC //===== By: ================================================== //= Iceandrews and MagnusG87 //= Contact: caiaphas(at)hotmail.com //= eAthena ID: Iceandrews //===== Description: ========================================= //= //= This NPC initiates a server wide Scavenger Hunt. //= The NPC generates a list of 10 items that are to be //= collected. This list is valid for everyone on the entire //= server. All players compete against each other to gather //= the items in the hunt. Once a player collects all the //= items, they can turn them in for a large experience //= reward, both job and base. At this time, a new list of //= items is generated for the entire server. If at any time //= the list of items is too hard, or impossible to gather, //= a GM character can reset the game and generate a new list //= of items. Only GM characters or a server restart will //= generate a new list of items. //= //= ******************* WARNINGS ***************************** //= 1 - It is possible that some hunts may be impossible. //= This script should generate a list of items that are //= dropped by a mosnter or sold by and NPC. However, //= it may select a mosnter that is NOT in the game. //= I believe this is a rare case. //= 2 - This script makes use of a global variable. //= //===== Version History: ===================================== //= 1.0 - Initial Release //= 1.1 - Made adjustments to the way in which it generated //= the item list. Previously, it was ANY random item //= from the item_db.txt. Now it should ONLY items //= that are either dropped by a monster or sold by //= any NPC. I also added code to choose between //= and experience reward or a specified number of base //= and job levels. //= 1.2 - Added item control. //============================================================ prontera,143,101,6 script ScavengerHunt 856,{ set .ireward,909; // change the 909 for your own item reward. set .iamount,1; // ammount of the item reward. //Main Menu Choices. mes "[scavenger Hunt]"; mes "Welcome to the Scavenger Hunt!"; next; menu "View Current Scavenger Hunt Items",ViewItems, "Hand in Current Scavenger Hunt Items",CheckForItems, "Leave",QuitHunt, "Initiate New Scavenger Hunt",GMCheck; // Diplays the list of items and their item ID number // that is valid for the current hunt. ViewItems: mes "[scavenger Hunt]"; mes "This is the current list of items."; mes ""; for(set .@i,0; .@i < 10; set .@i,.@i+1) { mes .@i+1 + ". " + getitemname($@scavengerList[.@i]) + " - Item ID:" + $@scavengerList[.@i]; } next; menu "Leave",QuitHunt; // Check to make sure you have all the required items // in your inventory. If you do, you get the rewards. // If not, the NPC interactions ends. CheckForItems: for(set .@i,0; .@i < 10; set .@i,.@i+1) { if(countitem($@scavengerList[.@i]) == 0) { goto DoesNotHaveItems; } } goto HasRequiredItems; // Player has the required items. // The player can turn in the items for a reward. // They can also not turn anything in and just leave. HasRequiredItems: mes "[scavenger Hunt]"; mes "Congratulations! You've collected all the items in this Scavenger Hunt. Would you like to turn them in for the reward?"; next; menu "Yes",HandInItems, "No",DoNotHandInItems; // Takes the items from the players inventory. // Player receives an experience reward. HandInItems: for(set .@i,0; .@i < 10; set .@i,.@i+1) { delitem $@scavengerList[.@i],1; } // Reward! getitem .ireward,.iamount; // Instead of experience, this reward is for a // specified number of base and job levels. // Change the numbers accordingly for your server. //atcommand "@blvl 5"; //atcommand "@jlvl 5"; callfunc "setScavengerList"; announce "Attention! A new scavenger hunt has begun! Come and get the new item list!",bc_all; mes "[scavenger Hunt]"; mes "You've gained base and job experience."; next; menu "Leave",QuitHunt; // Check to make sure player is a GM. // If they player is a GM, generate a new item list. // If they are not, provide a message and leave the NPC. GMCheck: if (getgmlevel()) { callfunc "setScavengerList"; mes "[scavenger Hunt]"; mes "A new list of item has been generated. Thanks!"; next; menu "View Current Scavenger Hunt Items",viewItems, "Leave",QuitHunt; } else { mes "[scavenger Hunt]"; mes "Sorry, you don't have the rights to start a new Scavenger Hunt."; next; menu "Leave",QuitHunt; } // Player does not have the required items. DoesNotHaveItems: mes "[scavenger Hunt]"; mes "Sorry, but it looks like you are missing some items. Come back when you've collected everything."; next; menu "Leave",QuitHunt; // Player chooses not to hand in the items. DoNotHandInItems: mes "[scavenger Hunt]"; mes "Aww, but you're missing out on a great reward!"; next; menu "Leave",QuitHunt; // Ends NPC interaction. QuitHunt: mes "[scavenger Hunt]"; mes "Good luck finding everything!"; close; // NPC Intialization OnInit: callfunc "setScavengerList"; end; } function script setScavengerList { //initializes list of scavenger items for( set .@i,0; .@i < 10 ; set .@i,.@i+1 ) { set .@valid, 0; //continue generating random numbers until a valid item is found while(.@valid == 0) { // This is the range of item IDs that can be produced // for any given scavenger hunt. This can be changed. set .@j, rand(501, 12153); // This takes the random number above and does 2 things. // First it check to see if the item exists at all. // If getiteminfo() returns -1, then an item with that // number is not in the item database. If that item does // exist, then it returns the maximum drop rate for that // item from the entier mosnter set. For example, if the // item is a 'Apple', and both Porings (5%) and Luncatis (1%) // drop this item, the function will return 5. This verifies // that the item ID gernerated is dropped by a monster. // If the returned number is 10000, this means it is // sold by an NPC. So this generates a list of random // items that are either dropped by a mosnter or sold // by and NPC. if(getiteminfo(.@j,3) > 0) { set $@scavengerList[.@i], .@j; set .@valid , 1; } } } return; } iM not sure if its ok to post somebody's script to edit it.. if not then ill just delete it then.. if its ok,, can anyone help me fix it? everytime i tried to Initiate the NPC, it gives me an error on map server syng "infinity loop" im not sure what's wrong.. so guys can you help me? thanks..
×
×
  • Create New...