• 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.
7
Posts
9
Years
Game: Pokemon FireRed
Type: Person event (Scripted Legendary Encounter)
Editor: PKSV-UI by Score_Under (via AdvanceMap 1.95)
Script:
Spoiler:


The goal: I have all three legendary dogs in a spot. What I want them to do is act like all the other legendary encounters here. I examined other legendary scripts to try to determine how they differed, and then could make my own to do this. Eventually I want to make all of the Gen II legendaries available somewhere.
What's actually happening:Catching the Pokemon does nothing. That is, it's still there, available for capture as many times as I want. If I run, the flee message for ZAPDOS displays, then if I walk away, any of the three that I've already ran from comes back after I take a step. If I make the legendary faint, the message doesn't display, but the pokemon still comes back after the next encounter. From the code examination (I have Entei's in the script, Suicune and Raikou's are similar, just with their own flags and coding) the issue (I believe) has to be in how var 8004 is being set. I'm not sure what exactly 8004 needs to become for it to work properly.

Screenshots and/or videos:
Since I can't post links, apparently, since I'm new here (and this is also my first attempt at hacking), the screencaps aren't available right here... www dot mainstreet52 dot info slash images slash FRIPH slash Dogs1.png is the first image (the others are Dogs2.png and Dogs3.png, and they were taken in numerical order.) I'm not sure how helpful they'll be... this is on fleeing twice.

UPDATE: Okay, so I figured out the Var... changed the var, and it no longer says ZAPDOS flew away, it gets the Pokemon correct. That's all that it fixed though. The code's the same as the other legendaries except for the changes to get the correct pokemon there... so I don't know what I'm doing wrong.
 
Last edited:
55
Posts
10
Years
  • Age 27
  • Seen Oct 18, 2014
Okay so I tried the script myself and it works fine. So you must be doing something wrong with the compiling.

You started the script with "#dynamic 0x800000", right? When you compile with XSE, you a small window pops up showing you where the script was located, which is at free space after the offset you specified (800000). Just copy the offset compiled for @start and enter it in Advance Map.

Are you effing kidding me? I forgot to change the #dynamic to 0x9B0000 and now I feel completely retarded! Thanks for the help! I'll see if it works right now!
 
55
Posts
10
Years
  • Age 27
  • Seen Oct 18, 2014
So I've scrapped my last script, cause it still wouldn't work, so I decided to start working on a starter script. Prof. Maple is standing outside of your house, waiting to ask a favor to meet his acquaintance. Prof. Maple then gives you Bulbasaur, Charmander, or Squirtle. After you get a gift from his acquaintance, you meet him in his Lab. I haven't gotten it figured out yet, but this is all I have.

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @intro 0x6
goto @1

#org @1
msgbox @favor 0x6
goto @bulba1

#org @bulba
msgbox @askbulba 0x6
yesnobox 0x0 0x0
compare 0x800D 0x1
if 0x1 goto @yesbulba
compare 0x800D 0x0
if 0x0 goto @char

#org @char
msgbox @askchar 0x6
yesnobox 0x0 0x0
compare 0x800D 0x1
if 0x1 goto @yeschar
compare 0x800D 0x0
if 0x0 goto @squirt

#org @squirt
msgbox @asksquirt 0x6
yesnobox 0x0 0x0
compare 0x800D 0x1
if 0x1 goto @yessquirt
compare 0x800D 0x0
if 0x0 goto @bulba

#org @yesbulba
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @gotbulba 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @namebulba 0x5
compare 0x800D 0x1
if 0x1 call @name
msgbox @carebulba 0x6
release
end

#org @yeschar
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @gotchar 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @namechar 0x5
compare 0x800D 0x1
if 0x1 call @name
msgbox @carechar 0x6
release
end

#org @yessquirt
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @gotsquirt 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @namesquirt 0x5
compare 0x800D 0x1
if 0x1 call @name
msgbox @caresquirt 0x6
release
end

#org @name
call 0x1A74EB
return

#org @intro
= Good morning, [PLAYER]. \nI need a favor from you.

#org @favor
= Can you go visit Prof. Hickory for me? \nHe lives in Castor Town, which \lis just a short walk from here. \lBut the route is full of Pokémon, \lso I'll give you a Pokémon to borrow.

#org @askbulba
= Would you like a Bulbasaur?

#org @gotbulba
= You received a Bulbasaur!

#org @namebulba
= Would you like to name Bulbasaur?

#org @carebulba
= Please take care of Bulbasaur!

#org @askchar
= Would you like a Charmander?

#org @gotchar
= You received a Charmander!

#org @namechar
= Would you like to name Charmander?

#org @carechar
= Please take care of Charmander!

#org @asksquirt
= Would you like a Squirtle?

#org @gotsquirt
= You received a Squirtle!

#org @namesquirt
= Would you like to name Squirtle?

#org @caresquirt
= Please take care of Charmander!


I've tested this out, and I've had a weird problem. I received a ????????, a Masterball, and several Great Balls, for I cannot choose anything else. Can anybody help me out here?
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
Fire red
editor XSE

soon as it warps the screen just stays black and nothing happens

Spoiler:

Your warp command is telling the game to warp to map bank 41 and map number 0. Just to be sure, do you want to warp to the 0th map in the 41st bank? Because I haven't touched A-Map in awhile, but I don't remember 41 banks...


So I've scrapped my last script, cause it still wouldn't work, so I decided to start working on a starter script. Prof. Maple is standing outside of your house, waiting to ask a favor to meet his acquaintance. Prof. Maple then gives you Bulbasaur, Charmander, or Squirtle. After you get a gift from his acquaintance, you meet him in his Lab. I haven't gotten it figured out yet, but this is all I have.




I've tested this out, and I've had a weird problem. I received a ????????, a Masterball, and several Great Balls, for I cannot choose anything else. Can anybody help me out here?

Do you mean you're receiving a ???????? Pokemon and it's holding a masterball/great ball? And what do you mean you cannot choose anything else? Are you stuck on the bulbasaur one and you can only select yes to get out of it? From what I see, the givepokemon command looks fine to me.
 
Last edited:
6,355
Posts
18
Years
  • Seen Apr 16, 2020
Fire red
editor XSE

soon as it warps the screen just stays black and nothing happens

Spoiler:

What Teh Blazer said, it's map bank first then map number. But make sure that the bank and map numbers are in decimal, for example, 0x41 is for map number 65, if you want the 41th map in whichever bank in Advance Map, that would be 0x29.

So I've scrapped my last script, cause it still wouldn't work, so I decided to start working on a starter script. Prof. Maple is standing outside of your house, waiting to ask a favor to meet his acquaintance. Prof. Maple then gives you Bulbasaur, Charmander, or Squirtle. After you get a gift from his acquaintance, you meet him in his Lab. I haven't gotten it figured out yet, but this is all I have.




I've tested this out, and I've had a weird problem. I received a ????????, a Masterball, and several Great Balls, for I cannot choose anything else. Can anybody help me out here?

Your script should execute without getting any items. Make sure to add a "setvar 0x8004 0x0" before the nicknaming special so that it works correctly.

I also noticed that the script won't jump to the next pokémon if you say no to the first one. I'm pretty sure you're compiling the scripts wrong. Are you sure you followed my instructions from my previous posts?
 

Rezordaxx

Asks many questions!
290
Posts
10
Years
What Teh Blazer said, it's map bank first then map number. But make sure that the bank and map numbers are in decimal, for example, 0x41 is for map number 65, if you want the 41th map in whichever bank in Advance Map, that would be 0x29.

I get it now thanks! stupid I didnt think of that!
 
55
Posts
10
Years
  • Age 27
  • Seen Oct 18, 2014
Your warp command is telling the game to warp to map bank 41 and map number 0. Just to be sure, do you want to warp to the 0th map in the 41st bank? Because I haven't touched A-Map in awhile, but I don't remember 41 banks...




Do you mean you're receiving a ???????? Pokemon and it's holding a masterball/great ball? And what do you mean you cannot choose anything else? Are you stuck on the bulbasaur one and you can only select yes to get out of it? From what I see, the givepokemon command looks fine to me.

Nothing pops up for a selection. No yes/no box, no text boxes (except for the items I get), and I only get the items. I need a serious amount of help here.
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
Nothing pops up for a selection. No yes/no box, no text boxes (except for the items I get), and I only get the items. I need a serious amount of help here.

Something really wrong is going on here, especially since you don't have any "giveitem" commands in your script so you shouldn't be receiving items in the first place. As Spheal said, have you made sure you compiled the script correctly and assigned the same address you got from compiling the script to an event OW?

Also, Spheal is correct in adding the "setvar 0x8004 0x0" and your yes/no thing is a bit off. But I think as for now, making sure you compiled the script correctly comes first, but do keep those in mind.
 
55
Posts
10
Years
  • Age 27
  • Seen Oct 18, 2014
Something really wrong is going on here, especially since you don't have any "giveitem" commands in your script so you shouldn't be receiving items in the first place. As Spheal said, have you made sure you compiled the script correctly and assigned the same address you got from compiling the script to an event OW?

Also, Spheal is correct in adding the "setvar 0x8004 0x0" and your yes/no thing is a bit off. But I think as for now, making sure you compiled the script correctly comes first, but do keep those in mind.

I'll try cleaning up the script and post the results later. If everything goes correctly, then I'll have a working starter giveaway!
 
72
Posts
10
Years
  • Age 33
  • Seen Dec 18, 2017
My script is happening at a random order. Sometimes it works like it is supposed too, and sometimes it works out of order. What am I doing wrong?

I want to talk the NPC to tell you he is on the phone, then end. When you talk to him again he gets angrier and tells you to leave. Then it should end again. Finally, the third time you talk to him he yells at you and a battle commences.


Spoiler:
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
My script is happening at a random order. Sometimes it works like it is supposed too, and sometimes it works out of order. What am I doing wrong?

I want to talk the NPC to tell you he is on the phone, then end. When you talk to him again he gets angrier and tells you to leave. Then it should end again. Finally, the third time you talk to him he yells at you and a battle commences.


Spoiler:

As a general rule of thumb, you should only be using flags 200-2FF, the ones you're using are too high and can be unstable.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
I'm having some trouble with this script. The script itself actually plays out accordingly but for some reason the move_camera doesn't want to work and doesn't move. Any help?

Script: (emerald codes)
Spoiler:


ill love you forever


also.. it makes no sense because 1) it's suppose to be a level script so once on it, it activates but doesn't do the movements yet I've done level script with camera before and 2) the script right after this one works perfectly with the move_cameras and everything..
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I'm having some trouble with this script. The script itself actually plays out accordingly but for some reason the move_camera doesn't want to work and doesn't move. Any help?

Script: (emerald codes)
Spoiler:


ill love you forever


also.. it makes no sense because 1) it's suppose to be a level script so once on it, it activates but doesn't do the movements yet I've done level script with camera before and 2) the script right after this one works perfectly with the move_cameras and everything..

Wasn't it specials 0x113 and 0x114 for the camera?
 
72
Posts
10
Years
  • Age 33
  • Seen Dec 18, 2017
As a general rule of thumb, you should only be using flags 200-2FF, the ones you're using are too high and can be unstable.

I'm sorry. I'm still new to this. What the heck is 2FF? ~_~

Also, is there a guide on which flags I can overwrite, and which flags already do stuff in game?
 

Rezordaxx

Asks many questions!
290
Posts
10
Years
I'm sorry. I'm still new to this. What the heck is 2FF? ~_~

Also, is there a guide on which flags I can overwrite, and which flags already do stuff in game?

2FF is a heximal number its means 767 in a decimal number
you can use 200 (heximal number(512 in decimal numbers)) til 2FF (heximal number)

hope you understand
 
72
Posts
10
Years
  • Age 33
  • Seen Dec 18, 2017
Thanks rezordaxx.

Another question.
when you are defeated before reaching the first Pokemon center you go back to your house and your mom heals you. How do you change where you go to be healed?
 
6,355
Posts
18
Years
  • Seen Apr 16, 2020
Thanks rezordaxx.

Another question.
when you are defeated before reaching the first Pokemon center you go back to your house and your mom heals you. How do you change where you go to be healed?

Pokémon Centers have level scripts where a different "healing place" is set whenever you enter one. The XSE command is "sethealingplace 0xX". For example, in Fire Red, having all your pokémon faint after using "sethealingplace 0x1" will get you back to Pallet Town, 0x2 to Viridian City and so on.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
Wasn't it specials 0x113 and 0x114 for the camera?

sorry guess i should specify.. it's an emerald hack so the #s are 116 and 117. i just didn't know if it's anything with the script itself that is the problem with why the cameras aren't working
 
72
Posts
10
Years
  • Age 33
  • Seen Dec 18, 2017
Pokémon Centers have level scripts where a different "healing place" is set whenever you enter one. The XSE command is "sethealingplace 0xX". For example, in Fire Red, having all your pokémon faint after using "sethealingplace 0x1" will get you back to Pallet Town, 0x2 to Viridian City and so on.

But, how would I even begin to write a script for that? Would I have to make a level script?

I want the player to warp back to a specific person in the starting town if they feint before reaching a center.
 
Status
Not open for further replies.
Back
Top