Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

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
 
Thread Tools
  #4651    
Old August 27th, 2010 (02:18 AM). Edited August 27th, 2010 by supersam2.
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
hi, why isn't that script working proprely?

Code:
'---------------
#dynamic 0x719830
#org @start
lock
faceplayer
random 0x385
copyvar 0x4060 0x800D
addvar 0x4060 0x1
bufferpokemon 0x1 0x4060
msgbox @Want 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
goto @no

#org @yes
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @PartyFull
msgbox @Obtained 0x2
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox @TakeCare 0x2
release
end

#org @no
msgbox @DontWant 0x2
release
end

#org @partyfull
msgbox @TxtPartyFull 0x2
release
end


#org @Want
= Vieil homme: Tu veux un \v\h03?

#org @Obtained
= [player] a recu un \v\h03!

#org @TakeCare
= Vieil homme: Prends soin de \v\h03?

#org @DontWant
= Vieil homme: Tant pis pour toi!

#org @TxtPartyFull
= Vieil homme: désolé, ton équipe est pleine!
It sometimes ask me if I want an attack name and sometimes if I want a pokemon... And sometimes it crashes

and by the way: how can I delete the point you can fly to on the first map?

thancks by advance, supersam2
  #4652    
Old August 27th, 2010 (10:41 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Quote originally posted by supersam2:
hi, why isn't that script working proprely?

Code:
'---------------
#dynamic 0x719830
#org @start
lock
faceplayer
random 385
copyvar 0x4060 0x800D
addvar 0x4060 0x1
bufferpokemon 0x1 0x4060
msgbox @Want 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
// Used to be #org @no
msgbox @DontWant 0x2
end

#org @yes
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @PartyFull
msgbox @Obtained 0x2
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox @TakeCare 0x2
end

#org @partyfull
msgbox @TxtPartyFull 0x2
end


#org @Want
= Vieil homme: Tu veux un [buffer2]?

#org @Obtained
= [player] a recu un [buffer2]!

#org @TakeCare
= Vieil homme: Prends soin de [buffer2]?

#org @DontWant
= Vieil homme: Tant pis pour toi!

#org @TxtPartyFull
= Vieil homme: désolé, ton équipe est pleine!
It sometimes ask me if I want an attack name and sometimes if I want a pokemon... And sometimes it crashes

and by the way: how can I delete the point you can fly to on the first map?

thancks by advance, supersam2
Well, your 'random' command is actually choosing a random number between 0 and 901. That's because you put the hexadecimal prefix ('0x') in front of 385. You can either change the number to 181 or just scrap the prefix altogether (that way XSE will treat it as a decimal). That should fix the errors. Other than that, the rest of the corrections (see above) are for efficiency's sake (except for the buffers which I changed so that it's a little easier to read).

As for the fly point, I think you can just move it to another map.
__________________

Brother of Vrai
  #4653    
Old August 27th, 2010 (11:00 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
I tried with that script and it still don't work...

Code:
'---------------
#dynamic 0x719830
#org @start
lock
faceplayer
random 0x181
copyvar 0x4060 0x800D
addvar 0x4060 0x1
bufferpokemon 0x1 0x4060
msgbox @Want 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @DontWant 0x2
release
end

#org @yes
countpokemon
compare LASTRESULT 0x6
if 0x1 goto @PartyFull
msgbox @Obtained 0x2
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox @TakeCare 0x2
end

#org @partyfull
msgbox @TxtPartyFull 0x2
end


#org @Want
= Vieil homme: Tu veux un [buffer2]?

#org @Obtained
= [player] a recu un [buffer2]!

#org @TakeCare
= Vieil homme: Prends soin de [buffer2]?

#org @DontWant
= Vieil homme: Tant pis pour toi!

#org @TxtPartyFull
= Vieil homme: désolé, ton équipe est pleine!
I really don't understand...
  #4654    
Old August 27th, 2010 (11:06 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Can you please be a little more specific? Just saying that it "doesn't work" won't help me figure out what's wrong.
__________________

Brother of Vrai
  #4655    
Old August 27th, 2010 (11:14 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
the main problem I think: the buffer2 make Attacks name appears but I haven't used any bufferattack command... Where does it come from? If I find this, I'm sure the problem will disappear
  #4656    
Old August 27th, 2010 (11:17 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Quote originally posted by supersam2:
the main problem I think: the buffer2 make Attacks name appears but I haven't used any bufferattack command... Where does it come from? If I find this, I'm sure the problem will disappear
I used '[buffer2]' because in your 'bufferpokemon' command, you used '0x1' as a parameter. Thus, '[buffer2]' is used to access the contents of the '0x1' buffer. Are you sure that you changed the value in the 'Script Offset' box in AdvanceMap to the address of the new script?
__________________

Brother of Vrai
  #4657    
Old August 27th, 2010 (11:25 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
Quote originally posted by colcolstyles:
I used '[buffer2]' because in your 'bufferpokemon' command, you used '0x1' as a parameter. Thus, '[buffer2]' is used to access the contents of the '0x1' buffer. Are you sure that you changed the value in the 'Script Offset' box in AdvanceMap to the address of the new script?
I don't know why, the script didn't compiled. It appears like it sis but it didn't in fact. I reopened the script and change the value again, taht works. Thank you very much

edit: there is still a little problem: it asked me one time if I want a "?"
  #4658    
Old August 27th, 2010 (11:37 AM).
Lodestar Lodestar is offline
 
Join Date: Aug 2010
Location: USA
Age: 22
Gender: Male
Nature: Careful
Posts: 9
Quote originally posted by supersam2:
I don't know why, the script didn't compiled. It appears like it sis but it didn't in fact. I reopened the script and change the value again, taht works. Thank you very much

edit: there is still a little problem: it asked me one time if I want a "?"
I don't know if this is right but I'm pretty sure there's 25 empty slots between Celebi and Treecko? Is it possible that that's the problem?
__________________
  #4659    
Old August 27th, 2010 (11:37 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Quote originally posted by supersam2:
edit: there is still a little problem: it asked me one time if I want a "?"
I think the problem lies in the fact that there are a number (25?) of empty pokémon entries in the midst of the pokémon data (people usually use them to add new pokémon). I would guess that the game randomly chose one of those. You'd have to insert some sort of check which will pick a new number if the number is one of those entries.

edit: Beaten :(
__________________

Brother of Vrai
  #4660    
Old August 27th, 2010 (11:43 AM). Edited August 27th, 2010 by supersam2.
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
one of those has number 389 and that's not normal becuz 0x181 + 0x1 = 0x182 = 386... I thougt the givepokemon use national dex number... Isn't it?

edit: anoter is n°411 and another one is 390
  #4661    
Old August 28th, 2010 (11:51 PM).
Zeffy's Avatar
Zeffy Zeffy is offline
the things i do for love ¯\_(ツ)_/¯
Moderator
BS
CS
 
Join Date: Apr 2009
Location: in the middle of Nowhere
Gender: Male
Posts: 5,459
Send a message via Skype™ to Zeffy
Quote originally posted by supersam2:
one of those has number 389 and that's not normal becuz 0x181 + 0x1 = 0x182 = 386... I thougt the givepokemon use national dex number... Isn't it?

edit: anoter is n°411 and another one is 390
Givepokemon uses hex. There's a hex list of Pokémon that comes XSE that should be used, not the National Pokedex Number.
__________________
c
a
r
t
o
o
n

n
e
t
w
o
r
k

staff collab
april 2o15
  #4662    
Old August 29th, 2010 (01:23 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
Can't find it... It's not in the guide. Is there additional documentation? Thank you and sorry for my noobs questions, but can't evolve without errors
  #4663    
Old August 29th, 2010 (01:26 AM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL 0m3GA ARS3NAL is offline
Im comin' home...
Silver Tier
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
Posts: 1,816
Quote originally posted by Zeffy:

Givepokemon uses hex. There's a hex list of Pokémon that comes XSE that should be used, not the National Pokedex Number.
Actually, XSE can tell the difference between DEC and HEX, if you want a pikachu you can type 25 instead of the hex number...
__________________
>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...

>
  #4664    
Old August 29th, 2010 (01:28 AM).
Zeffy's Avatar
Zeffy Zeffy is offline
the things i do for love ¯\_(ツ)_/¯
Moderator
BS
CS
 
Join Date: Apr 2009
Location: in the middle of Nowhere
Gender: Male
Posts: 5,459
Send a message via Skype™ to Zeffy
Quote originally posted by supersam2:
Can't find it... It's not in the guide. Is there additional documentation? Thank you and sorry for my noobs questions, but can't evolve without errors ;)
It should be in the same folder as where you extracted XSE. It's named stdpoke.rbh

On the other hand, you can make scripting easier by making use of these RBH files. Like so,

Code:
#include stdpoke.rbh

#dynamic 0x8000000
#org @start
givepokemon PKMN_CHARIZARD 0x36 0x0 0x0 0x0 0x0
end
By using the RBH files, you can just use PKMN_(NAME OF POKEMON HERE). There are also a few more RBH files you can use.
__________________
c
a
r
t
o
o
n

n
e
t
w
o
r
k

staff collab
april 2o15
  #4665    
Old August 29th, 2010 (02:07 AM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Gold Tier
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Posts: 12,871
I have really weird problem related to scripting... I have tried to add tile script to Ruby ROM (I've tried 2 different ROMs by the way) and that script isn't working. O_o But when I try to put the same script offset into old tile script it's working... Did this happen to anyone else?
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #4666    
Old August 29th, 2010 (02:12 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
yeah but It won't help if I wanna do a random pokemon script. The script would have to check if the random number is not one of those which are not pokemons. (25
compare 0x800D XX
if 0x1 goto @endscript)

Is it the only way?

@ash493: This is related to the values on the right panel but I haven't more complete infos. I tried it too and sometimes it works by changing the values to other similar to another tilescript, sometimes not...
  #4667    
Old August 29th, 2010 (02:18 AM).
Zeffy's Avatar
Zeffy Zeffy is offline
the things i do for love ¯\_(ツ)_/¯
Moderator
BS
CS
 
Join Date: Apr 2009
Location: in the middle of Nowhere
Gender: Male
Posts: 5,459
Send a message via Skype™ to Zeffy
Quote originally posted by supersam2:
yeah but It won't help if I wanna do a random pokemon script. The script would have to check if the random number is not one of those which are not pokemons. (25
compare 0x800D XX
if 0x1 goto @endscript)

Is it the only way?

@ash493: This is related to the values on the right panel but I haven't more complete infos. I tried it too and sometimes it works by changing the values to other similar to another tilescript, sometimes not...
Oh, so a random givepokemon eh? Could you give the whole script? I might have the solution for it. :>
__________________
c
a
r
t
o
o
n

n
e
t
w
o
r
k

staff collab
april 2o15
  #4668    
Old August 29th, 2010 (02:22 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
I've given here a little above x) here it is:

Code:
'---------------
#org 0x719830
lock
faceplayer
random 0x181
copyvar 0x4060 LASTRESULT
addvar 0x4060 0x1
bufferpokemon 0x0 0x4060
msgbox 0x87198AD MSG_YESNO '"Vieil homme: Tu veux un [buffer1]?"
compare LASTRESULT 0x1
if 0x1 goto 0x871985C
goto 0x8719897

'---------------
#org 0x71985C
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x87198A2
random 0x99
copyvar 0x4061 LASTRESULT
addvar 0x1 0x4061
msgbox 0x87198CB MSG_FACE '"[player] a recu un [buffer1]!"
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox 0x87198DE MSG_FACE '"Vieil homme: Prends soin de [buffe..."
release
end

'---------------
#org 0x719897
msgbox 0x8719900 MSG_FACE '"Vieil homme: Tant pis pour toi!"
release
end

'---------------
#org 0x7198A2
msgbox 0x8719922 MSG_FACE '"Vieil homme: désolé, ton équipe es..."
release
end


'---------
' Strings
'---------
#org 0x7198AD
= Vieil homme: Tu veux un [buffer1]?

#org 0x7198CB
= [player] a recu un [buffer1]!

#org 0x7198DE
= Vieil homme: Prends soin de [buffer1]?

#org 0x719900
= Vieil homme: Tant pis pour toi!

#org 0x719922
= Vieil homme: désolé, ton équipe est pleine!
and for tiles scipts can you help us?
  #4669    
Old August 29th, 2010 (02:27 AM).
Zeffy's Avatar
Zeffy Zeffy is offline
the things i do for love ¯\_(ツ)_/¯
Moderator
BS
CS
 
Join Date: Apr 2009
Location: in the middle of Nowhere
Gender: Male
Posts: 5,459
Send a message via Skype™ to Zeffy
Quote originally posted by supersam2:
I've given here a little above x) here it is:

Code:
'---------------
#org 0x719830
lock
faceplayer
random 0x181
copyvar 0x4060 LASTRESULT
addvar 0x4060 0x1
bufferpokemon 0x0 0x4060
msgbox 0x87198AD MSG_YESNO '"Vieil homme: Tu veux un [buffer1]?"
compare LASTRESULT 0x1
if 0x1 goto 0x871985C
goto 0x8719897

'---------------
#org 0x71985C
countpokemon
compare LASTRESULT 0x6
if 0x1 goto 0x87198A2
random 0x99
copyvar 0x4061 LASTRESULT
addvar 0x1 0x4061
msgbox 0x87198CB MSG_FACE '"[player] a recu un [buffer1]!"
givepokemon 0x4060 0x5 0x0 0x0 0x0 0x0
msgbox 0x87198DE MSG_FACE '"Vieil homme: Prends soin de [buffe..."
release
end

'---------------
#org 0x719897
msgbox 0x8719900 MSG_FACE '"Vieil homme: Tant pis pour toi!"
release
end

'---------------
#org 0x7198A2
msgbox 0x8719922 MSG_FACE '"Vieil homme: désolé, ton équipe es..."
release
end


'---------
' Strings
'---------
#org 0x7198AD
= Vieil homme: Tu veux un [buffer1]?

#org 0x7198CB
= [player] a recu un [buffer1]!

#org 0x7198DE
= Vieil homme: Prends soin de [buffer1]?

#org 0x719900
= Vieil homme: Tant pis pour toi!

#org 0x719922
= Vieil homme: désolé, ton équipe est pleine!
and for tiles scipts can you help us?
There's nothing wrong with it, really. It should work, but I can't be sure. I don't have XSE right now so I can't test it. :<
__________________
c
a
r
t
o
o
n

n
e
t
w
o
r
k

staff collab
april 2o15
  #4670    
Old August 29th, 2010 (02:43 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
the problem is that I sometimes become a "?" which is a non assigned pokemon. It's a pokemon you replace when you wanna add one of yours. and it seems that theyr hex number is between 0x1 and 0x181. In fact the last pokemon hex number is 0x19B for chimecho so they've a number but the only way I see to make those pokemons impossible to give by the script is to check 25 times the random number. Is it possible to make loops in scripting?
  #4671    
Old August 29th, 2010 (02:48 AM).
Zeffy's Avatar
Zeffy Zeffy is offline
the things i do for love ¯\_(ツ)_/¯
Moderator
BS
CS
 
Join Date: Apr 2009
Location: in the middle of Nowhere
Gender: Male
Posts: 5,459
Send a message via Skype™ to Zeffy
Quote originally posted by supersam2:
the problem is that I sometimes become a "?" which is a non assigned pokemon. It's a pokemon you replace when you wanna add one of yours. and it seems that theyr hex number is between 0x1 and 0x181. In fact the last pokemon hex number is 0x19B for chimecho so they've a number but the only way I see to make those pokemons impossible to give by the script is to check 25 times the random number. Is it possible to make loops in scripting?
You could check if it chooses the hex numbers on the "?" Pokemon and loop it by simply putting "goto @(put pointer here to where the comparing script is)".
__________________
c
a
r
t
o
o
n

n
e
t
w
o
r
k

staff collab
april 2o15
  #4672    
Old August 29th, 2010 (04:02 AM). Edited August 29th, 2010 by supersam2.
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
thank you , and for the level scripts? (tilescripts) How can we make them work?
  #4673    
Old August 29th, 2010 (08:08 AM).
Kevin's Avatar
Kevin Kevin is offline
kevin del rey
Silver Tier
 
Join Date: Jul 2010
Location: Virginia
Age: 16
Gender: Male
Posts: 2,688
Quote originally posted by supersam2:
thank you , and for the level scripts? (tilescripts) How can we make them work?
Level scripts? At the end you put a setvar 0x7000(or up) 0x1
Here's a tutorial on how to do it.
__________________
  #4674    
Old August 30th, 2010 (06:37 AM).
supersam2 supersam2 is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 33
sorry I didn't want level scripts I'm not good in english... I want to make scripts that activates when you walk on it to work. no one I made worked. A simple script with only a msg box don't work and I don't know how to make it work.
  #4675    
Old August 30th, 2010 (06:44 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
Working on KARL3DS
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 687
Quote originally posted by supersam2:
sorry I didn't want level scripts I'm not good in english... I want to make scripts that activates when you walk on it to work. no one I made worked. A simple script with only a msg box don't work and I don't know how to make it work.
Try calling a script from the tile like this:

#org 0xsomeoffset
goto 0xsomeotheroffset
end
__________________



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

Forum Jump


All times are UTC -8. The time now is 07:34 AM.