ZodiacDaGreat
Working on a Mobile System
- 429
- Posts
- 18
- Years
- South Pacific
- Seen Apr 26, 2017
Well? You already know ^^ Main/Major = Tileset1 and Secondary = Tileset2.
Hmmm... It still doesn't quite work...
I Open my rom, click on the "Patch" button, then I click on "Insert flag".
The patch is automatically set to 0xEB0...... Shortened
#Dynamic 0xEB0600
#org @start
lock
callasm 0xEB0501
givepokemon 4 5 0 0 0 0
msgbox @recieved 6
release
end
#org @recieved
= You receaved a pokèmon!\pPlease take good care of my\npokèmon
lol, you're not suppose to use #raw 0x1. Try something like this:
#org 0x800000
... 'commands
callasm 0xEB0501 '+1 because its a THUMB routine*
wildbattle/givepokemon/trainerbattle
... ' commands
end
Should work ;)
I tried this, but it does not seem to want to work as a level script (at least for me) but will work as a script event/signpost, but only for one battle, then turns itself off, until you activate the script manually again >_>. I do not know if it is just my script, or what, but I have spent a few hours, and have not found a solution (a good deal of the time was refreshing myself on scripting >_>, and learning level scripting).I just thought of a really great idea, you could use a level script which abuses the command random and making it in such a way you want and set the shiny flag by calling the flag routine.
You could always try it the following way. In a level script, instead of the callasm command, you could put this:Spoiler:I tried this, but it does not seem to want to work as a level script (at least for me) but will work as a script event/signpost, but only for one battle, then turns itself off, until you activate the script manually again >_>. I do not know if it is just my script, or what, but I have spent a few hours, and have not found a solution (a good deal of the time was refreshing myself on scripting >_>, and learning level scripting).
here is my script, so you can possibly see what I am doing wrong:
#org 0x8E3CF64
'-----------------------------------
random 0x1
compare LASTRESULT 0x0
if 0x1 jump 0x8EB0200 ' Equal To
end
#org 0x8EB0200
'-----------------------------------
callasm 0x8EB0501
nop0 ' #raw 0x0
setvar 0x4033 0x1
end
note: the setvar is only for the level script, to stop it from running again. yes i know it will only run once this way, but loops infinitely otherwise, freezing everything. i also tried a similar setup, but only to display a message, and the message worked, only once as expected, but this part never ran. using the exact same script, sans setvar, it works for the next battle initiated, so it does work normally. also, the random is just there so that when i get it running right, i can easily set the random to 0x80 (1/128 chance then) so everything is spiffy. i know the nop is not needed either, as i had it running before without it, but i just put it in in the hopes that it would fix the level script version somehow ><.
I do not know if your idea was a theory, or if I am just doing something nooby, but I am stuck XD. if there was a way to turn on the hack, and leave it on, instead of turning back off after battle, then that would be perfect, as long as it saved with it on, else it would turn it back off.
nope, same deal. works once if it is as a script tile, then turns itself off after a battle, and doesn't work as a level script.You could always try it the following way. In a level script, instead of the callasm command, you could put this:
And change the 0x1 to 0x0 if you don't want all Pokémon to be shiny anymore.
- FR/LG: writebytetooffset 0x1 0x2022000
- R/S/E: writebytetooffset 0x1 0x2042000
Indeed, since this shiny hack unlike the old one will reset itself to 0 after a battle unlike the old one.secondadvent said:i already said that i knew my random was not right, as i was going to set it right when i found out how to get the shiny thing to stay on as a level script. it is just there as a placeholder, and to allow me to see if it works in every battle. once it does, the random is being updated.
i got it to work as a level script now, but it still only works once per time in the room. the second battle and on leads to non-shiny pokemon, so that is what i need to solve now.
CallasmThis command, is used to call an ASM function that you have added to the rom. I'm not going to write an example, I'm going to use the example of the command used with Mastermind X's "Shiny Hack".
This is his hex script:
Quote:
With his exaplanation.0071b7a0h: 23 71 B7 71 08 00 B6 82 00 1E 00 00 00 25 38 01 ; #q·q..¶'.....%8.
0071b7b0h: 28 01 01 23 71 B7 71 08 02 FF FF FF FF FF FF FF ; (..#q·q..ÿÿÿÿÿÿÿ
Quote:
Now here's my version of his script in a Pokescript Language.[23] //asm call
[XXXXXXXX] //pointer to thumb-sub+1
[00] //filler
[B6] //define wild pokemon
[XXXX] //pokemon-id (INGAME)
[XX] //level
[XXXX] //held Item
[00]
[25] //special-event
[3801] //wild pokemon battle!
[28] //wait
[0101] //a second
[23] //asm call
[XXXXXXXX] //pointer to thumb-sub+1
[02] //end
Code:
with a bit more of an explanation.#org $start
callasm 0x71B771
#raw 0x00
wildbattle 0x82 0x1E 0x0
special 0x138
pause 0x101
callasm 0x71B771
end
He has called the ASM function twice. Once, to turn it on, and once to turn it off.
To turn it on, it needs that buffer following the command, and to turn it off, it isn't needed. I think he's explained everything else.