The PokéCommunity Forums  

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

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Reply
 
Thread Tools
  #51    
Old January 5th, 2010, 05:41 PM
Omega Zero's Avatar
Omega Zero
Is back...
Community Supporter Tier 4
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 16
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Omega Zero
Yes finally all of these are merged but.. some of the Xse have raws in it which shouldn't be in there
__________________
Reply With Quote
  #52    
Old January 5th, 2010, 06:53 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Half decent 'Headbutt Script':
Code:
//-------------------------------------
//Preperations
//-------------------------------------
#dynamic 0x800000
#define cAttack 0x1D //Change this value to use another attack

//-------------------------------------
//Main Script
//-------------------------------------
#org @Main
lockall //Lock everything from moving
checkattack cAttack //Stores the first Pokémon who knows the attack into the variable 0x800D
compare 0x800D 0x06 //Makes sure a Pokémon knows the attack...
if 0x01 goto @NotKnown //If the value is 6 then no Pokémon knows the attack
setanimation 0x00 0x800D //The Pokémon animation is set with the Pokémon who knows the attack
bufferpartypokemon 0x00 0x800D //Puts the Pokémon who knows the attack into [buffer1]
bufferattack 0x01 cAttack //Puts the attack name into [buffer2]
msgbox @Message1 0x05 //A Yes/No box appears with the message
compare 0x800D 0x00 //Checks in "No" was selected
if 0x01 goto @DoNotWant //If it was, quit
msgbox @Message2 0x04 //"[buffer1] used [buffer2]!" >> Keep open
closeonkeypress //Close the msgbox when a key is pressed
doanimation 0x25 //Shows the Pokémon animation
waitstate //Waits for the animation to complete
setvar 0x8004 0x01 //Set up to shake screen
setvar 0x8005 0x01
setvar 0x8006 0x0C
setvar 0x8007 0x02
special 0x136 //Shake screen
pause 0x20 //Wait 1~ second
special 0xAB //Call a random battle from the "Tree" section of wild Pokémon
compare 0x800D 0x00 //Checks if a wild battle happened
if 0x1 goto @DoNotWant //If not, quit
waitstate //Wait for the battle to complete
releaseall //Allow the player to move freely again
end //End the script

//-------------------------------------
//Sub Scripts
//-------------------------------------
#org @NotKnown
msgbox @Message3 0x03
end

#org @DoNotWant
releaseall
end

//-------------------------------------
//Messages
//-------------------------------------
#org @Message1
= This tree may contain a Pokemon.\nUse the move [buffer2]?

#org @Message2
= [buffer1] used [buffer2]!

#org @Message3
= This tree may contain a Pokemon.\nIt may be able to be knocked out.
Quote:
Originally Posted by tainui View Post
Yes finally all of these are merged but.. some of the Xse have raws in it which shouldn't be in there
It won't make a difference, except for some people not being able to understand it as easily.
__________________
あなた は しきしゃ です
わたし は ばか です

Last edited by Spherical Ice; January 23rd, 2010 at 01:01 PM. Reason: Bored.
Reply With Quote
  #53    
Old January 5th, 2010, 11:20 PM
sky_queen3's Avatar
sky_queen3
Minusle Fangirl. ;)
 
Join Date: Feb 2009
Location: Australia
Age: 24
Gender: Female
Nature: Naive
Uh, how do I use the last one, my character just frezes on the spot when I walk on the green S tile.
__________________
Reply With Quote
  #54    
Old January 5th, 2010, 11:23 PM
Omega Zero's Avatar
Omega Zero
Is back...
Community Supporter Tier 4
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 16
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Omega Zero
Quote:
Originally Posted by sky_queen3 View Post
Uh, how do I use the last one, my character just frezes on the spot when I walk on the green S tile.
in advanced map put
Unknown 0300
var number 4050
hope it helps
__________________
Reply With Quote
  #55    
Old January 5th, 2010, 11:49 PM
sky_queen3's Avatar
sky_queen3
Minusle Fangirl. ;)
 
Join Date: Feb 2009
Location: Australia
Age: 24
Gender: Female
Nature: Naive
Well, it at least works now. :D
__________________
Reply With Quote
  #56    
Old January 7th, 2010, 12:00 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Er, no.

Spoiler:
#dynamic 0xoffset

#org @start
lock
faceplayer
trainerbattle 0x9 0xid 0x3 @intro @defeat
msgbox @text 0x6
release
end

#org @intro
= Text.

#org @defeat
= Text.

#org @text
= Text.


You don't seem to get the hang of the thread. It's for scripts that are original and aren't explained in tutorials because the commands aren't used specifically for said scripts. You just explained how to make a different type of trainerbattle. -.-

Also, I've merged all four of these threads to prevent clutter. Please don't make any more copies of this thread, and remember that you can bump threads in Doc and Tuts!
__________________

Last edited by Spherical Ice; January 30th, 2010 at 09:08 AM.
Reply With Quote
  #57    
Old January 30th, 2010, 06:18 AM
trebornosliw's Avatar
trebornosliw
Learning
 
Join Date: Jul 2009
Age: 21
Gender: Male
Nature: Adamant
Okay, so I have a quick question about the Move Tutor script, right here:
Spoiler:

#org @Start
lock
faceplayer
checkflag 0x200
compare LASTRESULT 0x1
if 0x1 goto @AlreadyLearnt
msgbox @WantToLearn
boxset 0x5
compare LASTRESULT 0x0
if 0x1 goto @DontWant
setvar 0x8005 0x1 ' 0x[Move number]
special 0x18D
setflag 0x200
release
end

Now, after I've changed setvar 0x8005 0x1 to setvar 0x8005 0xwhatever, will the script find out on its own what Pokemon can or cannot learn the attack? Where does the program get that info?
I've got a script that I'm working on that I'll post later, though it's nothing compared to some of the awesome stuff I'm seeing here.
__________________
Credit for my avatar goes to the Lego company.
Reply With Quote
  #58    
Old January 30th, 2010, 08:45 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
@ Trebonsliw: I'm pretty sure that it searches through the whole of the player's party to see if any of them can learn it. I'm not sure where it gets the info from, though. Trial and error would be the only way to find out.
__________________
Reply With Quote
  #59    
Old January 30th, 2010, 08:54 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by The Master View Post
@ Trebonsliw: I'm pretty sure that it searches through the whole of the player's party to see if any of them can learn it. I'm not sure where it gets the info from, though. Trial and error would be the only way to find out.
Yeah, the special should handle that.
__________________
Reply With Quote
  #60    
Old January 30th, 2010, 01:47 PM
trebornosliw's Avatar
trebornosliw
Learning
 
Join Date: Jul 2009
Age: 21
Gender: Male
Nature: Adamant
Okay, thanks! It's an awesome script, I'm definitely going to be using it.
__________________
Credit for my avatar goes to the Lego company.
Reply With Quote
  #61    
Old February 18th, 2010, 02:10 AM
Hashtag's Avatar
Hashtag
king cook
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 19
Gender: Male
Code:
#dynamic 0x<offset>

#org @start
lock
faceplayer
showmoney 0x0 0x0 0x0
msgbox @msg1 MSG_KEEPOPEN
closeonkeypress
multichoice 0x14 0x1 0x<mcnumber> 0x0
compare 0x800D 0x0
if 0x1 goto @common
compare 0x800D 0x1
if 0x1 goto @uncommon
compare 0x800D 0x2
if 0x1 goto @rare
hidemoney 0x0 0x0
release
end

#org @common
checkmoney 0x1388 0x0
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x1388 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg3 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x5
compare 0x800D 0x0
if 0x1 goto @1
compare 0x800D 0x1
if 0x1 goto @2
compare 0x800D 0x2
if 0x1 goto @3
compare 0x800D 0x3
if 0x1 goto @4
compare 0x800D 0x4
if 0x1 goto @5
release
end

#org @1
giveegg 0x<species>
release
end

#org @2
giveegg 0x<species>
release
end

#org @3
giveegg 0x<species>
release
end

#org @4
giveegg 0x<species>
release
end

#org @5
giveegg 0x<species>
release
end

#org @notenough
hidemoney 0x0 0x0
msgbox @msg2 MSG_KEEPOPEN
closeonkeypress
release
end

#org @uncommon
checkmoney 0x2710 0x0
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x2710 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg3 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x5
compare 0x800D 0x0
if 0x1 goto @k1
compare 0x800D 0x1
if 0x1 goto @k2
compare 0x800D 0x2
if 0x1 goto @k3
compare 0x800D 0x3
if 0x1 goto @k4
compare 0x800D 0x4
if 0x1 goto @k5
release
end

#org @k1
giveegg 0x<species>
release
end

#org @k2
giveegg 0x<species>
release
end

#org @k3
giveegg 0x<species>
release
end

#org @k4
giveegg 0x<species>
release
end

#org @k5
giveegg 0x<species>
release
end

#org @rare
checkmoney 0x61A8
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x61A8 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg1 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x3
compare 0x800D 0x0
if 0x1 goto @rare1
compare 0x800D 0x1
if 0x1 goto @rare2
compare 0x800D 0x2
if 0x1 goto @rare3
release
end

#org @rare1
giveegg 0x<species>
release
end

#org @rare2
giveegg 0x<species>
release
end

#org @rare3
giveegg 0x<species>
release
end

#org @msg1
= Hello, welcome to our Egg Shop!\pWhich kind of Egg would you like?

#org @msg2
= You don't have enough money.

#org @msg3
= [black_fr][player] received a [red_fr]Pokémon Egg[black_fr]!
Here is a public egg shop script. Feel free to change any of the text and any of script. Just give credit to Manipulation; okay? The Multichoice box at the top should contain 'Uncommon, Common and Rare' learn how to change them okay. I'm too lazy to explain it.

Common - $5000
Uncommon - $10000
Rare - $25000
__________________
#projectshinx :: moderator
axton :: #firedave :: spheal

Last edited by Hashtag; February 28th, 2010 at 11:40 AM.
Reply With Quote
  #62    
Old February 28th, 2010, 11:27 AM
Team Rocket's Raichu
Bye-Bye!
 
Join Date: Mar 2009
Age: 18
Wow!...

I don't know what to say about this, except wow!

This will make hacks cooler. If I use these I will credit the makers.

EDIT: We should sticky this thread, if you ask me.
__________________

I'm a supermod of that forum.

I've left, bye PC.

Last edited by Team Rocket's Raichu; February 28th, 2010 at 11:37 AM.
Reply With Quote
  #63    
Old February 28th, 2010, 11:42 AM
Hashtag's Avatar
Hashtag
king cook
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 19
Gender: Male
Just to inform everyone I've edited the script, if you're using it or plan to please update it with the newest version. The post was edited today.
__________________
#projectshinx :: moderator
axton :: #firedave :: spheal
Reply With Quote
  #64    
Old March 2nd, 2010, 01:38 PM
NarutoActor's Avatar
NarutoActor
The rocks cry out to me
Community Supporter
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 20
Gender: Female
Nature: Bashful
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
Okay well I liked harry's Idea for an egg shop, but I thought of a way where rare just gives you a higher percentage, while common just gives you a low percentage at a rare pokemon. This method means that even if you pick common you can get a rare egg(with luck), and if you pick rare you can get an un common pokemon(bad luck)

If you pick Rare
Chance of Rare Egg: 80%
Chance of Uncommon Egg: 20%
Chance of Common Egg:0%

If you pick uncommon:
Chance of Rare Egg:40%
Chance of Uncommon Egg:50%
Chance of Common Egg:10%

If you pick common:
Chance of Rare Egg:~13.33%
Chance of uncommon Egg:~16.66
Chance of Common Egg:70%

The way I would implement this is adding a message that states that you can buy a ticket, and green ticket has the best chance of a rare pokemon egg.Also that blue was the worse chance, but it is the cheapest.

Credits:
Manipulation (for original Egg Shop Script)
NarutoActor (For new method. )

Code:
Code:
#dynamic 0x<offset>

#org @start
lock
faceplayer
showmoney 0x0 0x0 0x0
msgbox @msg1 MSG_KEEPOPEN
closeonkeypress
multichoice 0x14 0x1 0x<mcnumber> 0x0
compare 0x800D 0x0
if 0x1 goto @common
compare 0x800D 0x1
if 0x1 goto @uncommon
compare 0x800D 0x2
if 0x1 goto @rare
hidemoney 0x0 0x0
release
end

#org @common
checkmoney 0x1388 0x0
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x1388 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg3 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x1E
goto @com

#org @com
compare 0x800D 0x0
if 0x1 goto @1 'Uses only 2 rare pokemon, which was ment only for an example; you can add more.
compare 0x800D 0x1
if 0x1 goto @1
compare 0x800D 0x2
if 0x1 goto @2
compare 0x800D 0x3
if 0x1 goto @2
compare 0x800D 0x4
if 0x1 goto @3
compare 0x800D 0x5
if 0x1 goto @6
compare 0x800D 0x6
if 0x1 goto @3
compare 0x800D 0x7
if 0x1 goto @3
compare 0x800D 0x8
if 0x1 goto @4
compare 0x800D 0x9
if 0x1 goto @4
compare 0x800D 0xA
if 0x1 goto @5
goto @7 'stop comparing, since all other posiablitys would take you to a common pkmn.

#org @1
giveegg 0x<rare_species>
release
end

#org @2
giveegg 0x<rare_species>
release
end

#org @3
giveegg 0x<uncommon_species>
release
end

#org @4
giveegg 0x<uncommon_species>
release
end

#org @5
giveegg 0x<common_species>
release
end

#org @6
giveegg 0x<common_species>
release
end

#org @7
random 0x1
compare LASTRESULT 0x0
if true goto @5
goto @6

#org @notenough
hidemoney 0x0 0x0
msgbox @msg2 MSG_KEEPOPEN
closeonkeypress
release
end

#org @uncommon
checkmoney 0x2710 0x0
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x2710 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg3 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0xA
goto @com

#org @rare
checkmoney 0x61A8 
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x61A8 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg1 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x5
goto @com

#org @msg1
= Hello, welcome to our Egg Shop!\pWhich kind of Egg would you like?

#org @msg2
= You don't have enough money.

#org @msg3
= [black_fr][player] received a [red_fr]Pokémon Egg[black_fr]!
Side Notes: Feel Free to add more than 7 to change the percentages around, also re-arranging the Random <number> will change the percentages.
__________________
~There are those people who understand hex, F the rest
Reply With Quote
  #65    
Old March 13th, 2010, 01:52 PM
PeregrineFig's Avatar
PeregrineFig
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 19
Gender: Male
Nature: Hardy
Name: Random Clefairy Battle script
ROM: FireRed (US Version)
Description: This is a simple little script, but it might come in handy for a newbie hacker. When you talk to the Clefairy a random value between 0 and F is drawn, and if it's 0, you battle the Clefairy for a chance to catch it, otherwise, it bounces away into the mountains and disappears until you re-enter the map.
Script:
Spoiler:

#dynamic 0x740000
#org @start
lock
faceplayer
cry 0x23 0x0
msgbox @text 0x6
random 0xF
compare 0x800D 0x0
if 0x1 goto @clefairybattle
applymovement 0x1 @move
waitmovement 0x0
hidesprite LASTTALKED
release
end

#org @clefairybattle
wildbattle 0x23 0x5 0x0
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
setflag 0x202
release
end

#org @text
= CLEFAIRY: Clef! Cleffa!

#org @move
#raw 0x15
#raw 0x15
#raw 0x15
#raw 0xFE

Comments: Obviously you can change the flag, pokemon and level, movements, etc to whatever you want. Just make sure to set the person ID to the same as the flag used, or the Clefairy won't vanish after battling it. Of course, you might also want it to stay there even after battling it once, in that case just get rid of the setflag command and leave the ID as 0000.
Credits: I wrote this myself, however, diegoisawesome's tutorial taught me quite a few things about XSE scripting.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

Reply With Quote
  #66    
Old May 21st, 2010, 10:29 PM
HackDeoxys's Avatar
HackDeoxys
Community Supporter Tier 3
 
Join Date: May 2010
Nature: Lonely
Quote:
Originally Posted by sab View Post
effect: a random weather script
game: all gba games
credit: sab
script:
Spoiler:

'---------------
#org 0x(offset)
random 0x0A
compare LASTRESULT 0x0
if 0x1 goto @1
compare LASTRESULT 0x1
if 0x1 goto @2
compare LASTRESULT 0x2
if 0x1 goto @3
compare LASTRESULT 0x3
if 0x1 goto @4
compare LASTRESULT 0x4
if 0x1 goto @5
compare LASTRESULT 0x5
if 0x1 goto @6
compare LASTRESULT 0x6
if 0x1 goto @7
compare LASTRESULT 0x7
if 0x1 goto @8
compare LASTRESULT 0x8
if 0x1 goto @9
compare LASTRESULT 0x9
if 0x1 goto @10

#org @1
setweather 0x1
doweather
end

#org @2
setweather 0x2
doweather
end

#org @3
setweather 0x3
doweather
end

#org @4
setweather 0x4
doweather
end

#org @5
setweather 0x5
doweather
end

#org @6
setweather 0x7
doweather
end

#org @7
setweather 0xb
doweather
end

#org @8
setweather 0xd
doweather
end

#org @9
setweather 0x2
doweather
end

#org @10
setweather 0xb
doweather
end

I tried the random weather script and it just said
"No dynamic start offset specified."
Does anyone know how to fix it?
__________________
this is not a signature
Reply With Quote
  #67    
Old May 21st, 2010, 10:42 PM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Add "#dynamic 0xOFFSET" at the beginning, with 0xOFFSET being your offset.
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 06:21 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.