// TMW Script. // Author: // Jesusalva // Notes: // Christmas 2021 - Extra NPCs & Code Injection 081-1,82,68,0 script Nut Cracker NPC330,{ @npcname$ = "Nut Cracker"; Banker(); close; OnInit: .distance=5; end; } 081-1,69,82,0 script Ol' Reset NPC329,{ @npcname$ = "Ol' Reset"; StatReset(); close; OnInit: .distance=5; end; } 081-1,57,49,0 script Soul Menhir#Aethyr NPC346,{ @map$ = "081-1"; setarray @Xs, 54, 54, 54, 55, 55, 55, 56; setarray @Ys, 52, 53, 54, 52, 53, 54, 54; @x = 0; @y = 0; callfunc "SoulMenhir"; @map$ = ""; cleararray @Xs[0], 0, 7; cleararray @Ys[0], 0, 7; @x = 0; @y = 0; close; OnInit: .distance=5; end; } 081-1,60,91,0 script TMW Evolved Guide NPC356,{ mesn; mes "\""+l("Hello, and welcome to The Mana World: Evolved."); mes l("This is the server which will eventually take over TMW Legacy.")+"\""; next; mesn; mesq l("A few things are different here, you can read [@@https://wiki.themanaworld.org/index.php/Legacy:TMW_Evolved|on the wiki@@] some of the major differences."); select l("Thanks."), l("Learn more"); mes ""; if (@menu == 1) { closeclientdialog; close; } mesn; mesq l("For starters, magic skills are on F5 tab and no longer can be cast from chat. Drag'n'Drop them to the shortcut bars to use. You can also level them up if you have the points."); next; mesn; mesq l("To use magic, first select the target, and use the skill to unleash the magical attack. The next attack will only come when you use the skill again; unfortunately, it is NOT automatic."); next; mesn; mesq l("If you have unspent status points, you can level them up to 100. Focus skills work sightly different than on TMW Legacy. YOU NEED TO REFOCUS them!"); next; mesn; mesq l("Your weight limit is a bit larger, but if it reaches 90% you will no longer be able to attack, so be careful."); next; mesn; mesq l("When you die, you'll be taken to the Soul Menhir you touched last. There is a Soul Menhir nearby, I advise touching it as soon as possible."); next; mesn; mesq l("Experience acquired here will be carried over to TMW Legacy once the event ends, as well as the event rewards. You can exchange the %s with GM Santa, the GM Team will be publishing the rules in turning these in level ups or ultra rare hats shortly.", getitemlink(Carrot)); next; mesn; mesq l("The \"#world\" chat tab is bridged to #themanaworld-dev on IRC and Discord, you can quickly get in touch with the whole community and report bugs using it."); next; mesn; mesq l("Also, you may wish to use \"@resync\" or \"@resyncall\" if the monsters appear to vanish. That's mostly all, thanks for playing The Mana World. Contact staff if you need further assistance!"); close; OnInit: .distance=5; .sex = G_FEMALE; end; } 081-1,47,74,0 script Focus Master NPC328,{ while (true) { @pool = getskilllv(SKILL_POOL); @mallard = getskilllv(SKILL_MALLARDS_EYE); @brawling = getskilllv(SKILL_BRAWLING); @speed = getskilllv(SKILL_SPEED); @poison = getskilllv(SKILL_RESIST_POISON); @astralsoul = getskilllv(SKILL_ASTRAL_SOUL); @raging = getskilllv(SKILL_RAGING); mesn; mes "Your focusing skill level is " + @pool + "."; mes "Your mallard's eye skill level is " + @mallard + "."; mes "Your brawling skill level is " + @brawling + "."; mes "Your speed skill level is " + @speed + "."; mes "Your resist poison skill level is " + @poison + "."; mes "Your astral soul skill level is " + @astralsoul + "."; mes "Your raging skill level is " + @raging + "."; next; mes ""; mes l("Focus list:"); mesc l("%s : %s", l("Mallard's Eye"), (isfocused(SKILL_MALLARDS_EYE) ? l("Yes") : l("No"))); mesc l("%s : %s", l("Brawling"), (isfocused(SKILL_BRAWLING) ? l("Yes") : l("No"))); mesc l("%s : %s", l("Speed"), (isfocused(SKILL_SPEED) ? l("Yes") : l("No"))); mesc l("%s : %s", l("Resist Ailment"), (isfocused(SKILL_RESIST_POISON) ? l("Yes") : l("No"))); mesc l("%s : %s", l("Astral Soul"), (isfocused(SKILL_ASTRAL_SOUL) ? l("Yes") : l("No"))); mesc l("%s : %s", l("Raging"), (isfocused(SKILL_RAGING) ? l("Yes") : l("No"))); .@t=getactivatedpoolskilllist(); menuint l("Back"), 0, ("Toggle Focus - Mallards Eye"), SKILL_MALLARDS_EYE, ("Toggle Focus - Brawling"), SKILL_BRAWLING, ("Toggle Focus - Speed"), SKILL_SPEED, ("Toggle Focus - Resist Ailment"), SKILL_RESIST_POISON, ("Toggle Focus - Astral Soul"), SKILL_ASTRAL_SOUL, ("Toggle Focus - Raging"), SKILL_RAGING; mes ""; if (@menuret) { if (FOCUSING & getpoolskillFID(@menuret)) { unpoolskill(@menuret); mesc "Focus removed", 1; } else { .@s = poolskill(@menuret); if (.@s) mesc "Focus added", 2; else mesc sprintf("Impossible to focus. You can only focus %d skills at a time.", .@t), 1; } } else { break; } } mes ""; mesn; mesq l("Come back again!"); close; OnInit: .distance=5; end; } 081-2,90,288,0 script #X21ADMIN NPC_NO_SPRITE,{ if (instance_id() < 0) end; if (!is_gm() && !is_admin()) goto L_Auto; clear; do { mes "Dungeon config"; mes "--------------------"; mesf("Puzzle 01: %d", 'XMAS21CANDLE); mesf("Puzzle 02: %d", 'XMAS21TREE); mesf("Puzzle 03: %d", 'XMAS21AMBUSH); mes ""; mesf("Puzzle 01 Gate: %d", checkcell(getmap(), 105, 212, cell_chkpass)); mesf("Puzzle 02 Gate: %d", checkcell(getmap(), 127, 128, cell_chkpass)); mesf("Puzzle 03 Gate: %d", checkcell(getmap(), 49, 72, cell_chkpass)); mes ""; mesf("Boss Chamber Lock: %d", 'LOCKD); mes ""; select "Close", "Toggle Candle", "Toggle Tree", "Toggle Ambush", "Unlock Boss Chamber", "Renew Instance", "Refresh gates"; mes ""; switch (@menu) { case 2: 'XMAS21CANDLE = !'XMAS21CANDLE; logmes("X21CANDLE", LOGMES_ATCOMMAND); break; case 3: 'XMAS21TREE = !'XMAS21TREE; logmes("X21TREE", LOGMES_ATCOMMAND); break; case 4: 'XMAS21AMBUSH = !'XMAS21AMBUSH; logmes("X21AMBUSH", LOGMES_ATCOMMAND); break; case 5: 'LOCKD = false; logmes("X21LOCK", LOGMES_ATCOMMAND); break; case 6: instance_set_timeout(1800, 1800); break; case 7: closeclientdialog; goto L_Auto; break; } } while (@menu != 1); closeclientdialog; close; L_Auto: /* Attempt to fix Candle state */ if (!'XMAS21CANDLE) { if (checkcell(getmap(), 105, 212, cell_chkpass)) setcells getmap(), 103, 211, 107, 212, 1, "X21L1@"+X21ID(); } else { if (!checkcell(getmap(), 105, 212, cell_chkpass)) delcells "X21L1@"+X21ID(); } /* Attempt to fix Seeds state */ if (!'XMAS21TREE) { if (checkcell(getmap(), 127, 128, cell_chkpass)) setcells getmap(), 124, 127, 131, 128, 1, "X21L2@"+X21ID(); } else { if (!checkcell(getmap(), 127, 128, cell_chkpass)) delcells "X21L2@"+X21ID(); } /* Attempt to fix Ambush state */ if (!'XMAS21AMBUSH) { if (checkcell(getmap(), 49, 72, cell_chkpass)) setcells getmap(), 47, 71, 51, 72, 1, "X21L3@"+X21ID(); } else { if (!checkcell(getmap(), 49, 72, cell_chkpass)) delcells "X21L3@"+X21ID(); } end; OnInit: .distance=1; end; } /* I hate this, but bugs must die, incl. M+ ones */ 081-2,108,214,0 script Button#X21chA1 NPC_NO_SPRITE,{ @inst = instance_id() + 1; if (!'XMAS21CANDLE) { dispbottom l("Northern Lights")+" : "+l("The strong shall yield the %s to enlighten the way, according to the established sequence.", b(l("powder"))); end; } slide 108, 211; end; OnInit: .distance=1; end; } 081-2,109,211,0 script Button#X21chA2 NPC_NO_SPRITE,{ @inst = instance_id() + 1; if (!'XMAS21CANDLE) { dispbottom l("Northern Lights")+" : "+l("The strong shall yield the %s to enlighten the way, according to the established sequence.", b(l("powder"))); end; } slide 107, 214; end; OnInit: .distance=1; end; } 081-2,132,130,0 script Button#X21chB1 NPC_NO_SPRITE,{ if (!'XMAS21TREE) { dispbottom l("In this year Christmas, kids shall play ball. Once the Christmas Tree is set, the festivities may proceed."); end; } slide 131, 126; end; OnInit: .distance=1; end; } 081-2,132,126,0 script Button#X21chB2 NPC_NO_SPRITE,{ if (!'XMAS21TREE) { dispbottom l("In this year Christmas, kids shall play ball. Once the Christmas Tree is set, the festivities may proceed."); end; } slide 131, 130; end; OnInit: .distance=1; end; } 081-2,46,73,0 script Button#X21chC1 NPC_NO_SPRITE,{ if (!'XMAS21AMBUSH) { dispbottom l("One room, Seventeen buttons, Three truths, and a lever to bring joy to the children."); end; } slide 47, 70; end; OnInit: .distance=1; end; } 081-2,46,70,0 script Button#X21chC2 NPC_NO_SPRITE,{ if (!'XMAS21AMBUSH) { dispbottom l("One room, Seventeen buttons, Three truths, and a lever to bring joy to the children."); end; } slide 47, 73; end; OnInit: .distance=1; end; }