• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist 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.

[Other✓] Script Problems!

GUMI 02

Canada Goose
  • 3,183
    Posts
    11
    Years
    Hi, i have a few scripting problems!

    Give Pokemon Script
    Spoiler:

    Wild Pokemon Script
    Spoiler:

    I'm Using this tutorial: https://www.pokecommunity.com/showthread.php?t=164276

    Here is the results of the scripts



    Problems:
    - Wrong pokemon
    - wrong level's
    - not facing player

    Can someone help?
     
    Last edited:
    Hi, i have a few scripting problems!

    Give Pokemon Script
    Code:
    #dynamic 0x71A544
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    msgbox @1 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @take
    msgbox @2 0x6
    release
    end
    
    #org @take
    givepokemon 0x6 0x50 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @4 0x5
    compare LASTRESULT 0x1
    if 0x1 call @name
    msgbox @5 0x6
    release
    end
    
    #org @name
    call 0x1A74EB
    return
    
    #org @done
    msgbox @6 0x6
    release
    end
    
    #org @1
    = Hi, Can you take this Charizard\noff my hands?
    
    #org @2
    = Oh, That's okay!\nI'm sure someone else will want\lit!
    
    #org @3
    = [black_fr]You received a Charizard!
    
    #org @4
    = [black_fr]Would you like to give\na\nnickname to Charizard?
    
    #org @5
    = Take good care of my Charizard!
    
    #org @6
    = How is my Charizard feeling?

    Wild Pokemon Script
    Code:
    #dynamic 0x71A7C8
    
    #org @start
    lock
    faceplayer
    msgbox @1 0x6
    cry 0x6 0x0
    wildbattle 0x144 0x1E 0x8B
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x800F
    setflag 0x201
    release
    end
    
    #org @1
    = Articuno: Cuuuuuno!


    Here is the results of the scripts

    Problems:
    - Wrong pokemon
    - wrong level's
    - not facing player

    Can someone help?

    The reason when you talk to the old man, and he does not face you 'cause you don't have the faceplayer effect, so you should add a faceplayer effect:

    Code:
    #dynamic 0x71A544
    
    #org @start
    [B]lock
    faceplayer[/B]
    checkflag 0x828
    if 0x1 goto @done
    msgbox @1 0x5
    compare LASTRESULT 0x1
    if 0x1 goto @take
    msgbox @2 0x6
    release
    end
    
    #org @take
    givepokemon 0x6 0x50 0x0 0x0 0x0 0x0
    fanfare 0x13E
    msgbox @3 0x4
    waitfanfare
    closeonkeypress
    setflag 0x828
    msgbox @4 0x5
    compare LASTRESULT 0x1
    if 0x1 call @name
    msgbox @5 0x6
    release
    end
    
    #org @name
    call 0x1A74EB
    return
    
    #org @done
    msgbox @6 0x6
    release
    end
    
    #org @1
    = Hi, Can you take this Charizard\noff my hands?
    
    #org @2
    = Oh, That's okay!\nI'm sure someone else will want\lit!
    
    #org @3
    = [black_fr]You received a Charizard!
    
    #org @4
    = [black_fr]Would you like to give\na\nnickname to Charizard?
    
    #org @5
    = Take good care of my Charizard!
    
    #org @6
    = How is my Charizard feeling?

    The corrections is in Bold.
    I don't know why the Charizard became lvl. 80...

    But I know why the wildbattle script is wrong...
    You didn't convert it to hex.
    Articuno's number is 144 change it to hex and:

    90
    so that should be:
    wildbattle 0x90 ... ... ...
     
    the reason that the old man is not facing you is probably because he doesn't have a sprite for looking to the right/left
    The reason why the pokemon and levels are wrong is because you have to use their hex id
    Use this to convert: https://www.binaryhexconverter.com/hex-to-decimal-converter
    For example, I wanna give someone a level 20 Pikachu
    Pikachu's ID is 2, so I put 25 in the decimal box and I get 19
    Do the same with the number 20 and I get 14
    so in the pokemon id slot i put 0x19 and in the level slot i put 0x14
    Now, if you dont wanna convert to hex everytime you can just use their decimal number, as long as you dont put "0x" before the number
    So instead of 0x19 I put 25
    Just like that
    Hope I helped :)
     
    There is so much here! so i put it in a spoiler!
    Spoiler:

    Thanks i'll let you know how it goes! i'm not at home right now! #mobile
     
    Last edited:
    Back
    Top