Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

faking an inn

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Aug 16, 2009 10:24 am    Post subject: faking an inn Reply with quote

for my inn script i want it to make it restore stats to there full abilties again i even used the script the archieves provided but it seems to not work heres exactly what i put in but it won't restore anything for some reason.


Code:

set hero stat(0,stat:hp, get hero stat(0,stat:hp,maximum stat), current stat)
 set hero stat(0,stat:mp, get hero stat(0,stat:mp,maximum stat), current stat)


maybe the value of 0 is something i needed to put in and i just don't know exactly what or it just doesn't work for some other reason i don't know but any ideas would be appreciated.
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sun Aug 16, 2009 2:50 pm    Post subject: Reply with quote

0 is the hero id, as defined in your hsi file.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Aug 16, 2009 8:21 pm    Post subject: not working Reply with quote

are you sure thats it because its not registering my hero's name?
Back to top
View user's profile Send private message
Baconlabs
PURPLE IS MANLY




Joined: 15 Mar 2009
Posts: 335
Location: Tennessee

PostPosted: Sun Aug 16, 2009 8:35 pm    Post subject: Reply with quote

Hero's name? If you're using names, then you'll need to say hero:NAME instead of just NAME.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Aug 17, 2009 2:18 am    Post subject: Reply with quote

No, get/set hero stat take the position in the party as the first argument. To find this you would normally use the 'plot:find hero' command. For example, to heal hero 'Bob':
Code:
set hero stat(find hero(hero:Bob), stat:hp, get hero stat(find hero(hero:Bob), stat:hp, maximum stat), current stat)


However I assume that what you want to actually do is heal everyone in the active party, that is, in slots 0 to 3:

Code:
variable (i)
for (i, 0, 3) do (
  set hero stat(i, stat:hp, get hero stat(i, stat:hp, maximum stat), current stat)
  set hero stat(i, stat:mp, get hero stat(i, stat:mp, maximum stat), current stat)
)

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Mon Aug 17, 2009 7:48 am    Post subject: tried it Reply with quote

well i tried about everything you guys gave me and it seems the scripting acknowledged it but for some reason my hero is still not healing. His mp and hp remain the same so i was wondering if there is any other ideas you guys may have heres my exact script and it seems to be in the game just its not working see if i did anything wrong here to somehow defuse the healing process.


Code:
plotscript,inn,begin
stop song
suspend player
play sound (55)
show backdrop (42)
wait(13)
fade screen in
wait(20)
variable (i)
for (i, 0, 7) do (
set hero stat(i, stat:hp, get hero stat(i, stat:hp, maximum stat), current stat)
set hero stat(i, stat:mp, get hero stat(i, stat:mp, maximum stat), current stat)
)
play song(song:inn song)
wait (24)
stop song
wait (45)
show map

end


oo and the reason i put 0, 7 is because my game holds a total of 7 characters and i want even the ones in the reserve to be healed so if you switch them out i don't want them to have damage from there last battle still.
Back to top
View user's profile Send private message
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Mon Aug 17, 2009 8:14 am    Post subject: Reply with quote

I haven't actually looked into your script,

but there's this handy textbox condition:


As long as you turn this on, it'll heal the party's HP/MP after the textbox is shown.
(It doesn't actually bring up a shop or anything)

You could probably sneak it in during the backdrop as an invisible textbox.

Code:

Suspend Box Advance
Show textbox (#)
Advance Text Box
Resume Box Advance


[edit]

I'm pretty sure the problem is that you want to use:

Code:

set hero stat(find hero (i), stat:hp, get hero stat(find hero (i), stat:hp, maximum stat), current stat)


instead of

Code:

set hero stat(i, stat:hp, get hero stat(i, stat:hp, maximum stat), current stat)
Back to top
View user's profile Send private message Send e-mail AIM Address
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Mon Aug 17, 2009 10:33 am    Post subject: thanks Reply with quote

thanks man i'm sure this will work appreciate it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group