Here is the relevant part of my HSS file:
Code:
script, create quick status, begin
quick status := load slice collection(2)
herobox := lookup slice(sli:Box0)
display hero box(0)
herobox := lookup slice(sli:Box1)
display hero box(1)
herobox := lookup slice(sli:Box2)
display hero box(2)
#get map name and change short box
variable(v, temp)
temp := lookup slice(sli:MapName)
get map name (1, current map)
set slice text (temp, 1)
#display money
temp := lookup slice(sli:Money)
clear string(1)
append number(1, party money)
append ascii(1, 32)
append ascii(1, 36)
set slice text(temp, 1)
#display play time
temp := lookup slice(sli:PlayTime)
clear string(1)
append ascii(1, 159)
append ascii(1, 32)
v := (days of play * 24) + hours of play
if(v << 10) then(
append ascii(1,48)
)
append number(1, v)
append ascii(1, 58)
if(minutes of play << 10) then(
append ascii(1,48)
)
append number(1, minutes of play)
set slice text(temp, 1)
wait for key
end
script, display hero box, i = 0, begin
variable(temp, v)
if(hero by rank(i) <> -1) then(
#get information of hero
#change sprite picture
temp := lookup slice(sli:Portrait, herobox)
replace portrait sprite(temp, plut(hero by rank(i)))
#change hero lv
temp := lookup slice(sli:Level, herobox)
$1="LV "
append number (1, get hero level(i))
set slice text (temp, 1)
#change hero name
temp := lookup slice(sli:Name, herobox)
get hero name(1, i)
set slice text (temp, 1)
#calculate HP and MP bars
#((78*cur)/ max) = X
temp := lookup slice(sli:HPBar, herobox)
v := get hero stat(i,stat:HP,current stat) * 78
v := v / get hero stat(i,stat:HP,maximum stat)
set slice width(temp, v)
temp := lookup slice(sli:HP, herobox)
clear string(1)
append number(1, get hero stat(i,stat:HP,current stat))
append ascii(1, 47)
append number(1, get hero stat(i,stat:HP,maximum stat))
set slice text(temp, 1)
temp := lookup slice(sli:MPBar, herobox)
v := get hero stat(i,stat:MP,current stat) * 78
v := v / get hero stat(i,stat:MP,maximum stat)
set slice width(temp, v)
temp := lookup slice(sli:MP, herobox)
clear string(1)
append number(1, get hero stat(i,stat:MP,current stat))
append ascii(1, 47)
append number(1, get hero stat(i,stat:MP,maximum stat))
set slice text(temp, 1)
)
else(set slice visible(herobox,off))
end
quick status := load slice collection(2)
herobox := lookup slice(sli:Box0)
display hero box(0)
herobox := lookup slice(sli:Box1)
display hero box(1)
herobox := lookup slice(sli:Box2)
display hero box(2)
#get map name and change short box
variable(v, temp)
temp := lookup slice(sli:MapName)
get map name (1, current map)
set slice text (temp, 1)
#display money
temp := lookup slice(sli:Money)
clear string(1)
append number(1, party money)
append ascii(1, 32)
append ascii(1, 36)
set slice text(temp, 1)
#display play time
temp := lookup slice(sli:PlayTime)
clear string(1)
append ascii(1, 159)
append ascii(1, 32)
v := (days of play * 24) + hours of play
if(v << 10) then(
append ascii(1,48)
)
append number(1, v)
append ascii(1, 58)
if(minutes of play << 10) then(
append ascii(1,48)
)
append number(1, minutes of play)
set slice text(temp, 1)
wait for key
end
script, display hero box, i = 0, begin
variable(temp, v)
if(hero by rank(i) <> -1) then(
#get information of hero
#change sprite picture
temp := lookup slice(sli:Portrait, herobox)
replace portrait sprite(temp, plut(hero by rank(i)))
#change hero lv
temp := lookup slice(sli:Level, herobox)
$1="LV "
append number (1, get hero level(i))
set slice text (temp, 1)
#change hero name
temp := lookup slice(sli:Name, herobox)
get hero name(1, i)
set slice text (temp, 1)
#calculate HP and MP bars
#((78*cur)/ max) = X
temp := lookup slice(sli:HPBar, herobox)
v := get hero stat(i,stat:HP,current stat) * 78
v := v / get hero stat(i,stat:HP,maximum stat)
set slice width(temp, v)
temp := lookup slice(sli:HP, herobox)
clear string(1)
append number(1, get hero stat(i,stat:HP,current stat))
append ascii(1, 47)
append number(1, get hero stat(i,stat:HP,maximum stat))
set slice text(temp, 1)
temp := lookup slice(sli:MPBar, herobox)
v := get hero stat(i,stat:MP,current stat) * 78
v := v / get hero stat(i,stat:MP,maximum stat)
set slice width(temp, v)
temp := lookup slice(sli:MP, herobox)
clear string(1)
append number(1, get hero stat(i,stat:MP,current stat))
append ascii(1, 47)
append number(1, get hero stat(i,stat:MP,maximum stat))
set slice text(temp, 1)
)
else(set slice visible(herobox,off))
end
Now if I use a healing item or spell from a submenu, the info will be out of date. How can I make it update?
Additional info: It's triggered from an "on key press" script and the main menu allows scripts and gameplay



