The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #1301    
Old June 8th, 2009 (07:13 PM). Edited June 8th, 2009 by PI Hudson.
PI Hudson's Avatar
PI Hudson
Can be random for hugs> PIE!!!
 
Join Date: May 2009
Location: Minnesota
Age: 21
Gender: Male
Nature: Modest
QUESTION: Is there a way to check if a pokemon is holding an item?




Quote:
Originally Posted by Quickster View Post
In fire red, oaks lab has a level script but doesnt activate when you walk in by yourself, only after oak makes you come in. How does this work? Does it have a checkflag or something?
It works like this
-When you enter a map, it looks for level scripts
-In Oaks Lab, the script your looking for is #2
-If it is a #2 or 4 script, it looks at the Variable Flag (for this, it is 4055)
-It checks that this Variable for its Value (set previously, default is 0000) and if it isn't equal to the number given in the Map script, it doesn't activate. But if it is equal, it does activate.
(if MAP-VALUE>VAR-VALUE=not activate, if MAP-VALUE<VAR-VALUE=not activate, if MAP-VALUE=VAR-VALUE=activate)

In the script tile that we step on in Pallet Town to activate the script, we see this.
Quote:
XSE:|LINE 0045| setvar 0x4055 0x1
This means the next time we enter the Oaks Lab, the script will activate.

But, why doesn't it activate again?
In the Oaks Lab Level script, we observe this
Quote:
XSE:|LINE 0028| setvar 0x4055 0x2
This make it so you don't see this script again until the Var Value is equal again.

People kind of act the same way, but with flags.




Quote:
Originally Posted by Quickster View Post
Thanks for explaining that.I looked into it and seen it had something to do with the variable 4055,but i couldnt figure it all out.
Your welcome.
  #1302    
Old June 8th, 2009 (07:22 PM).
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by PI Hudson View Post
It works like this
-When you enter a map, it looks for level scripts
-In Oaks Lab, the script your looking for is #2
-If it is a #2 or 4 script, it looks at the Variable Flag (for this, it is 4055)
-It checks that this Variable for its Value (set previously, default is 0000) and if it isn't equal to the number given in the Map script, it doesn't activate. But if it is equal, it does activate.
(if MAP-VALUE>VAR-VALUE=not activate, if MAP-VALUE<VAR-VALUE=not activate, if MAP-VALUE=VAR-VALUE=activate)

In the script tile that we step on in Pallet Town to activate the script, we see this.


This means the next time we enter the Oaks Lab, the script will activate.

But, why doesn't it activate again?
In the Oaks Lab Level script, we observe this


This make it so you don't see this script again until the Var Value is equal again.

People kind of act the same way, but with flags.

Thanks for explaining that.I looked into it and seen it had something to do with the variable 4055,but i couldnt figure it all out.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #1303    
Old June 8th, 2009 (09:10 PM).
Gamer2020's Avatar
Gamer2020
This love is a sickness...
 
Join Date: Jun 2008
Location: Distant Land
Gender: Male
Nature: Bold
Send a message via Skype™ to Gamer2020
Hey guys. I have a problem.
Basically I wrote a script so that when the player steps on a certain spot a sprites goes up to him and battles him.
It works up until after the battle where it just plain goes sour.
Ive attached a small video to show you what happens.

This is the script
Spoiler:
#dynamic 800000

#org @start
lock
checkflag 0x1005
if 0x1 call @done
call @pre
applymovement 0x01 @move1
waitmovement 0x0
sethealingplace 0x6
setflag 0x1005
trainerbattle 0x1 0x237 0x0 @before @after @run
end

#org @pre
applymovement 0x01 @move3
msgbox @stuff 0x2
return

#org @run
msgbox @text 0x2
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
setflag 0x1005
release
end

#org @done
releaseall
end

#org @move1
#raw 0x56
#raw 0x09
#raw 0x0A
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @before
= How much did you hear?

#org @after
= Didn't think you'd be that strong.

#org @text
= Bye now!

#org @stuff
= They're are Whirlpools blocking\nthe entrances sir.



This is the amap stuff for the sprite


and this is the amap stuff for the script tile.




I think I am just overlooking something so please if you know what I did wrong please tell me.
Attached Files
File Type: zip wtf.zip‎ (147.7 KB, 10 views) (Save to Dropbox)
__________________
Pokemon Game Editor Download!
Pokemon TCG Assistant!
Fun Fact: Even though PGE isn't posted on PC anymore it still has the same number of downloads per day.
Accept no imitations!
  #1304    
Old June 9th, 2009 (07:00 AM).
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Gamer2020 View Post
Hey guys. I have a problem.
Basically I wrote a script so that when the player steps on a certain spot a sprites goes up to him and battles him.
It works up until after the battle where it just plain goes sour.
Ive attached a small video to show you what happens.

This is the script
Spoiler:
#dynamic 800000

#org @start
lock
checkflag 0x1005
if 0x1 call @done
call @pre
applymovement 0x01 @move1
waitmovement 0x0
sethealingplace 0x6
setflag 0x1005
trainerbattle 0x1 0x237 0x0 @before @after @run
end

#org @pre
applymovement 0x01 @move3
msgbox @stuff 0x2
return

#org @run
msgbox @text 0x2
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
setflag 0x1005
release
end

#org @done
releaseall
end

#org @move1
#raw 0x56
#raw 0x09
#raw 0x0A
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @before
= How much did you hear?

#org @after
= Didn't think you'd be that strong.

#org @text
= Bye now!

#org @stuff
= They're are Whirlpools blocking\nthe entrances sir.



This is the amap stuff for the sprite


and this is the amap stuff for the script tile.




I think I am just overlooking something so please if you know what I did wrong please tell me.

Im not sure,but you might need a waitmovment in the #org @pre
also the number should be 0003 and 4050 on a green script tile.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #1305    
Old June 9th, 2009 (09:10 AM).
Larsie13
Gone
 
Join Date: Oct 2006
Location: The Netherlands
Age: 23
Nature: Modest
Quote:
Originally Posted by Weavile Gemini View Post
Actually, Larsie, XSE hasn't been recognizing the lastresult keyword for some reason...
That's because XSE's std.rbh isn't in the same folder the .exe is. You need to extract everything from XSE's ZIP file in the same folder-structure as it is in the ZIP.
Quote:
Originally Posted by metapod23 View Post
Okay, I need help with this script. The basic problem is I've got three sprites (event no's 13, 14, and 15) that are supposed to move, but just don't. I've tried to figure out the problem, but haven't been able to. I gave them ID number 270 (the reason for the setflag) and I gave the script var #6042. Now the script works, but first when the 2nd applymovement for MOVEPLAYER goes, the player only steps up one space, and doesn't step right first. Second, the movements for sprites 13, 14, 15 don't work at all. They stay put and it moves onto the next msgbox. Do I need a different var? A different flag? Any help is appreciated. The relevant parts of the script are below:

Spoiler:
'---------------
#org 0x802646
lockall
applymovement MOVE_PLAYER 0x81A75DB
waitmovement 0x0
textcolor 0x0
msgbox 0x880240E MSG_KEEPOPEN '"Okay, JOE, then what's this POKéMO..."
applymovement MOVE_PLAYER 0x88024D8
msgbox 0x88024DC MSG_FACE '"[.] [.] [.]\pWhat's it to you, kid..."
applymovement 0x13 0x88025A8
applymovement 0x14 0x880259E
applymovement 0x15 0x880259E

waitmovement 0x13
waitmovement 0x14
waitmovement 0x15
hidesprite 0x13
hidesprite 0x14
hidesprite 0x15
setflag 0x270
setvar 0x6042 0x1
msgbox 0x88025B3 MSG_KEEPOPEN '"JOE: Thanks for the help.\nThose w..."
call 0x81A991D
releaseall
end

'-----------
' Movements
'-----------
#org 0x1A75DB
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x8024D8
#raw 0x20 'Step Right (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0xFE 'End of Movements

#org 0x8025A8
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org 0x80259E
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
0x13 = 19, 0x14 = 20, and 0x15 = 21. Use 19, 20 and 21, or 0xD, 0xF and 0xF. Also, you'll need a waitmovement 0 after the MOVEPLAYER.
Quote:
Originally Posted by Gamer2020 View Post
Hey guys. I have a problem.
Basically I wrote a script so that when the player steps on a certain spot a sprites goes up to him and battles him.
It works up until after the battle where it just plain goes sour.
Ive attached a small video to show you what happens.

This is the script
Spoiler:
#dynamic 800000

#org @start
lock
checkflag 0x1005
if 0x1 call @done
call @pre
applymovement 0x01 @move1
waitmovement 0x0
sethealingplace 0x6
setflag 0x1005
trainerbattle 0x1 0x237 0x0 @before @after @run
end

#org @pre
applymovement 0x01 @move3
msgbox @stuff 0x2
return

#org @run
msgbox @text 0x2
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
setflag 0x1005
release
end

#org @done
releaseall
end

#org @move1
#raw 0x56
#raw 0x09
#raw 0x0A
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @before
= How much did you hear?

#org @after
= Didn't think you'd be that strong.

#org @text
= Bye now!

#org @stuff
= They're are Whirlpools blocking\nthe entrances sir.



This is the amap stuff for the sprite


and this is the amap stuff for the script tile.




I think I am just overlooking something so please if you know what I did wrong please tell me.
O_O #dynamic 800000? That's the same as #dynamic 0xC3500! You forgot the 0x. Try to remember that it can make quite a big difference forgetting the 0x or not.
  #1306    
Old June 9th, 2009 (01:41 PM).
Mewtew
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male
Im Pretty badly stuck here, could someone please help me...allow me to explain my problem...

I am hacking myself a new pokemon game and have just begun, im using my very basic scriting knowledge and using the latest version of xse. i made the player wake up at the start of the game in a cave just above an old lady but am having a few major problems, the first of which comes in advance map..
when i place a sprite of a person into the room it will not appear in the visual boy or have any action within it, even when a script has been applied, please give me some pointers for a possible fix
number 2 comes from xse and advance map i think, i mad a script to stop anyone leaving the room without first choosing 1 of 2 pokemon, you are ment to walk onto the script and be pushed 1 step back, with a message to appear saying , maby i should talk to the old lady first...
so i made a script which i will include...but when i attach to the script to a script tile in advance map and play the game, if i walk on the script tile before it has been bypassed by a flag the game freezes, alough the music still plays on a low quality please help and i hope i have not written waaaay to much


Spoiler:
#Dynamic 0x800000
#org @start
checkflag 0x828
if 0x0 goto @hey!
if 0x1 goto @end
end
#org @hey!
lock
msgbox @icant 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end
#org @icant
= Maby I should talk with/nThe old lady first
#org @back
#raw 0x0D 0xFE
#org @end
release
end

Thanks
  #1307    
Old June 9th, 2009 (02:30 PM).
Gamer2020's Avatar
Gamer2020
This love is a sickness...
 
Join Date: Jun 2008
Location: Distant Land
Gender: Male
Nature: Bold
Send a message via Skype™ to Gamer2020
Quote:
Originally Posted by Gamer2020 View Post
Hey guys. I have a problem.
Basically I wrote a script so that when the player steps on a certain spot a sprites goes up to him and battles him.
It works up until after the battle where it just plain goes sour.
Ive attached a small video to show you what happens.

This is the script
Spoiler:
#dynamic 800000

#org @start
lock
checkflag 0x1005
if 0x1 call @done
call @pre
applymovement 0x01 @move1
waitmovement 0x0
sethealingplace 0x6
setflag 0x1005
trainerbattle 0x1 0x237 0x0 @before @after @run
end

#org @pre
applymovement 0x01 @move3
msgbox @stuff 0x2
return

#org @run
msgbox @text 0x2
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
setflag 0x1005
release
end

#org @done
releaseall
end

#org @move1
#raw 0x56
#raw 0x09
#raw 0x0A
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @before
= How much did you hear?

#org @after
= Didn't think you'd be that strong.

#org @text
= Bye now!

#org @stuff
= They're are Whirlpools blocking\nthe entrances sir.



This is the amap stuff for the sprite


and this is the amap stuff for the script tile.




I think I am just overlooking something so please if you know what I did wrong please tell me.
Someone please help. I know I must be overlooking something.
The problem is just after the battle when the trainer is supossed to walk away. I had it working before but idk what I changed.

Quote:
Originally Posted by Quickster View Post
Im not sure,but you might need a waitmovment in the #org @pre
also the number should be 0003 and 4050 on a green script tile.
No thats not it...
If I do that then the script tile won't do anything.

Quote:
Originally Posted by Larsie13 View Post
O_O #dynamic 800000? That's the same as #dynamic 0xC3500! You forgot the 0x. Try to remember that it can make quite a big difference forgetting the 0x or not.
That's not it either. I tried it just in case but I doubt it would matter where the script is.
__________________
Pokemon Game Editor Download!
Pokemon TCG Assistant!
Fun Fact: Even though PGE isn't posted on PC anymore it still has the same number of downloads per day.
Accept no imitations!
  #1308    
Old June 9th, 2009 (02:36 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by Weavile Gemini View Post
Actually, Larsie, XSE hasn't been recognizing the lastresult keyword for some reason...
That's what happens when you don't extract all the files from the zipped archive. LASTRESULT is defined in the std.rbh header.
__________________
  #1309    
Old June 9th, 2009 (02:41 PM).
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Mewtew View Post
Im Pretty badly stuck here, could someone please help me...allow me to explain my problem...

I am hacking myself a new pokemon game and have just begun, im using my very basic scriting knowledge and using the latest version of xse. i made the player wake up at the start of the game in a cave just above an old lady but am having a few major problems, the first of which comes in advance map..
when i place a sprite of a person into the room it will not appear in the visual boy or have any action within it, even when a script has been applied, please give me some pointers for a possible fix
number 2 comes from xse and advance map i think, i mad a script to stop anyone leaving the room without first choosing 1 of 2 pokemon, you are ment to walk onto the script and be pushed 1 step back, with a message to appear saying , maby i should talk to the old lady first...
so i made a script which i will include...but when i attach to the script to a script tile in advance map and play the game, if i walk on the script tile before it has been bypassed by a flag the game freezes, alough the music still plays on a low quality please help and i hope i have not written waaaay to much


Spoiler:
#Dynamic 0x800000
#org @start
checkflag 0x828
if 0x0 goto @hey!
if 0x1 goto @end
end
#org @hey!
lock
msgbox @icant 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end
#org @icant
= Maby I should talk with/nThe old lady first
#org @back
#raw 0x0D 0xFE
#org @end
release
end

Thanks

Im not sure of your first problem but your second problem sound like you forgot to put the unknown numbers in.They're 0003 and 4050.They go in the first two boxes under the people number i think.
And If you only want the script to check if you got a pokemon or not, i think the one below is a litlle less complicated.But you need to make sure the numbers are in on the script tile.
Also,or you using xse?If not i suggest to switch to it,its very easy to pick up on and theres a great tutorial by diegoisawesome.
The script below is for xse.
Spoiler:

#dynamic 0x

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @m1
waitmovement 0x0
release
end

#org @done
release
end

#org @1
= Maybe I should talk with the old\nlady first...

#org @m1
#raw 0x11
#raw 0xFE
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #1310    
Old June 9th, 2009 (03:05 PM).
mrhiyuck's Avatar
mrhiyuck
//
 
Join Date: Sep 2007
Spoiler:
Code:
'---------------
#dynamic 0x800000
#org 0xE3D134
lock
faceplayer
checkflag 0x939
if 0x0 goto @noditto
checkflag 0x941
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
checkitem 0x4 0x1
if 0x0 goto @jerk
removeitem 0x04 0x1
hidesprite 0x4
givepokemon 0x84 0xA 0xC3 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x941
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @noditto
msgbox @7 0x6
release
end

#org @jerk
msgbox @8 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hello... could you tell me your\nname?\p[player]?\pWell [player], it seems that DITTO\nover there has taken a liking to\lyou.\pIt's had a stressful time here in\nthe lab, so I was hoping he could\lspend time outside with a Trainer.\pWould you take DITTO?

#org @2
= No? Well come back if you change\nyour mind.\pI feel sorry for the little guy.

#org @3
= You received a DITTO!

#org @4
= Would you like to give a\nnickname to DITTO?

#org @5
= Be a good owner to DITTO!\nBetter then we were...

#org @6
= Hey [player]! How's DITTO doing?

#org @7
= Wow... it's been so busy, and now\nit's calmed down.\pWe were running nonstop with\nexperiments to get the Dojo\lworking.\pThat DITTO was the POK\h1bMON\ninvolved in the experiment. I hope\lhe can rest now.

#org @8
= Oh? You don't seem to have a\nPOK\h1bBALL.\pDITTO's old one was here...\nAll we need is a regular POK\h1bBALL.\pCould you find one?


This all works.. with a couple exceptions. Even without a pokeball, the checkitem doesn't seem to switch to "jerk". It does take a pokeball if you have one but if you don't it still continues without switching.

Also hidesprite works, but when you move just one step, the sprite returns. Could someone help me with these?
  #1311    
Old June 9th, 2009 (04:09 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by PI Hudson View Post
QUESTION: Is there a way to check if a pokemon is holding an item?
Not with scripting. You need ASM.

Quote:
Originally Posted by Gamer2020 View Post
Hey guys. I have a problem.
Basically I wrote a script so that when the player steps on a certain spot a sprites goes up to him and battles him.
It works up until after the battle where it just plain goes sour.
Ive attached a small video to show you what happens.

This is the script
Spoiler:
#dynamic 800000

#org @start
lock
checkflag 0x1005
if 0x1 call @done
call @pre
applymovement 0x01 @move1
waitmovement 0x0
sethealingplace 0x6
setflag 0x1005
trainerbattle 0x1 0x237 0x0 @before @after @run
end

#org @pre
applymovement 0x01 @move3
msgbox @stuff 0x2
return

#org @run
msgbox @text 0x2
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
setflag 0x1005
release
end

#org @done
releaseall
end

#org @move1
#raw 0x56
#raw 0x09
#raw 0x0A
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @before
= How much did you hear?

#org @after
= Didn't think you'd be that strong.

#org @text
= Bye now!

#org @stuff
= They're are Whirlpools blocking\nthe entrances sir.
Fixed (mostly optimized) script is below. Anyway, the script isn't the root of the problem at all. Do not follow the suggestion to set "No movements" because then applymovement will not work. Also, "Look down" isn't glitchy at all. It's just you need to set the Movement to 11.

Spoiler:
#dynamic 0x800000

#org @start
lock
checkflag 0x1006
if 0x1 goto @done
applymovement 0x01 @move3
waitmovement 0x0
msgbox @stuff 0x2
applymovement 0x01 @move1
waitmovement 0x0
sethealingplace 0x6
setflag 0x1006
trainerbattle 0x1 0x237 0x0 @before @after @run
release
end

#org @run
msgbox @text 0x2
applymovement 0x01 @move2
waitmovement 0x0
setflag 0x1005
hidesprite 0x01
release
end

#org @done
release
end

#org @move1
#raw 0x56
#raw 0x09
#raw 0x0A
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @before
= How much did you hear?

#org @after
= Didn't think you'd be that strong.

#org @text
= Bye now!

#org @stuff
= There are whirlpools blocking\nthe entrances sir.



Quote:
Originally Posted by mrhiyuck View Post
Spoiler:
Code:
'---------------
#dynamic 0x800000
#org 0xE3D134
lock
faceplayer
checkflag 0x939
if 0x0 goto @noditto
checkflag 0x941
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
checkitem 0x4 0x1
if 0x0 goto @jerk
removeitem 0x04 0x1
hidesprite 0x4
givepokemon 0x84 0xA 0xC3 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x941
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @noditto
msgbox @7 0x6
release
end

#org @jerk
msgbox @8 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hello... could you tell me your\nname?\p[player]?\pWell [player], it seems that DITTO\nover there has taken a liking to\lyou.\pIt's had a stressful time here in\nthe lab, so I was hoping he could\lspend time outside with a Trainer.\pWould you take DITTO?

#org @2
= No? Well come back if you change\nyour mind.\pI feel sorry for the little guy.

#org @3
= You received a DITTO!

#org @4
= Would you like to give a\nnickname to DITTO?

#org @5
= Be a good owner to DITTO!\nBetter then we were...

#org @6
= Hey [player]! How's DITTO doing?

#org @7
= Wow... it's been so busy, and now\nit's calmed down.\pWe were running nonstop with\nexperiments to get the Dojo\lworking.\pThat DITTO was the POK\h1bMON\ninvolved in the experiment. I hope\lhe can rest now.

#org @8
= Oh? You don't seem to have a\nPOK\h1bBALL.\pDITTO's old one was here...\nAll we need is a regular POK\h1bBALL.\pCould you find one?


This all works.. with a couple exceptions. Even without a pokeball, the checkitem doesn't seem to switch to "jerk". It does take a pokeball if you have one but if you don't it still continues without switching.

Also hidesprite works, but when you move just one step, the sprite returns. Could someone help me with these?
That's not the way checkitem works.
You do something like this:

Code:
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x0 goto @donthave
About the "sprite returning"... that's normal. Hidesprite will hide the sprite only temporarily.
Before the hidesprite command you need to use a setflag, which value is the Person ID you set.
__________________
  #1312    
Old June 9th, 2009 (04:23 PM).
XD003's Avatar
XD003
The Silver Rose of Chaos
 
Join Date: Feb 2006
Location: I call it hell, but some people call it Florida.
Age: 21
Gender: Male
Nature: Gentle
I have a question - I just hope I'm asking the right place for this. If not, please tell me where I should go to ask and all.

Anyways, my question is:
How do you make a script which makes a person have a Dropdown mutlichoice box list of Pokemon for sale. I have no clue how to script at all, and my friend who can script has no clue how. If you're wondering what I mean..:

Person: Oh, hello there! I'm a grass pokemon trainer and I came to this island to train up my pokemon and catch some new ones. However I got swept away and caught too many of the same in the process. Would you like to buy some form me?
[Dropdown box here]
Sunflora $500
Vileplume $500
Venusaur $1000
...
Etc etc. That's what I'm trying to do. I'm probably asking the wrong place, but it'd be really appreciated if you could help. Thanks in advance.
__________________
Pokemon Hacking Projects:
Yitria: Redux - Indefinite Hiatus (Reason: Unrecognizable errors after making the first map.)
Troditiran: Redux - Indefinite Hiatus (Reason: Abandoned hacking for reason stated above)

RPG Maker Projects:
Pokemon Yitria: Redux - In Progress (Taking a break)
Pokemon Inferno Red - In Progress (Taking a break)
Pokemon Troditiran: Redux - Not Started Yet
Pokemon Boundless World - Not Started Yet
Pokemon Endless Crimson - Not Started Yet (I don't even remember what this was ._.)
Pokemon XD² - Shadows of a Former Chaos - In Progress
Pokemon Fragmented Red - On Hold
  #1313    
Old June 9th, 2009 (04:24 PM).
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by Larsie13 View Post
0x13 = 19, 0x14 = 20, and 0x15 = 21. Use 19, 20 and 21, or 0xD, 0xF and 0xF. Also, you'll need a waitmovement 0 after the MOVEPLAYER.
It didn't really work, so I just changed them to IDs 1, 2, and 3 and changed the script accordingly and it worked perfectly. Thanks.
  #1314    
Old June 9th, 2009 (04:33 PM).
PlatniumPiano's Avatar
PlatniumPiano
You are now breathing manually
 
Join Date: Dec 2008
Location: Yesterday
Gender: Male
Nature: Lax
Quote:
Originally Posted by XD003 View Post
I have a question - I just hope I'm asking the right place for this. If not, please tell me where I should go to ask and all.

Anyways, my question is:
How do you make a script which makes a person have a Dropdown mutlichoice box list of Pokemon for sale. I have no clue how to script at all, and my friend who can script has no clue how. If you're wondering what I mean..:

Person: Oh, hello there! I'm a grass pokemon trainer and I came to this island to train up my pokemon and catch some new ones. However I got swept away and caught too many of the same in the process. Would you like to buy some form me?
[Dropdown box here]
Sunflora $500
Vileplume $500
Venusaur $1000
...
Etc etc. That's what I'm trying to do. I'm probably asking the wrong place, but it'd be really appreciated if you could help. Thanks in advance.

ASM would be the only way to my knowledge, but I could be wrong.
  #1315    
Old June 9th, 2009 (04:35 PM). Edited June 9th, 2009 by PI Hudson.
PI Hudson's Avatar
PI Hudson
Can be random for hugs> PIE!!!
 
Join Date: May 2009
Location: Minnesota
Age: 21
Gender: Male
Nature: Modest
Quote:
Originally Posted by HackMew View Post
Quote:
QUESTION: Is there a way to check if a pokemon is holding an item?
Not with scripting. You need ASM.
Oh, I was wondering because the Battle Pyramid can check for hold items, since it doesn't allow them.
  #1316    
Old June 9th, 2009 (04:50 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by PlatniumPiano View Post
ASM would be the only way to my knowledge, but I could be wrong.
Yes, you're wrong. The multichoice command is all that's needed basically, plus a bit of text editing.


Quote:
Originally Posted by PI Hudson View Post
Oh, I was wondering because the Battle Pyramid can check for hold items, since it doesn't allow them.
Did you check the scripts there? I'm pretty sure some specials are used.
__________________
  #1317    
Old June 9th, 2009 (04:55 PM).
XD003's Avatar
XD003
The Silver Rose of Chaos
 
Join Date: Feb 2006
Location: I call it hell, but some people call it Florida.
Age: 21
Gender: Male
Nature: Gentle
Quote:
Originally Posted by HackMew View Post
Yes, you're wrong. The multichoice command is all that's needed basically, plus a bit of text editing.
So, where exactly is the data for Multichoice located?
__________________
Pokemon Hacking Projects:
Yitria: Redux - Indefinite Hiatus (Reason: Unrecognizable errors after making the first map.)
Troditiran: Redux - Indefinite Hiatus (Reason: Abandoned hacking for reason stated above)

RPG Maker Projects:
Pokemon Yitria: Redux - In Progress (Taking a break)
Pokemon Inferno Red - In Progress (Taking a break)
Pokemon Troditiran: Redux - Not Started Yet
Pokemon Boundless World - Not Started Yet
Pokemon Endless Crimson - Not Started Yet (I don't even remember what this was ._.)
Pokemon XD² - Shadows of a Former Chaos - In Progress
Pokemon Fragmented Red - On Hold
  #1318    
Old June 9th, 2009 (05:08 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by XD003 View Post
So, where exactly is the data for Multichoice located?
Well, just search it. They're texts after all.
__________________
  #1319    
Old June 9th, 2009 (05:16 PM).
XD003's Avatar
XD003
The Silver Rose of Chaos
 
Join Date: Feb 2006
Location: I call it hell, but some people call it Florida.
Age: 21
Gender: Male
Nature: Gentle
I can't really script on my PC, nor does the scripting programs I have work. And I have no clue either how to search for it x-x.
Yeah, I know. I'm retarded - When it comes to scripting, I'm dumber then a nail.
__________________
Pokemon Hacking Projects:
Yitria: Redux - Indefinite Hiatus (Reason: Unrecognizable errors after making the first map.)
Troditiran: Redux - Indefinite Hiatus (Reason: Abandoned hacking for reason stated above)

RPG Maker Projects:
Pokemon Yitria: Redux - In Progress (Taking a break)
Pokemon Inferno Red - In Progress (Taking a break)
Pokemon Troditiran: Redux - Not Started Yet
Pokemon Boundless World - Not Started Yet
Pokemon Endless Crimson - Not Started Yet (I don't even remember what this was ._.)
Pokemon XD² - Shadows of a Former Chaos - In Progress
Pokemon Fragmented Red - On Hold
  #1320    
Old June 9th, 2009 (05:16 PM).
Teh_PingasYTP's Avatar
Teh_PingasYTP
PINGAS!
 
Join Date: May 2009
Location: Valley Springs
Gender:
Nature: Relaxed
Send a message via Yahoo to Teh_PingasYTP
i made a givepokemon script and it works, but after i get it and talk to him again, he gives it to me again, and again and i can't get it to work! i want him to say something else after i get it and talk to him again.

Script:
Spoiler:
#dynamic 0x71AA20
#org @start
lock
faceplayer
checkflag 0x829
if 0x0 goto @notyet
if 0x1 goto @give
release
end
#org @notyet
msgbox @sorry 0x6
end

#org @give
givepokemon 0x7E 0x7 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x829
msgbox @yay 0x6
release
end
#org @sorry
= Hello!\pMy name is Teh_PingasYTP!\pYou're in my hack!\pI'll tell you what.\pIf you come back to me\nafter you get the POK\h1BDEX,\pI'll give you something special!
#org @yay
= [player] obtained MAGMAR!\nCongradulations!\pIt's a very rare POK\h1BMON!\nTrain it well!


I am using XSE.
  #1321    
Old June 9th, 2009 (05:18 PM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL
Im comin' home...
Community Supporter Tier 1
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
Quote:
Originally Posted by XD003 View Post
So, where exactly is the data for Multichoice located?
There is a tutorial for editing multichoice data in the Documents And Tutorials section, please look there.
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
  #1322    
Old June 9th, 2009 (05:34 PM).
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Teh_PingasYTP View Post
i made a givepokemon script and it works, but after i get it and talk to him again, he gives it to me again, and again and i can't get it to work! i want him to say something else after i get it and talk to him again.

Script:
Spoiler:
#dynamic 0x71AA20
#org @start
lock
faceplayer
checkflag 0x829
if 0x0 goto @notyet
if 0x1 goto @give
release
end
#org @notyet
msgbox @sorry 0x6
end

#org @give
givepokemon 0x7E 0x7 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x829
msgbox @yay 0x6
release
end
#org @sorry
= Hello!\pMy name is Teh_PingasYTP!\pYou're in my hack!\pI'll tell you what.\pIf you come back to me\nafter you get the POK\h1BDEX,\pI'll give you something special!
#org @yay
= [player] obtained MAGMAR!\nCongradulations!\pIt's a very rare POK\h1BMON!\nTrain it well!


I am using XSE.
The script below should work.You set the flag for the pokedex after you get the pokemon.Thats the flag it checks for inorder to give the pokemon.Just a small mistake.

Spoiler:
#dynamic 0x

#org @start
checkflag 0x829
if 0x1 goto @give
msgbox @sorry 0x2
release
end

#org @give
checkflag 0x1000
if 0x1 goto @done
givepokemon 0x7E 0x7 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x1000
msgbox @yay 0x2
release
end

#org @done
msgbox @gave 0x2
release
end

#org @sorry
= Hello!\pMy name is Teh_PingasYTP!\pYou're in my hack!\pI'll tell you what.\pIf you come back to me\nafter you get the POK\h1BDEX,\pI'll give you something special!

#org @yay
= [player] obtained MAGMAR!\nCongradulations!\pIt's a very rare POK\h1BMON!\nTrain it well!

#org @gave
= text after recieve magmar
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #1323    
Old June 9th, 2009 (06:39 PM).
mrhiyuck's Avatar
mrhiyuck
//
 
Join Date: Sep 2007
Quote:
That's not the way checkitem works.
You do something like this:

Code:
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x0 goto @donthave
About the "sprite returning"... that's normal. Hidesprite will hide the sprite only temporarily.
Before the hidesprite command you need to use a setflag, which value is the Person ID you set.
Oh that got it working. Thank you so much!
  #1324    
Old June 9th, 2009 (09:12 PM).
PlatniumPiano's Avatar
PlatniumPiano
You are now breathing manually
 
Join Date: Dec 2008
Location: Yesterday
Gender: Male
Nature: Lax
I'm redesining the script for my first Pokemon in my hack... The problem is when the flag has been set. If the flag is not set, the script works fine, but when the flag is set, it automatically goes to the script in which it was not set.

Is this because the flag was set on a different map? Or something else (yes I set person id to 950)?

Ruby Version AXVE Script:

Code:
 
#dynamic 0x800000
 
#org @start
checkflag 0x950
if 0x1 goto @done
lock
faceplayer
msgbox @whatsup 0x6
release
end
 
#org @ponyta
msgbox @give 0x6
givepokemon 0x4D 0xF 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @obtain 0x6
waitfanfare
msgbox @would 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @call 0x6
setflag 0x800
release
end
 
#org @done
lock
faceplayer
msgbox @hey 0x5
compare LASTRESULT 0x1
if 0x1 goto @ponyta
msgbox @sorry 0x6
release
end
 
#org @name
fadescreen 0x1
special 0x9E
waitstate
return
 
#org @hey
= Hey, [player], what brings you\nhere on my day off?\p... ... ...\n... .... ...\l... ... ...\l... ... ...\pYou can't be serious...\n...Mew?\pWell, if this is true, then\nI guess you will need a POKéMON.
 
#org @give
= That's a wise choice.\pIt's not often you have\nan encounter with Mew.
 
#org @obtain
= You got a Ponyta!
 
#org @would
= Would you like to give a\nnickname to this POKéMON?
 
#org @call
= Well... we got you a\nPOKéMON.\lNow what?\p... ... ...\n... ... ...\lLord Aspen, eh?\pListen, Aspen is a seasoned POKéMON\nveteran, so with that guy there,\lI doubt you could win.\pHowever.\pIf you must, there is a cavern\nwhere you can train that\lhorse, located in the caves, one level above Aspens.
 
#org @whatsup
= Hey, [player], what's up?
 
#org @sorry
= Oh...\nWell, I'm sorry to hear that.
  #1325    
Old June 9th, 2009 (09:18 PM).
Xatoku's Avatar
Xatoku
Game Developer
 
Join Date: Feb 2009
Location: Canada
Gender: Male
I've asked this before but nobody's answered so here it is again,

In this script everything works 100% except that after the trainerbattle, sprite 0x5 on the screen changes colour. Could somebody tell me the proper settings I should give the sprite?

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x368
if 0x1 goto @end
lockall
msgbox @text1 0x6
applymovement 0x4 @move1
waitmovement 0x0
applymovement 0x4 @move2
waitmovement 0x0
pause 0x25
applymovement MOVE_PLAYER @move3
waitmovement 0x0
hidesprite 0x4
showsprite 0x6
msgbox @text2 0x6
applymovement MOVE_PLAYER @move4
waitmovement 0x0
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
hidesprite 0x2
fanfare 0x13E
msgbox @text3 0x4
waitfanfare
closeonkeypress
playsong 0x13B 0x0
msgbox @text4 0x6
showsprite 0x5
applymovement MOVE_PLAYER @move1
waitmovement 0x0
applymovement MOVE_PLAYER @move7
waitmovement 0x0
applymovement 0x5 @move5
waitmovement 0x0
msgbox @text5 0x6
applymovement 0x5 @move8
waitmovement 0x0
hidesprite 0x3
pause 0x10
applymovement 0x5 @move9
waitmovement 0x0
setvar 0x7030 0x129
setvar 0x7033 0x158
trainerbattle 0x9 0x2E5 0x0 @before @no
setvar 0x7030 0x158
setvar 0x7033 0x129
applymovement MOVE_PLAYER @move6
waitmovement 0x0
msgbox @text6 0x6
setflag 0x368
releaseall
warp 0x3 0x1 0x2 0x0 0x0
end

#org @end
releaseall
end

#org @text1
= [red_fr][Player]:[black_fr] Hey you!

#org @text2
= [red_fr][Player]:[black_fr] That takes care of him.\nNow for Totodile.

#org @text3
= [red_fr][Player][black_fr] stole the [navyblue_fr]Totodile.[black_fr]

#org @text4
= ???: Hey, you can't take that!

#org @text5
= [orange_fr]Gold:[black_fr] My names Gold, and you're\nthe thief who stole my backpack!\p[red_fr][Player]:[black_fr] What backpack?\p[orange_fr]Gold:[black_fr] Don't act like you don't\nknow!\p[orange_fr]Gold:[black_fr] You'll pay for what you did!

#org @before
= [orange_fr]Gold:[black_fr] Here goes!

#org @no
= Argh, he's strong!

#org @text6
= [orange_fr]Gold:[black_fr] You won't get away with this!

#org @move1
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x50
#raw 0x51
#raw 0x02
#raw 0xFE

#org @move4
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move5
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1E
#raw 0xFE

#org @move6
#raw 0x15
#raw 0x15
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x01
#raw 0xFE

#org @move7
#raw 0x00
#raw 0xFE

#org @move8
#raw 0x13
#raw 0x11
#raw 0xFE

#org @move9
#raw 0x10
#raw 0x12
#raw 0x01
#raw 0xFE
Closed Thread
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 07:32 PM.


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.