diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-03-17 13:11:37 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-03-30 11:22:58 -0400 |
commit | c0eab1f3997509784572302120456fe7cd856530 (patch) | |
tree | aa948796bb956b5f927a2ae7b243379c928a8912 /world | |
parent | a99779828dd609f004a17048d72bbfeb484a81bd (diff) | |
download | serverdata-c0eab1f3997509784572302120456fe7cd856530.tar.gz serverdata-c0eab1f3997509784572302120456fe7cd856530.tar.bz2 serverdata-c0eab1f3997509784572302120456fe7cd856530.tar.xz serverdata-c0eab1f3997509784572302120456fe7cd856530.zip |
move `merge-concentration-potions` spell to npc
add alchemy table
make alchemy puppets
Diffstat (limited to 'world')
-rw-r--r-- | world/map/npc/001-1/ched.txt | 14 | ||||
-rw-r--r-- | world/map/npc/029-2/_import.txt | 1 | ||||
-rw-r--r-- | world/map/npc/029-2/alchemy.txt | 81 | ||||
-rw-r--r-- | world/map/npc/magic/README.md | 2 |
4 files changed, 83 insertions, 15 deletions
diff --git a/world/map/npc/001-1/ched.txt b/world/map/npc/001-1/ched.txt index eb82aba1..2ec3288a 100644 --- a/world/map/npc/001-1/ched.txt +++ b/world/map/npc/001-1/ched.txt @@ -6,20 +6,6 @@ mes "\"I'm trying to get a spell to work, but I'm having some trouble.\""; mes "\"It's supposed to combine two potions, but I can't seem to figure out which two to combine...\""; next; - menu - "Good luck with that.", L_Done, - "What spell is it?", L_Next; - -L_Next: - mes ""; - mes "[Ched]"; - mes "\"Well, I don't remember what it's called... I took it out of 'Timbleweed's Advanced Transmutations,' but it seems awfully hard to cast.\""; - next; - mes "\"If you want to try it, the invocation is '" + get(.invocation$, "merge-concentration-potions") + ".' I just can't get the hang of it though.\""; - next; mes "\"Maybe I should go back to practicing '" + get(.invocation$, "detect-magic") + "' until I can cast it properly.\" %%6"; - goto L_Done; - -L_Done: close; } diff --git a/world/map/npc/029-2/_import.txt b/world/map/npc/029-2/_import.txt index 29e2607a..6d67f2f7 100644 --- a/world/map/npc/029-2/_import.txt +++ b/world/map/npc/029-2/_import.txt @@ -14,3 +14,4 @@ npc: npc/029-2/sorfina.txt npc: npc/029-2/stat_reset.txt npc: npc/029-2/tanisha.txt npc: npc/029-2/two_arms.txt +npc: npc/029-2/alchemy.txt diff --git a/world/map/npc/029-2/alchemy.txt b/world/map/npc/029-2/alchemy.txt new file mode 100644 index 00000000..d0d2909a --- /dev/null +++ b/world/map/npc/029-2/alchemy.txt @@ -0,0 +1,81 @@ +029-2,113,57,0|script|#alchemylab|400 +{ + 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"; + 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, "#alchemylab")) + goto L_Failed; + if (!(get(.recipes$[.@n], "#alchemylab") == @alchlab_items$[0] && get(.recipes$[.@n+1], "#alchemylab") == @alchlab_items$[1]) && + !(get(.recipes$[.@n], "#alchemylab") == @alchlab_items$[1] && get(.recipes$[.@n+1], "#alchemylab") == @alchlab_items$[0])) + goto L_CheckRecipes; + + getitem get(.recipes$[.@n+2], "#alchemylab"), 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], "#alchemylab")) +"]"; + 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; + +OnInit: + void // the first alchemy lab doesn't need a puppet, it's already on a map + puppet("027-2", 51, 100, strnpcinfo(0)+0, 400), // TODO: make a npc like npc 400 but with hoverCursor="action" => looks better for things like crafting + puppet("001-2", 92, 76, strnpcinfo(0)+1, 400), + puppet("001-2", 98, 76, strnpcinfo(0)+2, 400), + puppet("001-2", 92, 89, strnpcinfo(0)+3, 400), + puppet("001-2", 98, 89, strnpcinfo(0)+4, 400); + + setarray .recipes$[0], + "DilutedConcentrationPot", "DarkConcentrationPotion", "ConcentrationPotion", + "CactusDrink", "CactusDrink", "CactusPotion", + "PinkPetal", "BottleOfWater", "ConcentrationPotion"; + set .rsize, getarraysize(.recipes$); + end; +} diff --git a/world/map/npc/magic/README.md b/world/map/npc/magic/README.md index 89d0fe12..187c7c04 100644 --- a/world/map/npc/magic/README.md +++ b/world/map/npc/magic/README.md @@ -2,7 +2,7 @@ - [X] finish the missing spells and push them so they can be tested - [ ] Deal with the removal of the following spells from magic to NPCs or Commands - [X] Ched - - [ ] merge-concentration-potions + - [X] merge-concentration-potions - [ ] Auldsbel - [ ] make-short-tanktop - [ ] make-tanktop |