n0tttt

Members
  • Content Count

    259
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by n0tttt

  1. I didn't understand very well. Could you try with one of these commands? Like sleep 2 * 60 * 60 * 1000; *sleep {<milliseconds>}; *sleep2 {<milliseconds>}; *awake "<NPC name>"; These commands are used to control the pause of a NPC. sleep and sleep2 will pause the script for the given amount of milliseconds. Awake is used to cancel a sleep. When awake is called on a NPC it will run as if the sleep timer ran out, and thus making the script continue. Sleep and sleep2 basically do the same, but the main difference is that sleep will not keep the rid, while sleep2 does. Also sleep2 will stop the script if there is no unit attached. Examples: sleep 10000; //pause the script for 10 seconds and ditch the RID (so no player is attached anymore) sleep2 5000; //pause the script for 5 seconds, and continue with the RID attached. awake "NPC"; //Cancels any running sleep timers on the NPC 'NPC'. *initnpctimer{ "<NPC name>" {, <Attach Flag>} } | { "<NPC name>" | <Attach Flag> }; *stopnpctimer{ "<NPC name>" {, <Detach Flag>} } | { "<NPC name>" | <Detach Flag> }; *startnpctimer{ "<NPC name>" {, <Attach Flag>} } | { "<NPC name>" | <Attach Flag> }; *setnpctimer <tick>{,"<NPC name>"}; *getnpctimer(<type of information>{,"<NPC name>"}) *attachnpctimer {"<character name>"}; *detachnpctimer {"<NPC name>"}; This set of commands and functions will create and manage an NPC-based timer. The NPC name may be omitted, in which case the calling NPC is used as target. Contrary to addtimer/deltimer commands which let you have many different timers referencing different labels in the same NPC, each with their own countdown, 'initnpctimer' can only have one per NPC object. But it can trigger many labels and let you know how many were triggered already and how many still remain. This timer is counting up from 0 in ticks of 1/1000ths of a second each. Upon creating this timer, the execution will not stop, but will happily continue onward. The timer will then invoke new execution threads at labels "OnTimer<time>:" in the NPC object it is attached to. To create the timer, use the 'initnpctimer', which will start it running. 'stopnpctimer' will pause the timer, without clearing the current tick, while 'startnpctimer' will let the paused timer continue. By default timers do not have a RID attached, which lets them continue even if the player that started them logs off. To attach a RID to a timer, you can either use the optional "attach flag" when using 'initnpctimer/startnpctimer', or do it manually by using 'attachnpctimer'. Likewise, the optional flag of stopnpctimer lets you detach any RID after stopping the timer, and by using 'detachnpctimer' you can detach a RID at any time. Normally there is only a single timer per NPC, but as an exception, as long as you attach a player to the timer, you can have multiple timers running at once, because these will get stored on the players instead of the NPC. NOTE: You need to attach the RID before the timer _before_ you start it to get a player-attached timer. Otherwise it'll stay a NPC timer (no effect). If the player that is attached to the npctimer logs out, the "OnTimerQuit:" event label of that NPC will be triggered, so you can do the appropriate cleanup (the player is still attached when this event is triggered). The 'setnpctimer' command will explicitly set the timer to a given tick. 'getnpctimer' provides timer information. Its parameter defines what type: 0 - Will return the current tick count of the timer. 1 - Will return 1 if there are remaining "OnTimer<ticks>:" labels in the specified NPC waiting for execution. 2 - Will return the number of times the timer has triggered and will trigger an "OnTimer<tick>:" label in the specified NPC. Example 1: <NPC Header> { // We need to use attachnpctimer because the mes command below needs RID attach attachnpctimer; initnpctimer; npctalk "I cant talk right now, give me 10 seconds"; end; OnTimer5000: npctalk "Ok 5 seconds more"; end; OnTimer6000: npctalk "4"; end; OnTimer7000: npctalk "3"; end; OnTimer8000: npctalk "2"; end; OnTimer9000: npctalk "1"; end; OnTimer10000: stopnpctimer; mes "[Man]"; mes "Ok we can talk now"; detachnpctimer; // and remember attachnpctimer and detachnpctimer can only use while the NPC timer is not running ! } Example 2: OnTimer15000: npctalk "Another 15 seconds have passed."; // You have to use 'initnpctimer' instead of 'setnpctimer 0'. // This is equal to 'setnpctimer 0' + 'startnpctimer'. // Alternatively, you can also insert another 'OnTimer15001' label so that the timer won't stop. */ initnpctimer; end; // This OnInit label will run when the script is loaded, so that the timer // is initialized immediately as the server starts. It is dropped back to 0 // every time the NPC says something, so it will cycle continuously. OnInit: initnpctimer; end; Example 3: mes "[Man]"; mes "I have been waiting " + (getnpctimer(0)/1000) + " seconds for you."; // We divide the timer returned by 1000 to convert milliseconds to seconds. close; Example 4: mes "[Man]"; mes "Ok, I will let you have 30 more seconds..."; close2; setnpctimer (getnpctimer(0)-30000); // Notice the 'close2'. If there were a 'next' there the timer would be // changed only after the player pressed the 'next' button. end; EDIT: And to the topic creator: Do you mean World Boss by Sehrentos spawned when that happens? And which monsters? Just random ones? You need to specify a little more.
  2. n0tttt

    Rolling in the deep

    Added a new config for that. Also tried to clean some things. Hope it works.
  3. Okay, test this one. - script Extra_GearConf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Armor */ add_item(2301, 1, 111,10, 2303, 1, 111,25, 2305, 1, 111, 40, 2307, 1, 111, 65, 2311, 1, 111, 75, 2319, 1, 111,95, 2320, 1, 111,125); /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* Shield */ add_item(2101, 1, 111,30, 2103, 1, 111,45, 2105, 1, 111, 70); /* Robe */ add_item(2501, 1, 111,31, 2503, 1, 111,46, 2505, 1, 111, 71); /* Shoes */ add_item(2401, 1, 111,32, 2403, 1, 111,47, 2405, 1, 111, 72); /* Debug */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"ffffff", // % of evolution. "03fd20", // Wings evolving. "11f4cc"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HAND_L, EQI_ARMOR, EQI_GARMENT, EQI_SHOES; //============================================= end; OnNPCKillEvent: if(@evolve_inuse) end; @evolve_inuse = true; [email protected] = getarraysize(.slots); while([email protected] < [email protected]) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1) { [email protected] = 0; [email protected]_item = false; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_percent = false; [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_item = true; [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = getd("mobs_"[email protected]_id) + 1; setd "mobs_"[email protected]_id,.[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) [email protected]_percent = true; } else { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) [email protected]_percent = true; } if([email protected]_percent) { setd "mobs_"[email protected]_id,0; setd "exp_"[email protected]_id,0; specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto) { specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" está evoluindo...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; if([email protected]) { getinventorylist; [email protected] = true; } [email protected] = inarray(@inventorylist_id,[email protected]_id); if([email protected] != -1) { if([email protected]_expire[[email protected]]) { setarray [email protected][0],@inventorylist_id[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]]; setarray [email protected][0],@inventorylist_option_id1[[email protected]],@inventorylist_option_id2[[email protected]],@inventorylist_option_id3[[email protected]],@inventorylist_option_id4[[email protected]],@inventorylist_option_id5[[email protected]]; setarray [email protected][0],@inventorylist_option_value1[[email protected]],@inventorylist_option_value2[[email protected]],@inventorylist_option_value3[[email protected]],@inventorylist_option_value4[[email protected]],@inventorylist_option_value5[[email protected]]; setarray [email protected][0],@inventorylist_option_parameter1[[email protected]],@inventorylist_option_parameter2[[email protected]],@inventorylist_option_parameter3[[email protected]],@inventorylist_option_parameter4[[email protected]],@inventorylist_option_parameter5[[email protected]]; [email protected] = @inventorylist_bound[[email protected]]; } else { continue; } [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); if(getarraysize([email protected])){ delitem3 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; if([email protected]) getitembound3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account,[email protected],[email protected],[email protected]; else getitem3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; } else { delitem2 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; if([email protected]) getitembound2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account; else getitem2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; } equip [email protected]_item; setd "evo_"[email protected]_id,0; announce "Parabéns!! Sua "+getitemname([email protected]_id)+" evoluiu para "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; } } } else if([email protected]_id == [email protected]_evo) { [email protected]_item = true; } } } [email protected]++; } [email protected]++; } } @evolve_inuse = false; end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } }
  4. n0tttt

    Rolling in the deep

    Annie put that one faster. Well, I put my version (not tested, again: I don't have a test server). This one supports random option and has a sell window (if it works, of course). I grabbed the getitemname2 function by AnnieRuru and F_RandOptDist by Stolao. Credits. //===== Hercules Script ===================================== //= [Function] getitemname2 //===== By: ================================================= //= AnnieRuru //===== Current Version: ==================================== //= 2.4 //===== Compatible With: ==================================== //= hercules 2015-11-27 //===== Description: ======================================== //= custom function to show item names just like in game //===== Topic: ============================================== //= http://herc.ws/board/topic/11275-getitemname2/ //===== Additional Comments: ================================ //= callfunc( "getitemname2", ItemID, Identify, Refine, Broken, Card1, Card2, Card3, Card4 {, Bound } ) //= it also creates a player array : @itemname2_info$ //= [0] = color //= ^000000 (black) = normal equipment/items //= ^999999 (gray) = unidentify equipment //= ^FF0000 (red) = broken equipment //= ^66CC00 (green) = enchanted equipment (1) //= ^0066CC (blue) = enchanted equipment (2) //= ^CC6600 (brown) = enchanted equipment (3) //= ^CC44CC (purple) = enchanted equipment (4) //= ^CCCC00 (yellow) = bounded equipment //= [1] = ID information //= Equipment = Char ID //= Pet egg = Pet ID //= [2] = return full item name if unidentified ( used in unidentified items only ) //= [3] = amount of star crumb used, return in number ( used in crafted item only ) //= [4] = weapon element, return in string ( used in crafted item only ) //= [5] = bound type, return in string //=========================================================== function script getitemname2 { freeloop true; deletearray @itemname2_info$; [email protected] = getarg(0); [email protected] = getiteminfo( [email protected], 2 ); [email protected] = getarg(2); [email protected][0] = getarg(4); [email protected][1] = getarg(5); [email protected][2] = getarg(6); [email protected][3] = getarg(7); [email protected] = getarg(8,0); [email protected]$ = ( [email protected] )? "+"+ [email protected] +" " : "" ; // I think no need refinement check for type 4 or 5, the source automatically convert refined etc items into no refinement [email protected]$ = ( [email protected] = getitemslots( [email protected] ) )? " ["+ [email protected] +"]" : "" ; if ( [email protected] ) { @itemname2_info$[0] = "^CCAA00"; // this condition always get overwritten ... if ( [email protected] == 1 ) @itemname2_info$[5] = "Account"; else if ( [email protected] == 2 ) @itemname2_info$[5] = "Guild"; else if ( [email protected] == 3 ) @itemname2_info$[5] = "Party"; else if ( [email protected] == 4 ) @itemname2_info$[5] = "Character"; } if ( [email protected] != IT_WEAPON && [email protected] != IT_ARMOR && [email protected][0] != 254 ) { // non-equipable item that isn't signed [email protected] = [email protected][1] + ( ( [email protected][1] >= 0 )? 0 : 1 << 16 ) + [email protected][2] * ( 1 << 16 ); @itemname2_info$[1] = ( [email protected] )? [email protected] : ""; [email protected]$ = getitemname( [email protected] ); } else if ( ( [email protected] == IT_WEAPON || [email protected] == IT_ARMOR ) && [email protected][0] && [email protected][1] && [email protected][2] && [email protected][3] ) // equipment with no card, for reduce gotocount [email protected]$ = [email protected]$ + getitemname( [email protected] ) + [email protected]$; else if ( ( [email protected] == IT_WEAPON || [email protected] == IT_ARMOR ) && ( [email protected][0] || [email protected][1] || [email protected][2] || [email protected][3] ) && [email protected][0] != 254 && [email protected][0] != 255 ) { // equipment that has cards, but not a signed item [email protected]$ = "#"+ [email protected][0] +"##"+ [email protected][1] +"##"+ [email protected][2] +"##"+ [email protected][3] +"#"; [email protected] = 0; while ( [email protected] < 4 ) { if ( !compare( [email protected]$, "#"+ [email protected][[email protected]] +"#" ) ) { [email protected][[email protected]] = countstr( [email protected]$, "#"+ [email protected][[email protected]] +"#" ); [email protected]$ = [email protected]$ +"#"+ [email protected][[email protected]] +"#"; } if ( getstrlen( [email protected]$[[email protected][[email protected]]] ) && [email protected][[email protected]] ) { if ( [email protected][[email protected]] == 2 ) [email protected]$[[email protected]] = "Double"; else if ( [email protected][[email protected]] == 3 ) [email protected]$[[email protected]] = "Triple"; else if ( [email protected][[email protected]] == 4 ) [email protected]$[[email protected]] = "Quadruple"; if ( !compare( [email protected]$[[email protected][[email protected]]], "of " ) ) [email protected]$ = [email protected]$ + [email protected]$[[email protected]] +( ( getstrlen([email protected]$[[email protected]]) )? " ": "" )+ [email protected]$[[email protected][[email protected]]] +" "; else [email protected]$ = [email protected]$ +" "+ [email protected]$[[email protected][[email protected]]] +( ( getstrlen([email protected]$[[email protected]]) )? " ": "" )+ [email protected]$[[email protected]]; } [email protected] = [email protected] + ( [email protected][[email protected]] && [email protected] >= [email protected] && ( [email protected][[email protected]] /100 ) != 47 && ( [email protected][[email protected]] /100 ) != 48 ); [email protected]++; } if ( [email protected] == 1 ) @itemname2_info$[0] = "^66CC00"; else if ( [email protected] == 2 ) @itemname2_info$[0] = "^0066CC"; else if ( [email protected] == 3 ) @itemname2_info$[0] = "^CC6600"; else if ( [email protected] == 4 ) @itemname2_info$[0] = "^CC44CC"; [email protected]$ = [email protected]$ + [email protected]$ + getitemname( [email protected] ) + [email protected]$ + [email protected]$; } else if ( [email protected][0] == 254 || [email protected][0] == 255 ) { // signed items [email protected] = @itemname2_info$[1] = [email protected][2] + ( ( [email protected][2] >= 0 )? 0 : 1 << 16 ) + [email protected][3] * ( 1 << 16 ); if ( !query_sql("select name from `char` where char_id = "+ [email protected], [email protected]$) ) [email protected]$ = "Unknown"; [email protected] = [email protected][1] / 10; if ( [email protected] == 128 ) { [email protected]$ = "Very Strong "; @itemname2_info$[3] = "1"; } else if ( [email protected] == 256 ) { [email protected]$ = "Very Very Strong "; @itemname2_info$[3] = "2"; } else if ( [email protected] == 384 ) { [email protected]$ = "Very Very Very Strong "; @itemname2_info$[3] = "3"; } [email protected] = [email protected][1] % 10; if ( [email protected] == 1 ) [email protected]$ = @itemname2_info$[4] = "Ice "; else if ( [email protected] == 2 ) [email protected]$ = @itemname2_info$[4] = "Earth "; else if ( [email protected] == 3 ) [email protected]$ = @itemname2_info$[4] = "Fire "; else if ( [email protected] == 4 ) [email protected]$ = @itemname2_info$[4] = "Wind "; [email protected]$ = [email protected]$ + [email protected]$ + [email protected]$ +"'s "+ [email protected]$ + getitemname( [email protected] ); } // else if ( getarg(3) ) // broken equipment ... seems no longer show red // @itemname2_info$[0] = "^FF0000"; if ( !getstrlen( @itemname2_info$[0] ) ) @itemname2_info$[0] = "^000000"; return [email protected]$; } - script itemname2_prefix -1,{ OnInit: [email protected]$[4001] = "Lucky"; [email protected]$[4002] = "Vital"; [email protected]$[4003] = "Hard"; [email protected]$[4004] = "Dexterous"; [email protected]$[4005] = "Hallowed"; [email protected]$[4006] = "Lucky"; [email protected]$[4007] = "Beholder"; [email protected]$[4008] = "Extra"; [email protected]$[4009] = "Light"; [email protected]$[4010] = "Wise"; [email protected]$[4011] = "Dynamic"; [email protected]$[4012] = "Rigid"; [email protected]$[4013] = "Excellent"; [email protected]$[4014] = "of Champion"; [email protected]$[4015] = "Quick"; [email protected]$[4016] = "Speedy"; [email protected]$[4017] = "Stun"; [email protected]$[4018] = "Smart"; [email protected]$[4019] = "Martyr"; [email protected]$[4020] = "Blink"; [email protected]$[4021] = "Skillful"; [email protected]$[4022] = "of Spore"; [email protected]$[4023] = "of Desert"; [email protected]$[4024] = "Drowsy"; [email protected]$[4025] = "Keen"; [email protected]$[4026] = "Shrewd"; [email protected]$[4027] = "Athletic"; [email protected]$[4028] = "Double-forced"; [email protected]$[4029] = "Wolverine"; [email protected]$[4030] = "Windy"; [email protected]$[4031] = "of Ares"; [email protected]$[4032] = "of Athena"; [email protected]$[4033] = "Detoxication"; [email protected]$[4034] = "Clever"; [email protected]$[4035] = "Bloody"; [email protected]$[4036] = "Robust"; [email protected]$[4037] = "Untouchable"; [email protected]$[4038] = "of Health"; [email protected]$[4039] = "of Aristotle"; [email protected]$[4040] = "Teleport"; [email protected]$[4041] = "of Sandman"; [email protected]$[4042] = "of Heman"; [email protected]$[4043] = "Hurricane"; [email protected]$[4044] = "Hiding"; [email protected]$[4045] = "Heavy"; [email protected]$[4046] = "of Cleric"; [email protected]$[4047] = "Ghost"; [email protected]$[4048] = "Poison"; [email protected]$[4049] = "Flammable"; [email protected]$[4050] = "of Hermes"; [email protected]$[4051] = "of Flash"; [email protected]$[4052] = "Erudite"; [email protected]$[4053] = "Healing"; [email protected]$[4054] = "Holy"; [email protected]$[4055] = "Ice"; [email protected]$[4056] = "of Warmth"; [email protected]$[4057] = "Silence"; [email protected]$[4058] = "Cranial"; [email protected]$[4059] = "of Cadi"; [email protected]$[4060] = "Clamorous"; [email protected]$[4061] = "Immortal"; [email protected]$[4062] = "Envenom"; [email protected]$[4063] = "Insecticide"; [email protected]$[4064] = "Nimble"; [email protected]$[4065] = "Underneath"; [email protected]$[4066] = "Brutal"; [email protected]$[4067] = "Atomic"; [email protected]$[4068] = "Chemical"; [email protected]$[4069] = "Saharic"; [email protected]$[4070] = "of Witch"; [email protected]$[4071] = "Angelic"; [email protected]$[4072] = "Solid"; [email protected]$[4073] = "Discount"; [email protected]$[4074] = "of Gargantua"; [email protected]$[4075] = "Hypnotic"; [email protected]$[4076] = "Cursing"; [email protected]$[4077] = "Under a Cast"; [email protected]$[4078] = "of Recovery"; [email protected]$[4079] = "of Muscle"; [email protected]$[4080] = "Fisher"; [email protected]$[4081] = "Glorious"; [email protected]$[4082] = "Gigantic"; [email protected]$[4083] = "Homer's"; [email protected]$[4084] = "Blast"; [email protected]$[4085] = "Damned"; [email protected]$[4086] = "Critical"; [email protected]$[4087] = "Order"; [email protected]$[4088] = "Guard"; [email protected]$[4089] = "Aqua"; [email protected]$[4090] = "Amulet"; [email protected]$[4091] = "of Counter"; [email protected]$[4092] = "Boned"; [email protected]$[4093] = "Cure"; [email protected]$[4094] = "Kingbird"; [email protected]$[4095] = "Genie's"; [email protected]$[4096] = "Venomer's"; [email protected]$[4097] = "Green"; [email protected]$[4098] = "of Zephyrus"; [email protected]$[4099] = "of Ifrit"; [email protected]$[4100] = "Soul-Enchanted"; [email protected]$[4101] = "of Gnome"; [email protected]$[4102] = "Mocking"; [email protected]$[4103] = "Clairvoyant"; [email protected]$[4104] = "Chaos"; [email protected]$[4105] = "Unfrozen"; [email protected]$[4106] = "Ancient"; [email protected]$[4107] = "Fledged"; [email protected]$[4108] = "Innoxious"; [email protected]$[4109] = "Flameguard"; [email protected]$[4110] = "Viper's"; [email protected]$[4111] = "Decussate"; [email protected]$[4112] = "Peerless"; [email protected]$[4113] = "of Ghost"; [email protected]$[4114] = "Poisoning"; [email protected]$[4115] = "Malicious"; [email protected]$[4116] = "Divine"; [email protected]$[4117] = "Hybrid"; [email protected]$[4118] = "Dragoon"; [email protected]$[4119] = "Evil"; [email protected]$[4120] = "of Dragoon"; [email protected]$[4121] = "Perfect"; [email protected]$[4122] = "Adurate"; [email protected]$[4123] = "Bearer's"; [email protected]$[4124] = "Plasterer's"; [email protected]$[4125] = "Aqua"; [email protected]$[4126] = "Titan"; [email protected]$[4127] = "Insomniac"; [email protected]$[4128] = "of Deaf"; [email protected]$[4129] = "of Rogue"; [email protected]$[4130] = "Divine"; [email protected]$[4131] = "Hasty"; [email protected]$[4132] = "of Gemstone"; [email protected]$[4133] = "Immune"; [email protected]$[4134] = "Spiritual"; [email protected]$[4135] = "Mirror"; [email protected]$[4136] = "from Hell"; [email protected]$[4137] = "of Infinity"; [email protected]$[4138] = "Satanic"; [email protected]$[4139] = "of Moonlight"; [email protected]$[4140] = "Liberation"; [email protected]$[4141] = "Deadly"; [email protected]$[4142] = "of Berserk"; [email protected]$[4143] = "Neutral"; [email protected]$[4144] = "of Eternity"; [email protected]$[4145] = "of Bigmouth"; [email protected]$[4146] = "Reflect"; [email protected]$[4147] = "Scythe-like"; [email protected]$[4148] = "of Kirin"; [email protected]$[4149] = "of Serenity"; [email protected]$[4150] = "Spell-Proof"; [email protected]$[4151] = "Havoc Bringer's"; [email protected]$[4152] = "Sprightly"; [email protected]$[4153] = "of Cancer"; [email protected]$[4154] = "Sweet Scented"; [email protected]$[4155] = "Deadly Goblin's"; [email protected]$[4156] = "of Fatal Flame"; [email protected]$[4157] = "Piercing"; [email protected]$[4158] = "Slaughter"; [email protected]$[4159] = "Deluxe"; [email protected]$[4160] = "Superior"; [email protected]$[4161] = "Anti-Magic"; [email protected]$[4162] = "Sightless"; [email protected]$[4163] = "Wild"; [email protected]$[4164] = "Fisherman's"; [email protected]$[4165] = "of Insect Soul Eater"; [email protected]$[4166] = "of Jinx"; [email protected]$[4167] = "of Beast Soul Eater"; [email protected]$[4168] = "of Doom"; [email protected]$[4169] = "Spell Master's"; [email protected]$[4170] = "Solidifying"; [email protected]$[4171] = "Soul Draining"; [email protected]$[4172] = "Slicing"; [email protected]$[4173] = "Mesmerizing"; [email protected]$[4174] = "Deviant"; [email protected]$[4175] = "Shoving"; [email protected]$[4176] = "Fatal Serpentine"; [email protected]$[4177] = "Green Stone"; [email protected]$[4178] = "Bow-Master's"; [email protected]$[4179] = "of Highlight"; [email protected]$[4180] = "of Dragon Soul Eater"; [email protected]$[4181] = "Soundless"; [email protected]$[4182] = "of Demon Soul Eater"; [email protected]$[4183] = "Werewolf"; [email protected]$[4184] = "Crushing"; [email protected]$[4185] = "of Wisdom"; [email protected]$[4186] = "Strenuous"; [email protected]$[4187] = "of the Spooky Night"; [email protected]$[4188] = "Red Stone"; [email protected]$[4189] = "of Misfortune"; [email protected]$[4190] = "of Last Laugh"; [email protected]$[4191] = "of the Stix"; [email protected]$[4192] = "of Fatal Pisces"; [email protected]$[4193] = "of Patience"; [email protected]$[4194] = "Overpowering"; [email protected]$[4195] = "Blue Stone"; [email protected]$[4196] = "of Jellopy"; [email protected]$[4197] = "Lucky Streak"; [email protected]$[4198] = "of True Sight"; [email protected]$[4199] = "Dashing"; [email protected]$[4200] = "of Mystical Resistance"; [email protected]$[4201] = "Crippling"; [email protected]$[4202] = "of Exorcism"; [email protected]$[4203] = "Blazing"; [email protected]$[4204] = "Poacher's"; [email protected]$[4205] = "Blue Cubic"; [email protected]$[4206] = "Cubic"; [email protected]$[4207] = "Anti-Small"; [email protected]$[4208] = "Energetic"; [email protected]$[4209] = "Fiddler's"; [email protected]$[4210] = "Pressure"; [email protected]$[4211] = "Virtuoso's"; [email protected]$[4212] = "of Knock-Back"; [email protected]$[4213] = "of Reticence"; [email protected]$[4214] = "Man-Eater's"; [email protected]$[4215] = "Rationing"; [email protected]$[4216] = "Freezing"; [email protected]$[4217] = "Rejuvenating"; [email protected]$[4218] = "Nightmarish"; [email protected]$[4219] = "Magic Stone"; [email protected]$[4220] = "Faithful"; [email protected]$[4221] = "Insect Collector's"; [email protected]$[4222] = "of Sleep"; [email protected]$[4223] = "Stun-Proof"; [email protected]$[4224] = "Monsoon"; [email protected]$[4225] = "Slingshot"; [email protected]$[4226] = "Supreme"; [email protected]$[4227] = "Roast Scented"; [email protected]$[4228] = "of Siesta"; [email protected]$[4229] = "of Torment"; [email protected]$[4230] = "Coward's"; [email protected]$[4231] = "Charging"; [email protected]$[4232] = "Refreshing"; [email protected]$[4233] = "Lucky Fluke"; [email protected]$[4234] = "of Clarity"; [email protected]$[4235] = "Fallen Angel's"; [email protected]$[4236] = "Protective"; [email protected]$[4237] = "of Godly Wrath"; [email protected]$[4238] = "of Doubled Power"; [email protected]$[4239] = "Veteran Hunter's"; [email protected]$[4240] = "Magic-Proof"; [email protected]$[4241] = "Miraculous"; [email protected]$[4242] = "Prime"; [email protected]$[4243] = "of Escape"; [email protected]$[4244] = "Seeker's"; [email protected]$[4245] = "Assassinator's"; [email protected]$[4246] = "Killing"; [email protected]$[4247] = "Starfish's"; [email protected]$[4248] = "Shining Cross"; [email protected]$[4249] = "Witch Doctor's"; [email protected]$[4250] = "Anti-Large"; [email protected]$[4251] = "Invasion"; [email protected]$[4252] = "Four Leaf Clover"; [email protected]$[4253] = "of Royal Guard"; [email protected]$[4254] = "Anti-Medium"; [email protected]$[4255] = "Smashing"; [email protected]$[4256] = "Desirable"; [email protected]$[4257] = "Wing"; [email protected]$[4258] = "Prodigy"; [email protected]$[4259] = "of Nature"; [email protected]$[4260] = "Confusion Resistant"; [email protected]$[4261] = "Bleed Resistant"; [email protected]$[4262] = "Dark Sky"; [email protected]$[4263] = "Bloodlust"; [email protected]$[4264] = "Thunderbolt"; [email protected]$[4265] = "of Dawn"; [email protected]$[4266] = "Magic Resistant"; [email protected]$[4267] = "Dragon Slayer's"; [email protected]$[4268] = "Extending"; [email protected]$[4269] = "Fatasm"; [email protected]$[4270] = "of Venom"; [email protected]$[4271] = "Yellow Stone"; [email protected]$[4272] = "Swift"; [email protected]$[4273] = "Shell"; [email protected]$[4274] = "of Undead Soul Eater"; [email protected]$[4275] = "Undead Killer's"; [email protected]$[4276] = "Crucial"; [email protected]$[4277] = "Dominatrix"; [email protected]$[4278] = "of Magical Immunity"; [email protected]$[4279] = "Soul Collector's"; [email protected]$[4280] = "Blessed"; [email protected]$[4281] = "Diligent"; [email protected]$[4282] = "of Reservoir"; [email protected]$[4283] = "Mana Sphere"; [email protected]$[4284] = "of Caress"; [email protected]$[4285] = "Elven-Enchanted"; [email protected]$[4286] = "Terrorizing"; [email protected]$[4287] = "Magically Shielded"; [email protected]$[4288] = "Maestro"; [email protected]$[4289] = "of Plant Soul Eater"; [email protected]$[4290] = "Mirror"; [email protected]$[4291] = "Deadly Kobold's"; [email protected]$[4292] = "Deadly Plant's"; [email protected]$[4293] = "of Chance"; [email protected]$[4294] = "Sneaky"; [email protected]$[4295] = "of Blackout"; [email protected]$[4296] = "Greedy"; [email protected]$[4297] = "Poaching"; [email protected]$[4298] = "of Mayhem"; [email protected]$[4299] = "Guardian's"; [email protected]$[4300] = "Venomous Charge"; [email protected]$[4301] = "Traumatic"; [email protected]$[4302] = "High Risk"; [email protected]$[4303] = "Mystic"; [email protected]$[4304] = "Shield Master's"; [email protected]$[4305] = "Explosive"; [email protected]$[4306] = "King's"; [email protected]$[4307] = "of Marine Soul Eater"; [email protected]$[4308] = "Power Draining"; [email protected]$[4309] = "Reinforced"; [email protected]$[4310] = "Fatally Evil"; [email protected]$[4311] = "Anti-Evil"; [email protected]$[4312] = "of the Soul"; [email protected]$[4313] = "Bogie"; [email protected]$[4314] = "Fire-Proof"; [email protected]$[4315] = "of Stone Curse"; [email protected]$[4316] = "of Angel Soul Eater"; [email protected]$[4317] = "Aural"; [email protected]$[4318] = "Storm-Bringer's"; [email protected]$[4319] = "Sword-Master's"; [email protected]$[4320] = "Meteoric"; [email protected]$[4321] = "Polymorphic"; [email protected]$[4322] = "of Retaliation"; [email protected]$[4323] = "of Frost"; [email protected]$[4324] = "Arctic"; [email protected]$[4325] = "Vicious"; [email protected]$[4326] = "Ocean Scented"; [email protected]$[4327] = "Spell Flow"; [email protected]$[4328] = "Hyper"; [email protected]$[4329] = "Soul Gain"; [email protected]$[4330] = "Curse Lift"; [email protected]$[4331] = "Evasion"; [email protected]$[4332] = "of Talent"; [email protected]$[4333] = "of Chaotic Venom"; [email protected]$[4334] = "Anti-Sniping"; [email protected]$[4335] = "Gnome"; [email protected]$[4336] = "of Vitality"; [email protected]$[4337] = "of Wildcat"; [email protected]$[4338] = "of Vital Switching"; [email protected]$[4339] = "of Stone Wall"; [email protected]$[4340] = "of Requiem"; [email protected]$[4341] = "Disarm"; [email protected]$[4342] = "Mammoth"; [email protected]$[4343] = "of Creator"; [email protected]$[4344] = "of Value"; [email protected]$[4345] = "Sylph"; [email protected]$[4346] = "of Power Switching"; [email protected]$[4347] = "Stamina"; [email protected]$[4348] = "Gangster"; [email protected]$[4349] = "Anti-Arrow"; [email protected]$[4350] = "Undine"; [email protected]$[4351] = "Low Level"; [email protected]$[4352] = "of Regeneration"; [email protected]$[4353] = "of Rejuvenation"; [email protected]$[4354] = "of Stability"; [email protected]$[4355] = "Healthy"; [email protected]$[4356] = "Magic Cancel"; [email protected]$[4357] = "of Fury"; [email protected]$[4358] = "Lost-Power"; [email protected]$[4359] = "of Shadow"; [email protected]$[4360] = "Assassin"; [email protected]$[4361] = "of Hollgrehenn"; [email protected]$[4362] = "Heat"; [email protected]$[4363] = "Protection"; [email protected]$[4364] = "of Magic Sealing"; [email protected]$[4365] = "of Tempest"; [email protected]$[4366] = "of Caster"; [email protected]$[4367] = "of Squeezing"; [email protected]$[4368] = "Rapid"; [email protected]$[4369] = "of Luck Switching"; [email protected]$[4370] = "Weakening"; [email protected]$[4371] = "of Paladin"; [email protected]$[4372] = "Life Stream"; [email protected]$[4373] = "Cursed"; [email protected]$[4374] = "of Vision"; [email protected]$[4375] = "Extra High Level"; [email protected]$[4376] = "Manful"; [email protected]$[4377] = "Sweetie"; [email protected]$[4378] = "Low Level"; [email protected]$[4379] = "Low Level"; [email protected]$[4380] = "Salamander"; [email protected]$[4381] = "of Wanderer"; [email protected]$[4382] = "of Scholar"; [email protected]$[4383] = "Chaotic"; [email protected]$[4384] = "Magic Eater"; [email protected]$[4385] = "Drink"; [email protected]$[4386] = "of Magic Shelter"; [email protected]$[4387] = "of Agility Switching"; [email protected]$[4388] = "Soul"; [email protected]$[4389] = "Elemental"; [email protected]$[4390] = "Blooding"; [email protected]$[4391] = "Snack"; [email protected]$[4392] = "of Dexterity Switching"; [email protected]$[4393] = "of Intelligence Switching"; [email protected]$[4394] = "Divine Cross"; [email protected]$[4395] = "Slug"; [email protected]$[4396] = "Dull"; [email protected]$[4397] = "Stupidity"; [email protected]$[4398] = "Darkness"; [email protected]$[4399] = "Penetration"; [email protected]$[4400] = "of Temptation"; [email protected]$[4401] = "Swift"; [email protected]$[4402] = "Strange"; [email protected]$[4403] = "of Reload"; [email protected]$[4404] = "of Chaotic Bleeding"; [email protected]$[4405] = "of Magic Mirror"; [email protected]$[4406] = "Twinkle"; [email protected]$[4407] = "of Elimination"; [email protected]$[4408] = "Abyss"; [email protected]$[4409] = "Panic"; [email protected]$[4410] = "Madness"; [email protected]$[4411] = "Arta's"; [email protected]$[4412] = "Aria"; [email protected]$[4413] = "Resistance"; [email protected]$[4414] = "Gorgon's"; [email protected]$[4415] = "Sweet"; [email protected]$[4416] = "of Grain"; [email protected]$[4417] = "of Flow"; [email protected]$[4418] = "of Hail"; [email protected]$[4419] = "Jack Frost"; [email protected]$[4420] = "of Comfort"; [email protected]$[4421] = "of Chinook"; [email protected]$[4422] = "Breeze"; [email protected]$[4423] = "of Sharkia"; [email protected]$[4424] = "Stony"; [email protected]$[4425] = "Beast"; [email protected]$[4426] = "Exceeding"; [email protected]$[4427] = "of Force"; [email protected]$[4428] = "of Shaft"; [email protected]$[4429] = "Nessus's"; [email protected]$[4430] = "of Inferno"; [email protected]$[4431] = "Stygian"; [email protected]$[4432] = "Scorching"; [email protected]$[4433] = "of Ignis"; [email protected]$[4434] = "Miner's"; [email protected]$[4435] = "Outrageous"; [email protected]$[4436] = "Lunatic"; [email protected]$[4437] = "Rabid"; [email protected]$[4438] = "Mental"; [email protected]$[4439] = "of Anathema"; [email protected]$[4440] = "of Ignoring"; [email protected]$[4441] = "Arrogant"; [email protected]$[4442] = "of Basis"; [email protected]$[4443] = "of Underneath"; [email protected]$[4444] = "of Saharic"; [email protected]$[4445] = "of Windy"; [email protected]$[4447] = "of Envenom"; [email protected]$[4448] = "of Damned"; [email protected]$[4449] = "of Hallowed"; [email protected]$[4450] = "Surplus"; [email protected]$[4451] = "of Excess"; [email protected]$[4452] = "Magical"; [email protected]$[4453] = "Fierce"; [email protected]$[4454] = "Sorry"; [email protected]$[4455] = "Love"; [email protected]$[4457] = "Psychic"; [email protected]$[4458] = "of Illusion"; [email protected]$[4459] = "of Fast"; [email protected]$[4460] = "of Healing"; [email protected]$[4461] = "of Sharp"; [email protected]$[4462] = "Prime Defense"; [email protected]$[4463] = "Prime Attack"; [email protected]$[4464] = "Fatal"; [email protected]$[4465] = "Sweeping"; [email protected]$[4466] = "Straight Shooting"; [email protected]$[4467] = "Heavy"; [email protected]$[4468] = "Polution"; [email protected]$[4469] = "Marine"; [email protected]$[4470] = "Botany"; [email protected]$[4471] = "Draco"; [email protected]$[4472] = "Carnivore"; [email protected]$[4473] = "Undead"; [email protected]$[4474] = "Mortal"; [email protected]$[4475] = "Intangible"; [email protected]$[4476] = "Entomic"; [email protected]$[4477] = "Demonic"; [email protected]$[4480] = "Of Halfreload"; [email protected]$[4481] = "Half Jack Frost"; [email protected]$[4482] = "Of Half regeneration"; [email protected]$[4483] = "Half Spiritual"; [email protected]$[4484] = "Of Half Gemstone"; [email protected]$[4485] = "Half Abyss"; [email protected]$[4991] = "Carefree"; [email protected]$[4998] = "of Valor"; [email protected]$[4999] = "of Aegis"; [email protected]$[4505] = "of Mad Witch"; [email protected]$[4506] = "of Archer"; [email protected]$[4507] = "Scaraba"; [email protected]$[4508] = "of Mad Berserker"; [email protected]$[4509] = "Insectproof"; [email protected]$[4510] = "Black-out"; [email protected]$[4511] = "Silentium"; [email protected]$[4512] = "of Acolyte"; [email protected]$[4513] = "of Thief"; [email protected]$[4514] = "Exorcism"; [email protected]$[4515] = "Flora"; [email protected]$[4516] = "of Stone wall"; [email protected]$[4517] = "of Magician"; [email protected]$[4518] = "Burning"; [email protected]$[4519] = "Seraphim"; [email protected]$[4520] = "Screaming"; [email protected]$[4521] = "Mortal Blow"; [email protected]$[4522] = "Cold"; [email protected]$[4523] = "Aquarius"; [email protected]$[4524] = "of Swordman"; [email protected]$[4525] = "Sweeping"; [email protected]$[4526] = "of Magic Defense"; [email protected]$[4527] = "of Defense"; [email protected]$[4528] = "Spirit"; [email protected]$[4529] = "Physical"; [email protected]$[4530] = "of Merchant"; [email protected]$[4531] = "Under Curse"; [email protected]$[4532] = "Sprinting"; [email protected]$[4533] = "Blinding"; [email protected]$[4534] = "Water Bomb"; [email protected]$[4493] = "Half High Risk"; [email protected]$[4582] = "Endurance"; [email protected]$[4583] = "Of poisonous weeds"; [email protected]$[4584] = "Vampire"; [email protected]$[4585] = "Of Curse"; [email protected]$[4586] = "Wind"; [email protected]$[4587] = "Slasher"; [email protected]$[4588] = "Of Powerful"; [email protected]$[4589] = "Of Reach"; [email protected]$[4590] = "Of Lethargy"; [email protected]$[4591] = "Of Blood"; [email protected]$[4592] = "Of Chemical"; end; } //===== EinherjarRO Scripts ================================== //= F_RandOptDisp //===== By: ================================================== //= Stolao //===== Current Version: ===================================== //= 1.01 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Converts random option int values into human readable //===== Comments: ============================================ //= Optmize more? //===== Additional Comments: ================================= //= 1.00 Original Make //= 1.01 Added 'Blank' for 'missing' rndoptions client side //===== Contact Ifo: ========================================= //= [Stolao] //= Email: [email protected] //============================================================ function script F_RandOptDisp { // callfunc("F_RandOptDisp",id,value,paramater); setarray [email protected]$[1],"Max Hp +"+getarg(1,0)+"","Max Sp +"+getarg(1,0)+"","Str +"+getarg(1,0)+"","Agi +"+getarg(1,0)+"","Vit +"+getarg(1,0)+"", "Int +"+getarg(1,0)+"","Dex +"+getarg(1,0)+"","Luk +"+getarg(1,0)+"","Max Hp +"+getarg(1,0)+"%","Max Sp +"+getarg(1,0)+"%", "Increases natural HP regeneration by "+getarg(1,0)+"%","Increases natural SP regeneration by "+getarg(1,0)+"%","ATK +"+getarg(1,0)+"%","MATK +"+getarg(1,0)+"%","ASPD +"+getarg(1,0)+"", "Increases attack speed (reduce delay after attack by "+getarg(1,0)+"%)","ATK +"+getarg(1,0)+"","HIT +"+getarg(1,0)+"","MATK +"+getarg(1,0)+"","DEF +"+getarg(1,0)+"", "MDEF +"+getarg(1,0)+"","FLEE +"+getarg(1,0)+"","Perfect dodge +"+getarg(1,0)+"","CRIT +"+getarg(1,0)+"","Resistance to Neutral "+getarg(1,0)+"%", "Resistance to Water "+getarg(1,0)+"%","Resistance to Earth "+getarg(1,0)+"%","Resistance to Fire "+getarg(1,0)+"%","Resistance to Wind "+getarg(1,0)+"%","Resistance to Poison "+getarg(1,0)+"%", "Resistance to Holy "+getarg(1,0)+"%","Resistance to Shadow "+getarg(1,0)+"%","Resistance to Ghost "+getarg(1,0)+"%","Resistance to Undead "+getarg(1,0)+"%","Resistance to all elements "+getarg(1,0)+"%", "Resistance to Neutral monster "+getarg(1,0)+"%","Physical damage to Neutral monsters "+getarg(1,0)+"%","Resistance to Water monsters "+getarg(1,0)+"%","Physical damage to Water monsters "+getarg(1,0)+"%","Resistance to Earth monsters "+getarg(1,0)+"%", "Physical damage to Earth monsters "+getarg(1,0)+"%","Resistance to Fire monsters "+getarg(1,0)+"%","Physical damage to Fire monsters "+getarg(1,0)+"%","Resistance to Wind monsters "+getarg(1,0)+"%","Physical damage to Wind monsters "+getarg(1,0)+"%", "Resistance to Poison monsters "+getarg(1,0)+"%","Physical damage to Poison monsters "+getarg(1,0)+"%","Resistance to Holy monsters "+getarg(1,0)+"%","Physical damage to Holy monsters "+getarg(1,0)+"%","Resistance to Shadow monsters "+getarg(1,0)+"%", "Physical damage to Shadow monsters "+getarg(1,0)+"%","Resistance to Ghost monsters "+getarg(1,0)+"%","Physical damage to Ghost monsters "+getarg(1,0)+"%","Resistance to Undead monsters "+getarg(1,0)+"%","Physical damage to Undead monsters "+getarg(1,0)+"%", "Magical recistance to Neutral monsters "+getarg(1,0)+"%","Magical damage to Neutral monsters "+getarg(1,0)+"%","Magical recistance to Water monsters "+getarg(1,0)+"%","Magical damage to Water monsters "+getarg(1,0)+"%","Magical recistance to Earth monsters "+getarg(1,0)+"%", "Magical damage to Earth monsters "+getarg(1,0)+"%","Magical recistance to Fire monsters "+getarg(1,0)+"%","Magical damage to Fire monsters "+getarg(1,0)+"%","Magical recistance to Wind monsters "+getarg(1,0)+"%","Magical damage to Wind monsters "+getarg(1,0)+"%", "Magical recistance to Poison monsters "+getarg(1,0)+"%","Magical damage to Poison monsters "+getarg(1,0)+"%","Magical recistance to Holy monsters "+getarg(1,0)+"%","Magical damage to Holy monsters "+getarg(1,0)+"%","Magical recistance to Shadow monsters "+getarg(1,0)+"%", "Magical damage to Shadow monsters "+getarg(1,0)+"%","Magical recistance to Ghost monsters "+getarg(1,0)+"%","Magical damage to Ghost monsters "+getarg(1,0)+"%","Magical recistance to Undead monsters "+getarg(1,0)+"%","Magical damage to Undead monsters "+getarg(1,0)+"%", "Enchants armor with Neutral property","Enchants armor with Water property","Enchants armor with Earth property","Enchants armor with Fire property","Enchants armor with Wind property", "Enchants armor with Poison property","Enchants armor with Holy property","Enchants armor with Shadow property","Enchants armor with Ghost property","Enchants armor with Undead property", "Blank", "Resistance to Formless monsters "+getarg(1,0)+"%","Resistance to Undead monsters "+getarg(1,0)+"%","Resistance to Brute monsters "+getarg(1,0)+"%","Resistance to Plant monsters "+getarg(1,0)+"%","Resistance to Insect monsters "+getarg(1,0)+"%", "Resistance to Fish monsters "+getarg(1,0)+"%","Resistance to Demon monsters "+getarg(1,0)+"%","Resistance to Demihuman monsters "+getarg(1,0)+"%","Resistance to Angel monsters "+getarg(1,0)+"%","Resistance to Dragon monsters "+getarg(1,0)+"%", "Physical damage to Formless monsters "+getarg(1,0)+"%","Physical damage to Undead monsters "+getarg(1,0)+"%","Physical damage to Brute monsters "+getarg(1,0)+"%","Physical damage to Plant monsters "+getarg(1,0)+"%","Physical damage to Insect monsters "+getarg(1,0)+"%", "Physical damage to Fish monsters "+getarg(1,0)+"%","Physical damage to Demon monsters "+getarg(1,0)+"%","Physical damage to Demihuman monsters "+getarg(1,0)+"%","Physical damage to Angel monsters "+getarg(1,0)+"%","Physical damage to Dragon monsters "+getarg(1,0)+"%", "Magical damage to Formless monsters "+getarg(1,0)+"%","Magical damage to Undead monsters "+getarg(1,0)+"%","Magical damage to Brute monsters "+getarg(1,0)+"%","Magical damage to Plant monsters "+getarg(1,0)+"%","Magical damage to Insect monsters "+getarg(1,0)+"%", "Magical damage to Fish monsters "+getarg(1,0)+"%","Magical damage to Devil monsters "+getarg(1,0)+"%","Magical damage to Demihuman monsters "+getarg(1,0)+"%","Magical damage to Angel monsters "+getarg(1,0)+"%","Magical damage to Dragon monsters "+getarg(1,0)+"%", "CRIT +"+getarg(1,0)+"/10 to Formless monsters","CRIT +"+getarg(1,0)+"/10 to Undead monsters","CRIT +"+getarg(1,0)+"/10 to Brute monsters","CRIT +"+getarg(1,0)+"/10 to Plant monsters","CRIT +"+getarg(1,0)+"/10 to Insect monsters", "CRIT +"+getarg(1,0)+"/10 to Fish monsters","CRIT +"+getarg(1,0)+"/10 to Demon monsters","CRIT +"+getarg(1,0)+"/10 to Demihuman monsters","CRIT +"+getarg(1,0)+"/10 to Angel monsters","CRIT +"+getarg(1,0)+"/10 to Dragon monsters", "Ignores "+getarg(1,0)+"% Def of Formless monster","Ignores "+getarg(1,0)+"% Def of Undead monster","Ignores "+getarg(1,0)+"% Def of Brute monster","Ignores "+getarg(1,0)+"% Def of Plant monster","Ignores "+getarg(1,0)+"% Def of Insect monster", "Ignores "+getarg(1,0)+"% Def of Fish monster","Ignores "+getarg(1,0)+"% Def of Demon monster","Ignores "+getarg(1,0)+"% Def of Demihuman monster","Ignores "+getarg(1,0)+"% Def of Angel monster","Ignores "+getarg(1,0)+"% Def of Dragon monster", "Ignores "+getarg(1,0)+"% Mdef of Formless monster","Ignores "+getarg(1,0)+"% Mdef of Undead monster","Ignores "+getarg(1,0)+"% Mdef of Brute monster","Ignores "+getarg(1,0)+"% Mdef of Plant monster","Ignores "+getarg(1,0)+"% Mdef of Insect monster", "Ignores "+getarg(1,0)+"% Mdef of Fish monster","Ignores "+getarg(1,0)+"% Mdef of Demon monster","Ignores "+getarg(1,0)+"% Mdef of Demihuman monster","Ignores "+getarg(1,0)+"% Mdef of Angel monster","Ignores "+getarg(1,0)+"% Mdef of Dragon monster", "Physical damage to Normal monsters "+getarg(1,0)+"%","Physical damage to Boss monsters "+getarg(1,0)+"%","Resistance to Normal monsters "+getarg(1,0)+"%","Resistance to Boss monsters "+getarg(1,0)+"%","Magical damage to Normal monsters "+getarg(1,0)+"%", "Magical damage to Boss monsters "+getarg(1,0)+"%","Ignores "+getarg(1,0)+"% Def of Normal monster","Ignores "+getarg(1,0)+"% Def of Boss monster","Ignores "+getarg(1,0)+"% Mdef of Normal monster","Ignores "+getarg(1,0)+"% Mdef of Boss monster", "Damage to Small size monsters "+getarg(1,0)+"%","Damage to Medium size monsters "+getarg(1,0)+"%","Damage to Large size monsters "+getarg(1,0)+"%","Resistance to Small size monsters "+getarg(1,0)+"%","Resistance to Medium size monsters "+getarg(1,0)+"%", "Resistance to Large size monsters "+getarg(1,0)+"%","Nullify weapon's damage size penalty","Increases critical damage by "+getarg(1,0)+"%","Decreases critical damage by "+getarg(1,0)+"%","Increases ranged physical damage "+getarg(1,0)+"%", "Decreases ranged physical damage "+getarg(1,0)+"%","Increases Healing skills by "+getarg(1,0)+"%","Increases Healing skills by "+getarg(1,0)+"%","Reduces cast time by "+getarg(1,0)+"%","Reduces cast delay by "+getarg(1,0)+"%", "Decreases SP consumption by "+getarg(1,0)+"%", "Blank","Blank", "Enchants weapon with Neutral property","Enchants weapon with Water property","Enchants weapon with Earth property","Enchants weapon with Fire property", "Enchants weapon with Wind property","Enchants weapon with Poison property","Enchants weapon with Holy property","Enchants weapon with Shadow property","Enchants weapon with Ghost property", "Enchants weapon with Undead property","Indestructible","Indestructible"; return [email protected]$[getarg(0,0)]; } prontera,150,150,4 script Rolling in the Deep 100,{ if(!.status && getgmlevel() >= .gm_lvl) { mes "Do you want to start the raffle?"; if(select("No","Yes") == 2) { clear; mes "Sell me the items you want to give."; mes "Please don't put unidentified items."; close2; callshop "rolling_shop",2; end; } } else if(.status == 1) { if(.player_n < .players) { if(countitem(.coin_id) >= .fee) { [email protected] = inarray(.player_aid,getcharid(3)); if([email protected] == -1) { mes "Do you want to join this game? Fee: "+.fee+" coins."; mes "Prize:"; [email protected] = getarraysize(.item_id); for([email protected] = 0;[email protected] < [email protected];[email protected]++) { [email protected]_option = false; mes @itemname2_info$ + getitemname2(.item_id[[email protected]],1,.item_ref[[email protected]],0,.item_card1[[email protected]],.item_card2[[email protected]],.item_card3[[email protected]],.item_card4[[email protected]]); for([email protected] = 1;[email protected] <= 5;[email protected]++) { [email protected]$ = F_RandOptDisp(getd(".item_opt"[email protected]+"["[email protected]+"]"),getd(".item_val"[email protected]+"["[email protected]+"]"),getd(".item_param"[email protected]+"["[email protected]+"]")); if([email protected]$ != "") { if([email protected]_option) { [email protected]_option = true; mes "^ff0000Item Options:^000000"; } mes [email protected]$; } } } if(select("No","Yes") == 2) { if(countitem(.coin_id) >= .fee) { delitem .coin_id,.fee; .player_aid[++.player_n] = getcharid(3); .player_cid[.player_n - 1] = getcharid(0); .player_name$[.player_n - 1] = strcharinfo(0); if(.player_n >= .players) donpcevent strnpcinfo(0)+"::OnSpin"; } } } else { mes "You're already participating. Wait for the event to start."; } } else { mes "You need "+.fee+" coins to join this game."; } } else { mes "Everyone is registered."; } } else if(.status == 2) { mes "The game is spinning right now. Pay attention."; } else { mes "I'm sorry but this game isn't active right now."; } close; OnSellItem: disable_items; [email protected] = getarraysize(@sold_nameid); for([email protected] = 0;[email protected] < [email protected];[email protected]++) { if([email protected]_identify[[email protected]]) { deletearray @sold_nameid[[email protected]],1; deletearray @sold_quantity[[email protected]],1; deletearray @sold_refine[[email protected]],1; deletearray @sold_identify[[email protected]],1; for([email protected] = 1;[email protected] <= 5;[email protected]++) { if([email protected] < 5) deletearray getd("@sold_card"[email protected]+"["[email protected]+"]"),1; deletearray getd("@sold_opt"[email protected]+"["[email protected]+"]"),1; deletearray getd("@sold_val"[email protected]+"["[email protected]+"]"),1; deletearray getd("@sold_param"[email protected]+"["[email protected]+"]"),1; } [email protected]; [email protected]; } } if([email protected]) { while(true) { clear; mes "What do you want to do?"; [email protected] = select("Set fee ("+max(1,[email protected][0])+"z)","Set amount of players ("+max(5,[email protected][1])+")","Ready") - 1; if([email protected] < 2) { input [email protected][[email protected]]; } else { mes "Do you want to continue or check if everything is correct?"; if(select("Check if everything is correct","Continue") == 2 && !.status) { .fee = max(1,[email protected][0]); // default 1 fee. .players = max(5,[email protected][1]); // default 5 players. .status = true; .player_aid[0] = getcharid(3); .o_player = getcharid(0); for([email protected] = 0;[email protected] < [email protected];[email protected]++) delitem @sold_nameid[[email protected]],@sold_quantity[[email protected]]; copyarray .item_id[0],@sold_nameid[0],[email protected]; copyarray .item_amt[0],@sold_quantity[0],[email protected]; copyarray .item_ref[0],@sold_refine[0],[email protected]; for([email protected] = 1;[email protected] <= 5;[email protected]++) { if([email protected] < 5) copyarray getd(".item_card"[email protected]+"[0]"),getd("@sold_card"[email protected]+"[0]"),[email protected]; copyarray getd(".item_opt"[email protected]+"[0]"),getd("@sold_option_id"[email protected]+"[0]"),[email protected]; copyarray getd(".item_val"[email protected]+"[0]"),getd("@sold_option_id"[email protected]+"[0]"),[email protected]; copyarray getd(".item_param"[email protected]+"[0]"),getd("@sold_option_id"[email protected]+"[0]"),[email protected]; } announce strcharinfo(0)+" is having a raffle for "+.fee+" coin per entry only "+.players+" people can join.",bc_all; if([email protected] == 1) announce "The prize is "[email protected]_quantity[0]+" "+getitemname2(@sold_nameid[0], @sold_identify[0], @sold_refine[0], @sold_attribute[0], @sold_card1[0], @sold_card2[0], @sold_card3[0], @sold_card4[0], @sold_bound[0])+".",bc_all; else announce "There're multiple prizes. Check them in the NPC!",bc_all; stopnpctimer; initnpctimer; break; } else if(.status) { mes "Sorry but someone started before you."; break; } } } } else { mes "You put no valid item."; } close; OnSpin: stopnpctimer; .status = 2; // We delete the player who started the event (we had him in the array to avoid joining him). deletearray .player_aid[0],1; .player_n--; while([email protected] < 3) { mapannounce "prontera","Roll n°"+([email protected] + 1)+".",bc_map; sleep 2000; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep 2000; [email protected] = rand(.player_n--); if([email protected] == 2) { mapannounce "prontera","And the winner is...",bc_map; sleep 2500; } mapannounce "prontera",.player_name$[[email protected]]+"...",bc_map; deletearray .player_aid[[email protected]],1; deletearray .player_cid[[email protected]],1; deletearray .player_name$[[email protected]],1; if([email protected] < 2) sleep 5000; [email protected]++; } mail .player_cid[[email protected]],"Rolling in the Deep","Prize","Here's your prize from the game",0,.item_id,.item_amt,.item_card1,.item_card2,.item_card3,.item_card4,.item_opt1,.item_val1,.item_param1,.item_opt2,.item_val2,.item_param2,.item_opt3,.item_val3,.item_param3,.item_opt4,.item_val4,.item_param4,.item_opt5,.item_val5,.item_param5; setarray [email protected]_id[0],.coin_id; setarray [email protected]_amt[0],.players * .fee; mail .o_player,"Rolling in the Deep","Coins","Here's the coins",0,[email protected]_id,[email protected]_amt; // if 10 mins and nobody started the event. OnTimer600000: stopnpctimer; // we try to give the items back in this situation. if([email protected]) { if(isloggedin(.player_aid[0],.o_player)) mail .o_player,"Rolling in the Deep","Items back","No game was started and your items were given back",0,.item_id,.item_amt,.item_card1,.item_card2,.item_card3,.item_card4,.item_opt1,.item_val1,.item_param1,.item_opt2,.item_val2,.item_param2,.item_opt3,.item_val3,.item_param3,.item_opt4,.item_val4,.item_param4,.item_opt5,.item_val5,.item_param5; } .players_n = 0; .o_player = 0; deletearray .player_aid; deletearray .player_cid; deletearray .player_name$; deletearray .item_id; deletearray .item_amt; deletearray .item_ref; for([email protected] = 1;[email protected] <= 5;[email protected]++) { if([email protected] < 5) deletearray getd(".item_card"[email protected]); deletearray getd(".item_opt"[email protected]); deletearray getd(".item_val"[email protected]); deletearray getd(".item_param"[email protected]); } .fee = 0; .players = 0; .status = false; end; OnInit: .coin_id = 7539; // coin id. .gm_lvl = 0; npcshopattach "rolling_shop"; end; } - shop rolling_shop -1,512:-1 Edit: forgot to say you can add some checks if([email protected]_identify[[email protected]]) { to avoid "crap" items, like only an item with at least a card, or >= x refine, etc.
  5. I thought that wouldn't be a problem except when you're testing (most of the times the testings are with values as 1 or 2, so it's obviously the script will be triggering while evolving and such). Could it happen if you set it to something more realistic, like 50 or 100? I don't know. You can duplicate it, but I don't recommend it. You'll probably need to edit MAX_EVENT_QUEUE and I don't know if the labels are executed at the same time (pretty sure they don't?) so there'd be a queue anyways. You could test this though.
  6. n0tttt

    Rolling in the deep

    I don't know if I undertstood well and I don't know if this will work (can't test) prontera,150,150,4 script Rolling in the Deep 100,{ if(!.status) { if(countitem(.item_id)) { disable_items; while(true) { clear; mes "What do you want to do?"; [email protected] = select("Set fee "+max(1,[email protected][0])+"z","Set amount of players "+max(5,[email protected][1]),"Ready") - 1; if([email protected] < 2) { input [email protected][[email protected]]; } else { mes "Do you want to continue or check if everything is correct?"; if(select("Check if everything is correct","Continue") == 2) { .fee = max(1,[email protected][0]); // default 1 fee. .players = max(5,[email protected][1]); // default 5 players. .status = true; .player_aid[0] = getcharid(3); .o_player = getcharid(0); delitem .item_id,1; break; } } } announce strcharinfo(0)+" is having a raffle for "+.fee+" coin per entry only "+.players+" people can join.",bc_all; stopnpctimer; initnpctimer; close; } else { mes "You need "+getitemname(.item_id)+" to talk to me."; } } else if(!.rolling) { if(.player_n < .players) { if(countitem(.coin_id) >= .fee) { [email protected] = inarray(.player_aid,getcharid(3)); if([email protected] == -1) { mes "Do you want to join this game? Fee: "+.fee+" coins."; if(select("No","Yes") == 2) { if(countitem(.coin_id) >= .fee) { delitem .coin_id,.fee; .player_aid[++.player_n] = getcharid(3); .player_cid[.player_n - 1] = getcharid(0); if(.player_n >= .players) donpcevent strnpcinfo(0)+"::OnSpin"; } } } else { mes "You're already participating. Wait for the event to start."; } } else { mes "You need "+.fee+" coins to join this game."; } } else { mes "Everyone is registered."; } } else if(.rolling) { mes "The game is spinning right now. Pay attention."; } close; OnSpin: stopnpctimer; // We delete the player who started the event (we had him in the array to avoid joining him). deletearray .player_aid[0],1; .player_n--; while([email protected] < 3) { mapannounce "prontera","Roll n°"+([email protected] + 1)+".",bc_map; sleep 2000; specialeffect2 F_Rand(EF_SPINMOVE,EF_CASTSPIN2); sleep 2000; [email protected] = rand(.player_n--); if([email protected] == 2) { mapannounce "prontera","And the winner is...",bc_map; sleep 2500; } mapannounce "prontera",rid2name(.player_aid[[email protected]])+"...",bc_map; deletearray .player_aid[[email protected]],1; if([email protected] < 2) sleep 5000; [email protected]++; } mail .player_cid[[email protected]],"Rolling in the Deep","Prize","Here's your prize from the game",0,.prize_id,.prize_amt; setarray [email protected]_id[0],.coin_id; setarray [email protected]_amt[0],.players * .fee; mail .o_player,"Rolling in the Deep","Coins","Here's the coins",0,[email protected]_id,[email protected]_amt; // if 10 mins and nobody started the event. OnTimer600000: stopnpctimer; // we try to give the items back in this situation. if([email protected]) { if(isloggedin(.player_aid[0],.o_player)) getitem .item_id,1,.o_player; } .players_n = 0; .o_player = 0; deletearray .player_aid; deletearray .player_cid; .status = false; .rolling = false; end; OnInit: .item_id = 512; // item required to start. .coin_id = 7539; // coin id. // Prizes for the winner setarray .prize_id[0],513; setarray .prize_amt[0],5; end; }
  7. n0tttt

    Points SHOP

    Shop (Euphy's one which comes with rAthena) //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6c //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.2 Added category support. //= 1.3 More options and fixes. //= 1.4 Added debug settings. //= 1.5 Replaced categories with shop IDs. //= 1.6 Added support for purchasing stackables. //= 1.6a Added support for previewing costumes and robes. //= 1.6b Added 'disable_items' command. //= 1.6c Replaced function 'A_An' with "F_InsertArticle". //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; // ADD YOUR NPC HERE //============================================================ prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop"; } // prontera,165,203,6 script Quest Shop#2 998,{ callfunc "qshop",1,2; } // call the shop 1 and 2 defined below // etc.. Add your Shop NPCs 'Quest Shop#XXX' here //============================================================ // Script Core - DO NOT DUPLICATE THIS NPC !!!!!!!!!!!!! //============================================================ - script quest_shop -1,{ function Add; function Chk; function Slot; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0], "#pvp_points", "PvP Points"; //===================================================================================== // ------------------- ADD YOUR SHOPS NAME AND ITEMS SHOPS STARTING HERE -------------- //===================================================================================== // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1], "Headgears", // Shop Named 1 "Weapons", // Shop Named 2 "Other"; // Shop Named 3 // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- // Shop 1 Add(1,5022,1,0,10,7086,1,969,10,999,40,1003,50,984,2); Add(1,5032,1,0,20,1059,250,2221,1,2227,1,7063,600); Add(1,5027,1,0,30,2252,1,1036,400,7001,50,4052,1); Add(1,5045,1,0,40,2252,1,1054,450,943,1200); // Shop 2 Add(2,1224,1,0,50,7297,30,969,10,999,50,714,10); Add(2,1225,1,0,60,7292,30,969,10,999,50,714,10); // Shop 3 Add(3,531,1,3,70,512,1,713,1); Add(3,532,1,3,80,513,1,713,1); Add(3,533,1,3,90,514,1,713,1); Add(3,534,1,3,100,515,1,713,1); // ----------------------------------------------------------- //===================================================================================== // ------------------- YOUR SHOPS AND ITEMS SHOPS HAVE BEEN ADDED --------------------- //===================================================================================== freeloop(0); set .menu$,""; for(set [email protected],1; [email protected]<=getarraysize(.Shops$); set [email protected],[email protected]+1) { set .menu$, .menu$+.Shops$[[email protected]]+":"; npcshopdelitem "qshop"[email protected],909; } end; OnMenu: set [email protected], getarraysize(@i); if ([email protected]) set @shop_index, select(.menu$); else if ([email protected] == 1) set @shop_index, @i[0]; else { for(set [email protected],0; [email protected]<[email protected]; set [email protected],[email protected]+1) set [email protected]$, [email protected]$+.Shops$[@i[[email protected]]]+":"; set @shop_index, @i[select([email protected]$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[@shop_index] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop"[email protected]_index,1; npcshopattach "qshop"[email protected]_index; end; OnBuyItem: // [email protected][] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray [email protected][0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray [email protected][3],getd(".q_"[email protected]_index+"_"[email protected][0]+"[0]"),getarraysize(getd(".q_"[email protected]_index+"_"[email protected][0])); set [email protected][2],[email protected][1]*[email protected][3]; if ([email protected][2] || [email protected][2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname([email protected][0])+"."; end; } mes "[Quest Shop]"; mes "Reward: ^0055FF"+(([email protected][2] > 1)[email protected][2]+"x ":"")+Slot([email protected][0])+"^000000"; mes "Requirements:"; disable_items; if ([email protected][4]) mes " > "+Chk(Zeny,[email protected][4]*[email protected][1])+([email protected][4]*[email protected][1])+" Zeny^000000"; if ([email protected][5]) mes " > "+Chk(getd(.Points$[0]),[email protected][5]*[email protected][1])+([email protected][5]*[email protected][1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+([email protected][5]*[email protected][1])+")^000000"; if ([email protected][6]) for(set [email protected],6; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+2) mes " > "+Chk(countitem([email protected][[email protected]]),[email protected][[email protected]+1]*[email protected][1])+((.ShowID)?"{"[email protected][[email protected]]+"} ":"")+Slot([email protected][[email protected]])+" ("+countitem([email protected][[email protected]])+"/"+([email protected][[email protected]+1]*[email protected][1])+")^000000"; next; setarray @qe[1], getiteminfo([email protected][0],5), getiteminfo([email protected][0],11); if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT))) set [email protected],1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname([email protected][0])+"^000000:"+(([email protected] && [email protected][7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight([email protected][0],[email protected][2])) { mes "[Quest Shop]"; mes "^FF0000You need "+((([email protected][2]*getiteminfo([email protected][0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if ([email protected][4]) set Zeny, Zeny-([email protected][4]*[email protected][1]); if ([email protected][5]) setd .Points$[0], getd(.Points$[0])-([email protected][5]*[email protected][1]); if ([email protected][6]) for(set [email protected],6; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+2) delitem [email protected][[email protected]],[email protected][[email protected]+1]*[email protected][1]; getitem [email protected][0],[email protected][2]; if (.Announce) announce strcharinfo(0)+" has created "+(([email protected][2] > 1)[email protected][2]+"x "+getitemname([email protected][0]):callfunc("F_InsertArticle",getitemname([email protected][0])))+"!",0; specialeffect2 EF_FLOWERLEAF; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; changelook LOOK_ROBE, @qe[6]; } deletearray @qe[0],8; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray [email protected][0],getarg(2),getarg(3),getarg(4); for(set [email protected],5; [email protected]<getargcount(); set [email protected],[email protected]+2) { if (getitemname(getarg([email protected])) == "null") { debugmes "Quest requirement #"+getarg([email protected])+" invalid (skipped)."; return; } else setarray [email protected][[email protected]],getarg([email protected]),getarg([email protected]+1); } copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),[email protected][0],getarraysize([email protected]); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set [email protected]$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return [email protected]$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return [email protected]$+" ["+getitemslots(getarg(0))+"]"; default: return [email protected]$; } } } function script qshop { deletearray @i[0],getarraysize(@i); for(set [email protected],0; [email protected]<getargcount(); set [email protected],[email protected]+1) set @i[[email protected]],getarg([email protected]); doevent "quest_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 - shop qshop5 -1,909:-1 PvP Script: - script PvP_Points -1,{ OnPCKillEvent: [email protected]$ = strcharinfo(3); if(getmapflag([email protected]$,mf_pvp) && killedrid != getcharid(3)) { if(++#pvp_points % 5 == 0) dispbottom "Current amount of PvP Points: "+#pvp_points; } end; }
  8. n0tttt

    Custom Enchanter

    You can try this script by Sehrentos, it's one of the most configurable enchanters I've seen: //===== rAthena Script ======================================= //= Enchant NPC //===== By: ================================================== //= Sehrentos //===== Current Version: ===================================== //= 1.2 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Enchant player's equipment. Support multiple enchants. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Remove enchant option. //= 1.2 Added .max_enchant option. //============================================================ // shop/cashshop/itemshop/pointshop - shop enc_atk -1,501:300; - shop enc_def -1,501:300; - shop enc_stats -1,501:300; prt_in,65,68,4 script Enchant#prt1 4_M_MERCAT1,{ disable_items; switch(select("Attack:Defence:Stats:Remove")) { case 1: @shop_name$ = "enc_atk"; break; case 2: @shop_name$ = "enc_def"; break; case 3: @shop_name$ = "enc_stats"; break; case 4: callsub S_Remove; break; default: end; } callshop @shop_name$, 1; npcshopattach @shop_name$; end; OnInit: // Settings: shop names, currencies, items, prices .max_enchant = 2; // Max amount of enchants 0-4 setarray .shop_name$[0], "enc_atk", "enc_def", "enc_stats"; setarray .shop_currency$[0],"Zeny", "Zeny", "Zeny"; setarray .enc_atk_id[0], 4760, 4761, 4806, 4815, 4814, 4813, 4812, 4826, 4827, 4828, 4829, 4830, 4831, 4819, 4766, 4767,4764,4765, 4807, 4842, 4818, 4817, 4816, 4843, 4844, 4811, 4810, 4809, 4808, 4820, 4821, 4822, 4823, 4824, 4825, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841; setarray .enc_atk_price[0],10000,20000,30000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,10000,20000,30000,5000,7000,10000,20000,10000,20000,30000,40000,50000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000; setarray .enc_def_id[0], 4805, 4850, 4851, 4852,4762, 4763,4786,4787,4788,4789, 4790,4791,4792,4793, 4794,4795,4796,4797,4798,4799,4800,4801, 4802; setarray .enc_def_price[0],10000,20000,40000,60000,5000,12000,2000,4000,6000,8000,10000,3000,5000,9000,12000,1000,2000,3000,4000,5000,2500,5000,10000; setarray .enc_stats_id[0], 4700,4710,4720,4730,4740,4750, 4701,4711,4721,4731,4741,4751, 4702,4712,4722,4732,4742,4752, 4703,4713,4723,4733,4743,4753, 4704,4714,4724,4734,4744,4754, 4705,4715,4725,4735,4745,4755, 4706,4716,4726,4736,4746,4756, 4707,4717,4727,4737,4747,4757, 4708,4718,4728,4738,4748,4758, 4709, 4719, 4729, 4739, 4749, 4759; setarray .enc_stats_price[0],1500,1500,1500,1500,1500,1500, 2500,2500,2500,2500,2500,2500, 3500,3500,3500,3500,3500,3500, 4500,4500,4500,4500,4500,4500, 5500,5500,5500,5500,5500,5500, 6500,6500,6500,6500,6500,6500, 7500,7500,7500,7500,7500,7500, 8500,8500,8500,8500,8500,8500, 9500,9500,9500,9500,9500,9500, 10500,10500,10500,10500,10500,10500; // Load shop items for([email protected] = 0; [email protected] < getarraysize(.shop_name$); [email protected]++) { [email protected]$ = .shop_name$[[email protected]]; deletearray [email protected][0],getarraysize([email protected]); deletearray [email protected][0],getarraysize([email protected]); copyarray [email protected][0], getd("."[email protected]$+"_id[0]"), getarraysize(getd("."[email protected]$+"_id")); copyarray [email protected][0], getd("."[email protected]$+"_price[0]"), getarraysize(getd("."[email protected]$+"_price")); npcshopdelitem [email protected]$,501;// Remove apple for([email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++) { npcshopadditem [email protected]$, [email protected][[email protected]], [email protected][[email protected]]; } } end; OnSellItem: end; OnBuyItem: [email protected]_count = getarraysize(@bought_nameid); if([email protected]_count < 1) end; // Get shop data by @shop_name$ [email protected]_index = inarray(.shop_name$[0], @shop_name$); if([email protected]_index == -1 || getarraysize(.shop_name$) < 1) { message strcharinfo(0), "Shop was not found!"; debugmes "Incorrect shop array detected in '"[email protected]_name$+"'! FIXME!"; end; } copyarray [email protected]_id[0], getd("."[email protected]_name$+"_id"), getarraysize(getd("."[email protected]_name$+"_id")); copyarray [email protected]_price[0], getd("."[email protected]_name$+"_price"), getarraysize(getd("."[email protected]_name$+"_price")); for([email protected] = 0; [email protected] < [email protected]_count; [email protected]++) { [email protected] = inarray([email protected]_id[0], @bought_nameid[[email protected]]); if([email protected] == -1) { message strcharinfo(0), "Price was not found!"; debugmes "Incorrect price array detected in '"[email protected]_name$+"'! FIXME!"; end; } setarray [email protected]_cost[getarraysize([email protected]_cost)],[email protected]_price[[email protected]]*@bought_quantity[[email protected]]; for ([email protected] = 0; [email protected] < @bought_quantity[[email protected]]; [email protected]++) { setarray [email protected][getarraysize([email protected])],@bought_nameid[[email protected]]; } } // Count total cost for([email protected] = 0; [email protected] < [email protected]_count; [email protected]++) { [email protected]_cost = [email protected]_cost + [email protected]_cost[[email protected]]; } // Currency check if(.shop_currency$[[email protected]_index] == "Zeny" && Zeny < [email protected]_cost) { message strcharinfo(0), "("[email protected]_cost+") Not enough "+.shop_currency$[[email protected]_index]+"!"; end; } // Other currency checks... // Select equipment (EQI) mes "[ " + strnpcinfo(1) + " ]"; mes "Please select which equipment you want me to enchant."; [email protected] = callsub(S_SelectPosition); // Check if position has equipment if(!getequipisequiped([email protected])) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "You don't have anything equipped there!"; close; } [email protected]_id = getequipid([email protected]); //Equipped item id [email protected] = getequiprefinerycnt([email protected]); //Equipped refine value [email protected] = getitemslots([email protected]_id); setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3); [email protected]_count = getarraysize([email protected]); [email protected]_count = getarraysize([email protected]); /*if([email protected]_count > .max_enchant) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This item has been crafted or produced and cannot be enchanted."; close; }*/ // Check for enabled refinement /*if(!getequipisenableref([email protected])) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "I don't think I can enchant this item at all."; mes "Sorry..."; close; }*/ // Add all card slots for([email protected] = 0; [email protected] < [email protected]; [email protected]++) { setarray [email protected][getarraysize([email protected])], ([email protected][[email protected]] > 0 ? [email protected][[email protected]] : -1); } // Add previous enchants for([email protected] = [email protected]; [email protected] < [email protected]_count; [email protected]++) { if([email protected][[email protected]] > 0) { setarray [email protected][getarraysize([email protected])], [email protected][[email protected]]; } } // Add new enchants for([email protected] = 0; [email protected] < [email protected]_count; [email protected]++) { setarray [email protected][getarraysize([email protected])], [email protected][[email protected]]; } // Check for produced/crafted items 254,255 if([email protected][0] == CARD0_FORGE || [email protected][0] == CARD0_CREATE) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This item has been crafted or produced and cannot be enchanted."; close; } // Has card sockets 4 - slots if([email protected]_count > (.max_enchant - [email protected])) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This equipment can hold "+(.max_enchant - [email protected])+" enchant."; close; } // Has free sockets if(([email protected] + [email protected]_count) > .max_enchant || getarraysize([email protected]) > .max_enchant) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "This item does not have enough free sockets to enchant."; close; } // Confirm the setup clear; mes "[ " + strnpcinfo(1) + " ]^6E6E6E Setup^000000"; for([email protected] = 0; [email protected] < [email protected]_count; [email protected]++) { mes "Enchant: "+ getitemname([email protected][[email protected]]); } mes "Equipment: "+ getitemname(getequipid([email protected])); mes "Cost: "[email protected]_cost+" "+.shop_currency$[[email protected]_index]+"."; if (select("Create enchant:Cancel") != 1) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "Farewell."; close; } // Create selected enchant clear; mes "[ " + strnpcinfo(1) + " ]^6E6E6E Done^000000"; mes "Here is your enchanted equipment!"; delequip([email protected]); specialeffect2 154; if(.shop_currency$[[email protected]_index] == "Zeny") { Zeny = Zeny - [email protected]_cost; } getitem2 [email protected]_id, 1, 1, [email protected], 0, ([email protected][0] > 0 ? [email protected][0] : 0), ([email protected][1] > 0 ? [email protected][1] : 0), ([email protected][2] > 0 ? [email protected][2] : 0), ([email protected][3] > 0 ? [email protected][3] : 0); close; S_Remove: // Select equipment (EQI) mes "[ " + strnpcinfo(1) + " ]"; mes "Please select which equipment you want me to work on."; [email protected] = callsub(S_SelectPosition); // Check if position has equipment if(!getequipisequiped([email protected])) { clear; mes "[ " + strnpcinfo(1) + " ]"; mes "You don't have anything equipped there!"; close; } [email protected]_id = getequipid([email protected]); //Equipped item id [email protected] = getequiprefinerycnt([email protected]); //Equipped refine value [email protected] = getitemslots([email protected]_id); setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3); [email protected]_count = getarraysize([email protected]); [email protected]_count = getarraysize([email protected]); // Create selected item clear; mes "[ " + strnpcinfo(1) + " ]^6E6E6E Done^000000"; mes "Here is your equipment back!"; delequip([email protected]); specialeffect2 169; getitem2 [email protected]_id, 1, 1, [email protected], 0,0,0,0,0; for([email protected]=0; [email protected]<[email protected]; [email protected]++) { if([email protected][[email protected]] > 0) getitem [email protected][[email protected]], 1; } close; S_SelectPosition: setarray [email protected][1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R; setarray [email protected]$[1], "Top", "Mid", "Low", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory L", "Accessory R"; setarray [email protected][1], 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; // 1=allow, 0=deny for([email protected]=1; [email protected]<getarraysize([email protected]); [email protected]++) { if([email protected][[email protected]] && getequipisequiped([email protected][[email protected]])) { [email protected]$ = [email protected]$ + [email protected]$[[email protected]] + "-[" + getequipname([email protected][[email protected]]) + "]"; } [email protected]$ = [email protected]$ + ":"; } [email protected] = [email protected][select([email protected]$)]; return [email protected]; }
  9. Okay this is the first script but I only edited an "end" when an item reached its max evolution. It should continue looking for another item in your inventory to evolve. - script Extra_ItemConf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* 1HSword */ add_item(13415,1, 111, 1, 1103, 1, 111, 5, 1106, 1, 111, 15, 1109, 1, 111, 25, 1112, 1, 111, 30, 1115, 1, 111, 60, 1122, 1, 111, 70, 1123, 1, 111, 80, 1126, 1, 111, 90, 1121, 1, 111, 100, 1129, 1, 111, 125, 13422, 1, 111, 150 ); // Espada 1H /* 2HSword */ add_item(1118, 1, 111, 5, 1153, 1, 111, 15, 1156, 1, 111, 25, 1160, 1, 111, 30, 1159, 1, 111, 60, 1163, 1, 111, 70, 1190, 1, 111, 100, 1188, 1, 111, 200 ); // Espada 2H /* 2HAxe */ add_item(1381, 1, 111, 1, 1353, 1, 111, 5, 1356, 1, 111, 15, 1359, 1, 111, 25, 1362, 1, 111, 30, 1388, 1, 111, 100, 1384, 1, 111, 200 ); // Machado 1H /* Maces */ add_item(1545, 1, 111, 1, 1503, 1, 111, 5, 1506, 1, 111, 15, 1509, 1, 111, 25, 1512, 1, 111, 30, 1521, 1, 111, 60, 1515, 1, 111, 70, 1518, 1, 111, 80, 1548, 1, 111, 200 ); // Maces 1H /* Arcos */ add_item(1742, 1, 111, 1, 1703, 1, 111, 5, 1706, 1, 111, 15, 1709, 1, 111, 25, 1712, 1, 111, 30, 1713, 1, 111, 60, 1714, 1, 111, 70, 1735, 1, 111, 80, 18128, 1, 111, 200 ); // Arcos /* Cajados */ add_item(1639, 1, 111, 1, 1603, 1, 111, 5, 1606, 1, 111, 15, 1609, 1, 111, 25, 1612, 1, 111, 30, 1614, 1, 111, 60, 1615, 1, 111, 80, 1636, 1, 111, 100); // Cajados /* 1HSpear */ add_item(1403, 1, 111,10, 1406, 1, 111,15, 1409, 1, 111, 30, 1430, 1, 111, 200); /* 2HSpear */ add_item(1453, 1, 111,20, 1456, 1, 111,30, 1459, 1, 111, 40, 1462, 1, 111, 50, 1465, 1, 111, 70, 1412, 1, 111, 100); /* Knuckles */ add_item(1801, 1, 111,20, 1803, 1, 111,30, 1805, 1, 111, 40, 1809, 1, 111, 50, 1811, 1, 111, 60, 1807, 1, 111, 70, 1814, 1, 111, 80, 1829, 1, 111, 100); /* Violin */ add_item(1901, 1, 111,20, 1903, 1, 111,30, 1905, 1, 111, 40, 1909, 1, 111, 50, 1911, 1, 111, 60, 1907, 1, 111, 80, 1925, 1, 111,100, 1918, 1, 111, 150); /* Whip */ add_item(1950, 1, 111,20, 1952, 1, 111,30, 1954, 1, 111, 40, 1958, 1, 111, 50, 1960, 1, 111, 60, 1958, 1, 111, 80, 1994, 1, 111,100); /* Katar */ add_item(1264, 1, 111,20, 1262, 1, 111,30, 1295, 1, 111, 40, 1250, 1, 111, 50, 1252, 1, 111, 60, 1283, 1, 111, 100); /* Debug */ add_item(2301, 1, 111, 1, 2302, 1, 111, 2); /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"ffffff", // % of evolution. "03fd20", // Wings evolving. "11f4cc"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], /*EQI_HAND_R,*/ EQI_HAND_L, EQI_ARMOR, EQI_SHOES, EQI_GARMENT; //============================================= end; OnNPCKillEvent: if([email protected]) { // Cache. That old loop on every mob killed... if(@evo_var[0] && isequipped(@evo_var[0])) { [email protected]_item = true; [email protected]_id = @evo_var[0]; [email protected] = @evo_var[1] - 1; [email protected] = @evo_var[2] - 1; [email protected] = @evo_var[3]; [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid != [email protected]_id && [email protected]_id > 1001) end; } else { [email protected] = getarraysize(.slots); while([email protected] < [email protected] && [email protected]_item) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1 && [email protected]_item) { [email protected] = 0; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { [email protected]_item = true; setarray @evo_var[0],[email protected]_id,[email protected] + 1,[email protected] + 1,[email protected]; } } else if([email protected]_id == [email protected]_evo) { [email protected] = .w2[[email protected]]; } if([email protected]_item) [email protected]++; } if([email protected]_item) [email protected]++; } } } if([email protected]_item) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = getd("mobs_"[email protected]_id) + 1; setd "mobs_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "mobs_"[email protected]_id,0; } else { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "exp_"[email protected]_id,0; } specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto && [email protected]) { @evolving = true; specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" está evoluindo...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; getinventorylist; [email protected] = inarray(@inventorylist_id,[email protected]_id); if([email protected] != -1) { if([email protected]_expire[[email protected]]) { setarray [email protected],@inventorylist_id[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]]; setarray [email protected],@inventorylist_option_id1[[email protected]],@inventorylist_option_id2[[email protected]],@inventorylist_option_id3[[email protected]],@inventorylist_option_id4[[email protected]],@inventorylist_option_id5[[email protected]]; setarray [email protected],@inventorylist_option_value1[[email protected]],@inventorylist_option_value2[[email protected]],@inventorylist_option_value3[[email protected]],@inventorylist_option_value4[[email protected]],@inventorylist_option_value5[[email protected]]; setarray [email protected],@inventorylist_option_parameter1[[email protected]],@inventorylist_option_parameter2[[email protected]],@inventorylist_option_parameter3[[email protected]],@inventorylist_option_parameter4[[email protected]],@inventorylist_option_parameter5[[email protected]]; [email protected] = @inventorylist_bound[[email protected]]; } else { @evolving = false; } if(@evolving) { [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); if(getarraysize([email protected])){ delitem3 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; if([email protected]) getitembound3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account,[email protected],[email protected],[email protected]; else getitem3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; } else { delitem2 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; if([email protected]) getitembound2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account; else getitem2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; } equip [email protected]_item; setd "evo_"[email protected]_id,0; deletearray @evo_var; announce "Parabéns!! Sua "+getitemname([email protected]_id)+" evoluiu para "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; @evolving = false; } } } } } end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } } And now this is the second one. I only added a variable to prevent multiprocessing issues. - script Extra_ItemConf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* 1HSword */ add_item(13415,1, 111, 1, 1103, 1, 111, 5, 1106, 1, 111, 15, 1109, 1, 111, 25, 1112, 1, 111, 30, 1115, 1, 111, 60, 1122, 1, 111, 70, 1123, 1, 111, 80, 1126, 1, 111, 90, 1121, 1, 111, 100, 1129, 1, 111, 125, 13422, 1, 111, 150 ); // Espada 1H /* 2HSword */ add_item(1118, 1, 111, 5, 1153, 1, 111, 15, 1156, 1, 111, 25, 1160, 1, 111, 30, 1159, 1, 111, 60, 1163, 1, 111, 70, 1190, 1, 111, 100, 1188, 1, 111, 200 ); // Espada 2H /* 2HAxe */ add_item(1381, 1, 111, 1, 1353, 1, 111, 5, 1356, 1, 111, 15, 1359, 1, 111, 25, 1362, 1, 111, 30, 1388, 1, 111, 100, 1384, 1, 111, 200 ); // Machado 1H /* Maces */ add_item(1545, 1, 111, 1, 1503, 1, 111, 5, 1506, 1, 111, 15, 1509, 1, 111, 25, 1512, 1, 111, 30, 1521, 1, 111, 60, 1515, 1, 111, 70, 1518, 1, 111, 80, 1548, 1, 111, 200 ); // Maces 1H /* Arcos */ add_item(1742, 1, 111, 1, 1703, 1, 111, 5, 1706, 1, 111, 15, 1709, 1, 111, 25, 1712, 1, 111, 30, 1713, 1, 111, 60, 1714, 1, 111, 70, 1735, 1, 111, 80, 18128, 1, 111, 200 ); // Arcos /* Cajados */ add_item(1639, 1, 111, 1, 1603, 1, 111, 5, 1606, 1, 111, 15, 1609, 1, 111, 25, 1612, 1, 111, 30, 1614, 1, 111, 60, 1615, 1, 111, 80, 1636, 1, 111, 100); // Cajados /* 1HSpear */ add_item(1403, 1, 111,10, 1406, 1, 111,15, 1409, 1, 111, 30, 1430, 1, 111, 200); /* 2HSpear */ add_item(1453, 1, 111,20, 1456, 1, 111,30, 1459, 1, 111, 40, 1462, 1, 111, 50, 1465, 1, 111, 70, 1412, 1, 111, 100); /* Knuckles */ add_item(1801, 1, 111,20, 1803, 1, 111,30, 1805, 1, 111, 40, 1809, 1, 111, 50, 1811, 1, 111, 60, 1807, 1, 111, 70, 1814, 1, 111, 80, 1829, 1, 111, 100); /* Violin */ add_item(1901, 1, 111,20, 1903, 1, 111,30, 1905, 1, 111, 40, 1909, 1, 111, 50, 1911, 1, 111, 60, 1907, 1, 111, 80, 1925, 1, 111,100, 1918, 1, 111, 150); /* Whip */ add_item(1950, 1, 111,20, 1952, 1, 111,30, 1954, 1, 111, 40, 1958, 1, 111, 50, 1960, 1, 111, 60, 1958, 1, 111, 80, 1994, 1, 111,100); /* Katar */ add_item(1264, 1, 111,20, 1262, 1, 111,30, 1295, 1, 111, 40, 1250, 1, 111, 50, 1252, 1, 111, 60, 1283, 1, 111, 100); /* Debug */ add_item(2301, 1, 111, 1, 2302, 1, 111, 2); /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"ffffff", // % of evolution. "03fd20", // Wings evolving. "11f4cc"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], /*EQI_HAND_R,*/ EQI_HAND_L, EQI_ARMOR, EQI_SHOES, EQI_GARMENT; //============================================= end; OnNPCKillEvent: if(@evolve_inuse) end; @evolve_inuse = true; [email protected] = getarraysize(.slots); while([email protected] < [email protected]) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1) { [email protected] = 0; [email protected]_item = false; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = getd("mobs_"[email protected]_id) + 1; setd "mobs_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) continue; setd "mobs_"[email protected]_id,0; } else { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) continue; setd "exp_"[email protected]_id,0; } specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto) { specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" está evoluindo...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; if([email protected]) { getinventorylist; [email protected] = true; } [email protected] = inarray(@inventorylist_id,[email protected]_id); if([email protected] != -1) { if([email protected]_expire[[email protected]]) { setarray [email protected][0],@inventorylist_id[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]]; setarray [email protected][0],@inventorylist_option_id1[[email protected]],@inventorylist_option_id2[[email protected]],@inventorylist_option_id3[[email protected]],@inventorylist_option_id4[[email protected]],@inventorylist_option_id5[[email protected]]; setarray [email protected][0],@inventorylist_option_value1[[email protected]],@inventorylist_option_value2[[email protected]],@inventorylist_option_value3[[email protected]],@inventorylist_option_value4[[email protected]],@inventorylist_option_value5[[email protected]]; setarray [email protected][0],@inventorylist_option_parameter1[[email protected]],@inventorylist_option_parameter2[[email protected]],@inventorylist_option_parameter3[[email protected]],@inventorylist_option_parameter4[[email protected]],@inventorylist_option_parameter5[[email protected]]; [email protected] = @inventorylist_bound[[email protected]]; } else { continue; } [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); if(getarraysize([email protected])){ delitem3 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; if([email protected]) getitembound3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account,[email protected],[email protected],[email protected]; else getitem3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; } else { delitem2 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; if([email protected]) getitembound2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account; else getitem2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; } equip [email protected]_item; setd "evo_"[email protected]_id,0; announce "Parabéns!! Sua "+getitemname([email protected]_id)+" evoluiu para "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; } [email protected]_item = true; } else if([email protected]_id == [email protected]_evo) { [email protected] = .w2[[email protected]]; } } } [email protected]++; } [email protected]++; } } @evolve_inuse = false; end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } }
  10. I tried. Tell me if it works. - script Extra_ItemConf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* 1HSword */ add_item(13415,1, 111, 1, 1103, 1, 111, 5, 1106, 1, 111, 15, 1109, 1, 111, 25, 1112, 1, 111, 30, 1115, 1, 111, 60, 1122, 1, 111, 70, 1123, 1, 111, 80, 1126, 1, 111, 90, 1121, 1, 111, 100, 1129, 1, 111, 125, 13422, 1, 111, 150 ); // Espada 1H /* 2HSword */ add_item(1118, 1, 111, 5, 1153, 1, 111, 15, 1156, 1, 111, 25, 1160, 1, 111, 30, 1159, 1, 111, 60, 1163, 1, 111, 70, 1190, 1, 111, 100, 1188, 1, 111, 200 ); // Espada 2H /* 2HAxe */ add_item(1381, 1, 111, 1, 1353, 1, 111, 5, 1356, 1, 111, 15, 1359, 1, 111, 25, 1362, 1, 111, 30, 1388, 1, 111, 100, 1384, 1, 111, 200 ); // Machado 1H /* Maces */ add_item(1545, 1, 111, 1, 1503, 1, 111, 5, 1506, 1, 111, 15, 1509, 1, 111, 25, 1512, 1, 111, 30, 1521, 1, 111, 60, 1515, 1, 111, 70, 1518, 1, 111, 80, 1548, 1, 111, 200 ); // Maces 1H /* Arcos */ add_item(1742, 1, 111, 1, 1703, 1, 111, 5, 1706, 1, 111, 15, 1709, 1, 111, 25, 1712, 1, 111, 30, 1713, 1, 111, 60, 1714, 1, 111, 70, 1735, 1, 111, 80, 18128, 1, 111, 200 ); // Arcos /* Cajados */ add_item(1639, 1, 111, 1, 1603, 1, 111, 5, 1606, 1, 111, 15, 1609, 1, 111, 25, 1612, 1, 111, 30, 1614, 1, 111, 60, 1615, 1, 111, 80, 1636, 1, 111, 100); // Cajados /* 1HSpear */ add_item(1403, 1, 111,10, 1406, 1, 111,15, 1409, 1, 111, 30, 1430, 1, 111, 200); /* 2HSpear */ add_item(1453, 1, 111,20, 1456, 1, 111,30, 1459, 1, 111, 40, 1462, 1, 111, 50, 1465, 1, 111, 70, 1412, 1, 111, 100); /* Knuckles */ add_item(1801, 1, 111,20, 1803, 1, 111,30, 1805, 1, 111, 40, 1809, 1, 111, 50, 1811, 1, 111, 60, 1807, 1, 111, 70, 1814, 1, 111, 80, 1829, 1, 111, 100); /* Violin */ add_item(1901, 1, 111,20, 1903, 1, 111,30, 1905, 1, 111, 40, 1909, 1, 111, 50, 1911, 1, 111, 60, 1907, 1, 111, 80, 1925, 1, 111,100, 1918, 1, 111, 150); /* Whip */ add_item(1950, 1, 111,20, 1952, 1, 111,30, 1954, 1, 111, 40, 1958, 1, 111, 50, 1960, 1, 111, 60, 1958, 1, 111, 80, 1994, 1, 111,100); /* Katar */ add_item(1264, 1, 111,20, 1262, 1, 111,30, 1295, 1, 111, 40, 1250, 1, 111, 50, 1252, 1, 111, 60, 1283, 1, 111, 100); /* Debug */ add_item(2301, 1, 111, 1, 2302, 1, 111, 2); /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"ffffff", // % of evolution. "03fd20", // Wings evolving. "11f4cc"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], /*EQI_HAND_R,*/ EQI_HAND_L, EQI_ARMOR, EQI_SHOES, EQI_GARMENT; //============================================= end; OnNPCKillEvent: [email protected] = getarraysize(.slots); while([email protected] < [email protected]) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1) { [email protected] = 0; [email protected]_item = false; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = getd("mobs_"[email protected]_id) + 1; setd "mobs_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) continue; setd "mobs_"[email protected]_id,0; } else { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) continue; setd "exp_"+.[email protected]_id,0; } specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto) { specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" está evoluindo...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; if([email protected]) { getinventorylist; [email protected] = true; } [email protected] = inarray(@inventorylist_id,[email protected]_id); if([email protected] != -1) { if([email protected]_expire[[email protected]]) { setarray [email protected][0],@inventorylist_id[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]]; setarray [email protected][0],@inventorylist_option_id1[[email protected]],@inventorylist_option_id2[[email protected]],@inventorylist_option_id3[[email protected]],@inventorylist_option_id4[[email protected]],@inventorylist_option_id5[[email protected]]; setarray [email protected][0],@inventorylist_option_value1[[email protected]],@inventorylist_option_value2[[email protected]],@inventorylist_option_value3[[email protected]],@inventorylist_option_value4[[email protected]],@inventorylist_option_value5[[email protected]]; setarray [email protected][0],@inventorylist_option_parameter1[[email protected]],@inventorylist_option_parameter2[[email protected]],@inventorylist_option_parameter3[[email protected]],@inventorylist_option_parameter4[[email protected]],@inventorylist_option_parameter5[[email protected]]; [email protected] = @inventorylist_bound[[email protected]]; } else { continue; } [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); if(getarraysize([email protected])){ delitem3 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; if([email protected]) getitembound3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account,[email protected],[email protected],[email protected]; else getitem3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; } else { delitem2 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; if([email protected]) getitembound2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account; else getitem2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; } equip [email protected]_item; setd "evo_"[email protected]_id,0; announce "Parabéns!! Sua "+getitemname([email protected]_id)+" evoluiu para "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; } [email protected]_item = true; } else if([email protected]_id == [email protected]_evo) { continue; } } } [email protected]++; } [email protected]++; } } end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } }
  11. n0tttt

    i got error when applying custom commands.

    mapmoblist static int count_mob(struct block_list *bl, va_list ap) // [FE] { struct mob_data *md = (struct mob_data*)bl; short id = va_arg(ap, short); if (md->class_ == id) return 1; return 0; } ACMD_FUNC(mapmoblist) // [FE] { char temp[100]; bool mob_searched[MAX_MOB_DB]; bool mob_mvp[MAX_MOB_DB]; // Store mvp data.. struct s_mapiterator* it; unsigned short count = 0, i, mapindex = 0; int m = 0; memset(mob_searched, 0, MAX_MOB_DB); memset(mob_mvp, 0, MAX_MOB_DB); if (message && *message) { // Player input map name, search mob list for that map mapindex = mapindex_name2id(message); if (!mapindex) { clif_displaymessage(fd, "Map not found"); return -1; } m = map_mapindex2mapid(mapindex); } else { // Player doesn't input map name, search mob list in player current map mapindex = sd->mapindex; m = sd->bl.m; } clif_displaymessage(fd, "--------Monster List--------"); sprintf(temp, "Mapname: %s", mapindex_id2name(mapindex)); clif_displaymessage(fd, temp); clif_displaymessage(fd, "Monsters: "); //Looping and search for mobs it = mapit_geteachmob(); while (true) { TBL_MOB* md = (TBL_MOB*)mapit_next(it); if (md == NULL) break; if (md->bl.m != m || md->status.hp <= 0) continue; if (mob_searched[md->mob_id] == true) continue; // Already found, skip it if (mob_db(md->mob_id)->mexp) { mob_searched[md->mob_id] = true; mob_mvp[md->mob_id] = true; // Save id for later continue; // It's MVP! } mob_searched[md->mob_id] = true; count = map_foreachinmap(count_mob, m, BL_MOB, md->class_); sprintf(temp, " %s[%d] : %d", mob_db(md->mob_id)->jname, md->mob_id, count); clif_displaymessage(fd, temp); } mapit_free(it); clif_displaymessage(fd, "MVP: "); // Looping again and search for mvp, not sure if this is the best way.. for (i = 1000; i < MAX_MOB_DB; i++) { //First monster start at 1001 (Scorpion) if (mob_mvp[i] == true) { count = map_foreachinmap(count_mob, m, BL_MOB, i); sprintf(temp, " %s[%d] : %d", mob_db(i)->jname, i, count); clif_displaymessage(fd, temp); } } return 0; } Hope it works.
  12. Yeah, the script isn't coded like that. Based on the names, it was made with wings in mind. It would require a bigger change to make it do that. But does it work right for your needs now, or do you really need that feature?
  13. n0tttt

    Log Transaction

    I don't understand very well. conf/log_athena.conf: // Track Zeny Changes // Filter settings // 0 - don't log; 1 - log any zeny changes; 2.....1000000 - minimal absolute logging zeny value log_zeny: 0 Is this what you want? This is how the table works: -- -- Table structure for table `zenylog` -- # ZenyLog types # (M)onsters # (T)rade # (V)ending Sell/Buy # (S)hop Sell/Buy # (N)PC Change amount # (A)dministrators # (E)Mail # (B)uying Store # Ban(K) Transactions CREATE TABLE IF NOT EXISTS `zenylog` ( `id` int(11) NOT NULL auto_increment, `time` datetime NOT NULL, `char_id` int(11) NOT NULL default '0', `src_id` int(11) NOT NULL default '0', `type` enum('T','V','P','M','S','N','D','C','A','E','I','B','K') NOT NULL default 'S', `amount` int(11) NOT NULL default '0', `map` varchar(11) NOT NULL default '', PRIMARY KEY (`id`), INDEX (`type`) ) ENGINE=MyISAM AUTO_INCREMENT=1; I don't know if you want a npc shop with OnSellItem or something, but in case you want that kind of shop and it doesn't work, you can use something like this: prontera,150,150,4 script Seller 100,{ callshop "shop_seller",2; end; OnSellItem: for([email protected] = getarraysize(@sold_nameid);[email protected] < [email protected];[email protected]++) { if(@sold_nameid[[email protected]] == 969) { [email protected] = @sold_amount[[email protected]]; [email protected] = 100000*[email protected]; Zeny += [email protected]; delitem 969,[email protected]; //query_logsql "INSERT INTO `zenylog` (`time`, `char_id`, `src_id`, `type`, `amount`, `map`) VALUES (NOW(), '"+getcharid(0)+"'", '"+getcharid(3)+"'", 'S', '"+escape_sql(strcharinfo(3))+"')"; end; } } end; OnInit: npcshopattach "shop_seller"; end; } - shop shop_seller -1,512:1 Hope it works... if you want to use another table, tell me, because as I said, I didn't understand very well.
  14. n0tttt

    Battleground multiplayer whith @evilclone

    Nice script. Wouldn't you mind a little bit of editing? I don't even know if this will work or not, but I added a few setunitdatas // https://rathena.org/board/topic/114033-battleground-multiplayer-whith-evilclone/ function script F_ShuffleNumbers { deletearray getarg(2); [email protected] = getarg(0); [email protected] = getarg(1) +1 - [email protected]; [email protected] = getarg(3, [email protected]); if ([email protected] <= 0 || [email protected] <= 0) return 0; if ([email protected] > [email protected]) [email protected] = [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]) [email protected][[email protected]] = [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]) { [email protected] = rand([email protected]); set getelementofarray( getarg(2), [email protected] ), [email protected][[email protected]] + [email protected]; [email protected][[email protected]] = [email protected][[email protected]]; } return [email protected]; } prontera,155,185,5 script bg_pvp_clone 1_F_MARIA,{ .minplayer2start = 1; // 1vs1 mes "bg_pvp_clone"; if ( .start == true ) { mes "bg_pvp_clone is on-going"; close; } while ( .aid[[email protected]] != getcharid(3) && [email protected] < .size ) [email protected]; if ( [email protected] < .size ) { mes "You already join the queue."; close; } select "join"; mes "you have to stick to this map"; close2; .aid[ .size++ ] = getcharid(3); for ( [email protected] = 0; [email protected] < .size; [email protected] ) { if ( !isloggedin( .aid[[email protected]] ) ) { deletearray .aid[[email protected]], 1; [email protected]; --.size; } else { attachrid .aid[[email protected]]; if ( strcharinfo(3) != strnpcinfo(4) ) { deletearray .aid[[email protected]], 1; [email protected]; --.size; } } } detachrid; if ( .size < .minplayer2start *2 ) { announce .size +" players join", bc_npc | bc_area; end; } .start = true; .red = bg_create( "bat_c01",53,128, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead" ); .blue = bg_create( "bat_c01",146,56, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead" ); callfunc "F_ShuffleNumbers", 0, .size -1, [email protected]; for ( [email protected] = 0; [email protected] < .size; [email protected] ) { attachrid .aid[ [email protected][[email protected]] ]; bg_join ( [email protected] % 2 )? .red : .blue; } detachrid; deletearray .aid; .size = 0; bg_warp .red, "bat_c03", 53,128; bg_warp .blue, "bat_c03", 146,56; for ( [email protected] = 0; [email protected] < 20; [email protected] ) { if ([email protected] % 10 == 0) [email protected] = bg_get_data( (([email protected] < 10) ? .red : .blue), 1 ); [email protected] = [email protected][rand([email protected])]; [email protected] = bg_monster( (([email protected] < 10) ? .red : .blue), "bat_c03", 0,0, "--ja--", rand(1799,1804), strnpcinfo(0)+"::On"+(([email protected] < 10) ? "Red" : "Blue")+"CloneKill" ); setunitdata [email protected],UMOB_SEX,readparam( Sex, [email protected]); setunitdata [email protected],UMOB_CLASS,readparam( Class, [email protected]); setunitdata [email protected],UMOB_HAIRSTYLE,getlook( LOOK_HAIR, [email protected]); setunitdata [email protected],UMOB_HAIRCOLOR,getlook( LOOK_HAIR_COLOR, [email protected]); setunitdata [email protected],UMOB_HEADBOTTOM,getlook( LOOK_HEAD_BOTTOM, [email protected]); setunitdata [email protected],UMOB_HEADMIDDLE,getlook( LOOK_HEAD_MID, [email protected]); setunitdata [email protected],UMOB_HEADTOP,getlook( LOOK_HEAD_TOP, [email protected]); setunitdata [email protected],UMOB_CLOTHCOLOR,getlook( LOOK_CLOTHES_COLOR, [email protected]); setunitdata [email protected],UMOB_SHIELD,getlook( LOOK_SHIELD, [email protected]); setunitdata [email protected],UMOB_WEAPON,getlook( LOOK_WEAPON, [email protected]); } sleep 10000; // Match Duration if ( .winside == .red || .redscore > .bluescore ) { mapannounce "bat_c03", "- Red side Won the match !", bc_map; callsub L_reward, .red; } else if ( .winside == .blue || .bluescore > .redscore ) { mapannounce "bat_c03", "- Blue side Won the match !", bc_map; callsub L_reward, .blue; } else mapannounce "bat_c03", "Battle end as a draw", bc_map; bg_destroy .red; bg_destroy .blue; mapwarp "bat_c03", "prontera",150,185; .redscore = .bluescore = .start = false; bg_updatescore "bat_c03", 0, 0; end; L_reward: bg_get_data getarg(0), 1; for ( [email protected] = 0; [email protected] < [email protected]; [email protected] ) getitem 501,1, [email protected][[email protected]]; return; OnRedCloneKill: callsub L_CloneKill, .red, .blue, .bluescore, rand(1799,1804), "::OnRedCloneKill"; OnBlueCloneKill: callsub L_CloneKill, .blue, .red, .redscore, rand(1659,1663), "::OnBlueCloneKill"; L_CloneKill: [email protected] = bg_monster( getarg(0), "bat_c03", 0,0, "--ja--", getarg(3), strnpcinfo(0) + getarg(4) ); [email protected] = bg_get_data( getarg(0), 1 ); [email protected] = [email protected][rand([email protected])]; setunitdata [email protected],UMOB_SEX,readparam( Sex, [email protected]); setunitdata [email protected],UMOB_CLASS,readparam( Class, [email protected]); setunitdata [email protected],UMOB_HAIRSTYLE,getlook( LOOK_HAIR, [email protected]); setunitdata [email protected],UMOB_HAIRCOLOR,getlook( LOOK_HAIR_COLOR, [email protected]); setunitdata [email protected],UMOB_HEADBOTTOM,getlook( LOOK_HEAD_BOTTOM, [email protected]); setunitdata [email protected],UMOB_HEADMIDDLE,getlook( LOOK_HEAD_MID, [email protected]); setunitdata [email protected],UMOB_HEADTOP,getlook( LOOK_HEAD_TOP, [email protected]); setunitdata [email protected],UMOB_CLOTHCOLOR,getlook( LOOK_CLOTHES_COLOR, [email protected]); setunitdata [email protected],UMOB_SHIELD,getlook( LOOK_SHIELD, [email protected]); setunitdata [email protected],UMOB_WEAPON,getlook( LOOK_WEAPON, [email protected]); set getarg(2), getarg(2) +1; // killing clones add 1 point if ( .redscore < 100 && .bluescore < 100 ) bg_updatescore "bat_c03", .redscore, .bluescore; if ( getarg(2) == 100 ) { .winside = getarg(1); awake strnpcinfo(0); } end; OnRedQuit: callsub L_Quit, .red, .blue, "Red"; OnBlueQuit: callsub L_Quit, .blue, .red, "Blue"; L_Quit: if ( bg_get_data( getarg(0), 0 ) ) end; mapannounce "bat_c03", "All "+ getarg(2) +" team members has Quit!", bc_map; .winside = getarg(1); awake strnpcinfo(0); end; OnRedDead: callsub L_Dead, .red, .blue, .bluescore; OnBlueDead: callsub L_Dead, .blue, .red, .redscore; L_Dead: set getarg(2), getarg(2) +3; // killing players add 3 points if ( .redscore < 100 && .bluescore < 100 ) bg_updatescore "bat_c03", .redscore, .bluescore; if ( getarg(2) == 100 ) { .winside = getarg(1); awake strnpcinfo(0); } sleep2 1250; percentheal 100,100; end; } bat_c03 mapflag battleground 2 bat_c03 mapflag nosave SavePoint bat_c03 mapflag nowarp bat_c03 mapflag nowarpto bat_c03 mapflag noteleport bat_c03 mapflag nomemo bat_c03 mapflag nopenalty bat_c03 mapflag nobranch bat_c03 mapflag noicewall EDIT: Ups, I didn't see that edit.
  15. n0tttt

    Request Rental NPC

    Hope it works. //===== rAthena Script ======================================= //= Healer //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Basic healer script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //============================================================ - script Healer -1,{ [email protected] = 0; // Heal delay, in seconds setarray [email protected][0], 7539, 10; if ( $healer_rent <= gettimetick(2) && countitem([email protected][0]) >= [email protected][1]) { message strcharinfo(0), "Do you want to rent this NPC? Price: "[email protected][1]+" "+getitemname([email protected][0])+"."; if ( select("No:Yes") == 2 ) { if (countitem([email protected][0]) >= [email protected][1]) { delitem [email protected][0], [email protected][1]; $healer_zeny = 0; $healer_price = 0; $healer_rent = gettimetick(2) + 7 * 24 * 60 * 60; $healer_id = getcharid(3); } } } else if ( $healer_rent > gettimetick(2) && getcharid(3) == $healer_id ) { message strcharinfo(0),"Rent time left: "+Time2Str($healer_rent)+"."; message strcharinfo(0),"Zeny avaiaible: "+F_InsertComma($healer_zeny)+"."; switch(select("Continue:Set cost:"+(($healer_zeny)? "Withdraw zeny" : ""))) { case 2: input $healer_price; break; case 3: if($healer_zeny) { message strcharinfo(0), F_InsertComma($healer_zeny)+" received."; Zeny += $healer_zeny; $healer_zeny = 0; } else { message strcharinfo(0),"There isn't any zeny."; } break; } } if(countitem([email protected][0])) { message strcharinfo(0),"Currency: "+getitemname([email protected][0])+"."; for([email protected] = 1;.item_amt[[email protected]] > 0;[email protected]++) { [email protected] = .index[[email protected] - 1]; if(!(#healer_unlock & 1 << ([email protected] - 1))) [email protected]$+= "Unlock "+.buff_name$[[email protected]]+" ("+.item_amt[[email protected]]+")"; [email protected]$+= ":"; } [email protected] = select([email protected]$); if(countitem([email protected][0] >= .item_amt[[email protected]]) { #healer_unlock^= (1 << ([email protected] - 1)) } if (@HD > gettimetick(2)) end; if ($healer_price) { message strcharinfo(0), "Healing costs " + F_InsertComma($healer_price) + " Zeny."; if (Zeny < $healer_price) end; if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end; if(Zeny < $healer_price) end; Zeny -= $healer_price; $healer_zeny += $healer_price; } specialeffect2 EF_HEAL2; percentheal 100,100; if(#healer_unlock) { for([email protected] = 1;.item_amt[[email protected]] > 0;[email protected]++) { if(#healer_unlock & (1 << ([email protected] - 1))) { [email protected] = .buff_index[[email protected] - 1]; [email protected] = .buff_index[[email protected]]; for([email protected] = [email protected];[email protected] <= [email protected];[email protected]++) sc_start .buff_id[[email protected]],240000,.buff_lv[[email protected]]; } } } if ([email protected]) @HD = gettimetick(2) + [email protected]; end; OnInit: [email protected]$ = strnpcinfo(2); if([email protected]$ != "") { // add_buff(<item amount>,"name",<buff>,<lvl>{,<buff>,<lvl>}); add_buff(1,"Agi and Blessing",SC_INCREASEAGI,10,SC_BLESSING,10); //add_buff(2,...); .buff_id = 0; .total_buffs = 0; } end; function add_buff { .buff_name$[++.buff_id] = getarg(1); .item_amt[.buff_id] = getarg(0); [email protected] = getargcount(); for([email protected] = 2;[email protected] < [email protected];[email protected]+= 2) { .buff_id[[email protected] + .total_buffs - 2] = getarg([email protected]); .buff_lv[[email protected] + .total_buffs - 2] = getarg([email protected] + 1); } .total_buffs+= (([email protected]/2) - 1); .buff_index[.buff_id] = .total_buffs; } } // Duplicates //============================================================ alberta,25,240,6 duplicate(Healer) Healer#alb 909 aldebaran,135,118,6 duplicate(Healer) Healer#alde 909 amatsu,200,79,4 duplicate(Healer) Healer#ama 909 ayothaya,207,169,6 duplicate(Healer) Healer#ayo 909 comodo,184,158,6 duplicate(Healer) Healer#com 909 einbech,57,36,6 duplicate(Healer) Healer#einbe 909 einbroch,57,202,6 duplicate(Healer) Healer#einbr 909 geffen,115,72,6 duplicate(Healer) Healer#gef 909 gonryun,156,122,6 duplicate(Healer) Healer#gon 909 hugel,89,150,6 duplicate(Healer) Healer#hug 909 izlude,121,150,6 duplicate(Healer) Healer#izl 909 //Pre-RE: (125,118) jawaii,250,139,4 duplicate(Healer) Healer#jaw 909 lighthalzen,152,100,6 duplicate(Healer) Healer#lhz 909 louyang,226,103,4 duplicate(Healer) Healer#lou 909 manuk,272,144,6 duplicate(Healer) Healer#man 909 mid_camp,203,289,6 duplicate(Healer) Healer#mid 909 moc_ruins,72,164,4 duplicate(Healer) Healer#moc 909 morocc,153,97,6 duplicate(Healer) Healer#mor 909 moscovia,220,191,4 duplicate(Healer) Healer#mos 909 niflheim,212,182,5 duplicate(Healer) Healer#nif 909 payon,179,106,4 duplicate(Healer) Healer#pay 909 prontera,162,193,4 duplicate(Healer) Healer#prt 909 rachel,125,116,6 duplicate(Healer) Healer#rac 909 splendide,201,153,4 duplicate(Healer) Healer#spl 909 thor_camp,249,74,4 duplicate(Healer) Healer#thor 909 umbala,105,148,3 duplicate(Healer) Healer#umb 909 veins,217,121,4 duplicate(Healer) Healer#ve 909 xmas,143,136,4 duplicate(Healer) Healer#xmas 909 yuno,164,45,4 duplicate(Healer) Healer#yuno 909 // Duplicates (Renewal) //============================================================ brasilis,194,221,6 duplicate(Healer) Healer#bra 909 dewata,195,187,4 duplicate(Healer) Healer#dew 909 dicastes01,201,194,4 duplicate(Healer) Healer#dic 909 ecl_in01,45,60,4 duplicate(Healer) Healer#ecl 909 malangdo,132,114,6 duplicate(Healer) Healer#mal 909 malaya,227,204,6 duplicate(Healer) Healer#ma 909 mora,55,152,4 duplicate(Healer) Healer#mora 909
  16. n0tttt

    Anti Free Kill

    I recommend to fuse this with another OnPCKillEvent to avoid having a large event queue. - script Anti_FreeKill -1,{ OnPCKillEvent: if(@last_kill == killedrid) { if([email protected]_killamt >= 29) { atcommand "@jailfor 1h "+strcharinfo(0); announce strcharinfo(0)+" has been cheating with "+rid2name(@last_kill)+".",bc_all; @last_killamt = 0; @last_kill = 0; end; } } else { @last_killamt = 0; } @last_kill = killedrid; end; OnPCDieEvent: @last_killamt = 0; end; }
  17. n0tttt

    Need help for Incrase Headgear View id

    First of all, did you try the last NEMO version? https://gitlab.com/4144/Nemo/-/archive/master/Nemo-master.zip You can check which clients it can work on: http://nemo.herc.ws/patches/IncreaseViewID/
  18. n0tttt

    Channel Controller

    I have a script which I haven't released because... more than 1 year without test server. I hope it works, though. Tell me how it goes. It also has commands. - script Login_Config -1,{ OnInit: // Names of channels to show. setarray .channel_name$[0],"Global","Support","Trading"; // Channels names to join. setarray .channel$[0],"global","support","trade"; // Commands. setarray .command$[0],"autoloot","noask","noks","showdelay","showexp","showzeny"; bindatcmd "channels", "Login_Config::OnChannels"; bindatcmd "loginconf","Login_Config::OnConfig"; end; OnChannels: [email protected]$ = "^3227cd[Channel Manager]^000000"; mes [email protected]$; mes "Here you can change which channels you'll join when you log in."; mes "Remember the configuration is shared between all your characters."; [email protected] = getarraysize(.channel$); next; do { [email protected]$ = ""; for([email protected] = 0;[email protected] < [email protected];[email protected]++) { if(#config & (1 << [email protected])) [email protected]$+= "^539c36["+.channel_name$[[email protected]]+"]^000000:"; else [email protected]$+= "^b6101b["+.channel_name$[[email protected]]+"]^000000:"; } [email protected] = select("Finish.",[email protected]$) - 1; if([email protected]) #config^= (1 << ([email protected] - 1)); } while([email protected]); close; OnConfig: [email protected]$ = "^3227cd[Login Manager]^000000"; mes [email protected]$; mes "Here you can change your login config."; mes "Remember the configuration is shared between all your characters."; [email protected] = getarraysize(.command$); [email protected] = getarrayzize(.channel$) - 1; next; do { [email protected]$ = ""; for([email protected] = 0;[email protected] < [email protected];[email protected]++) { if(#config & (1 << ([email protected] + [email protected] + 1))) [email protected]$+= "^[email protected]"+.command$[[email protected]]+" "+((.command$[[email protected]] == "autoloot")? "("+((#rate_at)? #rate_at : 100)+"%)" : "")+".^000000:"; else [email protected]$+= "^[email protected]"+.command$[[email protected]]+".^000000:"; } [email protected] = select("Finish.",[email protected]$) - 1; if(.command$[[email protected] - 1] == "autoloot" && !(#config & (1 << ([email protected] + [email protected])))) { input [email protected]; if([email protected] && [email protected] < 100) #rate_at = [email protected]; else if([email protected]) continue; } else if(.command$[[email protected] - 1] == "autoloot") { #rate_at = 0; } if([email protected]) #config^= (1 << ([email protected] + [email protected])); } while([email protected]); close; OnPCLoginEvent: if(#config) { [email protected] = getarraysize(.channel$); [email protected] = getarraysize(.command$) + [email protected]; for(;[email protected] < [email protected];[email protected]++) { if(#config & (1 << [email protected])) { if([email protected] < [email protected]) atcommand "@join #"+.channel$[[email protected]]; else atcommand "@"+.command$[[email protected] - [email protected]]+" "+((.command$[[email protected] - [email protected]] == "autoloot" && #rate_at)? #rate_at+"" : ""); } } } end; }
  19. If the item is not really "repeatable", then you can look it by the id in the inarray. If it is, then we have to create an extra array with the EQP_* constants found in script_constants.hpp with the slots. - script Extra_ItemConf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* 1HSword */ add_item(13415,1, 111, 1, 1103, 1, 111, 5, 1106, 1, 111, 15, 1109, 1, 111, 25, 1112, 1, 111, 30, 1115, 1, 111, 60, 1122, 1, 111, 70, 1123, 1, 111, 80, 1126, 1, 111, 90, 1121, 1, 111, 100, 1129, 1, 111, 125, 13422, 1, 111, 150 ); // Espada 1H /* 2HSword */ add_item(1118, 1, 111, 5, 1153, 1, 111, 15, 1156, 1, 111, 25, 1160, 1, 111, 30, 1159, 1, 111, 60, 1163, 1, 111, 70, 1190, 1, 111, 100, 1188, 1, 111, 200 ); // Espada 2H /* 2HAxe */ add_item(1381, 1, 111, 1, 1353, 1, 111, 5, 1356, 1, 111, 15, 1359, 1, 111, 25, 1362, 1, 111, 30, 1388, 1, 111, 100, 1384, 1, 111, 200 ); // Machado 1H /* Maces */ add_item(1545, 1, 111, 1, 1503, 1, 111, 5, 1506, 1, 111, 15, 1509, 1, 111, 25, 1512, 1, 111, 30, 1521, 1, 111, 60, 1515, 1, 111, 70, 1518, 1, 111, 80, 1548, 1, 111, 200 ); // Maces 1H /* Arcos */ add_item(1742, 1, 111, 1, 1703, 1, 111, 5, 1706, 1, 111, 15, 1709, 1, 111, 25, 1712, 1, 111, 30, 1713, 1, 111, 60, 1714, 1, 111, 70, 1735, 1, 111, 80, 18128, 1, 111, 200 ); // Arcos /* Cajados */ add_item(1639, 1, 111, 1, 1603, 1, 111, 5, 1606, 1, 111, 15, 1609, 1, 111, 25, 1612, 1, 111, 30, 1614, 1, 111, 60, 1615, 1, 111, 80, 1636, 1, 111, 100); // Cajados /* 1HSpear */ add_item(1403, 1, 111,10, 1406, 1, 111,15, 1409, 1, 111, 30, 1430, 1, 111, 200); /* 2HSpear */ add_item(1453, 1, 111,20, 1456, 1, 111,30, 1459, 1, 111, 40, 1462, 1, 111, 50, 1465, 1, 111, 70, 1412, 1, 111, 100); /* Knuckles */ add_item(1801, 1, 111,20, 1803, 1, 111,30, 1805, 1, 111, 40, 1809, 1, 111, 50, 1811, 1, 111, 60, 1807, 1, 111, 70, 1814, 1, 111, 80, 1829, 1, 111, 100); /* Violin */ add_item(1901, 1, 111,20, 1903, 1, 111,30, 1905, 1, 111, 40, 1909, 1, 111, 50, 1911, 1, 111, 60, 1907, 1, 111, 80, 1925, 1, 111,100, 1918, 1, 111, 150); /* Whip */ add_item(1950, 1, 111,20, 1952, 1, 111,30, 1954, 1, 111, 40, 1958, 1, 111, 50, 1960, 1, 111, 60, 1958, 1, 111, 80, 1994, 1, 111,100); /* Katar */ add_item(1264, 1, 111,20, 1262, 1, 111,30, 1295, 1, 111, 40, 1250, 1, 111, 50, 1252, 1, 111, 60, 1283, 1, 111, 100); /* Debug */ add_item(2301, 1, 111, 1, 2302, 1, 111, 2); /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"ffffff", // % of evolution. "03fd20", // Wings evolving. "11f4cc"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], /*EQI_HAND_R,*/ EQI_HAND_L, EQI_ARMOR, EQI_SHOES, EQI_GARMENT; //============================================= end; OnNPCKillEvent: if([email protected]) { // Cache. That old loop on every mob killed... if(@evo_var[0] && isequipped(@evo_var[0])) { [email protected]_item = true; [email protected]_id = @evo_var[0]; [email protected] = @evo_var[1] - 1; [email protected] = @evo_var[2] - 1; [email protected] = @evo_var[3]; [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid != [email protected]_id && [email protected]_id > 1001) end; } else { [email protected] = getarraysize(.slots); while([email protected] < [email protected] && [email protected]_item) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1 && [email protected]_item) { [email protected] = 0; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { [email protected]_item = true; setarray @evo_var[0],[email protected]_id,[email protected] + 1,[email protected] + 1,[email protected]; } } else if([email protected]_id == [email protected]_evo) { end; } if([email protected]_item) [email protected]++; } if([email protected]_item) [email protected]++; } } } if([email protected]_item) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = getd("mobs_"[email protected]_id) + 1; setd "mobs_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "mobs_"[email protected]_id,0; } else if(getd(".it_mode_"[email protected]+"_"[email protected]) == 2) { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]item_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "exp_"[email protected]_id,0; } else { debugmes "Script Items_Evo, error: wrong mode."; end; } specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto && [email protected]) { @evolving = true; specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" está evoluindo...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; getinventorylist; [email protected] = inarray(@inventorylist_id,[email protected]_id); if([email protected] != -1) { if([email protected]_expire[[email protected]]) { setarray [email protected],@inventorylist_id[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]]; setarray [email protected],@inventorylist_option_id1[[email protected]],@inventorylist_option_id2[[email protected]],@inventorylist_option_id3[[email protected]],@inventorylist_option_id4[[email protected]],@inventorylist_option_id5[[email protected]]; setarray [email protected],@inventorylist_option_value1[[email protected]],@inventorylist_option_value2[[email protected]],@inventorylist_option_value3[[email protected]],@inventorylist_option_value4[[email protected]],@inventorylist_option_value5[[email protected]]; setarray [email protected],@inventorylist_option_parameter1[[email protected]],@inventorylist_option_parameter2[[email protected]],@inventorylist_option_parameter3[[email protected]],@inventorylist_option_parameter4[[email protected]],@inventorylist_option_parameter5[[email protected]]; [email protected] = @inventorylist_bound[[email protected]]; } else { @evolving = false; } if(@evolving) { [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); if(getarraysize([email protected])){ delitem3 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; if([email protected]) getitembound3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account,[email protected],[email protected],[email protected]; else getitem3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; } else { delitem2 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; if([email protected]) getitembound2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account; else getitem2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; } equip [email protected]_item; setd "evo_"[email protected]_id,0; deletearray @evo_var; announce "Parabéns!! Sua "+getitemname([email protected]_id)+" evoluiu para "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; @evolving = false; } } } } } end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } } Sometimes weird characters appear when you edit something. IDK why.
  20. It's because the script uses [email protected] for indexing which wing, and you added a loop which also uses [email protected] I changed the loop to use inarray and kept the rest like you did (just erased the other bits because they were confusing me). Tell me how it goes. - script Extra_ItemConf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* 1HSword */ add_item(13415,1, 111, 1, 1103, 1, 111, 5, 1106, 1, 111, 15, 1109, 1, 111, 25, 1112, 1, 111, 30, 1115, 1, 111, 60, 1122, 1, 111, 70, 1123, 1, 111, 80, 1126, 1, 111, 90, 1121, 1, 111, 100, 1129, 1, 111, 125, 13422, 1, 111, 150 ); // Espada 1H /* 2HSword */ add_item(1118, 1, 111, 5, 1153, 1, 111, 15, 1156, 1, 111, 25, 1160, 1, 111, 30, 1159, 1, 111, 60, 1163, 1, 111, 70, 1190, 1, 111, 100, 1188, 1, 111, 200 ); // Espada 2H /* 2HAxe */ add_item(1381, 1, 111, 1, 1353, 1, 111, 5, 1356, 1, 111, 15, 1359, 1, 111, 25, 1362, 1, 111, 30, 1388, 1, 111, 100, 1384, 1, 111, 200 ); // Machado 1H /* Maces */ add_item(1545, 1, 111, 1, 1503, 1, 111, 5, 1506, 1, 111, 15, 1509, 1, 111, 25, 1512, 1, 111, 30, 1521, 1, 111, 60, 1515, 1, 111, 70, 1518, 1, 111, 80, 1548, 1, 111, 200 ); // Maces 1H /* Arcos */ add_item(1742, 1, 111, 1, 1703, 1, 111, 5, 1706, 1, 111, 15, 1709, 1, 111, 25, 1712, 1, 111, 30, 1713, 1, 111, 60, 1714, 1, 111, 70, 1735, 1, 111, 80, 18128, 1, 111, 200 ); // Arcos /* Cajados */ add_item(1639, 1, 111, 1, 1603, 1, 111, 5, 1606, 1, 111, 15, 1609, 1, 111, 25, 1612, 1, 111, 30, 1614, 1, 111, 60, 1615, 1, 111, 80, 1636, 1, 111, 100); // Cajados /* 1HSpear */ add_item(1403, 1, 111,10, 1406, 1, 111,15, 1409, 1, 111, 30, 1430, 1, 111, 200); /* 2HSpear */ add_item(1453, 1, 111,20, 1456, 1, 111,30, 1459, 1, 111, 40, 1462, 1, 111, 50, 1465, 1, 111, 70, 1412, 1, 111, 100); /* Knuckles */ add_item(1801, 1, 111,20, 1803, 1, 111,30, 1805, 1, 111, 40, 1809, 1, 111, 50, 1811, 1, 111, 60, 1807, 1, 111, 70, 1814, 1, 111, 80, 1829, 1, 111, 100); /* Violin */ add_item(1901, 1, 111,20, 1903, 1, 111,30, 1905, 1, 111, 40, 1909, 1, 111, 50, 1911, 1, 111, 60, 1907, 1, 111, 80, 1925, 1, 111,100, 1918, 1, 111, 150); /* Whip */ add_item(1950, 1, 111,20, 1952, 1, 111,30, 1954, 1, 111, 40, 1958, 1, 111, 50, 1960, 1, 111, 60, 1958, 1, 111, 80, 1994, 1, 111,100); /* Katar */ add_item(1264, 1, 111,20, 1262, 1, 111,30, 1295, 1, 111, 40, 1250, 1, 111, 50, 1252, 1, 111, 60, 1283, 1, 111, 100); /* Debug */ add_item(2301, 1, 111, 1, 2302, 1, 111, 2); /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"ffffff", // % of evolution. "03fd20", // Wings evolving. "11f4cc"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], /*EQI_HAND_R,*/ EQI_HAND_L, EQI_ARMOR, EQI_SHOES, EQI_GARMENT; //============================================= end; OnNPCKillEvent: if([email protected]) { // Cache. That old loop on every mob killed... if(@evo_var[0] && isequipped(@evo_var[0])) { [email protected]_item = true; [email protected]_id = @evo_var[0]; [email protected] = @evo_var[1] - 1; [email protected] = @evo_var[2] - 1; [email protected] = @evo_var[3]; [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid != [email protected]_id && [email protected]_id > 1001) end; } else { [email protected] = getarraysize(.slots); while([email protected] < [email protected] && [email protected]_item) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1 && [email protected]_item) { [email protected] = 0; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { [email protected]_item = true; setarray @evo_var[0],[email protected]_id,[email protected] + 1,[email protected] + 1,[email protected]; } } else if([email protected]_id == [email protected]_evo) { end; } if([email protected]_item) [email protected]++; } if([email protected]_item) [email protected]++; } } } if([email protected]_item) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = getd("mobs_"[email protected]_id) + 1; setd "mobs_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "mobs_"[email protected]_id,0; } else if(getd(".it_mode_"[email protected]+"_"[email protected]) == 2) { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "exp_"[email protected]_id,0; } else { debugmes "Script Items_Evo, error: wrong mode."; end; } specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto && [email protected]) { @evolving = true; specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" está evoluindo...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; [email protected]; [email protected] = .slots[[email protected]]; getinventorylist; [email protected] = inarray(@inventorylist_equip,[email protected]); if([email protected] == -1) end; if([email protected]_expire[[email protected]]){ setarray [email protected],@inventorylist_id[[email protected]],@inventorylist_refine[[email protected]],@inventorylist_card1[[email protected]],@inventorylist_card2[[email protected]],@inventorylist_card3[[email protected]],@inventorylist_card4[[email protected]]; setarray [email protected],@inventorylist_option_id1[[email protected]],@inventorylist_option_id2[[email protected]],@inventorylist_option_id3[[email protected]],@inventorylist_option_id4[[email protected]],@inventorylist_option_id5[[email protected]]; setarray [email protected],@inventorylist_option_value1[[email protected]],@inventorylist_option_value2[[email protected]],@inventorylist_option_value3[[email protected]],@inventorylist_option_value4[[email protected]],@inventorylist_option_value5[[email protected]]; setarray [email protected],@inventorylist_option_parameter1[[email protected]],@inventorylist_option_parameter2[[email protected]],@inventorylist_option_parameter3[[email protected]],@inventorylist_option_parameter4[[email protected]],@inventorylist_option_parameter5[[email protected]]; [email protected] = @inventorylist_bound[[email protected]]; } else { end; } [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); if(getarraysize([email protected])){ delitem3 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; if([email protected]) getitembound3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account,[email protected],[email protected],[email protected]; else getitem3 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],[email protected],[email protected],[email protected]; } else { delitem2 [email protected][0],1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; if([email protected]) getitembound2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5],Bound_Account; else getitem2 [email protected]_item,1,1,[email protected][1],0,[email protected][2],[email protected][3],[email protected][4],[email protected][5]; } equip [email protected]_item; setd "evo_"[email protected]_id,0; deletearray @evo_var; announce "Parabéns!! Sua "+getitemname([email protected]_id)+" evoluiu para "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; @evolving = false; } } } end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } }
  21. Change it to: [email protected] = getd("mobs_"[email protected]_id) + 1; Sorry.
  22. n0tttt

    Item party bonus

    It's a recent command: https://github.com/rathena/rathena/commit/78edf851a00d61dbf3a6668c6f21f1dd1cbb6c45 Thank you for testing my script. It's a shame the two methods you tested didn't work. The only way I can think now is by using sc_start, but it would overlap with other buffs... - script bonus_party -1,{ OnPCStatCalcEvent: [email protected]_id = 1201; [email protected] = getcharid(1); [email protected] = getcharid(3); if(isequipped([email protected]_id) && [email protected]) { [email protected]_leader = is_party_leader(); getpartymember [email protected],1,[email protected]_cid; getpartymember [email protected],2,[email protected]_aid; [email protected] = [email protected]; for(;[email protected] < [email protected];[email protected]++) { if(isloggedin([email protected]_aid[[email protected]],[email protected]_cid[[email protected]])) { [email protected]++; if([email protected]_leader && [email protected]_aid[[email protected]] != [email protected]) { if(attachrid([email protected]_aid[[email protected]])) { [email protected] = getstatus(SC_INCALLSTATUS,5); if([email protected] <= 10000) { sc_start SC_INCALLSTATUS,60000,max(1,getstatus(SC_INCALLSTATUS,1) + [email protected]_bonus); if([email protected]) @party_bonus = true; } } } } } attachrid [email protected]; //sc_start SC_INCSTR,60000,[email protected]; bonus bStr,[email protected]; } end; } Edit: just did a little change (idk if it works) in case the player already had that buff, the script will sum +1 to avoid overwriting. Hope it works (can't test, I don't have a test server).
  23. n0tttt

    Add check for bounded items

    setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for( set [email protected],1; [email protected] <= 10; set [email protected],[email protected]+1 ) { if( getequipisequiped([email protected][[email protected]]) ) set [email protected]$, [email protected]$ + F_getpositionname([email protected][[email protected]]) + " - [ " + getequipname([email protected][[email protected]]) + " ]"; set [email protected]$, [email protected]$ + ":"; } set [email protected], [email protected][ select([email protected]$) ]; if(!getequipisequiped([email protected])) { mes "[ ^04B4AEIsaac^000000 ]"; mes "Young one... Your not wearing anything there that I can remove cards from."; end; } set [email protected],getequipcardcnt([email protected]); if([email protected] == 0) { mes "[ ^04B4AEIsaac^000000 ]"; mes "Young one... There are no cards compounded on this item. I can do nothing with it, I'm afraid."; end; } if (!checkweight(1202,([email protected]+1))) { mes "^3355FFJust a minute!"; mes "I can't offer any of my"; mes "services to you because"; mes "you're carrying too much"; mes "stuff. Put your extra items in"; mes "Kafra Storage and come again~"; end; } countbound; [email protected] = getarraysize(@bound_items); [email protected] = getquipid([email protected]); for([email protected] = 0;[email protected]< [email protected];[email protected]++) { if(@bound_items[[email protected]] == [email protected]) { mes "This item is bounded."; close; } }
  24. How didn't I see this post... Anyways here's a fixed version of the script I made on a PM. I edited it because it looks better and more readable this way. - script Items_Conf -1,{ function add_item; OnInit: /* add_item(id, evolution mode, monster id, amount, id...); If you want any monster, use 111. Evolution modes: 1 = Every X numer of mobs (1%). 2 = Experience (1%). */ /* Adaga */ add_item(13040,1, 111, 1, 1203, 1, 111, 5, 1206, 1, 111, 15, 1209, 1, 111, 25, 1212, 1, 111, 30, 1215, 1, 111, 60, 1218, 1, 111, 70, 1221, 1, 111, 80, 1222, 1, 111, 90, 13048, 1, 111, 150 ); // Adaga /* 1HSword */ add_item(13415,1, 111, 1, 1103, 1, 111, 5, 1106, 1, 111, 15, 1109, 1, 111, 25, 1112, 1, 111, 30, 1115, 1, 111, 60, 1122, 1, 111, 70, 1123, 1, 111, 80, 1126, 1, 111, 90, 1121, 1, 111, 100, 1129, 1, 111, 125, 13422, 1, 111, 150 ); // Espada 1H /* 2HSword */ add_item(1118, 1, 111, 5, 1153, 1, 111, 15, 1156, 1, 111, 25, 1160, 1, 111, 30, 1159, 1, 111, 60, 1163, 1, 111, 70, 1190, 1, 111, 100, 1188, 1, 111, 200 ); // Espada 2H /* 2HAxe */ add_item(1381, 1, 111, 1, 1353, 1, 111, 5, 1356, 1, 111, 15, 1359, 1, 111, 25, 1362, 1, 111, 30, 1388, 1, 111, 100, 1384, 1, 111, 200 ); // Machado 1H /* Maces */ add_item(1545, 1, 111, 1, 1503, 1, 111, 5, 1506, 1, 111, 15, 1509, 1, 111, 25, 1512, 1, 111, 30, 1521, 1, 111, 60, 1515, 1, 111, 70, 1518, 1, 111, 80, 1548, 1, 111, 200 ); // Maces 1H /* Arcos */ add_item(1742, 1, 111, 1, 1703, 1, 111, 5, 1706, 1, 111, 15, 1709, 1, 111, 25, 1712, 1, 111, 30, 1713, 1, 111, 60, 1714, 1, 111, 70, 1735, 1, 111, 80, 18128, 1, 111, 200 ); // Arcos /* Cajados */ add_item(1639, 1, 111, 1, 1603, 1, 111, 5, 1606, 1, 111, 15, 1609, 1, 111, 25, 1612, 1, 111, 30, 1614, 1, 111, 60, 1615, 1, 111, 80, 1636, 1, 111, 100); // Cajados /* 1HSpear */ add_item(1403, 1, 111,10, 1406, 1, 111,15, 1409, 1, 111, 30, 1430, 1, 111, 200); /* 2HSpear */ add_item(1453, 1, 111,20, 1456, 1, 111,30, 1459, 1, 111, 40, 1462, 1, 111, 50, 1465, 1, 111, 70, 1412, 1, 111, 100); /* Knuckles */ add_item(1801, 1, 111,20, 1803, 1, 111,30, 1805, 1, 111, 40, 1809, 1, 111, 50, 1811, 1, 111, 60, 1807, 1, 111, 70, 1814, 1, 111, 80, 1829, 1, 111, 100); /* Violin */ add_item(1901, 1, 111,20, 1903, 1, 111,30, 1905, 1, 111, 40, 1909, 1, 111, 50, 1911, 1, 111, 60, 1907, 1, 111, 80, 1925, 1, 111,100, 1918, 1, 111, 150); /* Whip */ add_item(1950, 1, 111,20, 1952, 1, 111,30, 1954, 1, 111, 40, 1958, 1, 111, 50, 1960, 1, 111, 60, 1958, 1, 111, 80, 1994, 1, 111,100); /* Katar */ add_item(1264, 1, 111,20, 1262, 1, 111,30, 1295, 1, 111, 40, 1250, 1, 111, 50, 1252, 1, 111, 60, 1283, 1, 111, 100); /* Debug */ /* 0 = Won't be evolved automatically. 1 = Will be evolved automatically */ .auto = 1; /* Color of the announces. */ setarray .c$[0],"09e2f9", // % of evolution. "d43438", // Wings evolving. "e2f909"; // Wings evolved. /* slots to check. EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 */ setarray .slots[0], EQI_HAND_R, EQI_HAND_L; //============================================= end; OnNPCKillEvent: if([email protected]) { // Cache. That old loop on every mob killed... if(@evo_var[0] && isequipped(@evo_var[0])) { [email protected]_item = true; [email protected]_id = @evo_var[0]; [email protected] = @evo_var[1] - 1; [email protected] = @evo_var[2] - 1; [email protected] = @evo_var[3]; [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid != [email protected]_id && [email protected]_id > 1001) end; } else { [email protected] = getarraysize(.slots); while([email protected] < [email protected] && [email protected]_item) { [email protected]_id = getequipid(.slots[[email protected]]); [email protected]++; if([email protected]_id < 0) continue; [email protected] = 0; while([email protected] < .w1 && [email protected]_item) { [email protected] = 0; while([email protected] < .w2[[email protected]] && [email protected]_item) { [email protected]_evo = getd(".it_id_"[email protected]+"_"[email protected]); if([email protected]_id == [email protected]_evo && getd(".it_id_"[email protected]+"_"+([email protected] + 1))) { [email protected]_id = getd(".it_mob_"[email protected]+"_"[email protected]); if(killedrid == [email protected]_id || [email protected]_id < 1001) { [email protected]_item = true; setarray @evo_var[0],[email protected]_id,[email protected] + 1,[email protected] + 1,[email protected]; } } else if([email protected]_id == [email protected]_evo) { end; } if([email protected]_item) [email protected]++; } if([email protected]_item) [email protected]++; } } } if([email protected]_item) { if(getd(".it_mode_"[email protected]+"_"[email protected]) == 1) { [email protected] = ++getd("mobs_"[email protected]_id); setd "mobs_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "mobs_"[email protected]_id,0; } else if(getd(".it_mode_"[email protected]+"_"[email protected]) == 2) { [email protected] = getd("exp_"[email protected]_id) + strmobinfo(6,killedrid); setd "exp_"[email protected]_id,[email protected]; if([email protected] < getd(".it_amt_"[email protected]+"_"[email protected])) end; setd "exp_"[email protected]_id,0; } else { debugmes "Script Items_Evo, error: wrong mode."; end; } specialeffect2 EF_BEGINSPELL6; sleep2 rand(190,280); specialeffect2 EF_ENERGYDRAIN3; [email protected] = getd("evo_"[email protected]_id); if([email protected] < 100) { setd "evo_"[email protected]_id,[email protected]; announce getitemname([email protected]_id)+": "[email protected]+"%.",bc_self,"0x"+.c$[0]; } if([email protected] >= 100 && .auto && [email protected]) { @evolving = true; specialeffect2 EF_GUMGANG3; sleep2 500; specialeffect2 EF_BASH3D2; sleep2 300; specialeffect2 EF_BLUEBODY; sleep2 300; announce getitemname([email protected]_id)+" is evolving...",bc_self,"0x"+.c$[1]; [email protected] = 3; while([email protected]) { specialeffect2 EF_DOUBLECASTBODY; sleep2 900; } specialeffect2 EF_STORMKICK5; sleep2 200; specialeffect2 EF_BUBBLE_DROP; sleep2 500; [email protected]; setarray [email protected][1],getequipcardid(.slots[[email protected]],0),getequipcardid(.slots[[email protected]],1),getequipcardid(.slots[[email protected]],2),getequipcardid(.slots[[email protected]],3); [email protected] = getequiprefinerycnt(.slots[[email protected]]); if(getiteminfo([email protected]_id,2) == IT_WEAPON) { for([email protected] = 0;[email protected] < 5;[email protected]++) { [email protected]_id[[email protected]] = getequiprandomoption(.slots[[email protected]],[email protected],ROA_ID); [email protected]_val[[email protected]] = getequiprandomoption(.slots[[email protected]],[email protected],ROA_VAL); if([email protected]_option && [email protected]_val[[email protected]])) [email protected]_option = true; } } [email protected]_item = getd(".it_id_"[email protected]+"_"+([email protected] + 1)); delequip .slots[[email protected]]; if([email protected]_option) getitembound3 [email protected]_item,1,true,[email protected],false,[email protected][1],[email protected][2],[email protected][3],[email protected][4],Bound_Char,[email protected]_id,[email protected]_val,0; else getitembound2 [email protected]_item,1,true,[email protected],false,[email protected][1],[email protected][2],[email protected][3],[email protected][4],Bound_Char; equip [email protected]_item; setd "evo_"[email protected]_id,0; deletearray @evo_var; announce "Congratulations, your "+getitemname([email protected]_id)+" has evolved to "+getitemname([email protected]_item)+".",bc_self,"0x"+.c$[2]; @evolving = false; } } } end; function add_item { for([email protected] = getargcount();[email protected] < [email protected];[email protected]+= 4) { [email protected] = .w2[.w1]++; setd ".it_id_"+.w1+"_"[email protected],getarg([email protected]); // id. if(getarg([email protected] + 4,0) != 0) { setd ".it_mode_"+.w1+"_"[email protected],getarg([email protected] + 1); // mode. setd ".it_mob_"+.w1+"_"[email protected],getarg([email protected] + 2); // mob id. setd ".it_amt_"+.w1+"_"[email protected],getarg([email protected] + 3); // amount. } } .w1++; } } Based on ||chris|| snippet, since I don't really know about the random options system.
  25. View File Event Manager This is an event manager I made. The events are of public knowledge (there aren't many ways to do good events and these are the ones I found to be the best, at the moment I wrote up the script), and I inspired myself from them. Here's the list of events it has as of now. Have fun! I can add some events if you like to. I considered some myself (like MvP vs MvP) but they offered little gameplay experience to do so. I can reconsider though! Avaiaible events: - Dices. - Find the Porings. - Escape from the Bombrings. - Guess the Monster. - Pick the Candy. - Devil Square. - Cluckers. Features: - Easy addition of events. - Random queue system which players can check with @events command. - Automatic joining with @event command. - Can manually start & end events (forcing them to end). - Events can have a limited amount of players. - Events have a limited time to let players register before they start. - Configurable prizes. I must give credits to sandbox, Stolao, and AnnieRuru for all the events I found, Thank you guys! If you buy, you accept this: You cannot redistribute this, less as your own. You can modify it as you like, however, in order to receive proper support, you must tell me what you modified. Submitter n0tttt Submitted 05/16/2017 Category Games, Events, Quests Video Content Author n0tttt, but based on public events.