How to disable/enable seasons

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am
Location: Poland

How to disable/enable seasons

Post by coltain »

When winter comes tiles of grass become white etc...

How to disable or enable this???
Harley
Forum Regular
Posts: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Post by Harley »

Add thoose script-command to textcmd/

Code: Select all

use uo;

include "include/packets";

program textcmd_setseason( who, text )

  if(!text or text == "")
    SendSysMessage(who, "Useage: .setseason <season>");
    SendSysMessage(who, "<season>: spring | desolation | fall | winter | summer");
    return;
  endif
  
  var season := lower(text);
  case(season)
    "spring":     SetSeasonForAll(SEASON_SPRING); SendSysMessage(who, "Season spring set");
                  SetGlobalProperty("gseason", "SEASON_SPRING");
    "desolation": SetSeasonForAll( SEASON_DESOLATION ); SendSysMessage(who, "Season desolation set");
                  SetGlobalProperty("gseason", "SEASON_DESOLATION");
    "fall":       SetSeasonForAll( SEASON_FALL ); SendSysMessage(who, "Season fall set");
                  SetGlobalProperty("gseason", "SEASON_FALL");
    "winter":     SetSeasonForAll( SEASON_WINTER ); SendSysMessage(who, "Season winter set");
                  SetGlobalProperty("gseason", "SEASON_WINTER");
    "summer":     SetSeasonForAll( SEASON_SUMMER ); SendSysMessage(who, "Season summer set");
                  SetGlobalProperty("gseason", "SEASON_SUMMER");
  endcase
  
endprogram
With best regards!!!
Post Reply