The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #826    
Old January 13th, 2013, 08:06 PM
Powerflare's Avatar
Powerflare
Pokémon Trainer N
 
Join Date: May 2008
Location: Unova
Age: 17
Gender: Male
Nature: Rash
I'm having a few problems with one of my scripts. First of all, the nicknaming portion of the script does not work (when it goes to nickname the Pokémon ingame, it nicknames "?" and not the appropriate Pokémon - the Magikarp given in this script). My second issue: the flag (0x9006) which prevents the guy from selling the Magikarp twice (instead he just tells you to scram) appears to work; however, when I leave the room/open the start menu etc., it seemingly clears the flag/ignores the checkflag and acts as if you've never talked to the guy before (so you can buy another Magikarp - c'mon, that'd be WAY too overpowered if someone could buy TWO Magikarp ). Any suggestions/thoughts/corrections?

PS: I am aware there is no offset after the #dynamic 0x in the spoiler. I didn't think it mattered which offset it was set to. I compiled the script in a test ROM so the offset used for that would be different than the actual offset I intend to compile this script to.

EDIT: Also, another minor glitch/oddity that came up: right around when the Pokémon is given, the lock on the NPC is seemingly released and he begins moving again.

Spoiler:
Code:
#dynamic 0x

#org @start
checkflag 0x9006
if 0x1 goto @start2
lock
faceplayer
showmoney 0x0 0x0 0x0
textcolor 0x0
msgbox @msg1 0x5
compare LASTRESULT 0x1
if 0x0 goto @end
checkmoney 0x1F4 0x0
compare LASTRESULT 0x1
if 0x0 goto @notenough
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @fullparty
textcolor 0x0
msgbox @msg4 0x6
paymoney 0x1F4 0x0
updatemoney 0x0 0x0 0x0
givepokemon 0x81 0x5 0x0 0x0 0x0 0x0
fanfare 0x101
textcolor 0x2
msgbox @gotpokemon 0x4
waitfanfare
closeonkeypress
textcolor 0x2
msgbox @liketoname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
textcolor 0x0
msgbox @msg5 0x6
setflag 0x9006
hidemoney 0x0 0x0
release
end

#org @start2
lock
faceplayer
textcolor 0x0
msgbox @msg6 0x6
release
end

#org @name
countpokemon
subvar 0x800D 0x1
copyvar 0x8004 0x800D
fadescreen 0x1 
special 0x166
waitstate
return

#org @end
textcolor 0x0
msgbox @msg2 0x6
hidemoney 0x0 0x0
release
end

#org @notenough
textcolor 0x0
msgbox @msg3 0x6
hidemoney 0x0 0x0
release
end

#org @fullparty
textcolor 0x2
msgbox @full 0x6
hidemoney 0x0 0x0
release
end

#org @liketoname
= Would you like to give a\nnickname to MAGIKARP?

#org @gotpokemon
= [player] paid an outrageous [$]500\nand bought a[.] MAGIKARP?!

#org @msg1
= MAN: Hey, kid!\pHave I got a deal just for you!\pSee, in the HOENN region,\nthere's this rare POKéMON\lknown as FEEBAS.\pI'll sell one to you for just\n[$]500!\pSo whaddaya say, deal?

#org @msg2
= MAN: I'm just trying to help\nyou out!

#org @msg3
= MAN: Hey, you'll need more\nthan THAT!

#org @msg4
= MAN: Heh-heh, gee thanks kid!

#org @msg5
= MAN: Now git outta 'ere.\pScram!

#org @msg6
= MAN: Git outta 'ere.\pScram!

#org @full
= You're party is full.
__________________
I like that face! Like to battle, do you?"-Crasher Wake

"... ... ... ... ... ... ... ... ... ... ... ..." -Red

Pokémon Black Version || Pokémon White Version

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

Last edited by Powerflare; January 13th, 2013 at 08:17 PM.
Reply With Quote
  #827    
Old January 13th, 2013, 08:25 PM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
Community Supporter
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Powerflare View Post
I'm having a few problems with one of my scripts. First of all, the nicknaming portion of the script does not work (when it goes to nickname the Pokémon ingame, it nicknames "?" and not the appropriate Pokémon - the Magikarp given in this script). My second issue: the flag (0x9006) which prevents the guy from selling the Magikarp twice (instead he just tells you to scram) appears to work; however, when I leave the room/open the start menu etc., it seemingly clears the flag/ignores the checkflag and acts as if you've never talked to the guy before (so you can buy another Magikarp - c'mon, that'd be WAY too overpowered if someone could buy TWO Magikarp ^_^). Any suggestions/thoughts/corrections?

PS: I am aware there is no offset after the #dynamic 0x in the spoiler. I didn't think it mattered which offset it was set to. I compiled the script in a test ROM so the offset used for that would be different than the actual offset I intend to compile this script to.

EDIT: Also, another minor glitch/oddity that came up: right around when the Pokémon is given, the lock on the NPC is seemingly released and he begins moving again.

Spoiler:
Code:
#dynamic 0x

#org @start
checkflag 0x9006
if 0x1 goto @start2
lock
faceplayer
showmoney 0x0 0x0 0x0
textcolor 0x0
msgbox @msg1 0x5
compare LASTRESULT 0x1
if 0x0 goto @end
checkmoney 0x1F4 0x0
compare LASTRESULT 0x1
if 0x0 goto @notenough
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @fullparty
textcolor 0x0
msgbox @msg4 0x6
paymoney 0x1F4 0x0
updatemoney 0x0 0x0 0x0
givepokemon 0x81 0x5 0x0 0x0 0x0 0x0
fanfare 0x101
textcolor 0x2
msgbox @gotpokemon 0x4
waitfanfare
closeonkeypress
textcolor 0x2
msgbox @liketoname 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
textcolor 0x0
msgbox @msg5 0x6
setflag 0x9006
hidemoney 0x0 0x0
release
end

#org @start2
lock
faceplayer
textcolor 0x0
msgbox @msg6 0x6
release
end

#org @name
countpokemon
subvar 0x800D 0x1
copyvar 0x8004 0x800D
fadescreen 0x1 
special 0x166
waitstate
return

#org @end
textcolor 0x0
msgbox @msg2 0x6
hidemoney 0x0 0x0
release
end

#org @notenough
textcolor 0x0
msgbox @msg3 0x6
hidemoney 0x0 0x0
release
end

#org @fullparty
textcolor 0x2
msgbox @full 0x6
hidemoney 0x0 0x0
release
end

#org @liketoname
= Would you like to give a\nnickname to MAGIKARP?

#org @gotpokemon
= [player] paid an outrageous [$]500\nand bought a[.] MAGIKARP?!

#org @msg1
= MAN: Hey, kid!\pHave I got a deal just for you!\pSee, in the HOENN region,\nthere's this rare POKéMON\lknown as FEEBAS.\pI'll sell one to you for just\n[$]500!\pSo whaddaya say, deal?

#org @msg2
= MAN: I'm just trying to help\nyou out!

#org @msg3
= MAN: Hey, you'll need more\nthan THAT!

#org @msg4
= MAN: Heh-heh, gee thanks kid!

#org @msg5
= MAN: Now git outta 'ere.\pScram!

#org @msg6
= MAN: Git outta 'ere.\pScram!

#org @full
= You're party is full.
The flag doesn't work because that one is simply way beyond what is should be. You should be using flags in the are of 0x200 rather than 0x9000+.

Edit: Just figured out you were hacking Emerald so some of my stuff was wrong
__________________

Last edited by DrFuji; January 13th, 2013 at 08:29 PM. Reason: Wrong stuff
Reply With Quote
  #828    
Old January 14th, 2013, 12:58 AM
TheUltimateG.J's Avatar
TheUltimateG.J
 
Join Date: Oct 2011
Location: Bihar,Darbhanga
Age: 16
Gender: Male
Nature: Jolly
hi diego ur scripting tutorials r great can any1 tell me how can i creat a script such tht professor oak give me national dex not normal pokedex whn i complete the pokemart errand
__________________


A lover of Pokemon and their Hacks this is no other than?

Only he can be----->G.J
Reply With Quote
  #829    
Old January 14th, 2013, 08:30 AM
Powerflare's Avatar
Powerflare
Pokémon Trainer N
 
Join Date: May 2008
Location: Unova
Age: 17
Gender: Male
Nature: Rash
Quote:
Originally Posted by DrFuji View Post
The flag doesn't work because that one is simply way beyond what is should be. You should be using flags in the are of 0x200 rather than 0x9000+.

Edit: Just figured out you were hacking Emerald so some of my stuff was wrong
I'm hacking FireRed. I actually started with flags at 9000 because I had no idea of where to start and was asking anyone of my hacking "team" and someone said to start at "over 9000." Is there a particular reason that flags that high don't work? I used a flag 0x9000 that works. (I'm gonna triple check that one to make sure it's still working properly). Come to think of it, 0x9004 worked too.

However, now that I think about it, I had a previous hack project with flags that worked around 0x1000. Will 0x1000-0x2000 work? I'm gonna go change the faulty Magikarp flag and even the high flags that seemingly worked.

PS: Any explanation about the nickname failure though?

EDIT: I fixed my script by changing the flag to 0x1006, the special to 0x9E, and I added in lock in a few other places in the script to keep Mr. Antsy Pants from moving when he shouldn't have been. Thanks for all of your help guys, I appreciate it! ;D
__________________
I like that face! Like to battle, do you?"-Crasher Wake

"... ... ... ... ... ... ... ... ... ... ... ..." -Red

Pokémon Black Version || Pokémon White Version

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

Last edited by Powerflare; January 14th, 2013 at 04:43 PM.
Reply With Quote
  #830    
Old January 18th, 2013, 09:05 PM
Darkrai Lv.1000's Avatar
Darkrai Lv.1000
Has a tendency to figure things out
 
Join Date: Jul 2007
Location: Aboard the Arc-Gurren
Age: 20
Gender: Male
Nature: Adamant
Send a message via AIM to Darkrai Lv.1000
Not sure if this is the right place to put this, but XSE has stopped running for me. I open it, only for it to close itself after about 3 seconds. What's the deal?

Also, is it possible to make a script that keeps a sprite hidden from view until a certain event happens first?
__________________
Reply With Quote
  #831    
Old January 18th, 2013, 09:57 PM
tajaros's Avatar
tajaros
Hi I'm dawg
 
Join Date: Apr 2012
Location: Philippines
Age: 15
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to tajaros
Quote:
Originally Posted by Darkrai Lv.1000 View Post
Not sure if this is the right place to put this, but XSE has stopped running for me. I open it, only for it to close itself after about 3 seconds. What's the deal?

Also, is it possible to make a script that keeps a sprite hidden from view until a certain event happens first?
Oh, come on this has been answered several times in the Simple Questions Thread already but anyways I'll answer for everyone's sake...

Go to the settings ini file and find there the text AutoUpdateCheck=1 change 1 to 0 and it's all good.

Completely possible have the sprite's Person ID flag set and in the certain event have that flag cleared and the sprite should show up.
__________________
Reply With Quote
  #832    
Old January 18th, 2013, 10:10 PM
Darkrai Lv.1000's Avatar
Darkrai Lv.1000
Has a tendency to figure things out
 
Join Date: Jul 2007
Location: Aboard the Arc-Gurren
Age: 20
Gender: Male
Nature: Adamant
Send a message via AIM to Darkrai Lv.1000
Quote:
Originally Posted by tajaros View Post
Oh, come on this has been answered several times in the Simple Questions Thread already but anyways I'll answer for everyone's sake...

Go to the settings ini file and find there the text AutoUpdateCheck=1 change 1 to 0 and it's all good.

Completely possible have the sprite's Person ID flag set and in the certain event have that flag cleared and the sprite should show up.
Yeah, i had a feeling it was answered somewhere, but I didn't want to flip through hundreds of pages (searching the thread doesn't work for me). Sorry for asking one of "those questions". xD
It worked though, thanks.
__________________
Reply With Quote
  #833    
Old January 21st, 2013, 12:42 PM
4768fitz's Avatar
4768fitz
 
Join Date: Feb 2008
Location: England
Age: 22
Gender:
Nature: Brave
This is great but I have a problem. Is there a tutorial on how to compile the script to allow it to work in the game? because I tried compiling the script but the game just freezes when I enter the room with the script in.
Reply With Quote
  #834    
Old January 21st, 2013, 01:27 PM
masterquestmq's Avatar
masterquestmq
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Quote:
Originally Posted by 4768fitz View Post
This is great but I have a problem. Is there a tutorial on how to compile the script to allow it to work in the game? because I tried compiling the script but the game just freezes when I enter the room with the script in.

in A map did u use a script box (that green box with an s)
if u did place the following
unknown 0300
var num 4050

and the script shud work
Reply With Quote
  #835    
Old January 21st, 2013, 01:48 PM
4768fitz's Avatar
4768fitz
 
Join Date: Feb 2008
Location: England
Age: 22
Gender:
Nature: Brave
Quote:
Originally Posted by masterquestmq View Post
in A map did u use a script box (that green box with an s)
if u did place the following
unknown 0300
var num 4050

and the script shud work
I used a P box (person box?) , there are 4 unkown boxes and there isn't a 'var num' box :/ what am I doing wrong
Reply With Quote
  #836    
Old January 25th, 2013, 05:28 PM
Shikai's Avatar
Shikai
Fight for the name of Pokemon
 
Join Date: Jan 2013
Location: Florida
Age: 13
Gender: Male
Nature: Brave
wheres the download for this?
__________________




My Steel Pokemon Team

Reply With Quote
  #837    
Old February 4th, 2013, 04:07 PM
Mr.KoolAid
Unhatched Egg
 
Join Date: Mar 2012
Gender: Female
Hello, I took a break from rom hacking after I discovered that I had to uninstall everything and start over (certain files were missing or something and no rom hack would run properly on my comp, making it a hassle to make one myself).

After realizing I could not stay away I came back, but to a surprise, nothing I do in advance map saves, i have tried everything to my extent (and the extent of google searches) of knowledge and I cannot figure out why nothing is saving.

I have uninstalled everything once again before I re-install I would like to know, are there certain links that I should avoid? I had the newest version of Amap (although i think ima go back to 1.92 if i can find a working link), XSE 1.1.1, was using the built in FSF, and YAPE. I had a clean version of Leaf Green.

Any help would be appreciated.
Reply With Quote
  #838    
Old February 20th, 2013, 03:57 AM
Caramel-O's Avatar
Caramel-O
The dark Cheetah
 
Join Date: Jul 2010
Location: Celadon City, Kanto
Age: 22
Gender: Male
Nature: Calm
It sounds perfect!! good explainning!! thank you!
__________________
Legendary trainer, Umberon's Master
Playing Pokemon for 15 years.
Reply With Quote
  #839    
Old February 21st, 2013, 03:15 PM
LudicoloDude's Avatar
LudicoloDude
 
Join Date: Mar 2012
Location: Hoenn
Age: 17
Gender: Male
Nature: Jolly
How would I make a level script that repeats itself everytime I enter a map?
Reply With Quote
  #840    
Old February 21st, 2013, 04:35 PM
kj3400's Avatar
kj3400
Wants a Magneton for a Charger
 
Join Date: Mar 2012
Gender: Male
Nature: Lax
Send a message via Skype™ to kj3400
I believe just making a script and saving it as a level script will do. Just don't add a 'setvar' at the end, which means everytime you enter the map, the script will activate.
Reply With Quote
  #841    
Old March 1st, 2013, 08:27 PM
munchhack's Avatar
munchhack
Advanced Scripter
 
Join Date: Jun 2012
Location: Las Vegas
Age: 16
Gender: Male
Nature: Adamant
I have one problem, whenever I go outside, the script start for the first to applymovement, and then nothing happens. I get released, and the policeman just stands there. Here is my code:
Spoiler:

This is the original code:

#dynamic 0x16159C

#org @start
lock
setvar 0x7000 0x1
applymovement 0x1 @movePoPo
waitmovement 0x0
applymovement 0xFF @movePlayer
waitmovement 0x0
msgbox @Police1 0x6
msgbox @Player1 0x6
msgbox @Police2 0x6
msgbox @Player2 0x6
msgbox @Police3 0x6
msgbox @Player3 0x6
msgbox @Police4 0x6
msgbox @Player4 0x6
msgbox @Police5 0x6
msgbox @Player5 0x6
msgbox @Police6 0x6
applymovement 0x6 @ByePoPo
waitmovement 0x0
setflag 0x1
release
end



#org @movePoPo
#raw 0x12 0x54 0x62 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0xFE

#org @Police1
= [blue_fr]Policeman: Stop right\nthere!

#org @Player1
= [red_fr][player]: What did I do?!

#org @Police2
= [blue_fr]Policeman: Your a suspect,\nwhere where in the morning of\ltoday?

#org @Player2
= [red_fr][player]: Uh, sleeping?

#org @Police3
= [blue_fr]Policeman: Oops, my bad.\nSorry it's that I'm just fed up\lthat a woman got kidnapped.

#org @Player3
= [red_fr][player]:Yeah I know, that\n"woman" was my mom. I heard\leverything that happend.

#org @Police4
= [blue_fr]Policeman: Really?\nTell me everything you know.

#org @Player4
= [red_fr][player] ...

#org @Police5
= [blue_fr]Policeman: Oh so thats\nwhat happened, don't worry\l[player] we'll get your mom back.

#org @Player5
= [red_fr][player]: Go ahead, I'm\npretty sure I'll get to here before\lyou do.

#org @Police6
= [blue_fr]Policeman: Your pretty\nenthusiastic kid.

#org @ByePoPo
#raw 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE

#org @movePlayer
#raw 0x3 0xFE



And this is the code after i compile it:

'-----------------------
#org 0x71AA60
#raw 02
#raw pointer 0x871AA3E
#raw 00

'-----------------------
#org 0x71AA3E
#raw word 0x7000
#raw word 0x0
#raw pointer 0x816269B
#raw word 0x0

'-----------------------
#org 0x16269B
lock
setvar 0x7000 0x1
applymovement 0x1 0x8162707
waitmovement 0x0
applymovement MOVE_PLAYER 0x81629FE
waitmovement 0x0
msgbox 0x8162712 '" blueefrrPoliceman: Stop right\nthe..."
msgbox 0x816273A '" reddfrr[player]: What did I do?!"
msgbox 0x816277A '" blueefrrPoliceman: Your a suspect,..."
msgbox 0x81627C6 '" reddfrr[player]: Uh, sleeping?"
msgbox 0x81627E7 '" blueefrrPoliceman: Oops, my bad.\n..."
msgbox 0x8162848 '" reddfrr[player]:Yeah I know, that\..."
msgbox 0x81628A1 '" blueefrrPoliceman: Really?\nTell m..."
msgbox 0x81628DC '" reddfrr[player] ..."
msgbox 0x8162912 '" blueefrrPoliceman: Oh so thats\nwh..."
msgbox 0x8162972 '" reddfrr[player]: Go ahead, I'm\npr..."
msgbox 0x81629C1 '" blueefrrPoliceman: Your pretty\nen..."
applymovement 0x6 0x81629F5
waitmovement 0x0
setflag 0x1
release
end


'-----------
' Movements
'-----------
#org 0x162707
#raw 12 'Step Left (Normal)
#raw 54 'Jump in Place (Facing Left)
#raw 62 'Exclamation Mark (!)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw 1F 'Step Left (Fast)
#raw FE 'End of Movements

#org 0x1629FE
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x1629F5
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x162712
= blueefrrPoliceman: Stop right\nthere!

#org 0x16273A
= reddfrr[player]: What did I do?!

#org 0x16277A
= blueefrrPoliceman: Your a suspect,\nwhere where in the morning of\ltoday?

#org 0x1627C6
= reddfrr[player]: Uh, sleeping?

#org 0x1627E7
= blueefrrPoliceman: Oops, my bad.\nSorry it's that I'm just fed up\lthat a woman got kidnapped.

#org 0x162848
= reddfrr[player]:Yeah I know, that\nwoman was my mom. I heard\leverything that happend.

#org 0x1628A1
= blueefrrPoliceman: Really?\nTell me everything you know.

#org 0x1628DC
= reddfrr[player] ...

#org 0x162912
= blueefrrPoliceman: Oh so thats\nwhat happened, don't worry\l[player] we'll get your mom back.

#org 0x162972
= reddfrr[player]: Go ahead, I'm\npretty sure I'll get to here before\lyou do.

#org 0x1629C1
= blueefrrPoliceman: Your pretty\nenthusiastic kid.


Oh and btw, if you reply please pm me, because I probably won't see it if you just reply here, or if you vm me.
Reply With Quote
  #842    
Old March 25th, 2013, 04:02 PM
LudicoloDude's Avatar
LudicoloDude
 
Join Date: Mar 2012
Location: Hoenn
Age: 17
Gender: Male
Nature: Jolly
I'm not sure if I just missed it or being blind, but is there a command where the camera will move to different sprites?
Reply With Quote
  #843    
Old April 12th, 2013, 02:36 PM
jukin8's Avatar
jukin8
Suicune Man
 
Join Date: Jan 2012
Location: Ontario, Canada
Age: 18
Gender: Male
Nature: Brave
has anyone made a pdf of this tutorial cause my internet is down at home and id like to use it for reference when i have time to work on my hack
__________________
Heavenly Suicune- Jukin8

Help me out by signing up at http://pkmnmoon.com/signup.php?s=12146 thanks
Reply With Quote
  #844    
Old April 13th, 2013, 12:31 AM
PiplupGHacker's Avatar
PiplupGHacker
Keeping the dream alive.
 
Join Date: Mar 2007
Location: New Lenox, IL
Age: 17
Gender: Female
Nature: Lonely
First of all, I can not say THANK YOU enough for this. Amazing tutorial, I've been using it to aid me in my first proper hack. Unfortunately, though, right now I'm encountering a problem ._.

Basically, all I'm trying to do is make it so that the fat NPC near the Poke Center in Pewter City gives you an Axew. Here's his original script:
Spoiler:
'-----------------------
#org 0x16622B
lock
faceplayer
setvar 0x8004 0x2
setvar 0x8005 0x2
special 0x173
msgbox 0x817E49F '"There aren't many serious Pokémon\n..."
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x17E49F
= There aren't many serious Pokémon\nTRAINERS here.\pThey're all like Bug CATCHERS,\nyou know, just hobbyists.\pBut PEWTER GYM's BROCK isn't like\nthat, not one bit.


What I've done is practically copied and pasted your givepokemon example, creating this script:
Spoiler:
'-----------------------
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x262 0x12 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end



'---------
' Strings
'---------
#org @1
= Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= [black_fr]You received an Axew!

#org @4
= [black_fr]Would you like to give a\nnickname to Axew?

#org @5
= Please take care of\nAxew.

#org @6
= Are you taking good care\nof Axew?


I compile it, and it seems to be alright, but when I test the game or go back to the guy's script, it's back to normal again, as if it never compiled in the first place! I tried setting the script up on other NPCs in Pewter, and I also tried literally just copy and pasting yours to no avail. Here's what the compile log says:
Spoiler:
eXtreme Script Editor v1.0.0
-------------------------------------
Opening output --> C:\Users\brian\Documents\Pokemon - The Golden\Pokemon - The Golden.gba...
Processing input script...
2 - DYNAMIC
> lDynamicStart = 0x800000
4 - ORG
> lNewOffset = 0xB32CFD
5 - (2B) - CHECKFLAG
> iWord = 0x828
6 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x8B32D5E
7 - (0F) MSGBOX (native)
> pText = 0x8B32D67
8 - (21) - COMPARE
> iWord = 0x800D
> iWord = 0x1
9 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x8B32D20
10 - (0F) MSGBOX (native)
> pText = 0x8B32DC8
11 - (6C) - RELEASE
12 - (02) - END
14 - ORG
> lNewOffset = 0xB32D20
15 - (79) - GIVEPOKEMON
> iWord = 0x262
> bByte = 0x12
> iWord = 0x0
> lDword = 0x0
> lDword = 0x0
> bByte = 0x0
16 - (31) - FANFARE
> iWord = 0x13E
17 - (0F) MSGBOX (native)
> pText = 0x8B32DFC
18 - (32) - WAITFANFARE
19 - (68) - CLOSEONKEYPRESS
20 - (29) - SETFLAG
> iWord = 0x828
21 - (0F) MSGBOX (native)
> pText = 0x8B32E1D
22 - (21) - COMPARE
> iWord = 0x800D
> iWord = 0x1
23 - (??) IF (native)
> bCondition = 0x1
This is a calling IF, 0x07.
> pTarget = 0x8B32D57
24 - (0F) MSGBOX (native)
> pText = 0x8B32E54
25 - (6C) - RELEASE
26 - (02) - END
28 - ORG
> lNewOffset = 0xB32D57
29 - (04) - CALL
> pPointer = 0x81A74EB
30 - (03) - RETURN
32 - ORG
> lNewOffset = 0xB32D5E
33 - (0F) MSGBOX (native)
> pText = 0x8B32E70
34 - (6C) - RELEASE
35 - (02) - END
42 - ORG
> lNewOffset = 0xB32D67
43 - RAW TEXT
> sText = "Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?"
45 - ORG
> lNewOffset = 0xB32DC8
46 - RAW TEXT
> sText = "That's okay.\pI'm sure someone else will\ntake it."
48 - ORG
> lNewOffset = 0xB32DFC
49 - RAW TEXT
> sText = "[black_fr]You received an Axew!"
51 - ORG
> lNewOffset = 0xB32E1D
52 - RAW TEXT
> sText = "[black_fr]Would you like to give a\nnickname to Axew?"
54 - ORG
> lNewOffset = 0xB32E54
55 - RAW TEXT
> sText = "Please take care of\nAxew."
57 - ORG
> lNewOffset = 0xB32E70
58 - RAW TEXT
> sText = "Are you taking good care\nof Axew?"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @1
> lOffset = 0xB32D67
DYNAMIC_OFFSET 2
> sLabel = @2
> lOffset = 0xB32DC8
DYNAMIC_OFFSET 3
> sLabel = @3
> lOffset = 0xB32DFC
DYNAMIC_OFFSET 4
> sLabel = @4
> lOffset = 0xB32E1D
DYNAMIC_OFFSET 5
> sLabel = @5
> lOffset = 0xB32E54
DYNAMIC_OFFSET 6
> sLabel = @6
> lOffset = 0xB32E70
DYNAMIC_OFFSET 7
> sLabel = @done
> lOffset = 0xB32D5E
DYNAMIC_OFFSET 8
> sLabel = @name
> lOffset = 0xB32D57
DYNAMIC_OFFSET 9
> sLabel = @start
> lOffset = 0xB32CFD
DYNAMIC_OFFSET 10
> sLabel = @take
> lOffset = 0xB32D20
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.035 seconds.


I mean, there don't SEEM to be any problems :/, it just won't save no matter what I do! Any advice? Anyways, I apologize if I'm just doing something completely idiotic here, I'm not the greatest at this.
__________________
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!
Reply With Quote
  #845    
Old April 13th, 2013, 02:07 AM
ShyRayq's Avatar
ShyRayq
Unprofessional Unprofessional
 
Join Date: Aug 2007
Gender: Male
Nature: Adamant
Quote:
Originally Posted by PiplupGHacker View Post
First of all, I can not say THANK YOU enough for this. Amazing tutorial, I've been using it to aid me in my first proper hack. Unfortunately, though, right now I'm encountering a problem ._.

Basically, all I'm trying to do is make it so that the fat NPC near the Poke Center in Pewter City gives you an Axew. Here's his original script:
Spoiler:
'-----------------------
#org 0x16622B
lock
faceplayer
setvar 0x8004 0x2
setvar 0x8005 0x2
special 0x173
msgbox 0x817E49F '"There aren't many serious Pokémon\n..."
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x17E49F
= There aren't many serious Pokémon\nTRAINERS here.\pThey're all like Bug CATCHERS,\nyou know, just hobbyists.\pBut PEWTER GYM's BROCK isn't like\nthat, not one bit.


What I've done is practically copied and pasted your givepokemon example, creating this script:
Spoiler:
'-----------------------
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x262 0x12 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end



'---------
' Strings
'---------
#org @1
= Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= [black_fr]You received an Axew!

#org @4
= [black_fr]Would you like to give a\nnickname to Axew?

#org @5
= Please take care of\nAxew.

#org @6
= Are you taking good care\nof Axew?


I compile it, and it seems to be alright, but when I test the game or go back to the guy's script, it's back to normal again, as if it never compiled in the first place! I tried setting the script up on other NPCs in Pewter, and I also tried literally just copy and pasting yours to no avail. Here's what the compile log says:
Spoiler:
eXtreme Script Editor v1.0.0
-------------------------------------
Opening output --> C:\Users\brian\Documents\Pokemon - The Golden\Pokemon - The Golden.gba...
Processing input script...
2 - DYNAMIC
> lDynamicStart = 0x800000
4 - ORG
> lNewOffset = 0xB32CFD
5 - (2B) - CHECKFLAG
> iWord = 0x828
6 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x8B32D5E
7 - (0F) MSGBOX (native)
> pText = 0x8B32D67
8 - (21) - COMPARE
> iWord = 0x800D
> iWord = 0x1
9 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x8B32D20
10 - (0F) MSGBOX (native)
> pText = 0x8B32DC8
11 - (6C) - RELEASE
12 - (02) - END
14 - ORG
> lNewOffset = 0xB32D20
15 - (79) - GIVEPOKEMON
> iWord = 0x262
> bByte = 0x12
> iWord = 0x0
> lDword = 0x0
> lDword = 0x0
> bByte = 0x0
16 - (31) - FANFARE
> iWord = 0x13E
17 - (0F) MSGBOX (native)
> pText = 0x8B32DFC
18 - (32) - WAITFANFARE
19 - (68) - CLOSEONKEYPRESS
20 - (29) - SETFLAG
> iWord = 0x828
21 - (0F) MSGBOX (native)
> pText = 0x8B32E1D
22 - (21) - COMPARE
> iWord = 0x800D
> iWord = 0x1
23 - (??) IF (native)
> bCondition = 0x1
This is a calling IF, 0x07.
> pTarget = 0x8B32D57
24 - (0F) MSGBOX (native)
> pText = 0x8B32E54
25 - (6C) - RELEASE
26 - (02) - END
28 - ORG
> lNewOffset = 0xB32D57
29 - (04) - CALL
> pPointer = 0x81A74EB
30 - (03) - RETURN
32 - ORG
> lNewOffset = 0xB32D5E
33 - (0F) MSGBOX (native)
> pText = 0x8B32E70
34 - (6C) - RELEASE
35 - (02) - END
42 - ORG
> lNewOffset = 0xB32D67
43 - RAW TEXT
> sText = "Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?"
45 - ORG
> lNewOffset = 0xB32DC8
46 - RAW TEXT
> sText = "That's okay.\pI'm sure someone else will\ntake it."
48 - ORG
> lNewOffset = 0xB32DFC
49 - RAW TEXT
> sText = "[black_fr]You received an Axew!"
51 - ORG
> lNewOffset = 0xB32E1D
52 - RAW TEXT
> sText = "[black_fr]Would you like to give a\nnickname to Axew?"
54 - ORG
> lNewOffset = 0xB32E54
55 - RAW TEXT
> sText = "Please take care of\nAxew."
57 - ORG
> lNewOffset = 0xB32E70
58 - RAW TEXT
> sText = "Are you taking good care\nof Axew?"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @1
> lOffset = 0xB32D67
DYNAMIC_OFFSET 2
> sLabel = @2
> lOffset = 0xB32DC8
DYNAMIC_OFFSET 3
> sLabel = @3
> lOffset = 0xB32DFC
DYNAMIC_OFFSET 4
> sLabel = @4
> lOffset = 0xB32E1D
DYNAMIC_OFFSET 5
> sLabel = @5
> lOffset = 0xB32E54
DYNAMIC_OFFSET 6
> sLabel = @6
> lOffset = 0xB32E70
DYNAMIC_OFFSET 7
> sLabel = @done
> lOffset = 0xB32D5E
DYNAMIC_OFFSET 8
> sLabel = @name
> lOffset = 0xB32D57
DYNAMIC_OFFSET 9
> sLabel = @start
> lOffset = 0xB32CFD
DYNAMIC_OFFSET 10
> sLabel = @take
> lOffset = 0xB32D20
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.035 seconds.


I mean, there don't SEEM to be any problems :/, it just won't save no matter what I do! Any advice? Anyways, I apologize if I'm just doing something completely idiotic here, I'm not the greatest at this.

Okay, did you ACTUALLY save A-map? That's the only problem I can see here. Just try every method of saving until that SoB works.
Alternately, could it be that you loaded from a savestate? Sometimes that doesn't work. Just save normally and if it works, there's your problem.
__________________
3DS Friend Code: 5069-3944-3902
IGN: Peter, Pokemon Y
Friend Safari: (Fighting) Throh, Meditite, Breloom
Live Pokedex Completed as of 02/03/14
Big thanks especially to DestinedJagold, Xerneas_X and Elements1

PM me if you want to trade, or add my FC.
Reply With Quote
  #846    
Old April 13th, 2013, 03:34 PM
PiplupGHacker's Avatar
PiplupGHacker
Keeping the dream alive.
 
Join Date: Mar 2007
Location: New Lenox, IL
Age: 17
Gender: Female
Nature: Lonely
Quote:
Originally Posted by Dragoon View Post
Okay, did you ACTUALLY save A-map? That's the only problem I can see here. Just try every method of saving until that SoB works.
Alternately, could it be that you loaded from a savestate? Sometimes that doesn't work. Just save normally and if it works, there's your problem.
Nope, properly loading a save via the title screen and all, and I'm saving in AdvanceMap. Thing is even after compiling and closing XSE and then going to reopen the script it's already back to the original script like it never compiled anything in the first place ._.
__________________
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!
Reply With Quote
  #847    
Old April 13th, 2013, 03:59 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by PiplupGHacker View Post
Nope, properly loading a save via the title screen and all, and I'm saving in AdvanceMap. Thing is even after compiling and closing XSE and then going to reopen the script it's already back to the original script like it never compiled anything in the first place ._.
Are you taking the new compiled offset and pasting it into the script offset box on the person in Advance-Map, then saving?
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #848    
Old April 13th, 2013, 05:14 PM
PiplupGHacker's Avatar
PiplupGHacker
Keeping the dream alive.
 
Join Date: Mar 2007
Location: New Lenox, IL
Age: 17
Gender: Female
Nature: Lonely
Quote:
Originally Posted by diegoisawesome View Post
Are you taking the new compiled offset and pasting it into the script offset box on the person in Advance-Map, then saving?
I was about to scold myself for not doing so, but even upon doing so it just goes back to the original "hurr durr bug trainers BROCK" >.<
__________________
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!
Reply With Quote
  #849    
Old April 13th, 2013, 05:18 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by PiplupGHacker View Post
I was about to scold myself for not doing so, but even upon doing so it just goes back to the original "hurr durr bug trainers BROCK" >.<
How are you testing it in-game? You should leave then reenter the map to make sure your changes are made.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #850    
Old April 13th, 2013, 06:20 PM
PiplupGHacker's Avatar
PiplupGHacker
Keeping the dream alive.
 
Join Date: Mar 2007
Location: New Lenox, IL
Age: 17
Gender: Female
Nature: Lonely
Quote:
Originally Posted by diegoisawesome View Post
How are you testing it in-game? You should leave then reenter the map to make sure your changes are made.
Tried this too, still nothing. What irks me is I've been able to successfully compile and insert something into the script before. No idea if this makes any difference but here's that script:

Spoiler:

'-----------------------
#org 0x16582F
msgbox 0x817D80D '"Technology is incredible!\pYou can ..."
callstd 0x2
special 0x16F
end


'---------
' Strings
'---------
#org 0x17D80D
= Technology is incredible!\pYou can now emulate PS2\nand GBA games in HD on your PC!


(If you noticed, I just made it so that he activates the event to give you the National Dex, and changed his lines for lols. He works totally fine) The only difference I can see here is that when I compile that the windows very small, but when I compile the givepokemon script, I get a box saying "Dynamic offsets: @1 @2 @3 @4 @5 @6 @done @name @start" with what seems to be a hex address next to each and a copy button to copy the addresses to the clipboard :/
__________________
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 10:44 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.