 |
Castle Paradox
|
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
|
Posted: Fri Jul 11, 2008 1:23 pm Post subject: Hero Levelled help |
|
|
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 |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Jul 11, 2008 2:18 pm Post subject: |
|
|
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 |
|
 |
Chenzi User was banned for this post

Joined: 02 Aug 2003 Posts: 190 Location: Grand Rapids, MI
|
Posted: Fri Jul 11, 2008 2:23 pm Post subject: |
|
|
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 |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Jul 11, 2008 2:46 pm Post subject: |
|
|
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 |
|
 |
Chenzi User was banned for this post

Joined: 02 Aug 2003 Posts: 190 Location: Grand Rapids, MI
|
Posted: Fri Jul 11, 2008 2:58 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|