1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Guest, PO has ceased our separate tiering and adopted Smogon tiers for SM. More information and updates here.

    Dismiss Notice

[Battle Scripting] Nova's Battle Script

Discussion in 'Server and Client Scripting' started by Nightfall Alicorn, Sep 12, 2015.

  1. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    Nova's Battle Script
    ~ Introduction~
    Hey everyone. I've decided to post my new battle script. Tested. So far, no issues. Just like the Client version, report any bugs you see here on this thread and I try sort it ASAP.

    Also. I've recent had an idea about making my battle and client script communicate with each other by sharing the saved data between. In other words, I may able to get the client to show all your tier scores from this script at once. Even allow you to setup battle messages like the intro and last Pokémon standing message by command interface without needing to learn coding.

    ~ Features ~
    Powerful helper commands:
    • Record your tier records. Wins, loses, ties, battles and longest turn.
    [​IMG]
    • See you and your opponent's battle stats during the end of battle. You can use the command -stats to show the stats mid battle if you want but I wouldn't over use it.
    [​IMG]
    • Contains my -eval and -obj commands for scripters. You should only use them if battling your own alt and testing purposes. Note, only you will see the printed messages.

    ~ How to Install ~
    ~~~~ [Part 1/3] ~~~~

    [​IMG]
    1. Click on Plugins on the menu bar.
    2. Click Plugin Manager in the drop-down menu.
    3. Tick the Script Window check-box.
    4. Click OK.
    5. Click on Plugins again on menu bar.
    6. Click Script Window in the drop-down menu.
    ~~~~ [Part 2/3] ~~~~

    [​IMG]
    1. Click the Download link below this thread.
    2. Copy all the text in the page.
    3. Paste the code inside the Script Window's Battle scripts tab.
    4. Un-tick Safe Scripts. (The script does not contain anything bad. It's just needed for saving and loading settings next time you log on.)
    5. Tick Show Warnings.
    6. Click OK.
    ~~~~ [Part 3/3] ~~~~

    Find a battle.
    • If your script isn't working. Check out the Troubleshooting section below.
    • If your updating you current script. Be sure to delete everything in the Script Window first before copying the new one.

    ~ Links: ~
    Update Logs will note and track script changes. If you want, you can download an old version of the script there.

    ~ Idea List ~
    Here's the list of ideas I've got that I will try to implement in the future. Also I'll list the ideas that I've scrapped or won't do for reasons.

    Current ideas to add:
    • [None.]

    ~ Troubleshooting ~
    Script won't load. / Commands won't work.
    There are many reasons for this but these are the most common.
    • Make sure you had copied all the code from the download link into the Script Window and had clicked OK.
    • Try closing the client and re-log on. If you had multiple server tabs open before, it usually causes issues updating the script.
    Getting script errors.
    This can happen from time to time, specially with some script updates that change the saved data file. Usually just reopening the Script Window and clicking OK solves this. If you've already tried this. You can report a bug here but don't forget to specify what command isn't working.

    ~ Bug Report Guidelines ~
    Before you report any bugs here. Please make sure you're running the latest version of the script.

    If you are on the latest version and the issue still occurring. Copy and paste the error message, if given one, and give instructions how to reproduce it.
     
  2. Zoroark

    Zoroark Aka Flare Forum Moderator Server Moderator Forum Moderator Server Moderator

    Joined:
    Jan 29, 2013
    Messages:
    873
    Likes Received:
    1,161
    PO Trainer Name:
    SkyPhoenix / Zoroark
    Adding a Damage calculator that calcs stuff during battle would be really helpful.
     
    Sam Holmes and Nightfall Alicorn like this.
  3. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    I know Nicehat made one here. But I don't wanna go taking someone else's hard work. I think there might be one on the next version of PO but I might be wrong. To be honest, I think that be hardest thing for me to do. But it's always on my suggestions list. Thanks mate.
     
    Sam Holmes and Zoroark like this.
  4. Zoroark

    Zoroark Aka Flare Forum Moderator Server Moderator Forum Moderator Server Moderator

    Joined:
    Jan 29, 2013
    Messages:
    873
    Likes Received:
    1,161
    PO Trainer Name:
    SkyPhoenix / Zoroark
    You don't have to replicate it. Just find a way of creating the same thing and improving it using your creativity. You can even go further than Nicehat in that part.
     
  5. Pumone

    Pumone Member

    Joined:
    Aug 30, 2015
    Messages:
    61
    Likes Received:
    13
    I can't find a way to battle against a bot in my own server. Can you gently explain how to do it? Thank you.
     
  6. Nightfall Alicorn

    Nightfall Alicorn Left Pokémon Online, most likely not coming back.

    Joined:
    Oct 15, 2013
    Messages:
    491
    Likes Received:
    171
    PO Trainer Name:
    Nightmare Moon
    It's not currently possible to run a AI by server. However you can run battle script by opening another client window. Maribel Hearn has been experimenting with battle script AI recently, however it's intelligence may not be best yet. He maybe able to help you.
     
    Pumone likes this.