• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Truality

Left for good
1,006
Posts
12
Years
  • Age 32
  • Seen May 17, 2013
Ok, I think I get ya.. But what might I want to do to change it? I'm still in tutorial mode right now, lol, so according to what I've looked up, the var number I use for script tiles is 4050 I guess, or does that even matter, I pick a new one like, say, a new flag or offset?

Hmm.. I've been getting by for a while now by myself, kinda sucks I got stuck on this as it seemed to be an easy script to write. (compared to a "shiny rock", that generates random selected shiny pokemon. this rock is hidden and meant to be seeked out for "new, special" pokemon not normally available..) Maybe a new approach? I bet if I assigned the script to a sign or a person it would work, but I was hoping for a way to reset them on entrance instead.

EDIT: Oh wait, you mean like, make the Var value 0x0001 maybe so it continues? (like, "yes", do something?) or is it checking for a value that doesn't exist? I think I get that with a value of 0 nothing would happen.. Maybe with 0x0001 it will trigger only once, then end? I'm not sure what could be in that variable if its used, I haven't used it myself so I suppose its been used already? I'm not sure, I'm still kinda noob.. At least with variables.
No, he's saying that as long as the value that you set in the box matches the one the variable currently has, the script will work. If you have 0001 in the box and the value is set to be 0000 from somewhere else, it won't work. It has to be 0001. It doesn't affect how many times the script will repeat.
 
49
Posts
14
Years
  • Seen Sep 10, 2011
Cool, got it to work, thanks guys. Added that 0x0001 to the var value :D So I take it that variable number for the next route needs to be 0x0002 to reset the next group or trainers?

EDIT: well, works mostly, I decided to remove the msgbox and now it won't work.. I get stuck on the tile it is set to, but everyone else moves still. Theres no "lock", so.. wth?.. I'd prefer if it didn't have a msgbox, but I guess I can deals with it if I don't have a choice.. I don't get why it wouldn't tho.

Also tested if 0x0002 would work for the new offset without the msgbox, that didn't seem to work either, so that probably won't work for the next route.. I don't get the Var value.. :(
 
Last edited:

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Cool, got it to work, thanks guys. Added that 0x0001 to the var value :D So I take it that variable number for the next route needs to be 0x0002 to reset the next group or trainers?

EDIT: well, works mostly, I decided to remove the msgbox and now it won't work.. I get stuck on the tile it is set to, but everyone else moves still. Theres no "lock", so.. wth?.. I'd prefer if it didn't have a msgbox, but I guess I can deals with it if I don't have a choice.. I don't get why it wouldn't tho.

Also tested if 0x0002 would work for the new offset without the msgbox, that didn't seem to work either, so that probably won't work for the next route.. I don't get the Var value.. :(

The script will only activate when it's set to the variable value you put in A-Map. However, you also have to change the var value at the end of the script, or else it will freeze.

So if the initial script has a var # of 4050 and the var value is 0000 in A-Map, then at the end of that script you would need to put:

Code:
setvar 0x4050 0x1

^ Now the that the variable value is set to 0001 instead of 0000 the script will no longer activate.

For the next script you could then use var # 4050 and var value 0001, but keep in mind that means that that script is now dependent on the previous script being completed and de-activated. If you didn't want it to be dependent on the previous script, you would use a different variable #, like 4051.

Just remember any variable in the game is initially set to 0000 - that's why any variable set to the value of 0000 in A-Map will activate a script initially.

Also remember in order to deactivate a script, you must change the value of the variable with setvar to something other than the var value the script is set to activate with in A-Map. It can be any number, but it makes sense to use the next one in sequence (if the script is set up to activate when the variable value is 0, it makes more sense to set the variable value to 1 than it does to 5, for instance - but either way would deactivate the script).
 

Bilaterus

ToBe Best Spriter ;)
31
Posts
12
Years
  • Seen Nov 6, 2012
Hey I've got this problem and it's delaying the making of my hack and stuff so... ;( Well I'll show you and maybe it's a script problem but anyway here we go
Game: FireRed
Type: Var script/Script box script
Editor: Erm, Pokescript and PKSVUI?
Script:
Spoiler:

Screenshots and/or videos: If you reeeally need one I'll make one

So recap: I make a full script (not the first time this has happened to me, it also happened while making a level script, but thats a different story) but when compiled most of the script just dissappears! Is it the script? Is it the ROM? Any ideas?

EDIT: Oh wait, I found out why -.- after "applymovement 0xFF $plop" the next line uses the offset "$plop" when it is supposed to be "$plop 1" so what do we learn? Check it super carefully, and don't use silly names for offsets :S
 
Last edited:

Truality

Left for good
1,006
Posts
12
Years
  • Age 32
  • Seen May 17, 2013
Okay, I've hit this snag that has been holding my hack back for days. And it's pretty relevant to the one from the guy above. (1-up)

There is a script tile that just doesn't play any script it's assigned to. Not only that, but any variable I seem to put on it doesn't work.

Here's a picture of the script tile's values, though I doubt anything's wrong with it:
v5bv2c.png

So, before anything else, let me tell you what else I've tried and didn't work:

  • changing variables
  • changing the variable's value
  • changing the position of the script tile
  • dumping the script tile somewhere on the map where no one would step on it and add a new one, still nothing
  • assign different scripts to it
  • checked multiple times with different ways if the variable's value is THE SAME as the one I put on A-MAP (namely, 0x0000)
If I put the script and/or variable in another script tile in ANY other previous script tile in this map (or any other map), it works. So what could be happening? (the map I'm talking about is 3.0 - Pallet Town, and the script tile doesn't work from the 6th script tile and above)
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Looking at some in-game scripts, I have a few more things you can try:

  • Reset the "Unknown" field back to $0000.
  • Make sure that the "talking level" matches the height of the movement permission beneath the Script event.
  • How many total events (of all types -- Warp, Signpost, etc.) are on your map? I wonder if there's a maximum.
 

Truality

Left for good
1,006
Posts
12
Years
  • Age 32
  • Seen May 17, 2013
Looking at some in-game scripts, I have a few more things you can try:

  • Reset the "Unknown" field back to $0000.
  • How many total events (of all types -- Warp, Signpost, etc.) are on your map? I wonder if there's a maximum.
  • Make sure that the "talking level" matches the height of the movement permission beneath the Script event.
And...

  • Yeah, still nothing.
  • It's shown in the picture above, I guess there's no problem here.
  • I checked and...OH MY GOD I am so silly! I completely let this unconsidered!
So yeah, I changed the talking level and it works perfectly now! Thanks a lot! This actually made so happy that I'm going to put you in the credits. I owe you one!
 

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
shinyabsol1 said:
Is it possible to make a script keep track of how much time has passed since a certain event occurred (using RTC)?

Like for a honey tree script...where you put honey on a tree, then have to wait a certain amount of time for a pokemon to appear...

Thanks.

I'm gonna bump this up a page, as no one has responded to it.

Does anyone know anything about this?
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I'm gonna bump this up a page, as no one has responded to it.

Does anyone know anything about this?

One way is possible with JPAN's Fire Red Hacked Engine, but I ran into some trouble with it as the clock seems to reset whenever I enter a Pokemon Center. But I'm not sure if it's a glitch with the system or just me or my rom.

There's another possibility, and it has to do with Daisy's script in FireRed when she massages your Pokemon. She only does it once a day, so there's a special (and I don't remember which it is right now, and I don't have my Windows opened at the moment to look at it) that seems to track this. After she gives you a massage, the "timer" is reset to 0, and I think it uses the compare command to see how much time has passed. You might be able to get something out of that.

Sorry I don't have more info on that for you right now, but I would look at the script when you get the chance.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
There's another possibility, and it has to do with Daisy's script in FireRed when she massages your Pokemon. She only does it once a day, so there's a special (and I don't remember which it is right now, and I don't have my Windows opened at the moment to look at it) that seems to track this. After she gives you a massage, the "timer" is reset to 0, and I think it uses the compare command to see how much time has passed. You might be able to get something out of that.

Sorry I don't have more info on that for you right now, but I would look at the script when you get the chance.
I suspect that Selphy (the woman at Resort Gorgeous) is also a daily event, but her script doesn't use a special, it compares a scripting variable to 0xFFFF. I couldn't find that var's setter, so I don't know if it's a pedometer or if the game engine explicitly sets it to 0xFFFF after the passing of a day.
 

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
metapod23 said:
One way is possible with JPAN's Fire Red Hacked Engine, but I ran into some trouble with it as the clock seems to reset whenever I enter a Pokemon Center. But I'm not sure if it's a glitch with the system or just me or my rom.

I already ruled out this method because there are a very limited amount of timers that the player gets access to. And since each honey tree would need its own timer, there would not be enough timers for it to work.

btw, my goal with all this honey tree stuff is to have a system in my hack that works similarly to that of D/P/Pt (lots of trees that can all keep track of when honey was slathered on them).

metapod23 said:
There's another possibility, and it has to do with Daisy's script in FireRed when she massages your Pokemon. She only does it once a day, so there's a special (and I don't remember which it is right now, and I don't have my Windows opened at the moment to look at it) that seems to track this. After she gives you a massage, the "timer" is reset to 0, and I think it uses the compare command to see how much time has passed. You might be able to get something out of that.

Sorry I don't have more info on that for you right now, but I would look at the script when you get the chance.

Thanks for the suggestion. :) I decompiled Daisy's script and found the part of the script with the special(s) that seem to have something to do with the "timer".

Code:
#org 0x168DB9
special 0x187
compare 0x800D 0x2
if 0x1 goto 0x81A7AE0
special 0x188
compare 0x4025 0x1F4
if 0x0 goto 0x8168E46
...

Then I used JPAN's thread on the special and special2 commands in the R&D section to figure out what the specials are for. And...they didn't really make any sense to me...

JPAN said:
187 places value on given variable. Seems to be a error checker of some kind, for every time it returns 0x2, a script is called to end.

188 usualy clears the values at 0203ae04 and ae08, but also may, if the values are right, change the value of 0203ae8c, which is a pointer to the RAM. is used before every legendary battle.

metapod23, do you have any idea what these mean?

DavidJCobb said:
I suspect that Selphy (the woman at Resort Gorgeous) is also a daily event, but her script doesn't use a special, it compares a scripting variable to 0xFFFF. I couldn't find that var's setter, so I don't know if it's a pedometer or if the game engine explicitly sets it to 0xFFFF after the passing of a day.

I might look into this later if the Daisy stuff doesn't work...but perhaps you can help to decipher what the specials in the script mean?
 
275
Posts
13
Years
  • Seen Oct 9, 2019
I already ruled out this method because there are a very limited amount of timers that the player gets access to. And since each honey tree would need its own timer, there would not be enough timers for it to work.

btw, my goal with all this honey tree stuff is to have a system in my hack that works similarly to that of D/P/Pt (lots of trees that can all keep track of when honey was slathered on them).
There may be something you can do even with a limited number of timers.

Don't start the timer when the tree is checked. Instead, always have the timer counting, and simply record the time at which the tree is checked.

So let's say I check the tree when the timer is, I don't know... Say 0x0123. And I want the honey to wear off in 0x1000. So when I check the tree, I'll store the current time (0x0123) in some variable. When I check it again later, I compare that variable's stored time to the new current time, and if more than 0x1000 has passed, the honey wears off.

The only way this could break is if the timer loops around more than once between checking the trees. You'd need some kind of extra code (maybe a walking script?) to handle that emergency case.

But essentially,

Pseudocode for tree script
Code:
if tree flag is set:
   // honey already applied
   if (current time - tree var) > honey expiration time:
      unset tree flag
   else:
      "There's already honey on this tree."
if tree flag is unset:
   "Want to apply some honey?"
   if yes:
      set tree flag
      tree var = current time

And you'd just use one flag and one scripting variable for each tree. (Also, running checks every ten or twenty steps via the walking script could prevent timer overflow from breaking the count. You'd just want to reserve tree flags and vars in advance, so you don't have to modify the walking script every single time you add a tree.)

Remember, though, that even in a cleared and script-free ROM, script vars are in short supply!

Thanks for the suggestion. :) I decompiled Daisy's script and found the part of the script with the special(s) that seem to have something to do with the "timer".

Code:
#org 0x168DB9
special 0x187
compare 0x800D 0x2
if 0x1 goto 0x81A7AE0
special 0x188
compare 0x4025 0x1F4
if 0x0 goto 0x8168E46
...
Wait... Compare 0x4025 to 0x1F4?

That's odd... There's a "secret" script that the game engine calls directly, when a save file is first created. It sets several flags and it sets 0x4025 to 0x1F4.

And now we see that used in Daisy's script (how the hell did I miss that when making my list?). Weird.

Then I used JPAN's thread on the special and special2 commands in the R&D section to figure out what the specials are for. And...they didn't really make any sense to me...
Special 187 can be ignored. It's called by everything from legendary battles to PokeCenter nurses to, as you've discovered, Daisy. No idea what 188 does.
 

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
DavidJCobb said:
There may be something you can do even with a limited number of timers.

Don't start the timer when the tree is checked. Instead, always have the timer counting, and simply record the time at which the tree is checked.

So let's say I check the tree when the timer is, I don't know... Say 0x0123. And I want the honey to wear off in 0x1000. So when I check the tree, I'll store the current time (0x0123) in some variable. When I check it again later, I compare that variable's stored time to the new current time, and if more than 0x1000 has passed, the honey wears off.

The only way this could break is if the timer loops around more than once between checking the trees. You'd need some kind of extra code (maybe a walking script?) to handle that emergency case.

But essentially,

Pseudocode for tree script

Code:
if tree flag is set:
   // honey already applied
   if (current time - tree var) > honey expiration time:
      unset tree flag
   else:
      "There's already honey on this tree."
if tree flag is unset:
   "Want to apply some honey?"
   if yes:
      set tree flag
      tree var = current time

Thanks for helping, DavidJCobb :)

I understand what you mean about using one timer, but:

1). metapod23 says the timer resets upon entering a Pokemon Center, which is a major problem...

2). The timer runs for 18 hours, but idk if it resets and keeps going after this or if it keeps going while the game is turned off (JPAN's guide doesn't say...)?

3). I read in JPAN's guide about the walking scripts, and I don't understand how they work at all (maybe you can clear that up for me).

DavidJCobb said:
And you'd just use one flag and one scripting variable for each tree. (Also, running checks every ten or twenty steps via the walking script could prevent timer overflow from breaking the count. You'd just want to reserve tree flags and vars in advance, so you don't have to modify the walking script every single time you add a tree.)

Remember, though, that even in a cleared and script-free ROM, script vars are in short supply!

Ok, two things about variables (I don't understand them fully):

1). Once set to a certain value, will it stay at that value (even if the game is turned off) until it is either reset to 0 or set to another value? If so, then I might have just thought of another possible way I could make honey trees work...

2). What variables are free for player use (for whatever) in game?


As for the specials used in the Daisy script, there were more of them, so maybe I picked the wrong ones? I'm gonna have another look at that script today...
 
73
Posts
14
Years
  • Seen Aug 31, 2014
I'm trying to make a script that checks a pokemon's happiness (with the happiness special from the Hacked Fire Red Engine. I've tried this in-game (by editting the base happiness of Charmander), and it always defaults to the last msgbox. Can someone help me fix this?

Code:
#org 0x81C2E0
lock
faceplayer
bufferfirstpokemon 0x00
special 0xd
compare 0x8004 0xFF
if 0x1 goto @love
compare 0x8004 0x96
if 0x1 goto @adore
compare 0x8004 0x4B
if 0x1 goto @like
compare 0x8004 0x28
if 0x1 goto @meh
msgbox @dislike 0x6
callstd 0x6
release
end

#org @love
msgbox @love2 0x6
callstd 0x6
release
end

#org @love2
= Your \v\h02 loves you!

#org @adore
msgbox @adore2 0x6
callstd 0x6
release
end

#org @adore2
= Your \v\h02 adores you!

#org @like
msgbox @like2 0x6
callstd 0x6
release
end

#org @like2
= Your \v\h02 likes you!

#org @meh
msgbox @meh2 0x6
callstd 0x6
release
end

#org @meh2
= Your \v\h02 is indifferent to you.

#org @dislike
= Your \v\h02 doesn't like you.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I already ruled out this method because there are a very limited amount of timers that the player gets access to. And since each honey tree would need its own timer, there would not be enough timers for it to work.

btw, my goal with all this honey tree stuff is to have a system in my hack that works similarly to that of D/P/Pt (lots of trees that can all keep track of when honey was slathered on them).



Thanks for the suggestion. :) I decompiled Daisy's script and found the part of the script with the special(s) that seem to have something to do with the "timer".

Code:
#org 0x168DB9
special 0x187
compare 0x800D 0x2
if 0x1 goto 0x81A7AE0
special 0x188
compare 0x4025 0x1F4
if 0x0 goto 0x8168E46
...

Then I used JPAN's thread on the special and special2 commands in the R&D section to figure out what the specials are for. And...they didn't really make any sense to me...



metapod23, do you have any idea what these mean?



I might look into this later if the Daisy stuff doesn't work...but perhaps you can help to decipher what the specials in the script mean?

special 0x188 and the compare 0x4025 0x1F4 are what you're looking for.

I tested them, and it turns out that it is a step counter, like in the Safari Zone. special 0x188 seems to start the step counter and I believe special 0x197 resets it to zero.

For grooming, you would have to take 500 steps before she will groom your Pokemon again, which is why it compares 0x4025 to 0x1f4.

This could be a way to do the honey trees, but it would not be using a real-time clock, so you couldn't time it for a certain number of hours, but only a certain number of steps.

I'm trying to make a script that checks a pokemon's happiness (with the happiness special from the Hacked Fire Red Engine. I've tried this in-game (by editting the base happiness of Charmander), and it always defaults to the last msgbox. Can someone help me fix this

To use the special in the hacked engine, you would probably need to put:

Code:
special2 0x8004 0xd

instead of special 0xd in your script.

Also, you should probably use if 0x4 instead of if 0x1 - 0x4 is greater than and equal to, while 0x1 is just equal to.
 
Last edited:

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
metapod23 said:
special 0x188 and the compare 0x4025 0x1F4 are what you're looking for.

I tested them, and it turns out that it is a step counter, like in the Safari Zone. special 0x188 seems to start the step counter and I believe special 0x197 resets it to zero.

For grooming, you would have to take 500 steps before she will groom your Pokemon again, which is why it compares 0x4025 to 0x1f4.

This could be a way to do the honey trees, but it would not be using a real-time clock, so you couldn't time it for a certain number of hours, but only a certain number of steps.

Ok, thanks. But if I understand you correctly, special 0x188 stores the number of steps taken to variable 0x4025, and no other. So I wouldn't be able to have multiple honey trees with honey on them each counting their own steps. Every time I would activate the special, it would overwrite 0x4025 with the new value.

Or wait, does 0x188 work with the special2 command where I can specify the variable that the steps are stored in? Either way, though, I think I will still look into using the timer special.

Thanks again.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
1). Once set to a certain value, will it stay at that value (even if the game is turned off) until it is either reset to 0 or set to another value? If so, then I might have just thought of another possible way I could make honey trees work...
Values are saved for variables 0x4000 and up, but not for variables 0x8000 and up. Some (such as 0x4020 or 0x4037) are used by the game engine and aren't safe, but those that the default game scripts use are safe (if you removed those scripts).

2). What variables are free for player use (for whatever) in game?
My post with the list of all flags also has a list of all vars. You can check that to see which variables were originally used for what, and decide which ones are safe based on their original uses. (Any that aren't written to directly by the game engine, and that were used in original game scripts (i.e. Daisy, Selphy, etc.), should be safe.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Ok, thanks. But if I understand you correctly, special 0x188 stores the number of steps taken to variable 0x4025, and no other. So I wouldn't be able to have multiple honey trees with honey on them each counting their own steps. Every time I would activate the special, it would overwrite 0x4025 with the new value.

Or wait, does 0x188 work with the special2 command where I can specify the variable that the steps are stored in? Either way, though, I think I will still look into using the timer special.

Thanks again.

You could possibly do it counting steps by using a different variable for each tree, similar to what DavidJCobb said, and by never deacitivating the counter once it's started. The only problem with that is I don't know if it would loop back around to 0 when it reached the end.

Anyway, to try it, you would need to copy the variable in 0x4025 to your own variable (copyvar). Then add the number of steps you want the honey tree to work at (addvar) to your variable. Then use comparevar to see if 0x4025 is equal to or greater than the number in your var.

I guess you would also need a second variable though, if it does loop, to check if the step count is less than the number of steps needed (meaning that the step count has looped back around and started over at 0).

The only issues with this would be that anything within that range would not yield a positive result, so say between 0 and 500 steps there would be no Pokemon, then between 65535 and 66035 steps there would be no Pokemon, and so on. Still, being that 65,000 steps is quite a lot, it could almost do what you wanted, except that it doesn't count it in real time.

I think your only choice for that is JPAN's hacked engine. Maybe you'll have better luck than I did. You would have to do something similar with that as well, though, since there's only one timer.
 

shinyabsol1

Pokemon DarkJasper!?
333
Posts
13
Years
  • Seen Nov 23, 2022
DavidJCobb said:
Values are saved for variables 0x4000 and up, but not for variables 0x8000 and up. Some (such as 0x4020 or 0x4037) are used by the game engine and aren't safe, but those that the default game scripts use are safe (if you removed those scripts).

My post with the list of all flags also has a list of all vars. You can check that to see which variables were originally used for what, and decide which ones are safe based on their original uses. (Any that aren't written to directly by the game engine, and that were used in original game scripts (i.e. Daisy, Selphy, etc.), should be safe.

Thanks. This clears some things up. I'll take a look at your post.

metapod23 said:
You could possibly do it counting steps by using a different variable for each tree, similar to what DavidJCobb said, and by never deacitivating the counter once it's started. The only problem with that is I don't know if it would loop back around to 0 when it reached the end.

Anyway, to try it, you would need to copy the variable in 0x4025 to your own variable (copyvar). Then add the number of steps you want the honey tree to work at (addvar) to your variable. Then use comparevar to see if 0x4025 is equal to or greater than the number in your var.

I guess you would also need a second variable though, if it does loop, to check if the step count is less than the number of steps needed (meaning that the step count has looped back around and started over at 0).

The only issues with this would be that anything within that range would not yield a positive result, so say between 0 and 500 steps there would be no Pokemon, then between 65535 and 66035 steps there would be no Pokemon, and so on. Still, being that 65,000 steps is quite a lot, it could almost do what you wanted, except that it doesn't count it in real time.

I think your only choice for that is JPAN's hacked engine. Maybe you'll have better luck than I did. You would have to do something similar with that as well, though, since there's only one timer.

Hmmm...I was thinking about something along the lines of this yesterday. I'm gonna fool around with that special using the commands you mentioned to see what I get. I also have another idea (using the rtc) that might work somewhat, but it will certainly be limited in its similarity to D/P/Pt's system. Oh well, I guess something that is close is better than nothing...

As for the whole timer thing, I've pretty much given up on that. All that possible looping and pkmn center stuff has really dented my interest in it...

Thanks for all your help, both metapod23 and DavidJCobb :)
 
73
Posts
14
Years
  • Seen Aug 31, 2014
Okay, I've encountered another problem with the Hacked Special 0xD Happiness Check:

Code:
#org 0x81C2E0
lock
faceplayer
bufferfirstpokemon 0x00
special2 0x8004 0xd
compare 0x8004 0xFF
if 0x4 goto @love
compare 0x8004 0x96
if 0x4 goto @adore
compare 0x8004 0x4B
if 0x4 goto @like
compare 0x8004 0x28
if 0x3 goto @meh
msgbox @dislike 0x6
callstd 0x6
release
end

#org @love
msgbox @love2 0x6
callstd 0x6
release
end

#org @love2
= Your \v\h02 loves you!

#org @adore
msgbox @adore2 0x6
callstd 0x6
release
end

#org @adore2
= Your \v\h02 adores you!

#org @like
msgbox @like2 0x6
callstd 0x6
release
end

#org @like2
= Your \v\h02 likes you!

#org @meh
msgbox @meh2 0x6
callstd 0x6
release
end

#org @meh2
= Your \v\h02 is indifferent to you.

#org @dislike
= Your \v\h02 doesn't like you.

I put this into the game and when I check it (I set Charmander's base Happiness to 0 and lost the rival match, run from the rest) it automatically goes to the "Adore" level, which is suppose to be 150 Happiness or better only. Do I need to call the special before EVERY check? Or is there another problem?
 
Status
Not open for further replies.
Back
Top