Arkadaşlar ben serverda yağmur kar yağmasını istiyorum!,sphere.ini de böle yaptım:

// Disable weather effects? <<~>>Sanırım bura yanlış yer?¿
NoWeather=0
Yağış scp de bu ama bir hata var sanırım çünkü .timesetup yazdığımda pencere çıkıyor ama tıklayıp yazı yazamıyorsun!:

[DEFNAME settings]
speed 1 // Time speed (1 - 60), 1 = real time 2=2x, 3=3x e.t.c. (60 = 1 game hr every RL minute)
use_britannian_calendar 1 // set to 1 to use "official" calendar (2 moon cycles) set to 0 runs 1 moon for all planes.
leap 1 // set to 1 to allow leap year calculations in calendar
tempaffect 1 // set to 1 for extreme temperatures to affect your players
fri13th 0 // set to 1 to reverse a players luck on any fri 13th
winterseason 2 // 3 = winter (snow), but I think gfx look a bit naff at the merging on grass/roads e.t.c.., so I use 2 which is fall
halloween 1 // dead world on Oct 31st, set to 0 to de-activate
whitexmas 1 // make Dec 25th Winter season (snow), set to 0 to de-activate. makes no diff if def.winterseason = 3)
easter 0 // set to 1 to activate, at present it only records a message to the server log, until it's tested for accuracy.
fire_ice 1 // set to 1 makes fire dungeon extremely hot & Ice dungeon extremely cold 0 disables.
storm_system 1 // sfx for rain/snow, darker lighting and rain puddles/snow piles left behind,if rain, chance of lightning strike
lightning_strike 10 // Chance (1 in x) that a player outside during a thunderstorm will be struck by lighting

//MONTH SETTINGS: month,days,name,temp variance
//To add more months follow defname pattern & alter months_per_year defname
//for temp variance temp: temp @noon = ((((<p.y>/200)*1.8)+32)+temp variance) (script reduces temp in accordance with time from/to noon.)
month_1 31 January 12.0
month_2 28 February 15.0
month_3 31 March 20.0
month_4 30 April 20.0
month_5 31 May 25.0
month_6 30 June 33.0
month_7 31 July 35.0
month_8 31 August 35.0
month_9 30 September 30.0
month_10 31 October 20.0
month_11 30 November 15.0
month_12 31 December 12.0

//leap year setting
leap_2 29 February 15.0

//DAYS PER WEEK
day_1 Sunday
day_2 Monday
day_3 Tuesday
day_4 Wednesday
day_5 Thursday
day_6 Friday
day_7 Saturday

//TIME KEEPER SETTINGS
mins_per_hour 60
hours_per_day 24
days_per_week 7
months_per_year 12

light_full_moon 17
light_dungeon 25

weather_summer 20
weather_spring 30
weather_fall 40
weather_winter 50

//Lunar section
lunar_phase_1 "new moon"
lunar_phase_2 "waxing crescent"
lunar_phase_3 "first quarter"
lunar_phase_4 "waxing gibbous"
lunar_phase_5 "full moon"
lunar_phase_6 "waning gibbous"
lunar_phase_7 "third quarter"
lunar_phase_8 "waning crescent"


[REGIONTYPE r_allregions]
on=@Enter
src.timerf 1, f_environ_calc

[PLEVEL 1]
time
date

[PLEVEL 6]
timesetup

[FUNCTION timesetup]
dialog d_time_setup

[DIALOG d_time_setup]
100,100
page 0
resizepic 0 0 2620 370 560
checkertrans 5 5 360 550
dtext 120 7 90 World Calendar Setup
gumppic 300 7 5608
dtext 10 30 90 Hours 24hr clock (0=midnight)
gumppic 10 60 2501
dtextentrylimited 15 60 20 20 90 0 2
dtext 10 90 90 Mins
gumppic 10 120 2501
dtextentrylimited 15 120 20 20 90 1 2
dtext 10 150 90 Date 1 to 31 (depending on month, will self correct)
gumppic 10 180 2501
dtextentrylimited 15 180 20 20 90 2 2
dtext 10 210 90 Day 1 to <ddef.days_per_week> (1=<def.day_1> e.t.c..)
gumppic 10 240 2501
dtextentrylimited 15 240 20 20 90 3 2
dtext 10 270 90 Month 1 to <ddef.months_per_year>
gumppic 10 300 2501
dtextentrylimited 15 300 20 20 90 4 2
dtext 10 330 90 Year (max 4 digits)
gumppic 10 360 2501
dtextentrylimited 15 360 60 20 90 5 4
dtext 10 390 90 Starting Lunar Phase 1 to 8
dtext 10 420 90 1=new, 2=wax cres, 3=1st quart, 4=wax gibb
dtext 10 450 90 5=full, 6=wan gibb, 7=3rd quart, 8=wan cres
gumppic 10 480 2501
dtextentrylimited 15 480 20 20 90 6 4
button 120 520 4005 4006 1 0 1
dtext 155 520 90 Confirm

[DIALOG d_time_setup BUTTON]
ON=1
if (<isempty <argtxt[0]>>)
sysmessage You did not enter Hours
dialog d_time_setup
return 1
elif (<eval <argtxt[0]>> > 23)
sysmessage Hours must be between 0 and 23, midnight = 0
dialog d_time_setup
return 1
else
var0.hours=<argtxt[0]>
endif

if (<isempty <argtxt[1]>>)
sysmessage You did not enter Minutes
dialog d_time_setup
return 1
elif (<eval <argtxt[1]>> > 59)
sysmessage Minutes must be between 0 and 59
dialog d_time_setup
return 1
else
var0.mins=<argtxt[1]>
endif

if (<isempty <argtxt[2]>>)
sysmessage You did not enter Date
dialog d_time_setup
return 1
elif (<eval <argtxt[2]>> < 1)
sysmessage The date must be greater than 0
dialog d_time_setup
return 1
else
var0.date=<argtxt[2]>
endif

if (<isempty <argtxt[3]>>)
sysmessage You did not enter Day
dialog d_time_setup
return 1
elif (<eval <argtxt[3]>> > <def.days_per_weeK>) || (<eval <argtxt[3]>> < 1)
sysmessage Day must be between 1 and <ddef.days_per_weeK>, 1 = <strarg <def.day_1>>
dialog d_time_setup
return 1
else
var0.day=<argtxt[3]>
endif

if (<isempty <argtxt[4]>>)
sysmessage You did not enter Month
dialog d_time_setup
return 1
elif (<eval <argtxt[4]>> > <def.months_per_year>) || (<eval <argtxt[4]>> < 1)
sysmessage Month must be between 1 and <ddef.months_per_year>
dialog d_time_setup
return 1
else
var0.month=<argtxt[4]>
endif

if (<isempty <argtxt[5]>>)
sysmessage You did not enter Year
dialog d_time_setup
return 1
else
var0.year=<argtxt[5]>
endif

if <def.use_britannian_calendar>
if (<isempty <argtxt[6]>>)
sysmessage You did not enter Lunar Phase
dialog d_time_setup
return 1
elif (<eval <argtxt[6]>> > 8)
sysmessage Lunar Phase must be between 1 and 8
dialog d_time_setup
return 1
else
var0.phase=<argtxt[6]>
var0.phase2=<argtxt[6]>
endif
else
if (<isempty <argtxt[6]>>)
sysmessage You did not enter Lunar Phase
dialog d_time_setup
return 1
elif (<eval <argtxt[6]>> > 8)
sysmessage Lunar Phase must be between 1 and 8
dialog d_time_setup
return 1
else
var0.phase=<argtxt[6]>
endif
endif
sysmessage Time/Calendar set

[FUNCTION f_time_keeper]
var0.mins +=<ddef.speed>
var0.lunar +=<ddef.speed> // Trammel
if <def.use_britannian_calendar>
var0.lunar2 +=<ddef.speed> // Felucca
if (<eval <var0.lunar>> >= <eval ((<ddef.hours_per_day>*<ddef.mins_per_hour>*28)/16)>)
var0.phase +=1
var0.lunar =1
endif
if (<eval <var0.lunar2>> >= <eval ((<ddef.hours_per_day>*<ddef.mins_per_hour>*28)/24)>)
var0.phase2 +=1
var0.lunar2 =1
endif
else
if (<eval <var0.lunar>> >= 5310)
var0.phase +=1
var0.lunar =1
endif
endif


if (<eval <var0.mins>> == <ddef.mins_per_hour>)
var0.hours += 1
var0.mins = 0
elif (<eval <var0.mins>> > <ddef.mins_per_hour>)
var0.hours += 1
var0.mins = <eval <var0.mins>-60>
endif

if (<eval <var0.phase>> > 8)
var0.phase=1
endif
if <def.use_britannian_calendar>
if (<eval <var0.phase2>> > 8)
var0.phase2=1
endif
endif

if (<eval <var0.mins>>== 0) || (<eval <var0.mins>>== 20) || (<eval <var0.mins>>== 40)
serv.allclients f_environ_calc
else
return 0
endif

if (<eval <var0.hours>>==<ddef.hours_per_day>)
var0.day += 1
var0.date += 1
var0.hours = 0
serv.newitem i_seasonal
new.p 10,10
endif

if <def.fri13th>
if (<isonline>)
if (<eval <var0.date>> == 13) && (<eval <var0.day>> == 6)
if (<isplayer>) && !(<isgm>)
if (<eval <src.luck>> > 0) && !(<src.tag0.fri13th>)
src.sysmessage Uh Oh! It's Friday the 13th!
src.luck = - <eval <src.luck>>
src.tag0.fri13th = 1
endif
endif
else
if (<isplayer>)
if (<eval <src.luck>> < 0) && (<src.tag0.fri13th>)
src.luck -= <eval <src.luck>*2>
src.tag0.fri13th=
endif
endif
endif
endif
endif

if (<eval <var0.day>> > <ddef.days_per_week>)
var0.day = 1
endif

//Easter tracker
if <def.easter>
if (<eval <var0.month>> >2) && (<eval <var0.date>> >21) || (<eval <var0.month>>==4)
if (<eval <var0.phase>> >= 5) && (<eval <var0.phase>> < 7)
if (<eval <var0.day>> == 1)
serv.log It should be easter
endif
endif
endif
endif

if (<eval <var0.date>> > <eval <strarg <def.month_<eval <var0.month>>>>>)
if (<def.leap>)
if (<eval <var0.month>> != 2)
var0.date = 1
var0.month += 1
else
if (<eval <fval <var0.year> /4> *4>==<eval <var0.year>>)
if (<eval <var0.date>> > <eval <strarg <def.leap_<eval <var0.month>>>>>)
var0.date = 1
var0.month += 1
endif
elif (<eval <var0.date>> > <eval <strarg <def.month_<eval <var0.month>>>>>)
var0.date = 1
var0.month += 1
endif
endif
else
var0.date = 1
var0.month += 1
endif
endif

if (<eval <var0.month>> > <ddef.months_per_year>)
var0.year += 1
var0.month = 1
endif

[ITEMDEF i_seasonal]
ID=i_gravestone
Name=seasonal marker
TYPE=t_script

ON=@Create
attr=attr_invis
timerf 8, f_season_control
timerf 12, remove

[FUNCTION f_season_control]
if (<eval <var0.month>> < <eval (<ddef.months_per_year>/4)>) || (<eval <var0.month>>==<eval (<ddef.months_per_year>/4)>) && (<eval <var0.date>> < 21)
region.season = <def.winterseason>
elif (<eval <var0.month>> < <eval (<ddef.months_per_year>/2)>) || (<eval <var0.month>>==<eval (<ddef.months_per_year>/4)>) && (<eval <var0.date>> < 21)
region.season = 0 //spring
elif (<eval <var0.month>> < <eval ((<ddef.months_per_year>/4)*3)>) || (<eval <var0.month>>==<eval ((<ddef.months_per_year>/4)*3)>) && (<eval <var0.date>> < 21)
region.season = 1 //summer
elif (<eval <var0.month>> < <eval (<ddef.months_per_year>-1)>) || (<eval <var0.month>>==<def.months_per_year>) && (<eval <var0.date>> < 21)
region.season = 2 //autumn
else
region.season = <def.winterseason>
endif
if <def.halloween>
if (<eval <var0.month>> == 10) && (<eval <var0.date>> == 31)
region.season = 4
endif
endif
if <def.whitexmas>
if (<eval <var0.month>> == 12) && (<eval <var0.date>> == 25)
region.season = 3
endif
endif

[FUNCTION date]
if (<p.m> < 2)
if (<p.x> < 325)
call f_dl_minus 12
elif (<p.x> < 975)
call f_dl_minus 9
elif (<p.x> < 1725)
call f_dl_minus 6
elif (<p.x> < 2300)
call f_dl_minus 3
elif (<p.x> < 3100)
call cal_today
elif (<p.x> < 3575)
call f_dl_plus 20
elif (<p.x> < 4225)
call f_dl_plus 17
elif (<p.x> < 4875)
call f_dl_plus 14
elif (<p.x> < 5100)
call f_dl_plus 11
elif (<p.x> > 5100) && (<p.y> < 2300)
if !(strcmp("<strarg <region.name>>","Shame")) || !(strcmp("<region.name>","The Heartwood")) || !(strcmp("<region.name>","Blighted Grove")) || !(strcmp("<region.name>","Sanctuary"))
call f_dl_minus 9
elif !(strcmp("<strarg <region.name>>","Despise")) || !(strcmp("<strarg <region.name>>","Destard")) || !(strcmp("<region.name>","Painted Caves"))
call f_dl_minus 6
elif !(strcmp("<strarg <region.name>>","Wrong"))
call f_dl_minus 3
elif !(strcmp("<strarg <region.name>>","Covetous")) || !(strcmp("<strarg <region.name>>","Fire")) || !(strcmp("<strarg <region.name>>","Ice")) || !(strcmp("<region.name>","Green Acres")) || !(strcmp("<region.name>","Green Acres 2")) || !(strcmp("<region.name>","Green Acres 3")) || !(strcmp("<region.name>","Palace of Paroxysmus"))
call cal_today
elif !(strcmp("<strarg <region.name>>","Deceit")) || !(strcmp("<region.name>","Prizm of Light"))
call f_dl_plus 17
elif !(strcmp("<strarg <region.name>>","Hythloth"))
call f_dl_plus 14
endif
elif (<p.x> > 5100) && (<p.y> > 2300)
call cal_today
endif
elif (<p.m>==2)
call f_dl_minus 12
elif (<p.m>==3)
call f_dl_plus 20
elif (<p.m>==4)
call f_dl_plus 11
endif
src.sysmessage It is <def.day_<dlocal.day>> <dlocal.date><local.suffix> of <strarg <streat <def.month_<dlocal.month>>>> of the year <dlocal.year>

[FUNCTION f_dl_minus]
if (<eval <var0.hours>> < <args>)
local.day = <eval <var0.day>-1>
call adj_cal_bckwd <dlocal.day>
else
call cal_today
endif

[FUNCTION f_dl_plus]
if (<eval <var0.hours>> > <args>)
local.day = <eval <var0.day>+1>
call adj_cal_fwd <dlocal.day>
else
call cal_today
endif

[function suffix]
if (<dlocal.date> == 1) || (<dlocal.date> == 21)|| (<dlocal.date> == 31)
local.suffix=st
elif (<dlocal.date> == 2) || (<dlocal.date> == 22)
local.suffix=nd
elif (<dlocal.date> == 3) || (<dlocal.date> == 23)
local.suffix=rd
else
local.suffix=th
endif
return <local.suffix>

[function adj_cal_bckwd]
if (<dlocal.day> < 1)
local.day=1
endif
local.date = <eval <var0.date>-1>
if (<dlocal.date> < 1)
local.month = <eval <var0.month>-1>
if (<def.leap>)
if (<dlocal.month> == 2)
<QVAL (<eval <fval <var0.year> /4> *4>==<eval <var0.year>>)? local.date = <eval <strarg <def.leap_<dlocal.month>>>>:local.date = <eval <strarg <def.month_<dlocal.month>>>>>
else
<QVAL (<dlocal.month> < 1)? local.date = <eval <strarg <def.month_<eval <def.months_per_year>>>>>:local.date = <eval <strarg <def.month_<dlocal.month>>>>>
endif
else
local.date = <eval <strarg <def.month_<dlocal.month>>>>
endif
else
local.month = <eval <var0.month>>
endif
if (<dlocal.month> < 1)
local.month = <ddef.months_per_year>
local.year = <eval <var0.year>-1>
else
local.year = <eval <var0.year>>
endif
call suffix <dlocal.date>
return <local.date>
return <local.day>
return <local.month>
return <local.suffix>
return <local.year>

[FUNCTION cal_today]
local.day = <eval <var0.day>>
local.date = <eval <var0.date>>
local.month = <eval <var0.month>>
local.year = <eval <var0.year>>
call suffix <dlocal.date>
return <local.date>
return <local.day>
return <local.month>
return <local.suffix>
return <local.year>

[FUNCTION adj_cal_fwd]
if (<dlocal.day> > 7)
local.day=1
endif
local.date = <eval <var0.date>+1>
local.month = <eval <var0.month>>
if (<def.leap>)
if (<dlocal.month> == 2)
if (<eval <fval <var0.year> /4> *4>==<eval <var0.year>>)
if (<dlocal.date> > <eval <strarg <def.leap_<dlocal.month>>>>)
local.date = 1
local.month += 1
endif
elif (<dlocal.date> > <eval <strarg <def.month_<dlocal.month>>>>)
local.date = 1
local.month += 1
endif
else
if (<dlocal.date> > <eval <strarg <def.month_<dlocal.month>>>>)
local.date = 1
local.month += 1
endif
endif
else
if (<dlocal.date> > <eval <strarg <def.month_<dlocal.month>>>>)
local.date = 1
local.month += 1
endif
endif

if (<dlocal.month> > <ddef.months_per_year>)
local.month = 1
local.year = <eval <var0.year>+1>
else
local.year = <eval <var0.year>>
endif
call suffix <dlocal.date>
return <local.date>
return <local.day>
return <local.month>
return <local.suffix>
return <local.year>

[FUNCTION time]
call f_pos_chk <p>
if !(<var0.mins>)
if (<dlocal.hours> == 0)
sysmessage "It is midnight."
elif (<dlocal.hours>== 12)
sysmessage "It is noon."
elif (<dlocal.hours> < 12)
sysmessage "It is <dlocal.hours> o'clock in the morning."
elif (<dlocal.hours> < 18)
sysmessage "It is <eval (<dlocal.hours>-12)> o'clock in the afternoon."
else
sysmessage "It is <eval (<dlocal.hours>-12)> o'clock at night."
endif
else
if (<dlocal.hours> == 0)
sysmessage "It is <QVAL (<eval <var0.mins>> < 31)? <eval <var0.mins>>:<eval 60-<var0.mins>>> minutes <QVAL (<eval <var0.mins>> < 31)? past midnight.:before 1 o'clock in the morning.>"
elif (<dlocal.hours> == 12)
sysmessage "It is <QVAL (<eval <var0.mins>> < 31)? <eval <var0.mins>>:<eval 60-<var0.mins>>> minutes <QVAL (<eval <var0.mins>> < 31)? past noon.:before <eval (<dlocal.hours>-11)> o'clock in the afternoon.>"
elif (<dlocal.hours> < 12)
sysmessage "It is <QVAL (<eval <var0.mins>> < 31)? <eval <var0.mins>>:<eval 60-<var0.mins>>> minutes <QVAL (<eval <var0.mins>> < 31)? past <dlocal.hours>:before <eval (<dlocal.hours>+1)>> in the morning."
elif (<dlocal.hours> < 18)
sysmessage "It is <QVAL (<eval <var0.mins>> < 31)? <eval <var0.mins>>:<eval 60-<var0.mins>>> minutes <QVAL (<eval <var0.mins>> < 31)? past <eval (<dlocal.hours>-12)>:before <eval (<dlocal.hours>-11)>> o'clock in the afternoon."
else
sysmessage "It is <QVAL (<eval <var0.mins>> < 31)? <eval <var0.mins>>:<eval 60-<var0.mins>>> minutes <QVAL (<eval <var0.mins>> < 31)? past <eval (<dlocal.hours>-12)>:before <eval (<dlocal.hours>-11)>> o'clock at night."
endif
endif
sysmessage Meridian (<dlocal.meridian>)

[FUNCTION f_pos_chk]
if (<p.m> < 2)
if (<p.x> < 325)
local.meridian = -12
<QVAL (<eval <var0.hours>> < 12)? local.hours = <eval <var0.hours>+12>:local.hours = <eval <var0.hours>-12>>
elif (<p.x> < 975)
local.meridian = -9
<QVAL (<eval <var0.hours>> < 9)? local.hours = <eval <var0.hours>+15>:local.hours = <eval <var0.hours>-9>>
elif (<p.x> < 1725)
local.meridian = -6
<QVAL (<eval <var0.hours>> < 6)? local.hours = <eval <var0.hours>+18>:local.hours = <eval <var0.hours>-6>>
elif (<p.x> < 2300)
local.meridian = -3
<QVAL (<eval <var0.hours>> < 3)? local.hours = <eval <var0.hours>+21>:local.hours = <eval <var0.hours>-3>>
elif (<p.x> < 3100)
local.meridian = 0
local.hours = <eval <var0.hours>>
elif (<p.x> < 3575)
local.meridian = 3
<QVAL (<eval <var0.hours>> < 21)? local.hours = <eval <var0.hours>+3>:local.hours = <eval <var0.hours>-21>>
elif (<p.x> < 4225)
local.meridian = 6
<QVAL (<eval <var0.hours>> < 18)? local.hours = <eval <var0.hours>+6>:local.hours = <eval <var0.hours>-18>>
elif (<p.x> < 4875)
local.meridian = 9
<QVAL (<eval <var0.hours>> < 15)? local.hours = <eval <var0.hours>+9>:local.hours = <eval <var0.hours>+9>>
elif (<p.x> < 5100)
local.meridian = 12
<QVAL (<eval <var0.hours>> < 13)? local.hours = <eval <var0.hours>+12>:local.hours <eval <var0.hours>-12>>
elif (<p.x> > 5100) && (<p.y> < 2300)
if !(strcmp("<strarg <region.name>>","Shame")) || !(strcmp("<region.name>","The Heartwood")) || !(strcmp("<region.name>","Blighted Grove")) || !(strcmp("<region.name>","Sanctuary"))
local.meridian = -9
<QVAL (<eval <var0.hours>> < 9)? local.hours = <eval <var0.hours>+15>:local.hours = <eval <var0.hours>-9>>
elif !(strcmp("<strarg <region.name>>","Despise")) || !(strcmp("<strarg <region.name>>","Destard")) || !(strcmp("<region.name>","Painted Caves"))
local.meridian = -6
<QVAL (<eval <var0.hours>> < 6)? local.hours = <eval <var0.hours>+18>:local.hours = <eval <var0.hours>-6>>
elif !(strcmp("<strarg <region.name>>","Wrong"))
local.meridian = -3
<QVAL (<eval <var0.hours>> < 3)? local.hours = <eval <var0.hours>+21>:local.hours = <eval <var0.hours>-3>>
elif !(strcmp("<strarg <region.name>>","Covetous")) || !(strcmp("<strarg <region.name>>","Fire")) || !(strcmp("<strarg <region.name>>","Ice")) || !(strcmp("<region.name>","Green Acres")) || !(strcmp("<region.name>","Green Acres 2")) || !(strcmp("<region.name>","Green Acres 3")) || !(strcmp("<region.name>","Palace of Paroxysmus"))
local.meridian = 0
local.hours = <eval <var0.hours>>
elif !(strcmp("<strarg <region.name>>","Deceit")) || !(strcmp("<region.name>","Prizm of Light"))
local.meridian = 6
<QVAL (<eval <var0.hours>> < 18)? local.hours = <eval <var0.hours>+6>:local.hours = <eval <var0.hours>-18>>
elif !(strcmp("<strarg <region.name>>","Hythloth"))
local.meridian = 9
<QVAL (<eval <var0.hours>> < 15)? local.hours = <eval <var0.hours>+9>:local.hours = <eval <var0.hours>-15>>
endif
elif (<p.x> > 5100) && (<p.y> > 2300)
local.meridian = 0
local.hours = <eval <var0.hours>>
endif
elif (<p.m>==2)
local.meridian = -12
<QVAL (<eval <var0.hours>> < 12)? local.hours = <eval <var0.hours>+12>:local.hours = <eval <var0.hours>-12>>
elif (<p.m>==3)
local.meridian = 3
<QVAL (<eval <var0.hours>> < 21)? local.hours = <eval <var0.hours>+3>:local.hours = <eval <var0.hours>-21>>
elif (<p.m>==4)
local.meridian = 12
<QVAL (<eval <var0.hours>> < 12)? local.hours = <eval <var0.hours>+12>:local.hours <eval <var0.hours>-12>>
endif
return <local.hours>
return <local.meridian>

[FUNCTION f_barometer]
if <def.storm_system>
if (<var0.month> < 4)
<QVAL (<eval rand(<ddef.weather_winter>)>== 10)? local.barometer=<eval {1 <ddef.weather_winter>}>:local.barometer=<eval {1 100}>>
elif (<var0.month> < 7)
<QVAL (<eval rand(<ddef.weather_spring>)>== 10)? local.barometer=<eval {1 <ddef.weather_spring>}>:local.barometer=<eval {1 100}>>
elif (<var0.month> < 10)
<QVAL (<eval rand(<ddef.weather_summer>)>== 10)? local.barometer=<eval {1 <ddef.weather_summer>}>:local.barometer=<eval {1 100}>>
else
<QVAL (<eval rand(<ddef.weather_fall>)>== 10)? local.barometer=<eval {1 <ddef.weather_fall>}>:local.barometer=<eval {1 100}>>
endif
else
local.barometer=<eval {1 100}>
endif
return <dlocal.barometer>

[FUNCTION f_environ_calc]
call f_pos_chk <p>
call f_light_manager <local.hours>
if (<dlocal.hours>==12)
local.fromhigh=0
else
<QVAL (<eval <local.hours>> < 12)? local.fromhigh=<eval (12-<local.hours>)>:local.fromhigh=<eval (<local.hours>-12)>>
endif
local.fromhigh=<eval <local.fromhigh>*30>
if (<p.m> < 2)
if !(strcmpi("<region.name>","Ice Isle")) //Ice Isle, permanently cold, high chance of precipitaion
local.temp=<eval (<eval {0 30}> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
local.weatherchance=<eval {10 80}>
elif !(strcmpi("<region.name>","Desert of Compassion")) //Desert of Compassion, permanently hot, low chance of precipitation.
local.temp=<eval (<eval {800 1000}> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
local.weatherchance=<eval {40 100}>
elif !(strcmpi("<region.name>","Green Acres")) || !(strcmpi("<region.name>","Green Acres 2")) || !(strcmpi("<region.name>","Green Acres 3"))
local.temp = <fval (<fval (<fval (<fval(<eval (<p.y>/200)>*1.8)>+32.0)> + <streat <streat <def.month_<eval <var0.month>>>>>)> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+(<p.y>/200))>
elif (<p.x> < 5100) // Main map
if (<flags>& 01000000)
local.temp=500
ctag.temp = <fval <local.temp>>
local.weatherchance=100
else
local.temp = <fval (<fval (<fval (<fval(<eval (<p.y>/200)>*1.8)>+32.0)> + <streat <streat <def.month_<eval <var0.month>>>>>)> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval ((<p.y>/200)+<local.barometer>)>
endif
elif (<p.x> > 5100) && (<p.y> < 2300)
if !(strcmp("<region.name>","The Heartwood")) || !(strcmp("<region.name>","Blighted Grove")) || !(strcmp("<region.name>","Sanctuary"))
local.temp=<eval ((50.0+<streat <streat <def.month_<eval <var0.month>>>>>)-<dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
local.weatherchance=<eval {1 100}>
else
if (<sector.weather>!=255)
sector.dry
update
endif
if <def.fire_ice>// Dungeons have no weather EVER, but do have temperatures...
if !(strcmpi("<strarg <region.name>>","Fire")) //fire
local.temp=<eval ((90.0+<streat <streat <def.month_<eval <var0.month>>>>>)-<dlocal.fromhigh>)>
ctag.temp = <fval <dlocal.temp>>
local.weatherchance=100
elif !(strcmpi("<strarg <region.name>>","Ice")) //ice
local.temp=<eval (<streat <streat <def.month_<eval <var0.month>>>>>-<fval <dlocal.fromhigh>>)>
ctag.temp = <fval <local.temp>>
local.weatherchance=100
else //other
local.temp=<eval ((50.0+<streat <streat <def.month_<eval <var0.month>>>>>)-<dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
local.weatherchance=100
endif
else
local.temp=<eval ((40.0+<streat <streat <def.month_<eval <var0.month>>>>>)-<dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
local.weatherchance=100
endif
endif
elif (<p.x> > 5100) && (<p.y> > 2300) // T2A map
if (<p.y> < 2500) //snow region
local.temp = <eval (<eval {0 35}> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+((<p.y> - 2300)/200))>
elif (<p.y> < 2900) //desert region
local.temp = <eval (<eval {80 100}> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+((<p.y> - 2300)/100))>
elif (<p.y> < 4100) //tropics
local.temp = <fval (<fval <fval(<eval <p.y>/200>*1.8)>+32.0> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp= <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+(<p.y>/200))>
endif
endif
else
if (<p.m>==2) // Ilshenar map
local.temp = <fval (<fval <fval ((<eval (<p.y>+1000)/200)>*1.8)>+32.0> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+((<p.y>+1000)/200))>
elif (<p.m>==3)
if (<p.x> < 800)// Malas map
local.temp = <fval (<fval <fval ((<eval <p.y>/200)>*1.8)>+32.0> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+(<p.y>/200))>
else
local.temp = <fval (<fval <fval ((<eval (<p.y>+1000)/200)>*1.8)>+32.0> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+((<p.y>+1000)/200))>
endif
elif (<p.m>==4)
if (<p.x> < 200)// Tokuno Islands map
local.temp = <fval (<fval <fval ((<eval <p.y>/200)>*1.8)>+32.0> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+(<p.y>/200))>
else
local.temp = <fval (<fval <fval (((<eval (<p.y>+2000)/200)>*1.8)>+32.0> + <streat <streat <def.month_<eval <var0.month>>>>> - <dlocal.fromhigh>)>
ctag.temp = <fval <local.temp>>
call f_barometer
local.weatherchance = <eval (<local.barometer>+((<p.y>+2000)/200))>
endif
endif
endif

//Begin seasonal weather control
if (<eval <var0.month>> > <eval (<ddef.months_per_year>-1)>)
if (<dlocal.weatherchance> < <ddef.weather_winter>)
if <def.storm_system>
<QVAL (<dlocal.weatherchance> < <eval <ddef.weather_winter>/2>)? call f_storm <dlocal.temp>:call f_weather <dlocal.temp>>
else
call f_weather <dlocal.temp>
endif
else
call f_dry
endif
elif (<eval <var0.month>> > <eval ((<ddef.months_per_year>/3)*2)>)
if (<dlocal.weatherchance> < <ddef.weather_fall>)
if <def.storm_system>
<QVAL (<dlocal.weatherchance> < <eval <ddef.weather_fall>/2>)? call f_storm <dlocal.temp>:call f_weather <dlocal.temp>>
else
call f_weather <dlocal.temp>
endif
else
call f_dry
endif
elif (<eval <var0.month>> > <eval ((<ddef.months_per_year>/2)-1)>)
if (<dlocal.weatherchance> < <ddef.weather_summer>)
if <def.storm_system>
<QVAL (<dlocal.weatherchance> < <eval <ddef.weather_summer>/2>)? call f_storm <dlocal.temp>:call f_weather <dlocal.temp>>
else
call f_weather <dlocal.temp>
endif
else
call f_dry
endif
elif (<eval <var0.month>> > <eval ((<ddef.months_per_year>/4)-1)>)
if (<dlocal.weatherchance> < <ddef.weather_spring>)
if <def.storm_system>
<QVAL (<dlocal.weatherchance> < <eval <ddef.weather_spring>/2>)? call f_storm <dlocal.temp>:call f_weather <dlocal.temp>>
else
call f_weather <dlocal.temp>
endif
else
call f_dry
endif
else
if (<dlocal.weatherchance> < <ddef.weather_winter>)
if <def.storm_system>
<QVAL (<dlocal.weatherchance> < <eval <ddef.weather_winter>/2>)? call f_storm <dlocal.temp>:call f_weather <dlocal.temp>>
else
call f_weather <dlocal.temp>
endif
else
call f_dry
endif
endif

[function hc]
serv.b <QVAL (<uid.<region.uid>.type>==t_multi)? multi: not multi>
serv.b <QVAL (<uid.<region.uid>.type>==t_multi_custom) ? custom multi: not multi>
serv.b <QVAL (<region.flags> & 0800)? dungeon flag:not dungeon>
serv.b <qval (<flags> & 01000000)? indoors:outdoors>

[FUNCTION f_light_manager]
if (<region.flags> & 0800)

//serv.b meets dungeon perameters
if (<sector.light> != <ddef.light_dungeon>)
sector.light=<ddef.light_dungeon>
endif
else
if (<eval <var0.month>> < <eval ((<ddef.months_per_year>/2)+1)>)
if (<dlocal.hours>==12)
if (<sector.light> != 0)
sector.light = 0
endif
elif (<dlocal.hours> > 12)
if (<eval (((<dlocal.hours>-12)*2)-<eval <var0.month>>)> < 1)
if (<sector.light> != 0)
sector.light = 0
endif
else
if (<sector.light> != <eval (((<dlocal.hours>-12)*2) - <eval <var0.month>>)>)
sector.light = <eval (((<dlocal.hours>-12)*2) - <eval <var0.month>>)>
endif
if (<eval <var0.phase>> == 5) && (<sector.light> > <ddef.light_full_moon>)
sector.light = <ddef.light_full_moon>
endif
endif
elif (<dlocal.hours> < 12)
if (<eval (((12-<dlocal.hours>)*2)-<eval <var0.month>>)> < 1)
if <sector.light> != 0
sector.light = 0
endif
else
if (<sector.light> != <eval (((12-<dlocal.hours>)*2) - <eval <var0.month>>)>)
sector.light = <eval (((12-<dlocal.hours>)*2) - <eval <var0.month>>)>
endif
if (<eval <var0.phase>> == 5) && (<sector.light> > <ddef.light_full_moon>)
sector.light = <ddef.light_full_moon>
endif
endif
endif
else
local.month = <eval (<ddef.months_per_year>-<var0.month>)>
if (<dlocal.hours>==12)
if (<sector.light> != 0)
sector.light = 0
endif
elif (<dlocal.hours> > 12)
if (<eval (((<dlocal.hours>-12)*2)-<dlocal.month>)> < 1)
if (<sector.light> != 0)
sector.light = 0
endif
else
if (<sector.light> != <eval (((<dlocal.hours>-12)*2)-<dlocal.month>)>)
sector.light = <eval (((<dlocal.hours>-12)*2)-<dlocal.month>)>
endif
if (<eval <var0.phase>> == 5) && (<sector.light> > <ddef.light_full_moon>)
sector.light = <ddef.light_full_moon>
endif
endif
elif (<dlocal.hours> < 12)
if (<eval (((12-<local.hours>)*2)-<dlocal.month>)> < 1)
if (<sector.light> != 0)
sector.light = 0
endif
else
if (<sector.light> != <eval (((12-<dlocal.hours>)*2)-<dlocal.month>)>)
sector.light = <eval (((12-<dlocal.hours>)*2)-<dlocal.month>)>
endif
if (<eval <var0.phase>> == 5) && (<sector.light> > <ddef.light_full_moon>)
sector.light = <ddef.light_full_moon>
endif
endif
endif
endif
endif

[FUNCTION f_weather]
if (<eval <local.temp>> < 360)
if (<sector.weather>==1) || (<sector.weather>==2)
return 0
else
sector.snow
return 1
endif
else
if (<sector.weather>==0)
return 0
else
sector.rain
return 1
endif
endif

[FUNCTION f_storm]
if (<eval <local.temp>> < 360)
sector.snow
f_make_snow
f_sfx_storm
return 1
else
sector.rain
f_make_rain
f_sfx_storm
f_sfx_rain
return 1
endif

[FUNCTION f_make_rain]
if (<sector.weather>==0)
if (<flags> & statf_indoors) || (<serv.map(<p.x>,<p.y>,<p.z>,<p.m>).type>==t_water)
return 1
else
serv.newitem=i_puddle
new.movenear <UID>,11
if (<serv.map(<new.p.x>,<new.p.y>,<new.p.z>,<new.p.m>).type>==t_water)
new.remove
endif
timerf {10 20}, f_make_rain
endif
else
return 1
endif

[FUNCTION f_make_snow]
if (<sector.weather>==2)
if (<flags> & statf_indoors) || (<serv.map(<p.x>,<p.y>,<p.z>,<p.m>).type>==t_water)
return 1
else
serv.newitem i_snow_pile
new.movenear <uid>,11
if (<serv.map(<new.p.x>,<new.p.y>,<new.p.z>,<new.p.m>).type>==t_water)
new.remove
endif
timerf {10 20}, f_make_snow
endif
else
return 1
endif

[FUNCTION f_make_lightning]
if (<sector.weather>==0)
if (<eval rand(3)>==1)
sector.allclients f_lightning_strike
else
if (<flags> & statf_indoors)
return 1
else
serv.newitem i_lightning_memory
new.movenear <uid>,11
timerf {15 45}, f_make_lightning
endif
endif
else
return 1
endif

[FUNCTION f_lightning_strike]
if (<isgm>) || (<flags> & statf_indoors) || (<flags> & statf_dead) || (<flags> & statf_freeze)
return 1
else
if (<eval rand(<ddef.lighting_strike>)>==1)
effect 1,1,1,1,1
sysmessage @,,1 You have been struck by lightning!
hits-=<eval <hits>/2>
endif
endif

[FUNCTION f_sfx_rain]
if (<sector.weather>==0)
sfx 16
timerf 1, f_sfx_rain
else
return 1
endif

[FUNCTION f_sfx_storm]
if (<sector.weather>==0)
if (<eval rand(3)>==1)
dorand 2
sfx 40
sfx 41
enddo
elif (<eval rand(3)>==2)
dorand 2
sfx 21
sfx 22
enddo
endif
elif (<sector.weather>==1) || (<sector.weather>==2)
if (<eval rand(3)>==1)
sfx 20
endif
else
return 1
endif
timerf, {5 20} f_sfx_storm

[FUNCTION f_dry]
if (<sector.weather>==255)
return 1
else
sector.dry
return 1
endif

[EVENTS e_environmental]
ON=@Environchange
if <isplayer>
f_environ_calc
if <def.tempaffect>
if !(<restest 1 i_tempaffect>)
serv.newitem i_tempaffect
new.equip
endif
local.layer=3
for 14
if (<dlocal.layer>==8)
local.layer=12
elif (<dlocal.layer>==14)
local.layer=17
elif (<dlocal.layer>==18)
local.layer=19
elif (<dlocal.layer>==21)
local.layer=22
endif
if (<findlayer(<dlocal.layer>)>)
ctag0.temp = <fval <ctag0.temp>+1.0>
endif
local.layer +=1
endfor
if (<fval <ctag0.temp>> < 32.0)
ctag0.temp = <fval <fval <ctag0.temp>> + <eval (<src.rescold>/2)*10)>>
elif (<fval <ctag0.temp>> > 80.0)
ctag0.temp = <fval <fval <ctag0.temp>> - <eval (<src.resfire>/2)*10)>>
endif
endif
endif

ON=@Login
if <def.tempaffect>
if !(<restest 1 i_tempaffect>)
serv.newitem i_tempaffect
new.equip
endif
endif

if <def.fri13th>
if (<eval <var0.date> != 13) && (<eval <var0.day>> != 6)
if (<isplayer>) && (<tag0.fri13th>)
if (<eval <luck>> < 0)
luck -= <eval <luck>*2>
tag0.fri13th= //remove marker
endif
endif
else
if (<isplayer>) && !(<isgm>) && !(<tag0.fri13th>)
if (<eval <luck>> > 0) //for positive luck
luck = - <eval <luck>>
tag0.fri13th = 1
endif
endif
endif
endif

ON=@Logout
if (<restest 1 i_tempaffect>)
consume 1 i_tempaffect
endif

[ITEMDEF i_tempaffect]
ID=i_memory
TYPE=t_eq_script
NAME=tempmem

ON=@Create
ATTR=attr_decay|attr_newbie|attr_move_never

ON=@Equip
timer=1

ON=@Timer
if <def.tempaffect>
if (<cont.flags>& 01000000) && !(<region.flags> & 0800)
return 1
endif
if (<cont.body>!=c_ghost_man) || (<cont.body>!=c_ghost_woman) || !(<cont.isgm>)
if (<fval <cont.ctag0.temp>> < 10.0)
cont.sysmessage You are freezing to death
if (<cont.stam> > 5)
cont.stam -= 5
else
cont.stam=0
endif
if (<cont.stam> < <eval <cont.maxstam>/4>)
cont.hits -= 5
endif
elif (<fval <cont.ctag0.temp>> < 20.0)
cont.sysmessage You feel extremely cold
if (<cont.stam> > 2)
cont.stam -= 2
else
cont.stam=0
endif
if (<cont.stam> < <eval <cont.maxstam>/4>)
cont.hits -= 2
endif
elif (<fval <cont.ctag0.temp>> < 40.0)
cont.sysmessage You feel very cold
if (<cont.stam> > 1)
cont.stam -= 1
else
cont.stam=0
endif
if (<cont.stam> < <eval <cont.maxstam>/4>)
cont.hits -= 1
endif
elif (<eval <cont.ctag0.temp>> > 40.0) && (<eval <cont.ctag0.temp>> < 90.0)
return 0
elif (<fval <cont.ctag0.temp>> > 105.0)
cont.sysmessage You are burning up
if (<cont.stam> > 6)
cont.stam -= 6
else
cont.stam=0
endif
if (<cont.stam> < <eval <cont.maxstam>/4>)
cont.hits -= 6
endif
elif (<fval <cont.ctag0.temp>> > 97.0)
cont.sysmessage You feel extremely hot
if (<cont.stam> > 3)
cont.stam -= 3
else
cont.stam=0
endif
if (<cont.stam>< <eval <cont.maxstam>/4>)
cont.hits -= 3
endif
elif (<fval <cont.ctag0.temp>> > 90.0)
cont.sysmessage You are very hot
if (<cont.stam> > 1)
cont.stam -= 1
else
cont.stam=0
endif
if (<cont.stam> < <eval <cont.maxstam>/4>)
cont.hits -= 1
endif
endif
endif
timer=20
else
remove
endif
return 1

[ITEMDEF 014f5]
DEFNAME=i_spyglass
TYPE=T_SPY_GLASS
FLIP=1
RESOURCES=2 i_ingot_iron, 1 i_GLASS
WEIGHT=3
CATEGORY=Decoration - Miscellaneous
SUBSECTION=Nautical
DESCRIPTION=SpyGlass (N)
DUPELIST=014f6

ON=@DCLICK
if <def.use_britannian_calendar>
src.sysmessage Trammel is in the <def.lunar_phase_<dvar0.phase>> phase
src.sysmessage Felucca is in the <def.lunar_phase_<dvar0.phase2>> phase
return 1
else
src.sysmessage The moon is in the <def.lunar_phase_<dvar0.phase>> phase
return 1
endif

[ITEMDEF 0104b]
DEFNAME=i_clock
RESOURCES=i_CLOCK_FRAME,i_CLOCK_PARTS
WEIGHT=2
TYPE=T_CLOCK
CATEGORY=Items by Professions
SUBSECTION=Tinker
DESCRIPTION=Clock
DUPELIST=0104c
SKILLMAKE=TINKERING 30.7,t_tinker_tools

ON=@Dclick
src.time
return 1

[ITEMDEF i_puddle]
ID=i_blood_pool_large
NAME=puddle

ON=@Create
timer={60 180}
color=91
attr=attr_move_never|attr_can_decay
dorand 5
dispid=0122a
dispid=0122b
dispid=0122c
dispid=0122d
dispid=0122e
enddo

ON=@Step
if !<argn>
sfx 0027
endif

ON=@Timer
remove
return 1

[ITEMDEF i_snow_pile]
ID=i_blood_pool_large
NAME=snow

ON=@Create
color=0481
attr=attr_move_never|attr_can_decay
timer={90 180}
dorand 5
dispid=0122a
dispid=0122b
dispid=0122c
dispid=0122d
dispid=0122e
enddo

ON=@Step
if !<argn>
sfx 012e
endif

ON=@Timer
remove
return 1

[ITEMDEF i_lightning_memory]
ID=i_memory
TYPE=t_script

ON=@Create
timer=1
ATTR=attr_move_never

ON=@Timer
if <more>
sector.light=18
remove
else
more=1
serv.newnpc=c_man_invisible
tag.npc=<new.uid>
new.str=1
new.hits=1
new.invul
new.movenear <uid>,1
if (<new.flags> & ~01000000)
new.effect 1,1,1,1,1
sector.light=0
sfx 41
endif
obj=<tag.npc>
obj.remove
timerd=1
endif
return 1

Üye Ol veya Giriş Yap

Bu forum başlığına mesaj atmak istiyorsanız hemen üye olun veya giriş yapın.