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

Hero Levelled help

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Chenzi
User was banned for this post




Joined: 02 Aug 2003
Posts: 190
Location: Grand Rapids, MI

PostPosted: Fri Jul 11, 2008 1:23 pm    Post subject: Hero Levelled help Reply with quote

I was wondering if anyone could help me with this issue I've been having. The following script is supposed to give the party experience, then display if the party has leveled (at this point I don't care if they leveled multiple times) using a text box with a string attached.
A bit of pre-code first, just incase it's related...

Code:
 
plotscript, EndRockQuest, begin
   GiveTreasure(7)
   GiveXP(300)
end

plotscript, GiveTreasure, ItemNumber, begin
   get item name(1,ItemNumber)
   play sound (1,false,false)
        tb(31)
   getitem (itemnumber,1)
end



And, the code that's giving me problems:
Code:
 
plotscript, GiveXP, Amount, begin
give experience (party, Amount)

if (herolevelled (find hero (hero: Warrior))) then (
      get hero name(1,find hero(hero: Warrior))
   tb(35)
)

if (hero levelled(find hero(hero:Rogue))) then (
   get hero name (1, find hero(hero: Rogue))
   tb(35)
)

if (hero levelled(find hero(hero:Monk))) then (
   get hero name (1, find hero(hero: Monk))
   tb(35)
)

if (hero levelled(find hero(hero:Wizard))) then (
   get hero name (1, find hero(hero: Wizard))
   tb(35)
)

if (hero levelled(find hero(hero:Priest))) then (
   get hero name (1, find hero(hero: Priest))
   tb(35)
)
end


The HSI file included properly, the heros have even been renamed to Warrior, Priest, etc. The heros have been actually gaining the correct amount of XP (300, about 5 levels), but "if hero levelled" etc isn't detecting that they actually levelled, therefor the textbox isn't opening. Also, I'm sure that GiveXP is being activated, because I tossed a 'gameover' in there to make sure the script was being called correctly.

(Sorry about the mass of text, but I'm not sure if anything is related.)
_________________
Allow me to preemptively disclose that I probably hate the person posting below, including myself.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Jul 11, 2008 2:18 pm    Post subject: Reply with quote

I looked at the code, and it turns out there was a bug in the "give experience" command that was preventing the level-ups from being detected. Try tonight's nightly build, and let us know if it works.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chenzi
User was banned for this post




Joined: 02 Aug 2003
Posts: 190
Location: Grand Rapids, MI

PostPosted: Fri Jul 11, 2008 2:23 pm    Post subject: Reply with quote

Thank god! I thought I was just doing it wrong or something. I spent 3 hours looking at it, and was like, "wait, wtf?"

You may wanna take a peak at spells learnt as well, it may suffer from a similiar problem (didn't test it yet).

What time should I get that nightly? It's been a while since I've dicked around in the OHR.
_________________
Allow me to preemptively disclose that I probably hate the person posting below, including myself.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Jul 11, 2008 2:46 pm    Post subject: Reply with quote

Chenzi wrote:
What time should I get that nightly? It's been a while since I've dicked around in the OHR.


Nightlies are normally built starting at 11:05 PM pacific time, but since I happen to be next to the machine that does the nightlies right now, I'll force a rebuild, so you can download it in about an hour.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chenzi
User was banned for this post




Joined: 02 Aug 2003
Posts: 190
Location: Grand Rapids, MI

PostPosted: Fri Jul 11, 2008 2:58 pm    Post subject: Reply with quote

Ahahah oh wow, lucky me eh? Thanks James.
_________________
Allow me to preemptively disclose that I probably hate the person posting below, including myself.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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