• 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.
20
Posts
14
Years
Ok, i set the variables for my script block, and below is my script but instead of getting what i want to happen(an applymovement battle script) the game now resets, any1 able to help me.

Spoiler:
 
5,256
Posts
16
Years
Spoiler:
 
20
Posts
14
Years
Spoiler:

Ok i fixed the script, but It seems to have the same effect. The game keeps reseting, the only weird thing is that i don't even make it to the script block before it resets.

I think it could have something to do with the setvar? anyone have any suggestions?
 

Lyzo

Back from vacation
261
Posts
17
Years
Ok i fixed the script, but It seems to have the same effect. The game keeps reseting, the only weird thing is that i don't even make it to the script block before it resets.

I think it could have something to do with the setvar? anyone have any suggestions?

Wait. You don't make it to the script event tile? Check if one of your person event tiles has their behaviour set to hidden. There's multiple, and some of them cause the game to reset, when you get near.
 
20
Posts
14
Years
Wait. You don't make it to the script event tile? Check if one of your person event tiles has their behaviour set to hidden. There's multiple, and some of them cause the game to reset, when you get near.


Oh jeeze well lol yea i thought maybe the person event was supposed to be set to hidden, like Professor Oak in pallet town, hmm let me fix the person event and i will get back to you on that.
 

Lyzo

Back from vacation
261
Posts
17
Years
Oh jeeze well lol yea i thought maybe the person event was supposed to be set to hidden, like Professor Oak in pallet town, hmm let me fix the person event and i will get back to you on that.
There's three different Hidden's, not all of them reset the game, I thought. Try them ;)
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Oh jeeze well lol yea i thought maybe the person event was supposed to be set to hidden, like Professor Oak in pallet town, hmm let me fix the person event and i will get back to you on that.

Prof. Oak's sprite isn't set to hidden, it uses a special flag to hide it. I think it uses 2C, and that's what I use for all the sprites I want to be hidden on the map when you first enter - setting the behavior to hidden will make it invisible, but still there and able to be bumped into by the player. Just set the sprite's Person ID to 2c.
 
20
Posts
14
Years
ok im gonna get this, so i will repost my script, but i will try to give more info this time, in the picture below you can see the script tile where I walk on and the person tile that is supposed to walk to my position on the script tile.
ScreenShot3-5.jpg


I have the person event invisible, but not through Adv.Map.
My problem now is that the game freezes when
I step on the Script tile!
I don't know why but below is the adv map settings for the script tile.

ScreenShot4-4.jpg


My Script
Spoiler:

Thanks for any future suggestions, once I learn this to the fullest I plan to put a tutorial up about it since i've searched far and wide and found not a single one! Thanks from Hackerxide.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
ok im gonna get this, so i will repost my script, but i will try to give more info this time, in the picture below you can see the script tile where I walk on and the person tile that is supposed to walk to my position on the script tile.
ScreenShot3-5.jpg


I have the person event invisible, but not through Adv.Map.
My problem now is that the game freezes when
I step on the Script tile!
I don't know why but below is the adv map settings for the script tile.

ScreenShot4-4.jpg


My Script
Spoiler:

Thanks for any future suggestions, once I learn this to the fullest I plan to put a tutorial up about it since i've searched far and wide and found not a single one! Thanks from Hackerxide.

Most important change in bold. You have to set variable 4099 to something other than 0, because you have set the script to activate when 4099's var value is 0. If you don't set variable 4099 to something other than 0, it will continue endlessly and glitch up.
 

Hacks0rus

Monster Raving Looney
24
Posts
12
Years
  • Seen Nov 9, 2012
I was away from my computor for most of yesterday, but i just though i would say thanks for all your help and tips.
turns out i had the wrong version of XSE installed like [T]ouko said :)
 

tkallab

Should have been in Dissidia
1,031
Posts
16
Years
I have a simple problem here. At least, I hope it's simple, otherwise I'm stuck with this glitch.
I've made a script where the player steps on a tile, then walks up, and a msgbox opens, and that's the script. Don't get me wrong, it works perfectly, but there's a small issue.
You see, the tile the player steps on is a warp. So a little arrow shows up when he steps on it. And then the arrow continues to be there until the script is over.
So, is there a way to remove that arrow while the script is still running?

Might as well illustrate this with some screepshots I took for another forum.

fail1.png

So, here I wanna go outside. Everything okay.

fail2.png

When suddenly, someone decides to not let me out. Don't worry, this is still part of the script.

fail3.png

Now an applymovement command moves me toward the lady. BUT. The arrow is still there.

fail4.png

Even when I stop moving and start a new conversation, the arrow continues to exist.

fail5.png

It's gone after the script ends, luckily.

Is it possible to remove that arrow during the script?
 

[T]ouko

Dedicated Scripter!
46
Posts
12
Years
  • Seen Jul 9, 2013
@Hacks0rus You're welcome :)

@tkallab Since I don't see your script, I can only assume this: Maybe you used lockall in your script, if I'm correct, that freezes everything, and if something is in the middle of an animation, that doesn't matter, it get's frozen too. So my best guess would be to change lockall to lock. Also, could you post the script (maybe you did in a previous post, sorry can't find it)? Because I don't even know if you used lockall, maybe something else is wrong.
 

tkallab

Should have been in Dissidia
1,031
Posts
16
Years
Code:
#dynamic 0x800000

#org @start
checkflag 0x300
if 0x1 goto @dontgo
msgbox @comehere 0x6
applymovement 0xFF @getoverhere
waitmovement 0x0
msgbox @fateful 0x6
setflag 0x300
end

#org @fateful
= [red_fr]Good morning, you must be \v\h01.\nI will have to register you so we\lknow you've arrived.\p[black_fr]...\p[red_fr]All done. You can go upstairs now\nto commence the challenge. Good\lluck!

#org @comehere
= [red_fr]Please come over to the counter.

#org @getoverhere
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0xFE

#org @dontgo
msgbox @wrongway 0x6
applymovement 0xff @up
waitmovement 0x0
end

#org @wrongway
= [red_fr]Wait, you're going the wrong way!\nPlease take the stairs to start\lthe challenge.

#org @up
#raw 0x11
#raw 0xfe

Here's the script. Didn't even use a lock command :/
 
5,256
Posts
16
Years
As far as I know, there is no way to remove that arrow as the script will automatically lock the player. So the only way to fix it is if you put three scripts around the warp and work from there. :/

Now, I've got a minor question. If I wanted to set a tile where the player is stood, would the following work?
getplayerpos 0x7A3A 0x7A3B
setmaptile 0x7A3A 0x7A3B 0x1 0x0


If not, how would I go about doing so? Is it even possible?
 

tkallab

Should have been in Dissidia
1,031
Posts
16
Years
Why didn't I think of that -.- Thank you!
As for your question, I doubt that'd work because the script would read it as the x and y position instead of the variables :/ This is coming from just a logical thinker and not from a hacking expert though, so I'd say try it out.
 

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
Why didn't I think of that -.- Thank you!
As for your question, I doubt that'd work because the script would read it as the x and y position instead of the variables :/ This is coming from just a logical thinker and not from a hacking expert though, so I'd say try it out.


I did try it, actually, thinking the same way as you. And, of course, it didn't work.



Sorry, guy. But there is another option.

For the main script, set a var. Then jump to another org. Then in that org use the compare command to see what var has been set, then call (not jump) ANOTHER org to set the appropriate setmaptile, then return to the main script.
 
Last edited:
275
Posts
13
Years
  • Seen Oct 9, 2019
My advanced eval trick allows one to pass the value of a variable into a script that accepts only raw values and not variables. The "dynamic script compilation at run-time" link in my signature links to an explanation of how it works.

Basically, with some complex RAM edits, you can literally write a script at run-time. You'd take your script -- "setmaptile 0xWWXX 0xYYZZ 0x1 0x0 ; return" -- and convert it to hex. You'd write those hex values into variables, and then use some tricky RAM manipulation to call those variables and get the game to treat them as script code. Since you're building the script at run-time, any part of it can be changed -- in this case, the WWXX and YYZZ that get passed to setmaptile.

The effect is that functions that only take values can have those values "injected" from variables.

I should note that it is a very complex technique, but it solves problems like this quite effectively.
 
20
Posts
14
Years
ok i fixed my script, and now when i step on the script tile, my player gets the exclamation mark and faces down like i want, but the game freezes after that, so the applymovement for the other sprite, aka the one that is supposed to battle me does not move towards me. Is there any scripting to be done for the sprite itself?

Spoiler:
 

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
ok i fixed my script, and now when i step on the script tile, my player gets the exclamation mark and faces down like i want, but the game freezes after that, so the applymovement for the other sprite, aka the one that is supposed to battle me does not move towards me. Is there any scripting to be done for the sprite itself?

Spoiler:


You reference @move1 but the org is @move2.

That's all I've got. It looks fine besides that, the @move1 you reference must be blank data, since you never defined it.
 
20
Posts
14
Years
You reference @move1 but the org is @move2.

That's all I've got. It looks fine besides that, the @move1 you reference must be blank data, since you never defined it.


Ok yea i saw that and fixed it since my last post, but im glad to say i now got the script to work where the trainer comes to me when i step on the script tile, he battles me but after he is supposed to say a line and walk away. He does not say anything and is just facing me, can't talk to him, only can walk away and back onto the script tile then he says see ya later and walks away..

Is there anyway to fix this new problem....im almost there!


My new script!
Spoiler:

 
Status
Not open for further replies.
Back
Top