Weather Battle Script

Discussion in 'Server and Client Scripting' started by kazzaluis, May 3, 2013.

  1. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    can you help me how to make a Command to change the weather at the begining of the battle ??

    i heard about function on battlesetup to change the weather

    can any help me ??
     
  2. Manectric-Rang

    Manectric-Rang Unown-Ç ftw

    Joined:
    Mar 21, 2012
    Messages:
    60
    Likes Received:
    0
    Try this, replacing REPLACETHIS with an integer between 1 and 4 (1 = hailstorm, 2 = rain, 3 = sandstorm, 4 = sun):

    Code (text):
    1. battleSetup : function(a, b, c) {
    2. sys.prepareWeather(c, REPLACETHIS)
    3. },
     
  3. kazzaluis

    kazzaluis Member

    Joined:
    Jun 15, 2012
    Messages:
    93
    Likes Received:
    0
    well how about this...

    if i put the battlesetup event in my script

    and make a command /weather rain

    battleSetup : function(a, b, c) {
    sys.prepareWeather(c, weathervar)
    },

    if command=="weather"{
    if commonData == Rain{weathervar=2)}
    if commonData == Hail{weathervar=1)}
    if commonData == sun{weathervar=4)}
    if commonData == sand{weathervar=3)}
    }

    and what's a and b means?

    is this will working ???
     
  4. Manectric-Rang

    Manectric-Rang Unown-Ç ftw

    Joined:
    Mar 21, 2012
    Messages:
    60
    Likes Received:
    0
    Check your PMs.