[Battle Scripting] Hawkings' script (includes damage calculation) [alpha]

Discussion in 'Server and Client Scripting' started by Hawkings, Mar 15, 2014.

  1. Hawkings

    Hawkings New Member

    Joined:
    Mar 15, 2014
    Messages:
    3
    Likes Received:
    1
    Hi everyone. I'm working on a script to assist the player providing quick access to information that would otherwise be tedious (but not impossible) to obtain. That information includes stats, possible abilities, types and type effectiveness against the pokemon, both for your pokemon and for the opponent one. It also predicts the damage your moves will inflict. Since this is only an alpha version, errors are expected to happen, and damage calculation will not work properly for moves that need further calculation, like hidden power or low kick. Also, it doesn't take into account items or enemy EVs, so if you are holding a life orb, you will deal more damage than expected, or if the opponent invested EVs in defense or special defense you will deal less damage than expected. Finally, the plugin shows texts in Spanish, but if anyone is interested in an English version, I can translate it (right now I'm assuming nobody will be interested in this script xD). EDIT: now it's translated :)

    For the script to work properly, you need to create a file in your Mods folder called pluginData.json and paste this inside: http://pastebin.com/yL2L8Y7P.

    You can find the script itself here: http://pastebin.com/Yxt6FvSB.

    Comments will be much appreciated!
     
    Last edited: Mar 18, 2014
  2. Silone

    Silone Kanade <3

    Joined:
    Jul 31, 2013
    Messages:
    265
    Likes Received:
    3
    PO Trainer Name:
    Silone
    Can you translate it for me?
     
  3. Hawkings

    Hawkings New Member

    Joined:
    Mar 15, 2014
    Messages:
    3
    Likes Received:
    1
    Sure, now the links in the original post are updated, download them again. Also some improvements have been done, like taking into account some items as life orb or choice band for the damage calculation. Hope you like it, I appreciate comments and suggestions :)
     
  4. Anup

    Anup The Lucky One

    Joined:
    May 25, 2014
    Messages:
    23
    Likes Received:
    0
    La.Landorus called Gengar back!
    La.Landorus sent out Arceus!
    Script Error line 2: ReferenceError: Can't find variable: Constants


    The foe's Tyranitar used Dark Pulse!
    Arceus lost 90 HP! (21% of its health)

    Start of turn 4
    Arceus used Swords Dance!
    Arceus's Attack sharply rose!
    Script Error line 296: ReferenceError: Can't find variable: statBoost

    La.Landorus: rip
    Script Error line 1: ReferenceError: Can't find variable: rip

    La.Landorus: hmm
    Script Error line 1: ReferenceError: Can't find variable: hmm

    La.Landorus: Sacred Sword
    Script Error line 1: SyntaxError: Parse error

    Please help me
    I don't how to use your script