The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Level Battle Script (https://www.pokecommunity.com/showthread.php?t=355050)

PokemonMasterAhmed September 2nd, 2015 7:57 PM

Level Battle Script
 
Hello there I need help on making a rival script like Gary in cerulean city. No giving items. I use Pksvui for this so I do not want here xse.
I made a script
#dyn 0X740000
#org @start
setvar 0x4334 0x2
playsound 0x131 0x0
applymovement 0x3 @Move
pauseevent 0x0
faceplayer
lockall
msgbox @string ' Hey Ahmed...
callstd MSG_NOCLOSE
trainerbattle 0X0 0X002 0X0 @beginning @ending
setflag 0x210
msgbox @Bye ' Bye Ahmed...
applymovement 0x3 @Move2
playsound 0x123 0x0
pauseevent 0x0
fadedefault
dissapear 0x3
releaseall
end

#org @Move
m walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down end

#org @string
= \c\h01\h07Hey Ahmed I was waiting for\n\c\h01\h07you to have a pokemon battle,\pare you ready, Lets go!

#org @ending
= \c\h01\h07That was a good battle,\n\c\h01\h07thank you I learned alot from\p\c\h01\h07it.\p\c\h01\h0FAhmed: I also learned alot!

#org @Bye
= \c\h01\h07Bye Ahmed!\p\c\h01\h0FAhmed: Bye Destiny!

#org @Move2
m walk_up walk_left walk_left walk_left walk_left walk_left walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_left walk_left walk_left walk_up end

What happens first is that the rival will not walk,after the text is done it says a random thing, it will not playsound.

Sayuri September 2nd, 2015 8:46 PM

Are you sure you applied the movement to the correct person event? That's most likely why it's not moving. I'm not sure about the sound not playing.
You spelled "disappear" incorrectly, so that may be leading to some issues. Other than that, I don't see much wrong with the script unless I overlooked something. Then again, I'm not the best at proofreading.

PokemonMasterAhmed September 2nd, 2015 11:08 PM

Quote:

Originally Posted by DogPolice (Post 8914593)
Are you sure you applied the movement to the correct person event? That's most likely why it's not moving. I'm not sure about the sound not playing.
You spelled "disappear" incorrectly, so that may be leading to some issues. Other than that, I don't see much wrong with the script unless I overlooked something. Then again, I'm not the best at proofreading.

Thanks anyway. But it did not work

C me September 3rd, 2015 2:01 AM

First of all don't use var 0x4334, it's unsafe.

Where's the text for @beginning? If it doesn't point anywhere it won't work.

PokemonMasterAhmed September 3rd, 2015 1:27 PM

Quote:

Originally Posted by C me (Post 8914722)
First of all don't use var 0x4334, it's unsafe.

Where's the text for @beginning? If it doesn't point anywhere it won't work.

Which var perhaps. Whats gonna solve playsound

PokemonMasterAhmed September 3rd, 2015 4:52 PM

Well only two more probs :( First the sound won't work and after the rival won't move away.

C me September 4th, 2015 12:54 AM

Quote:

Originally Posted by PokemonMasterAhmed (Post 8915383)
Well only two more probs :( First the sound won't work and after the rival won't move away.

Tbh, more people would be able to help you if you used XSE. I don't know if pauseevent does the same thing but you need the equivalent of waitmovement after the last movement.

For the sound try a pause (again I can't remeber the PKSV command) after the sound. I don't know if you have a waitfanfare or something.

PokemonMasterAhmed September 4th, 2015 4:01 PM

Quote:

Originally Posted by C me (Post 8915629)
Tbh, more people would be able to help you if you used XSE. I don't know if pauseevent does the same thing but you need the equivalent of waitmovement after the last movement.

For the sound try a pause (again I can't remeber the PKSV command) after the sound. I don't know if you have a waitfanfare or something.

Ok xse is allowed

PokemonMasterAhmed September 4th, 2015 4:24 PM

I fixed the music but my rival won't go away after the battle. Thanks, Xse helped with the music

C me September 5th, 2015 1:28 AM

Quote:

Originally Posted by PokemonMasterAhmed (Post 8916399)
I fixed the music but my rival won't go away after the battle. Thanks, Xse helped with the music

Set the person I.D number in AMap to 210 and he will stay hidden.

Mana September 5th, 2015 3:01 AM

The answer is actually very simple and nobody has said it yet :<.

To continue a script after a battle, you need to use:

trainerbattle 0x1 0x002 0x0 @Beginning @Ending @CONTINUE

So that section of your script should look like:

Quote:

...
msgbox @string ' Hey Ahmed...
callstd MSG_NOCLOSE
trainerbattle 0x1 0x002 0x0 @Beginning @Ending @CONTINUE
End

#org @CONTINUE
setflag 0x210
msgbox @Bye ' Bye Ahmed...
applymovement 0x3 @Move2
...etc...

PokemonMasterAhmed September 5th, 2015 5:09 PM

Quote:

Originally Posted by C me (Post 8916785)
Set the person I.D number in AMap to 210 and he will stay hidden.

Well I did that and the rival did not disappear

C me September 6th, 2015 12:39 AM

Quote:

Originally Posted by PokemonMasterAhmed (Post 8917597)
Well I did that and the rival did not disappear

Have you done Mana's changes too? I can't see why it won't work, show us a video or something.

PokemonMasterAhmed September 6th, 2015 2:00 AM

Quote:

Originally Posted by C me (Post 8917957)
Have you done Mana's changes too? I can't see why it won't work, show us a video or something.

Yes and I can't make a video, the rival will walk and if you go ahead shes in the area

C me September 6th, 2015 4:42 AM

Try setting the flag after disappear.

PokemonMasterAhmed September 6th, 2015 1:36 PM

Quote:

Originally Posted by C me (Post 8918089)
Try setting the flag after disappear.


It worked :)


All times are GMT -8. The time now is 2:30 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.