-
Notifications
You must be signed in to change notification settings - Fork 68
Services
Allofich edited this page May 5, 2024
·
5 revisions
The venueSeed
below is a 4-byte value formed as XX YY mm nn
, where X
and Y
are the door block coordinates, and m
and n
are the indices of the name components. (TODO: example)
Each drink bought increases the counter, and when it passes a certain limit, a drunkenness effect is applied. It seems the counter should have decreased by 1 every hour, but probably due to a bug, it happens every minute. The strength of the effect depend on the drink price.
srand(venueSeed)
list <- []
entries <- []
for i <- 0, 9
do
r <- rnd(16) # 0..15, apparently another bug and 0x15 was meant
while r in list
list.append(r)
name <- drinks[r]
price <- adjustHoliday(drinkPrice[r], 1) # service
listEntry <- sprintf(priceFmt, price, name)
entries.append(listEntry)
if pc.race == BRETON then X <- 12 else X <- 25
limit <- pc.stat[END]/X
if drinksConsumed > limit then
applyDrunkenness(pc, drinkPrice[id])
pc.recalcStats()
endif
applyDrunkenness(npc, magn) <-
magnitude <- magn * 5
if npc.race == BRETON then duration <- 120 else duration <- 60
npc.addEffect(<DRUNK with +magnitude to STR, WIL, END, LUC and -magnitude to INT, AGI, SPD, PER>)
drinks
is a szlist @4153E
. drinkPrice
is a byte array @41614
. priceFmt
is a string @46797
, "\t200%u gp\n%s"
cost <- adjustHoliday((pc.level + 1) * 5, 4)
if donate >= pc.gold then
pc.gold <- pc.gold - donate
magnitude <- donate / cost
globalBlessing <- globalBlessing + hexPercent(magnitude)
endif
globalBlessing
is set to 0 each new week.
if pc.curHP == pc.maxHP then
response <- sprintf(healNoNeed, pc.name)
return
endif
price <- adjustHoliday((pc.level + 1) * 15, 1)
templeConfirmation <- sprinf(templeConf, price)
if askYesNo(templeConfirmation) then
# remove price gold etc
response <- sprintf(healOK, pc.name)
showMessage(response)
pc.curHP <- pc.maxHP
endif
templeConf
is a string @46A2D
. healOK
is @46942
. healNoNeed
is @46959
.