diff options
Diffstat (limited to 'world/map/npc/029-2')
-rw-r--r-- | world/map/npc/029-2/_import.txt | 2 | ||||
-rw-r--r-- | world/map/npc/029-2/_mobs.txt | 13 | ||||
-rw-r--r-- | world/map/npc/029-2/_nodes.txt | 16 | ||||
-rw-r--r-- | world/map/npc/029-2/alchemy.txt | 99 | ||||
-rw-r--r-- | world/map/npc/029-2/morgan.txt | 8 | ||||
-rw-r--r-- | world/map/npc/029-2/sorfina.txt | 36 | ||||
-rw-r--r-- | world/map/npc/029-2/tanisha.txt | 2 |
7 files changed, 143 insertions, 33 deletions
diff --git a/world/map/npc/029-2/_import.txt b/world/map/npc/029-2/_import.txt index 29e2607a..b87b6dc1 100644 --- a/world/map/npc/029-2/_import.txt +++ b/world/map/npc/029-2/_import.txt @@ -2,7 +2,9 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. map: 029-2 npc: npc/029-2/_mobs.txt +npc: npc/029-2/_nodes.txt npc: npc/029-2/_warps.txt +npc: npc/029-2/alchemy.txt npc: npc/029-2/bankroom.txt npc: npc/029-2/barrels.txt npc: npc/029-2/barrels_config.txt diff --git a/world/map/npc/029-2/_mobs.txt b/world/map/npc/029-2/_mobs.txt index 02d3fbd9..a63fae65 100644 --- a/world/map/npc/029-2/_mobs.txt +++ b/world/map/npc/029-2/_mobs.txt @@ -1,15 +1,4 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. // Candor Island Indoor mobs -029-2,33,57,24,7|monster|HouseMaggot|1050,7,100000ms,30000ms,Mob029-2::On1050 - - -029-2,0,0,0|script|Mob029-2|32767 -{ - end; - -On1050: - set @mobID, 1050; - callfunc "MobPoints"; - end; -} +029-2,33,57,24,7|monster|HouseMaggot|1050,7,100000ms,30000ms diff --git a/world/map/npc/029-2/_nodes.txt b/world/map/npc/029-2/_nodes.txt new file mode 100644 index 00000000..9e38e0e1 --- /dev/null +++ b/world/map/npc/029-2/_nodes.txt @@ -0,0 +1,16 @@ +// This file is generated automatically. All manually added changes will be removed when running the Converter. +// Candor Island Indoor nodes + +029-2,0,0,0|script|Node029-2|32767 +{ + end; +OnInit: + setarray .m$, "_N-Alchemy", "029-2"; + setarray .x1, "_N-Alchemy", 113; + setarray .y1, "_N-Alchemy", 57; + setarray .x2, "_N-Alchemy", 0; + setarray .y2, "_N-Alchemy", 0; + setarray .id, "_N-Alchemy", 0; + donpcevent "_N-Alchemy::OnMaybeStart"; + destroy; +} diff --git a/world/map/npc/029-2/alchemy.txt b/world/map/npc/029-2/alchemy.txt new file mode 100644 index 00000000..b5e4732c --- /dev/null +++ b/world/map/npc/029-2/alchemy.txt @@ -0,0 +1,99 @@ +-|script|_N-Alchemy|32767 +{ + set @npc_distance, 1; + callfunc "PCtoNPCRange"; + if (@npc_check) end; + + title "Alchemy Lab"; + mes "This is an alchemy lab."; + mes "With it, you can combine reagents together to create powerful potions."; + next; + clear; + mes "##BDrag & drop 2 items from your inventory. All items used will be lost.##b"; + cleararray @alchlab_items$[0], "", 2; // since we're not using a scoped (.@) array, we need to clean it + requestitem @alchlab_items$[0], 2; // TODO: add a craft builtin (npc action 12) + clear; + if (@alchlab_items$[0] == "" || @alchlab_items$[1] == "") + goto L_NoItems; + + mes "You are about to combine the following:"; + mes " ["+ getitemlink(@alchlab_items$[0]) +"]"; + mes " ["+ getitemlink(@alchlab_items$[1]) +"]"; + mes; + mes "##BWarning! This will permanently destroy the selected items.##b"; + // can not use a scope variable to store item names because menu is a script terminator (destroys the scope) + menu + "Abort Mission.", L_Abort, + "Proceed.", L_Proceed; + +L_Proceed: + // XXX: here we could make it wait a little, while the potion is boiling (and show an animation/particles/sound) + if (countitem(@alchlab_items$[0]) < 1 || countitem(@alchlab_items$[1]) < 1) // this shouldn't happen, but just to be safe.. + goto L_NoItems; + delitem @alchlab_items$[0], 1; + delitem @alchlab_items$[1], 1; + if (@alchlab_items$[0] == "BottleOfWater" || @alchlab_items$[1] == "BottleOfWater") // give back used bottles + getitem "EmptyBottle", if_then_else(@alchlab_items$[0] == "BottleOfWater" && @alchlab_items$[1] == "BottleOfWater",2,1); + + set .@n, -3; + goto L_CheckRecipes; + +L_CheckRecipes: + set .@n, .@n+3; + if (.@n == get(.rsize, "_N-Alchemy")) + goto L_Failed; + if (!(get(.recipes$[.@n], "_N-Alchemy") == @alchlab_items$[0] && get(.recipes$[.@n+1], "_N-Alchemy") == @alchlab_items$[1]) && + !(get(.recipes$[.@n], "_N-Alchemy") == @alchlab_items$[1] && get(.recipes$[.@n+1], "_N-Alchemy") == @alchlab_items$[0])) + goto L_CheckRecipes; + + getitem get(.recipes$[.@n+2], "_N-Alchemy"), 1; // XXX: here we could also make it fail sometimes depending on your expertise + + // XXX: here we could make it give profession/crafting exp + clear; + mes "You combined the following:"; + mes " ["+ getitemlink(@alchlab_items$[0]) +"]"; + mes " ["+ getitemlink(@alchlab_items$[1]) +"]"; + mes; + mes "You obtained:"; + mes " ["+ getitemlink(get(.recipes$[.@n+2], "_N-Alchemy")) +"]"; + close; + +L_NoItems: + mes "You must put exactly 2 items."; + close; + +L_Failed: + mes "The potion bubbles violently and evaporates."; // XXX: here we could have random failure messages + close; + +L_Abort: + close; + +S_Spawn: + set .@s, getarraysize(.x1); + if (.spawned >= .@s) + goto S_Return; + set .@n$, "#_Al-lab"+chr(3)+.spawned; + void puppet(.m$[.spawned], .x1[.spawned], .y1[.spawned], .@n$, 400); // TODO: make a npc like npc 400 but with hoverCursor="action" => looks better for things like crafting + set .spawned, .spawned + 1; + if (.spawned < .@s) + goto S_Spawn; + return; + +S_Return: + return; + +OnMaybeStart: + callsub S_Spawn; + if (.started == 0) + goto L_InitVars; + end; + +L_InitVars: + setarray .recipes$[0], 0, + "DilutedConcentrationPot", "DarkConcentrationPotion", "ConcentrationPotion", + "CactusDrink", "CactusDrink", "CactusPotion", + "PinkPetal", "BottleOfWater", "ConcentrationPotion"; + set .rsize, getarraysize(.recipes$); + end; +} diff --git a/world/map/npc/029-2/morgan.txt b/world/map/npc/029-2/morgan.txt index 1f8f19f4..d5604f93 100644 --- a/world/map/npc/029-2/morgan.txt +++ b/world/map/npc/029-2/morgan.txt @@ -78,7 +78,7 @@ L_Start: mes "\"Various wands and staffs are found throughout the land with many different strengths and weaknesses.\""; mes "\"To use the wand you need to have it equipped and speak the incantation to let it tap into your mana.\""; mes "\"As the power of your magic grows so will the spells you can cast.\""; - mes "\"Lets start with a basic wand attack. " + getspellinvocation("wand") + "\""; + mes "\"Lets start with a basic wand attack. " + get(.invocation$, "spell-wand") + "\""; mes "\"Equip the wand and lets try out that spell.\""; mes "\"To cast a spell open the chat window, type the invocation and press enter.\""; mes "\"Speak to me again once you've cast the spell.\""; @@ -86,7 +86,7 @@ L_Start: L_Started: mes "[Morgan]"; - mes "\"Lets start with a basic wand attack. " + getspellinvocation("wand") + "\""; + mes "\"Lets start with a basic wand attack. " + get(.invocation$, "spell-wand") + "\""; mes "\"Equip the wand and lets try out that spell.\""; mes "\"To cast a spell open the chat window, type the invocation and press enter.\""; mes "\"Speak to me again once you've cast the spell.\""; @@ -95,7 +95,7 @@ L_Started: L_CastOnce: mes "[Morgan]"; mes "\"Ok, good job! Looks like you have good mana flow.\""; - mes "\"Onto the next lesson. Now that you have " + getspellinvocation("wand") + " cast,\""; + mes "\"Onto the next lesson. Now that you have " + get(.invocation$, "spell-wand") + " cast,\""; mes "\"Each time you attack the wand will convert a bit of you mana into a magic bolt.\""; mes "\"After so many attacks, you will need to recast the invocation to stay attuned to the wand.\""; mes "\"(Logging out will also cancel any spell effects currently active in-game.).\""; @@ -106,7 +106,7 @@ L_CastOnce: L_LearningDone: mes "[Morgan]"; - mes "\"" + getspellinvocation("wand") + " is a basic wand attack.\""; + mes "\"" + get(.invocation$, "spell-wand") + " is a basic wand attack.\""; mes "\"A Wand must be equipped to use the spell.\""; mes "\"To cast a spell open the chat window, type the invocation and press enter.\""; mes "\"I've taught you all I can for now. You should visit the Mana Seed north west of Hurnscald.\""; diff --git a/world/map/npc/029-2/sorfina.txt b/world/map/npc/029-2/sorfina.txt index 9d2d4bb3..7c6a589f 100644 --- a/world/map/npc/029-2/sorfina.txt +++ b/world/map/npc/029-2/sorfina.txt @@ -86,10 +86,10 @@ L_Carpet: mes "[Sorfina]"; mes "\"Try to take a few steps and walk to that carpet over there."; next; - npcaction 2, "#Carpet"; + camera "#Carpet"; mapmask getmask() | 4; next; - npcaction 3; + camera; mes "Press [###keyMoveUp;] to move up, press [###keyMoveDown;] to move down, "; mes "press [###keyMoveLeft;] to move left, press [###keyMoveRight;] to move right "; mes " or click on the place you want to go to.\""; @@ -100,12 +100,12 @@ L_Dresser: mes "[Sorfina]"; mes "\"You should get dressed now.\""; next; - npcaction 2, "Dresser#tutorial"; + camera "Dresser#tutorial"; mapmask getmask() | 32; mes "\"In that dresser there are some clothes you can wear.\""; mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press [###keyTargetNPC;] to focus and [###keyTalk;] to talk/activate.\""; next; - npcaction 3; + camera; mes "\"Now get the clothes out of the dresser.\""; goto L_Close; @@ -169,6 +169,7 @@ L_Explain: "... the inventory and items?",L_Items, "... shortcuts?",L_Shortcut, "... what to do in Candor?",L_Aidan, + "... change my appearence?",L_Barber, "... nevermind.",L_Close; L_Walk: @@ -241,6 +242,15 @@ L_Aidan: mes "Talk to everybody. You can never tell when they might know something useful.\""; goto L_Close; +L_Barber: + mes "[Sorfina]"; + mes "\"Jessie downstairs can change your appearance.\""; + mes "\"They will allow you to change your hair color or style as well as gender.\""; + next; + mes "\"There are a number of people across the continent that can change this for you.\""; + mes "\"There is no cost or limit to the number of times it can be changed.\""; + goto L_Close; + L_Hasan: mes "[Sorfina]"; mes "\"Make yourself at home! Do you have any questions?\""; @@ -303,12 +313,12 @@ OnTouch: mes "[Sorfina]"; mes "\"You should get dressed now.\""; next; - npcaction 2, "Dresser#tutorial"; + camera "Dresser#tutorial"; mapmask getmask() | 16; mes "\"In that dresser there are some clothes you can wear.\""; mes "\"To interact with things in your environment or talk to NPCs you can either click on it or press N to focus and T to talk/activate.\""; next; - npcaction 3; + camera; mes "\"Now get the clothes out of the dresser.\""; set QL_BEGIN, 2; close; @@ -389,27 +399,21 @@ L_Block: { if (TUT_var == 0) goto L_KnockBack; - goto L_Close; + end; L_KnockBack: message strcharinfo(0), "Server : ##BPlease Accept the Game rules"; warp "029-2", 22, 24; - goto L_Close; - -L_Close: - close; + end; } 029-2,24,24,0|script|#GameRules4|32767,0,1 { if (TUT_var == 0) goto L_KnockBack; - goto L_Close; + end; L_KnockBack: message strcharinfo(0), "Server : ##BPlease Accept the Game rules"; warp "029-2", 22, 24; - goto L_Close; - -L_Close: - close; + end; } diff --git a/world/map/npc/029-2/tanisha.txt b/world/map/npc/029-2/tanisha.txt index 7142721e..025cc499 100644 --- a/world/map/npc/029-2/tanisha.txt +++ b/world/map/npc/029-2/tanisha.txt @@ -221,7 +221,7 @@ OnTimer1000: if (getareausers("029-2", 98, 84, 106, 89) == 0) goto L_CleanUp; // This is needed because multiple players can be in the area at once - areatimer "029-2", 98, 84, 106, 89, 0, "Tanisha::OnTick"; + areatimer 0, "029-2", 98, 84, 106, 89, 0, "Tanisha::OnTick"; end; L_CleanUp: |