• 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!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Scripting Question] Help with function code

  • 158
    Posts
    6
    Years
    I have this code for a move called Cyanide Spit. Aparently, the move is like Smack Down but instead of allowing the use of Ground-type moves on fliers, it allows the use of Poison-type moves on Steel-types.

    Here's the WIP code:
    Spoiler:


    Any help please?
     
    What exactly do you need help with. Just look at how Smack Down works. Use Ctrl+Shift+F and look for Smack Down.
     
    What exactly do you need help with. Just look at how Smack Down works. Use Ctrl+Shift+F and look for Smack Down.

    Well, I keep getting Synax everytime and I need to know how on Earth I am supposed to make this code correct. I also don't want it to hit airborne Pokemon like Smack Down does.
     
    I have this code for a move called Cyanide Spit. Aparently, the move is like Smack Down but instead of allowing the use of Ground-type moves on fliers, it allows the use of Poison-type moves on Steel-types.

    Here's the WIP code:
    Spoiler:


    Any help please?

    Hi,

    I've noticed you made a few coding-related posts recently, and would like you advise you to use the
    Code:
     tags. That makes it much easier to read, as it will be properly indented.
     
    Hey there,
    Implementing this move shouldn't be that hard.
    Let me help you. :)
    First of all I guess you have something like this in your moves PBS file:
    Spoiler:

    For you the "ZZZ" Should be a number, note it because we are going to need it.

    Put this in PBEffects below "# These effects apply to a battler" (Look for the highest number then put this right below it):
    Spoiler:

    Put this in PokeBattle_Battlers below "@effects[PBEffects::Yawn] = 0":
    Spoiler:
    Put this in PokeBattle_MoveEffects and Replace "ZZZ" with the number you noted:
    Spoiler:
    Now in PokeBattle_Move find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it:
    Spoiler:

    in PokeBattle_ZMove(only if you have Zmoves in your game) do basically the same(find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it):
    Spoiler:
    Now a little extra, if you want Pokemon hit by this move to also be susceptible to poisoning you may want to add these:
    Spoiler:

    Here you go!
    If you find any mistakes feel free to contact me. I didn't try out if the move works as intended so it could have some errors in its code.
    Have a nice day .:)
     
    Last edited:
    Hey there,
    Implementing this move shouldn't be that hard.
    Let me help you. :)
    First of all I guess you have something like this in your moves PBS file:
    Spoiler:

    For you the "ZZZ" Should be a number, note it because we are going to need it.

    Put this in PBEffects below "# These effects apply to a battler" (Look for the highest number then put this right below it):
    Spoiler:

    Put this in PokeBattle_Battlers below "@effects[PBEffects::Yawn] = 0":
    Spoiler:
    Put this in PokeBattle_MoveEffects and Replace "ZZZ" with the number you noted:
    Spoiler:
    Now in PokeBattle_Move find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it:
    Spoiler:

    in PokeBattle_ZMove(only if you have Zmoves in your game) do basically the same(find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it):
    Spoiler:
    Now a little extra, if you want Pokemon hit by this move to also be susceptible to poisoning you may want to add these:
    Spoiler:

    Here you go!
    If you find any mistakes feel free to contact me. I didn't try out if the move works as intended so it could have some errors in its code.
    Have a nice day .:)

    Okay!
     
    Hey there,
    Implementing this move shouldn't be that hard.
    Let me help you. :)
    First of all I guess you have something like this in your moves PBS file:
    Spoiler:

    For you the "ZZZ" Should be a number, note it because we are going to need it.

    Put this in PBEffects below "# These effects apply to a battler" (Look for the highest number then put this right below it):
    Spoiler:

    Put this in PokeBattle_Battlers below "@effects[PBEffects::Yawn] = 0":
    Spoiler:
    Put this in PokeBattle_MoveEffects and Replace "ZZZ" with the number you noted:
    Spoiler:
    Now in PokeBattle_Move find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it:
    Spoiler:

    in PokeBattle_ZMove(only if you have Zmoves in your game) do basically the same(find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it):
    Spoiler:
    Now a little extra, if you want Pokemon hit by this move to also be susceptible to poisoning you may want to add these:
    Spoiler:

    Here you go!
    If you find any mistakes feel free to contact me. I didn't try out if the move works as intended so it could have some errors in its code.
    Have a nice day .:)

    Oh! And Cyanide Spit is a Dark-type move. I forgot to tell you that! ^^,
     
    Hey there,
    Implementing this move shouldn't be that hard.
    Let me help you. :)
    First of all I guess you have something like this in your moves PBS file:
    Spoiler:

    For you the "ZZZ" Should be a number, note it because we are going to need it.

    Put this in PBEffects below "# These effects apply to a battler" (Look for the highest number then put this right below it):
    Spoiler:

    Put this in PokeBattle_Battlers below "@effects[PBEffects::Yawn] = 0":
    Spoiler:
    Put this in PokeBattle_MoveEffects and Replace "ZZZ" with the number you noted:
    Spoiler:
    Now in PokeBattle_Move find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it:
    Spoiler:

    in PokeBattle_ZMove(only if you have Zmoves in your game) do basically the same(find "if opponent.effects[PBEffects::MiracleEye]" and place this right above it):
    Spoiler:
    Now a little extra, if you want Pokemon hit by this move to also be susceptible to poisoning you may want to add these:
    Spoiler:

    Here you go!
    If you find any mistakes feel free to contact me. I didn't try out if the move works as intended so it could have some errors in its code.
    Have a nice day .:)

    I got Syntax. There is an error.
     
    Hey again,
    Can you send me the error message?

    EDIT: Ok, it was my bad. I located the mistake in the PokeBattle_Move part, in this line:
    Spoiler:

    Additionally I went over the script again and noticed that these parts in the PokeBattle_BattlerEffects were also wrong:
    Spoiler:

    Sorry for my inconvenience and I hope it works now.
    Also edited my original. :)
     
    Last edited:
    Back
    Top