Jump to content

jeffsaber

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jeffsaber's Achievements

Poring

Poring (1/15)

  • Dedicated
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Hello. I'm trying to make an NPC script that allows a player to "Disassemble" specific items from their inventory (not equipped), and will yield results depending on the following factors: 1. Item Tier - Depending on the ItemID. Determines whether the item to be disassembled belongs to the following: > Soul Weapons > Advanced Soul Weapons > Easter Egg Quest Reward Weapons > Faction Weapons > Valkyrie Equipment > Diabolus Equipment > Sinister Equipment > Dual-Slotted Armors > Faction Equipment > Ubergarments > Advanced Headgear > Geffen Magic Tournament Equipment > Upgraded Geffen Magic Tournament Equipment 2. Refine Level - Depending on refine level, either the amount or rate at which better items are yielded via disassembling the item increases. 3. Compounded Cards and Enhancements - Depending on the rarity and level of enhancements, either the amount or rate at which better items are yielded via disassembling the item increases. 4. Faction (Clan) Alignment - Depending on which Faction the player belongs to, changes the possible item yield of the disassembly process. If the player is Neutral (No Faction), then there is no change. I may have realized mid-way through writing the initial settings that I may have gotten into something that's way above my skill level in code (I'm still pretty much a newbie at scripting), and am in need of assistance regarding this matter. Here's what I've done so far, and where I am currently stuck at. setarray .@itemtier[0],1283,1323,1489,1746,1830,1935,1992,2007,2115,2185,2186,2357,2361,2362,2363,2374,2375,2410,2421,2433,2524,2537,2632,2633,2750,2792,2793,5013,5171,5297,5373,5762,5808,13076,13088,13115,13431,15073,15074,15146,15177,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,28605,28913,39000,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39016,39017,39018,39019,39020,39021,39022,39023,39024,39025,39026,39027,39028,39029,39030,39032,39033,39034,39035,39036,39037,39038,39039,39040,39041,39046,39047,39048,39049,39050,39051,39052,39053,39054,39055,39056,40001,40003,40004,40005,40007,40008,40009,40010,10011,40012,40013,40014,40015,40016,40017,40018,40021,40023,40024,40025,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40041,40043,40044,40045,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40100,40101,40102,40103,40105,40109,40110,40111,40112,40200,40201,40202,40203; set .@itemtcount,getarraysize(.@itemtier); getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if (@inventorylist_id[.@i] == .@itemtier[.@h] && @inventorylist_equip[.@i] == 0 && @inventorylist_refine[.@i] < 11 && @inventorylist_card1[.@i] >= 0 && @inventorylist_card2[.@i] >= 0 && @inventorylist_card3[.@i] >= 0 && @inventorylist_card4[.@i] >= 0){ for ( .@j = 0; .@j < @inventorylist_count; .@j++ ) { set .@blender[.@j],@inventorylist_id[.@i]; set .@blender$[.@j],getitemname(@inventorylist_id[.@i]); set .@blendref[.@j],@inventorylist_refine[.@i]; set .@blendc1[.@j],@inventorylist_card1[.@i]; set .@blendc2[.@j],@inventorylist_card2[.@i]; set .@blendc3[.@j],@inventorylist_card3[.@i]; set .@blendc4[.@j],@inventorylist_card4[.@i]; } } } set .@blen1,getarraysize(.@blender); set .@blen2,getarraysize(.@blendref); set .@blen3,getarraysize(.@blendc1); set .@blen4,getarraysize(.@blendc2); set .@blen5,getarraysize(.@blendc3); set .@blen6,getarraysize(.@blendc4); set .@blendsize,getarraysize(.@blender$); set .@blend$,implode(.@blender$, ":"); .@j = select( .@blend$ ) - 1; Getting confused with the looping process that's supposed to check if the items in the player's inventory (@inventorylist_id) matches the items in the "Able to Disassemble" itemID list (.@itemtier), and double-checks with getinventorylist if the above criteria for the disassembly process are met. I couldn't wrap my head around that looping process, but then there's the issue of displaying every single item in the player's inventory that are able to be disassembled into the NPC's menu (.@blend$). I couldn't set the other parameters (e.g. the player's alignment via getcharid(5) or query_sql("SELECT `clan_id` FROM `char` WHERE `char_id` = '"+getcharid(0)+"'");, and the item yield from the process itself) and add NPC flair, such as dialogue, unless I get past this hurdle lol Thank you in advance, and sorry for being an overbearing newbie ?
  2. So, I've been working on two instance scripts, both having been redone from scratch and reiterated for god knows how many times already across a week... I'm already confused and on the verge of giving up entirely, but maybe I'm just too stressed out to realize a simple syntax error or two. As of now, both scripts show no error whatsoever in the logs, but both still don't work. Script A: plazuda,148,112,3 script Plazuda 111,{ end; OnInstanceInit: instance_announce 1,"Clear all monsters to proceed.",bc_map; areamonster instance_mapname("plazuda"),130,92,167,131,"Iruna Orc",1850,50,instance_npcname("Plazuda")+"::OnKill"; end; OnKill: set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("Plazuda")+"::OnKill"); if (.@mob_dead_num > 49){ instance_announce 1,"Next wave will crash in 5 seconds.",bc_map; sleep2 5000; enablenpc instance_npcname("PlazudaInstance"); end; } } plazuda,148,112,3 script PlazudaInstance 111,{ end; OnInstanceInit: disablenpc instance_npcname("PlazudaInstance"); end; OnEnable: instance_announce 1,"Clear all monsters to proceed.",bc_map; areamonster instance_mapname("plazuda"),130,92,167,131,"Malfil",3456,50,instance_npcname("PlazudaInstance")+"::OnKill"; end; OnKill: set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("PlazudaInstance")+"::OnKill"); if (.@mob_dead_num > 49){ instance_announce 1,"Next wave will crash in 5 seconds.",bc_map; sleep2 5000; enablenpc instance_npcname("PlazudaInstance#2"); end; } } plazuda,148,112,3 script PlazudaInstance#2 111,{ end; OnInstanceInit: disablenpc instance_npcname("PlazudaInstance#2"); end; OnEnable: instance_announce 1,"Clear all monsters to proceed.",bc_map; areamonster instance_mapname("plazuda"),130,92,167,131,"Malfil",3456,75,instance_npcname("PlazudaInstance#2")+"::OnKill"; end; OnKill: set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("PlazudaInstance#2")+"::OnKill"); if (.@mob_dead_num > 74){ instance_announce 1,"Plazuda will re-emerge from the old Magic Institute Core in 5 seconds.",bc_map; sleep2 5000; enablenpc instance_npcname("PlazudaInstance#3"); end; } } plazuda,148,112,3 script PlazudaInstance#3 111,{ end; OnInstanceInit: disablenpc instance_npcname("PlazudaInstance#3"); end; OnEnable: instance_announce 1,"Defeat Plazuda.",bc_map; monster instance_mapname("plazuda"),147,104,"Dark-Enchanted Plazuda",2131,1,instance_npcname("PlazudaInstance#3")+"::OnKill"; end; OnKill: set .@mob_dead_num,mobcount(instance_mapname("plazuda"),instance_npcname("PlazudaInstance#3")+"::OnKill"); if (.@mob_dead_num > 0){ instance_announce 1,"Plazuda has been defeated.",bc_map; sleep2 3000; instance_announce 1,"Instance will close in 20 seconds.",bc_map; sleep2 20000; instance_destroy; end; } Script B: 1@dth2,16,105,3 script Memory of Mezzaluna 1689,{ set talk,0; if(!instance_id()){ end; } else { if (talk < 1 && talk2 < 1){ mes "[Fallen Empress Mezzaluna]"; mes "Please help me get over my past..."; close2; set talk,1; set talk2,1; set gryps,0; set guard,0; set evil,0; hideonnpc "Slebinian Statue"; hideonnpc "Slebinian Statue#1"; hideonnpc "Slebinian Statue#2"; hideonnpc "Slebinian Statue#3"; hideonnpc "Slebinian Statue#4"; areamonster instance_mapname("1@dth2"),98,42,250,175,"Gryps",1447,50,"Memory of Mezzaluna::OnGrypsKill"; areamonster instance_mapname("1@dth2"),98,42,250,175,"Slebinian Royal Guard",1805,5,"Memory of Mezzaluna::OnGuardKill"; end; } } OnGrypsKill: set gryps,gryps+1; .@i = 50-gryps; if (.@i > 0 && .@i < 50){ announce .@i+" Gryps remain.",0; end; } if (.@i < 1 && .@j > 0){ instance_announce 0,"Find Slebinian Royal Guards and collect their Evil Hearts!",0; end; } else if (.@i < 1 && .@j < 1){ instance_announce 0,"Find and activate the Slebinian Statues!",0; hideoffnpc "Slebinian Statue"; hideoffnpc "Slebinian Statue#1"; hideoffnpc "Slebinian Statue#2"; hideoffnpc "Slebinian Statue#3"; hideoffnpc "Slebinian Statue#4"; end; } OnGuardKill: set guard,guard+1; .@j = 5-guard; if (.@j > 0 && .@j < 5){ instance_announce 0,"You've killed a Slebinian Royal Guard! Get his Evil Heart to activate a Slebinian Statue!",0; end; } if (.@i > 0 && .@j < 1){ instance_announce 0,"Find and kill all the remaining Gryps to continue.",0; end; } else if (.@i < 1 && .@j < 1){ instance_announce 0,"Find and activate the Slebinian Statues!",0; hideoffnpc "Slebinian Statue"; hideoffnpc "Slebinian Statue#1"; hideoffnpc "Slebinian Statue#2"; hideoffnpc "Slebinian Statue#3"; hideoffnpc "Slebinian Statue#4"; end; } OnMezzKill: hideoffnpc "Memory of Mezzaluna#1"; set talk,2; end; } 1@dth2,111,93,3 script Slebinian Statue 111,{ if (evil < 1 && .@i < 1 && .@j < 1){ mes "You put an Evil Heart near the statue, and you feel something ominous."; close2; delitem 7583,1; set evil,1; end; } else if (evil != 0 && .@i > 0 || .@j > 0){ mes "Collect Evil Hearts and clear all monsters first to activate this statue."; close; end; } } 1@dth2,127,46,3 script Slebinian Statue#1 111,{ if (evil > 0 && evil < 2 && .@i < 1 && .@j < 1){ mes "You put an Evil Heart near the statue, and you feel something ominous."; close2; delitem 7583,1; set evil,2; end; } else if (evil != 1 && .@i > 0 || .@j > 0){ mes "Collect Evil Hearts, clear all monsters and find the other statues first."; close; end; } } 1@dth2,143,120,3 script Slebinian Statue#2 111,{ if (evil > 1 && evil < 3 && .@i < 1 && .@j < 1){ mes "You put an Evil Heart near the statue, and you feel something ominous."; close2; delitem 7583,1; set evil,3; end; } else if (evil != 2 && .@i > 0 || .@j > 0){ mes "Collect Evil Hearts, clear all monsters and find the other statues first."; close; end; } } 1@dth2,216,98,3 script Slebinian Statue#3 111,{ if (evil > 2 && evil < 4 && .@i < 1 && .@j < 1){ mes "You put an Evil Heart near the statue, and you feel something ominous."; close2; delitem 7583,1; set evil,4; end; } else if (evil != 3 && .@i > 0 || .@j > 0){ mes "Collect Evil Hearts, clear all monsters and find the other statues first."; close; end; } } 1@dth2,233,103,3 script Slebinian Statue#4 111,{ if (evil > 3 && evil < 5 && .@i < 1 && .@j < 1){ mes "You put an Evil Heart near the statue, and you feel something ominous."; next; mes "[Empress Mezzaluna]"; mes "Help me..."; close2; delitem 7583,1; monster instance_mapname("1@dth2"),314,104,"Empress Mezzaluna",1689,1,"Memory of Mezzaluna::OnMezzKill"; instance_announce 0,"The spirit of the fallen Slebinian Empress Mezzaluna II has appeared! Proceed further and defeat her!",0,"0x00ff99"; end; } else if (evil != 4 && .@i > 0 || .@j > 0){ mes "Collect Evil Hearts, clear all monsters and find the other statues first."; close; end; } } 1@dth2,327,115,3 script Memory of Mezzaluna#1 1689,{ if (talk != 2){ end; } else { mes "[Fallen Empress Mezzaluna]"; mes "Thank you, brave one."; next; mes "[Fallen Empress Mezzaluna]"; mes "My good friend, the High Empress of Iruna's hard choice would've been for nothing if you didn't come here to help..."; next; mes "[Fallen Empress Mezzaluna]"; mes "With the last of my powers, I can take you back to where you came from."; next; mes "[Fallen Empress Mezzaluna]"; mes "Hold on tight..."; close2; set talk,0; set talk2,0; instance_destroy; end; } OnInstanceDestroy: hideonnpc "Memory of Mezzaluna#1"; end; } Not asking for much, but can anyone help out a struggler here just by checking a few lines of code? Thank you, everyone.
  3. Hi, it's my first time asking stuff over here. I am confused at this error: This is a regular hit on an emperium, using dual wielded daggers on SinX. It's fine as is when using any of the combinations of these three items: Axe/Sword/Dagger Also works on Dagger+Shield exclusively But when it comes to all other weapon (and job) combinations, it all falls apart. Sniper||Bow SinX/Lord Knight||[(Katar)/(Sword||Shield)/(Axe||Shield)]/[(Sword||Shield)/(Spear||Shield)] Champion||Fist My Emperium stats are as follows: Keep in mind this is all with elemental modifiers (Shadow) and [Enchant Deadly Poison] As far as I remember playing Ragnarok way back, breakers aren't just all SinX. So, why does this error exist, and how do I fix it? Thanks ? EDIT: Forgot to mention PRE-RE, bordering on Medium High to Super High Rate. EDIT2: Katars don't work either
×
×
  • Create New...