Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 109 additions & 4 deletions scripts/edana/barwench.script
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
setvar STORE_TRIGGERTEXT "store trade buy sell purchase sale offer"
const NO_HAIL 1
const VEND_INDIVIDUAL 1

setvard SOUP_BUSY 0
setvard SOUP_ORDERS 0
setvard SOUP_RAGE 0
const SOUP_RAGE_EVERY 6
setvard VENDOR_NOT_ON_USE 1
}

Expand Down Expand Up @@ -57,6 +62,7 @@

if game.time > NEXT_HELLO
if $cansee(player,128)
if !SOUP_BUSY

saytext Hello there.
say [.2] [.2] [.1]
Expand All @@ -73,6 +79,12 @@

{ vendor_used

if ( SOUP_BUSY )
{
saytext Just a moment, love, I've got soup on!
exitevent
}

playsound 0 10 voices/human/female_vendor2.wav
saytext What brings you here today? Business or pleasure?
say [.3] [.3] [.3] [.2] [.1] [.3] [.1]
Expand Down Expand Up @@ -113,6 +125,8 @@

{ game_menu_getoptions

if !SOUP_BUSY //one pot at a time

local reg.mitem.title "Order Soup"
local reg.mitem.type payment
local reg.mitem.data "health_spotion;drink_mead;mana_mpotion;health_apple:3;gold:200"
Expand All @@ -122,12 +136,103 @@
}

{ give_soup
setvard SOUP_CUSTOMER PARAM1
if ( $get_by_name(sylph_soup) equals 0 )
{
callevent soup_serve
exitevent
}

offer PARAM1 mana_soup
helptip PARAM1 generic "Sylphiel's Soup" "Provides full health and three minutes of rapid mana regeneration"
setmovedest PARAM1 9999
setvard SOUP_BUSY 1
playanim break
setvard SOUP_FAILSAFE_TIME game.time
add SOUP_FAILSAFE_TIME 34.0
callevent 35.0 soup_failsafe

add SOUP_ORDERS 1
if ( SOUP_ORDERS < SOUP_RAGE_EVERY )
{
setvard SOUP_RAGE 0
saytext One bowl coming up, just let me get it off the fire!
usetrigger sylph_soup
exitevent
}

setvard SOUP_ORDERS 0
setvard SOUP_RAGE 1
local L_PICK $rand(1,3)
if ( L_PICK == 1 ) saytext Another one?! Do I look like I've got six arms? Fine. FINE.
if ( L_PICK == 2 ) saytext Back to the pot. AGAIN. Next one of you that orders soup is washing the bowls!
if ( L_PICK == 3 ) saytext Oh, of course, more soup! Who needs feet anyway?!
callevent bchat_mouth_move 3.0
callevent 2.5 soup_rage_walk
}

{ soup_rage_walk
usetrigger sylph_soup
playanim move anim_rage_walk //now why would go and make her mad? She makes your food you know.
playsound 0 10 voices/m2_quest/sylphiel_rage.wav
setvard SOUP_RAGE_STAGE 0
setvard SOUP_RAGE_STILL 0
setvard SOUP_RAGE_POS $get(ent_me,origin)
callevent 0.2 soup_rage_watch
}

{ soup_rage_watch
if SOUP_BUSY
local L_POS $get(ent_me,origin)
local L_MOVED $dist2D(L_POS,SOUP_RAGE_POS)
setvard SOUP_RAGE_POS L_POS
if ( SOUP_RAGE_STAGE equals 0 )
{
if ( L_MOVED < 1 )
{
add SOUP_RAGE_STILL 1
}
else
{
setvard SOUP_RAGE_STILL 0
}
if ( SOUP_RAGE_STILL > 2 ) setvard SOUP_RAGE_STAGE 1
}
else
{
if ( L_MOVED > 1 )
{
playanim move anim_rage_walk
exitevent
}
}
callevent 0.2 soup_rage_watch
}

{ soup_back
if SOUP_BUSY
setvard SOUP_BUSY 0
callevent soup_serve
}

{ soup_failsafe
if SOUP_BUSY
if game.time > SOUP_FAILSAFE_TIME
callevent soup_back
}

{ soup_serve
if $get(SOUP_CUSTOMER,isplayer)
offer SOUP_CUSTOMER mana_soup
helptip SOUP_CUSTOMER generic "Sylphiel's Soup" "Provides full health and three minutes of rapid mana regeneration"
setmovedest SOUP_CUSTOMER 9999
playanim once push_button
saytext One bowl of Sylphee's soup, fresh off the fire. Enjoy!
if ( SOUP_RAGE equals 1 )
{
saytext HERE!
}
else
{
saytext One bowl of Sylphee's soup, fresh off the fire. Enjoy!
}
setvard SOUP_RAGE 0
callevent convo_anim
}

Expand Down