• 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?".
  • 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.

colcolstyles

Yours truly
1,588
Posts
15
Years
I'm a beginning scripter and experimenting with various scripts. I have a problem right here, it's hidesprite. The sprite keeps reappearing after I make a step, although the flag number is the same as the person's ID. The cry also doesn't work. Can someone help me? (I cannot post a screenshot because the system disallows me to post an URL before having 15 posts.)


Spoiler:


My script.

You need a 'waitcry' command after 'cry' or else the game will go ahead and start the battle without waiting for the cry to finish. As for the other problem, everything should work as long as you have '1024' written in the "Person ID" field in AdvanceMap. I can't tell you what's wrong because I don't have the ROM. Make sure that the address in the "Script offset" field matches the address of "@start" that is displayed when you compile the script in XSE.
 
3
Posts
13
Years
  • Seen Aug 29, 2010
Thank you about the cry, it works now. As for the hidesprite, I added another event on the map, used the script on that person event and it worked flawlessly.

Thank you =)
 

Surmonter

Hear No Evil
1,101
Posts
13
Years
I just started scripting, and I am disecting scripts from other tutorials to try and teach myself most of the stuff. Well, I got down a lot of the basics but I am have trouble.

With this script, something always goes wrong. It says "Hello! Happy birthday!" then skips the rest of the dialouge (after pausing for a few seconds) and goes right to "Can you take care of it?"

Can someone please help me?

Spoiler:
 
32
Posts
14
Years
Hey, so I've got this script and it's got a couple bugs. It works for the most part, but there are just some bugs I don't know how to work out on my own.

I'll tell you basically what I want my script to do. Basically, you pick one of your starter pokemon (This is the script for one of the 9 pokeballs in the lab) and once you pick your pokemon, you're asked to give it a nickname and the like. Then after you've got it, your rival randomly picks one of the 3 starters that is a superior type to your own. Then he walks off and leaves. Most of it works.

Here's the script
Spoiler:


Now here's the list of bugs
1. Obviously it doesn't show a Cyndaquil, it shows a Dratini. I don't know what the pokemon numbers are in hex, otherwise it would show them correctly. Anyone got a list? I've got the normal pokemon list, but I don't know how to convert it to hex.

2. For some reason, when you say yes to giving a nickname, a tile is randomly changed to another tile on the map, a sound effect plays and the script continues. The nickname screen never shows. None of that was programmed, which is very odd.

3. This isn't really a bug, I just didn't know how. So, the rival picks randomly one of the 3 starters. How do I make the game know that this has happened? Should I use flags and just have like 9 of them and check if one of them is on? I don't know ... just someone say how the game does it and I'll do it that way.

4. Once the rival leaves, I don't know why, but it says "PLAYER recieved a ????????. PLAYER put the ???????? in the bag" Gary's theme never ends and that textbox won't leave. The cause of this, I don't know.

If you could just list the cause and the fix (Cause due to future reference, just giving me the fix doesn't help me learn :P) that would be great.

Also, while we're on the subject, there's another thing in my game. I have another event script that works basically fine. One thing though, I want the character used in the event to be nonexistent until the actual event is initiated, sort of like Oak in the beginning of FR/LG. Anyone know how to do this?

Oh, and in case it's needed, this is LeafGreen.

Thank you very much in advance!
 

KotovSyndrome_

Consumer of many asparagus.
57
Posts
15
Years


Can someone please help me?


Spoiler:


Try this. Change is in bold.
 
2
Posts
16
Years
  • Seen Dec 22, 2010
Game: FireRed
Type: Person

It's an item pickup, it picks up fine, but doesn't disappear until I walk around the map. I'd appreciate any help!

Spoiler:
 
32
Posts
14
Years
Spoiler:


2. For some reason, when you say yes to giving a nickname, a tile is randomly changed to another tile on the map, a sound effect plays and the script continues. The nickname screen never shows. None of that was programmed, which is very odd.

3. This isn't really a bug, I just didn't know how. So, the rival picks randomly one of the 3 starters. How do I make the game know that this has happened? Should I use flags and just have like 9 of them and check if one of them is on? I don't know ... just someone say how the game does it and I'll do it that way.

Also, while we're on the subject, there's another thing in my game. I have another event script that works basically fine. One thing though, I want the character used in the event to be nonexistent until the actual event is initiated, sort of like Oak in the beginning of FR/LG. Anyone know how to do this?

I've fixed everything but the listed bugs in the script I posted earlier. I'd really appreciate assistance on the last 3.
 
14
Posts
13
Years
  • Seen Mar 29, 2011
I would like to request help in editing pokemon trainer's text?

Advance text doesn't work for me and I can't find advance trainer.

...I believe this would be called a trigger type?

Right now I'm using PKSV, AM, and PET.
 
47
Posts
13
Years
I would like to request help in editing pokemon trainer's text?

Advance text doesn't work for me and I can't find advance trainer.

...I believe this would be called a trigger type?

Right now I'm using PKSV, AM, and PET.

In advancemap go to 'events' and find trainer who's text you want to edit. Select that trainer and on the right you will see a button open script.
You can open the script in a script editor like XSE. In that script you can find and edit the text the trainer says(usually at the bottom). if you make the text longer, you may need to use a diffrent pointer or you'll overwrite some other game data. Use free space finder(built in in advance map) to find one. Then compile the script and burn it to your rom.
If you have problems finding this check out the XSE script tutorial on the forum.(all credit goes to the creator of the tutorial obviously)

all done :D
 
14
Posts
13
Years
  • Seen Mar 29, 2011
Okay, thank you! I just have one more question(Sorry!).

Well, I guess this might be considered two.

(1) I'm editing FireRed, where do I find Gary/Green's battle with Ash/Red? All I found is Green's text.

(2)How do you make a person walk in an event(As in, walk up to you, talk, then battle you) and then disappear after he loses?
 
47
Posts
13
Years
Still pretty new to scripting myself so here's a few noob questions i can't seem to find a straightforward answer to.

Questions:
Spoiler:


Thanks in advance:)

-------------------------------------------------

Okay, thank you! I just have one more question(Sorry!).

Well, I guess this might be considered two.

(1) I'm editing FireRed, where do I find Gary/Green's battle with Ash/Red? All I found is Green's text.

(2)How do you make a person walk in an event(As in, walk up to you, talk, then battle you) and then disappear after he loses?

1:
I don't really know which battle you mean, try adding a screenshot or something. :)
If you want to edit the pokemon, their moves, the trainer's items, the money you get for beating him etc... I advise HackMew's Advance Trainer. Checkout all of HackMew's tools while you are at it. They are GREAT! Thanks to HackMew! :)

2:
check out thethethethe's Scripting Tutorial, you will need the command 'applymovement' which is explained there, the values to make you character move are also included in that awesome tutorial. It helped me a great deal in starting to script! Thanks thethethethe! :)

hope this helps...
 
Last edited:

Flandre Scarlet

Free your mind.
356
Posts
16
Years
Hey guys, I have a small problem with this script, when I talk to the person from the right side, nothing happens, it just goes on with the part if you were to talk to the person from the front (I hope that make sense.)

Spoiler:


If someone were willing to help me, I'd be highly grateful. Thanks!
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Hey guys, I have a small problem with this script, when I talk to the person from the right side, nothing happens, it just goes on with the part if you were to talk to the person from the front (I hope that make sense.)

If someone were willing to help me, I'd be highly grateful. Thanks!
Simply put, PLAYERFACING doesn't always work properly. This can be fixed by copybyte command;
Code:
'---------------
#org 0x808B31
msgbox 0x8808BF8 MSG_FACE '"I'm sorry, but no one is allowed\n..."
[S-HIGHLIGHT]setvar PLAYERFACING 0x0000
copybyte 0x020370D4 0x02036E58            ;Prepare the PLAYERFACING variable.
compare PLAYERFACING 0x04                       ;Is the player facing right?[/S-HIGHLIGHT]
if 0x1 goto 0x8808B99
setdooropened 0x20 0xB
doorchange
clearflag 0x1008
showsprite 0x8
applymovement 0x3 0x8808D1B
waitmovement 0x0
applymovement 0x8 0x8808D1F
waitmovement 0x0
msgbox 0x8808CA0 MSG_NORMAL '"[red_fr]???: Officer, we need you ..."
msgbox 0x8808CEB MSG_NORMAL '"[blue_fr]Okay, I'm coming in now!"
applymovement 0x8 0x8808D23
waitmovement 0x0
hidesprite 0x8
applymovement 0x3 0x8808D26
waitmovement 0x0
hidesprite 0x3
setflag 0x1009
setdoorclosed 0x20 0xB
release
end

'---------------
#org 0x808B99
setdooropened 0x20 0xB
doorchange
clearflag 0x1008
showsprite 0x8
applymovement MOVE_PLAYER 0x8808D09
waitmovement 0x0
applymovement 0x3 0x8808D0D
waitmovement 0x0
applymovement 0x8 0x8808D11
waitmovement 0x0
msgbox 0x8808CA0 MSG_NORMAL '"[red_fr]???: Officer, we need you ..."
msgbox 0x8808CEB MSG_NORMAL '"[blue_fr]Okay, I'm coming in now!"
applymovement 0x8 0x8808D14
waitmovement 0x0
hidesprite 0x8
applymovement 0x3 0x8808D17
waitmovement 0x0
hidesprite 0x3
setflag 0x1009
setdoorclosed 0x20 0xB
release
end


'---------
' Strings
'---------
#org 0x808BF8
= I'm sorry, but no one is allowed\nin here.\pWe have an evil organisation\ninside the building causing chaos.\pWe already have enough people\ninside to defeat them, sorry.

#org 0x808CA0
= [red_fr]???: Officer, we need you in\nhere!\pThings have gotten out of control!

#org 0x808CEB
= [blue_fr]Okay, I'm coming in now!


'-----------
' Movements
'-----------
#org 0x808D1B
#raw 0x13 'Step Right (Normal)
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements

#org 0x808D1F
#raw 0x10 'Step Down (Normal)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0x808D23
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x808D26
#raw 0x12 'Step Left (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x808D09
#raw 0x10 'Step Down (Normal)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

#org 0x808D0D
#raw 0x10 'Step Down (Normal)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

#org 0x808D11
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0x808D14
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x808D17
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
 
33
Posts
13
Years
  • Seen Dec 12, 2020
Your problem is this:
Code:
setflag 501

The 501 needs to be 0x501.
Code:
setflag 0x501


OMG --' sorry for asking that noob question... really I'm sorry and thanks a lot

EDIT: huh... Still don't work...

here is the final script:

Code:
'---------------
#org 0x9C51CC
lock
checkflag 0x501
if 0x1 goto 0x89C7A2A
msgbox 0x89C7A5B MSG_FACE '"Maman: j'ai une\nmauvaise nouvelle..."
msgbox 0x89C7B50 MSG_FACE '"Maman non reste avec\nmoi! Maman! ..."
fadescreen 0x1
hidesprite LASTTALKED
setflag 0x501
fadescreen 0x0
msgbox 0x89C7BC8 MSG_FACE '"ouvre la lettre de\nMaman.\lCher  ..."
release
end

'---------------
#org 0x9C7A2A
release
end


'---------
' Strings
'---------
#org 0x9C7A5B
= Maman: j'ai une\nmauvaise nouvelle pour toi, je\lsuis gravement malade et\lje vais mourir. Il est trop dur\lpour moi de te dire ce qu'il\lfaut que je te dise, c'est\lpourquoi je t'ai écrit une\llettre, j'espère que tu ne m'en\lvoudras pas, je t'aime\l

#org 0x9C7B50
= Maman non reste avec\nmoi! Maman! MAMAAAAAAAN!\lNOOOOOON! J'ai besoin de toi\ls'il te plaît ne me laisse\lpas! Mamaaaan!\l

#org 0x9C7BC8
= ouvre la lettre de\nMaman.\lCher  p , si tu lis cette\llettre c'est que je ne suis plus\llà, j'ai beaucoup de choses à te\ldire alors je vais commencer par\lle début. Je t'ai dit qu'à ta\lnaissance, ton père nous avait\labandonnés, je t'ai menti, c'est\lmoi qui suis partie en\lt'emportant, parce que j'aivais\lpeur de ce dont il\létait capable, quand tu est né\let pendant ma grossesse,\lil n'arrêtait pas de répèter\lqu'il allait faire de toi le\lplus grand dresseur pokémon de\ltous les temps. Il était très\lsévère avec lui même et se\lcontraignait à une conduite\lexemplaire, si bien que j'ai eu\lpeur. Peur qu'il fasse la même\lchose avec toi et que tu ne sois\lpas heureux à cause de lui. Je\lne lui ai pas donné de nouvelles\ldepuis que je suis partie, et\lj'aimerais que tu le retrouve,\lc'est quelqu'un de bien. Je\lvoudrais qu'il sache que je\lne l'ai pas quitté parce que je\lne l'aimais pas. Il t'aidera\ldans la vie et t'aidera quoi que\ltu fasse. Je T'aime, Maman
 
Last edited:

Teh Newbeh

Yellow Gold™
29
Posts
13
Years
  • Seen Oct 27, 2023
Is it possible to continue a script after losing in a trainer or pokemon battle without asm?
 
33
Posts
13
Years
  • Seen Dec 12, 2020
huh sorry, I did'nt know I had to put the flag number in the ID. Problem solved, thank you for all

teh newbeh: ask Dante, author of pokémon crono, he did that in a trainerbattle (battling giovani with a nidorino lvl 33 and you've only a poochyena lvl 5 xD)
 
Last edited:
1
Posts
13
Years
Hi. My goal in this script is to, when you talk to gary,
let him walk to the mart (a few steps right), make
him tell the player that it's closed and then run off.
Player 'thinks'(in grey) that gary is a moron, and then
OAK appears from above. He says: Hey, kid! Don't run off!
Then he walks to the player. Here is when it stops working
instead of saying that its dangerous to stay outside and
then taking player with him to the lab, only a weird box on the left
appears and then after clicking A a yes/no box appears.

here's the script:
Spoiler:


what am i doing wrong?
 

Klaww The Clown

One With A Face
4
Posts
13
Years
This is my first post, and I spent about 15 minutes to figure out if this went under script help or simple questions, but...Yeah...

Anyway...

Game: Pokemon Fire Red
Type: Person
Editor: XSE
Script:
Spoiler:

Screenshots and/or Videos: None...

Basically, if you don't wanna read that, my problem is with the "giveitem 0x15D 0x1 MSG_OBTAIN" line. I figured it would give me the OAK'S PARCEL, but when I press debug, it says "missing #define or parameter".

Any other advice would be good, since I just started trying to script. (No hex editor... Yet.) I probably did something wrong with flags, anyway.

This is probably a really stupid newbie mistake, but yeah.

Also, ignore the dialog. I'm definitely changing it laters. That's the MOM script by the way, and it's not fully done.

Just keep in mind that I'm new, pl0x? :P

And, really sorry if I put this in the wrong place. :embarrass
 
Status
Not open for further replies.
Back
Top