• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] Level Battle Script

  • 41
    Posts
    9
    Years
    • Seen Jul 3, 2016
    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.
     
    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.
     
    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
     
    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.
     
    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.
     
    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
     
    Last edited:
    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:

    ...
    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...
     
    Try setting the flag after disappear.
     
    Back
    Top