• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Archive] Script help thread

Status
Not open for further replies.
Thanks for the help dshayabusa and thex4, just one more (unrelated) question: is there a scripting command for getting the in-game clock time in ruby?

here's a script example of the clock. ;)
thethethethe helped me make it. :)

Code:
#org $start
checkflag 0x29E
if 0x1 goto $done
message $fix
boxset 6
call 0x1B6A9B
pause 0x1E
setflag 0x29E
release
end

#org $done
message $sun
boxset 6
call 0x1B6A91
end

#org $sun
$sun 1 = \v\h01: It's a sundial...

#org $fix
$fix 1 = \v\h01: Oh... It's a sundial...\p\v\h01: I wonder what's the\ntime today...

dunno if this is the right code. :\
 
Compiled, this script changes...
And if I change the script so It doesn't change, it freezes...
Spoiler:
 
I need some help with this script i compile it and it goes like this

Spoiler:


but when opened it just goes like this:
'-----------------------
#org 0x2DE517
Please help
 
I need some help with this script i compile it and it goes like this

Spoiler:


but when opened it just goes like this:
'-----------------------
#org 0x2DE517
Please help
Get an offset with more bytes and try again.
 
Can someone help me with this? If I
Sorry bout it being compiled.
Spoiler:

Help much appreciated.
 
i don't get what our saying

Compiled, this script changes...
And if I change the script so It doesn't change, it freezes...
Spoiler:
I think you need a sprite to do the walking so just make a person event with no offset
 
Last edited:
Compiled, this script changes...
And if I change the script so It doesn't change, it freezes...
Spoiler:

Remember you should always put an end.
Also, avoid using flag 0x200 over and over again. Safer flags are those ranging from 0x1000 to 0xFFFF. A lot more than you'll ever need.
When using an if for checking flags, there's no need to put two ifs. In fact, if the first if is not executed, the rest of the script would be executed instead.
Checking flags, however, doesn't make sense if you don't set them.
After each applymovement command you should put a waitmovement 0x0 too.
And don't forget to put callstd/boxset in the right place. That is, right after the message/msgbox command.

This is the fixed script. It should work fine even if I haven't tested it.

Spoiler:



I need some help with this script i compile it and it goes like this

Spoiler:


but when opened it just goes like this:
'-----------------------
#org 0x2DE517
Please help

When compiling a dynamic script, the offset you specify in the #dynamic part isn't going to be the exact same offset where the script will be actually compiled. This happen in most case since that offset (in your case 0x2DE517) is what XSE uses to search free space from.
Once compiled, the compiler log will show you the actual offset where the script got compiled.
As I said earlier, remember to use setflag after checking it.


Can someone help me with this? If I
Sorry bout it being compiled.
Spoiler:

Help much appreciated.

I guess you recompiled the script after compiling it. Well, you should know that if you don't pay attention, scripts may get ovewritten themselves, and that explains why you're getting a nop instead of end.
Don't forget to put callstd/boxset right after the message/msgbox command, anyway.

Try using this:

Spoiler:
 
Last edited:
Hackmew, I tried the script, but the game still just freezes. I also tried compiling at a different offset. Didn't work either.
 
Hackmew, I tried the script, but the game still just freezes. I also tried compiling at a different offset. Didn't work either.

The offset isn't the problem, obviously. The thing is you shouldn't use random setvar/special when you don't know what they do. Hence the freeze.
Also, if you give the player his/her fist Pokémon, you should enable the POKéMON menu flag as well. In FireRed it's 0x828. I did other few adjustments here and there.

Here's the fixed and working script. Simply compile it.

Spoiler:
 
For having people follow you, is it the same script for that person everytime or different for each tile.
 
For having people follow you, is it the same script for that person everytime or different for each tile.
Not entirely sure what you mean... Are you asking if you can have more than one movement per script? If so then yes you can:

Code:
applymovement 0x1 @move
waitmovement 0

#org @move
#raw [put as many movements as you want here] 0xfe
 
Spoiler:

Sorry again Hackmew, but it still just freezes.
 
Spoiler:

Sorry again Hackmew, but it still just freezes.

I'm sorry bu you must be doing something wrong.

[PokeCommunity.com] [Archive] Script help thread



To solve the problem:
  1. Make sure you're using latest version of XSE (just in case, it shouldn't really matter)
  2. Compile the script and assign the proper offset to a person
  3. Clear any savegames you may have
  4. Load your ROM, enter and exit a building and try your script

If the script still doesn't work, try using a clean ROM instead, repeating all the steps above.
 
It worked on a clean rom. Thanks Heaps Hackmew, but can I get it to dissappear afterwards (If you cant tell, Im knew at scripting:))
 
It worked on a clean rom. Thanks Heaps Hackmew, but can I get it to dissappear afterwards (If you cant tell, Im knew at scripting:))

Well, all you need is a flag which is a unique value acting like a switch that can enable and/or disable custom events. Which means you shouldn't share the same flag for different events.

And here's a little tip: to get better texts without worrying about \n \p etc, use the Text Adjuster under the Tools menu.

I'll edit your script to show you how. For further info, check the info I posted some posts above and try it yourself.

Spoiler:
 
Spoiler:


Do you have to setflag 0x1001, because its not working. The first part of the script works fine, and the player gets everything. But if you click it again. it just replays the script
 
Spoiler:


Do you have to setflag 0x1001, because its not working. The first part of the script works fine, and the player gets everything. But if you click it again. it just replays the script

Yes, you have to add a setflag 0x1001 after the if command.
 
Okay, that works fine! Thank You So much Hackmew, for help with this script!:D
 
I made this script, I'm having some trouble, it won't work for me, can anyone see a problem with it?

Spoiler:
 
Status
Not open for further replies.
Back
Top