• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Script] Script is randomly giving me masterballs

  • 6
    Posts
    9
    Years
    • Seen Aug 13, 2021
    I'm trying to write a script for cubone to join my party after marowak has been defeated. The flag for her being defeated isnt set yet when ive tested so far, because the code seems to be acting REALLY weird.
    This is the line of code i have:
    Code:
    #dynamic 0x259D36
    
    #org @start
    lock
    fadeout 0x5
    faceplayer
    cry 0x68 0x0
    waitcry
    checkflag 0x2FF
    if 0x1 goto @marowakisdead
    msgbox @sadmarowak 0x1
    release
    fadein 0x1
    end
    
    #org @marowakisdead
    cry 0x69 0x0
    waitcry
    msgbox @marowakisdead1 0x1
    cry 0x69 0x0
    waitcry
    cry 0x68 0x0
    waitcry
    givepokemon 0x68 0x5 0x0 0x0 0x0 0x0
    fadescreen 0x1
    msgbox @marowakisdead2 0x1 '"Pl/h1Dase t/h17ke /h19/h2Bre /h24f..."
    hidesprite LASTTALKED
    fadescreen 0x0
    release
    fadein 0x1
    end
    
    #org @sadmarowak
    = This cubone sits in a puddle of\ntears..\lThe tears are flowing out\lof a large skull over his head.\lWhat happened...?
    
    #org @marowakisdead1
    = You hear the cry of a Marowak but\ncan't figure out where it came\lfrom.\pThe tears stop flowing from\nCubone's mask..\pCubone looks up at you..\p Is his mother here now?\pCubone hugs your leg and begins\ncrying again.
    
    #org @marowakisdead2
    = Pl/h1Dase t/h17ke /h19/h2Bre /h24f hh/h21m

    does anyone know why this is returning "player has received Master ball!" but it will also say "player has received ????????????" I'm totally stumped.
     
    I found that instead of using 0x0 or 0x1 in the msgbox line, use MSG_SIGN and it will work fine.
     
    Back
    Top