diff options
Diffstat (limited to 'npc/008-2-7')
-rw-r--r-- | npc/008-2-7/_import.txt | 2 | ||||
-rw-r--r-- | npc/008-2-7/shop.txt | 36 | ||||
-rw-r--r-- | npc/008-2-7/simon.txt | 39 | ||||
-rw-r--r-- | npc/008-2-7/wyara.txt | 69 |
4 files changed, 143 insertions, 3 deletions
diff --git a/npc/008-2-7/_import.txt b/npc/008-2-7/_import.txt index 4cb38df9..d3391d83 100644 --- a/npc/008-2-7/_import.txt +++ b/npc/008-2-7/_import.txt @@ -3,4 +3,6 @@ "npc/008-2-7/_savepoints.txt", "npc/008-2-7/_warps.txt", "npc/008-2-7/mapflags.txt", +"npc/008-2-7/shop.txt", +"npc/008-2-7/simon.txt", "npc/008-2-7/wyara.txt", diff --git a/npc/008-2-7/shop.txt b/npc/008-2-7/shop.txt new file mode 100644 index 00000000..30989eb3 --- /dev/null +++ b/npc/008-2-7/shop.txt @@ -0,0 +1,36 @@ +// Evol scripts. +// Authors: +// 4144 +// Micksha +// Reid +// toams +// Description: +// Simons Potion Shop. + +008-2-7,30,26,0 trader #Invisible008-2-7 NPC_HIDDEN,{ + +OnInit: + tradertype(NST_MARKET); + + sellitem SmallHealing, -1, 10; + sellitem MediumHealing, -1, 5; + sellitem SmallMana, -1, 10; + sellitem MediumMana, -1, 5; + sellitem ConcPotion, -1, 3; + sellitem IronPotion, -1, 3; + + .sex = G_OTHER; + .distance = 2; + end; + +OnClock0000: +OnClock0800: +OnClock1600: + restoreshopitem SmallHealing, 10; + restoreshopitem MediumHealing, 5; + restoreshopitem SmallMana, 10; + restoreshopitem MediumMana, 5; + restoreshopitem ConcPotion, 3; + restoreshopitem IronPotion, 3; + end; +} diff --git a/npc/008-2-7/simon.txt b/npc/008-2-7/simon.txt new file mode 100644 index 00000000..1b4ae071 --- /dev/null +++ b/npc/008-2-7/simon.txt @@ -0,0 +1,39 @@ +// Evol scripts. +// Author: +// Micksha +// Description: +// Simon, Wyaras Apprentice. +// THIS IS A PLACEHOLDER! + +008-2-7,30,26,0 script Simon NPC_SIMON,{ + speech + l("Hi, I am Simon."), + l("I am Wyaras apprentice, helping her with selling her potions."), + l("I would prefer becoming a real Sorcerer one time. *sighs*"); + + switch (select(l("Potions? That sounds useful. What do you have?"), + l("Thats your problem, really."), + l("Becoming a Sorcerer? I want that too!"))) + { + case 1: + closeclientdialog; + shop "#Invisible008-2-7"; + close; + case 2: + speech S_FIRST_BLANK_LINE, + l("Leave me alone."); + close; + case 3: + speech S_FIRST_BLANK_LINE, + l("It needs so much training, but Wyara only leaves me here, standing and selling something instead of teaching me."); + close; + } + + + close; + +OnInit: + .sex = G_MALE; + .distance = 2; + end; +} diff --git a/npc/008-2-7/wyara.txt b/npc/008-2-7/wyara.txt index a875544a..502a5409 100644 --- a/npc/008-2-7/wyara.txt +++ b/npc/008-2-7/wyara.txt @@ -3,16 +3,79 @@ // Micksha // Description: // Wyara the witch. -// THIS IS A PLACEHOLDER! +// TODO: Buy or make plushroom potions +// TODO: Should she ask for a money comission when resetting status? 008-2-7,27,28,0 script Wyara#008-2-7 NPC_DARK_DRUID,{ + function confirmStatusReset; + function doStatusReset; speech l("What? Is there someone?"), l("Please, leave me alone. I have to pixel potions."), - lg("I will sell some when you return a bit later."); - + lg("I will sell some when you return a bit later."), + l("Unless you are interested in a status reset?"); + next; + do + { + select + l("I'm fine, thanks."), + l("I actually could use a status reset!"); + switch (@menu) { + case 2: + @plush_count = lognbaselvl(1, 10); + @plush_count = @plush_count*12/10; + if (confirmStatusReset()) + doStatusReset(); + break; + } + } while (@menu != 1); + // Note: There is some dark magic here, because confirmStatusReset() overrides @menu. close; +function confirmStatusReset { + mesn; + mesq l("Let me just have a quick look at you. Hm... I will need @@ @@s to reset your stats.", @plush_count, getitemlink(Plushroom)); + next; + mesn; + mesq l("Also, status point reset can't be undone. Do you really want this?"); + next; + if (askyesno() == ASK_YES) + { + if (countitem(Plushroom) >= @plush_count) + return 1; + mesn; + mesq l("Alright, but... You only have @@ @@, and I need @@ to do the status reset for you!", countitem(Plushroom), getitemlink(Plushroom), @plush_count); + } + return 0; +} + +function doStatusReset { + delitem Plushroom, @plush_count; + + .@wasSP = StatusPoint; + resetstatus; + + // Everything was done before dialog in case of forced disconnection + speech S_FIRST_BLANK_LINE | S_LAST_NEXT, + l("Thank you."), + l("Now stand still... It should not take much time..."); + if (StatusPoint == .@wasSP) + { + speech + l("It seems that you have no status points to reset!"), + l("I'll return the plushroom to you, but please, do not waste my time."); + getitem Plushroom, @plush_count; + } + else + { + speech + l("Let's see... @@ of your status points have just been reset!", StatusPoint - .@wasSP), + l("Spend it wisely this time."), + lg("But you are welcome to reset your stats again if you bring me some more plushrooms!"); + } + return; +} + OnInit: .sex = G_FEMALE; .distance = 2; |