1 import Crossfire,random,math,sys
5 Params=Crossfire.ScriptParameters()
8 while object.Name!=Name:
16 if object.Name==
"Shop Floor":
25 if object.Name.find(
"Puddle")>-1:
32 if object.Name.find(
"Puddle")>-1:
40 whoami=Crossfire.WhoAmI()
48 b=whoami.CreateObject(
"icecube")
50 z=b.CreateObject(
"event_time")
51 b.Speed=0.0010000000475*4
52 if whoami.Map.Path.find(
"/world_")>-1:
56 z.Slaying=
"/python/pshop/Ice.py"
57 z=b.CreateObject(
"event_destroy")
60 z.Slaying=
"/python/pshop/Ice.py"
62 b.Teleport(whoami.Map,whoami.X,whoami.Y)
68 b.Weight+=whoami.Weight
76 elif b.Weight<2000000:
81 elif Params==
"FogDeath":
82 whoami=Crossfire.WhoAmI()
90 whoami=Crossfire.WhoAmI()
91 Rand=random.randint(0,8)
97 Crossfire.SetReturnValue(1)
101 whoami=Crossfire.WhoAmI()
102 activator=Crossfire.WhoIsActivator()
105 Dict=CFDB.get(
"pshop")
107 WL=
str(whoami.WeightLimit)
110 a=(Me[0],
"PickedUp",Me[2])
115 Dict.update({
str(whoami.WeightLimit):(a[0],a[1],a[2])})
116 CFDB.store(
"pshop",Dict)
121 elif Params==
"Player":
122 whoami=Crossfire.WhoAmI()
123 elif Params==
"PuddleDeath":
124 whoami=Crossfire.WhoAmI()
126 Fogs=
int(whoami.Weight/1000)
133 if whoami.Name==
"fog":
136 z=whoami.CreateObject(
"temp_fog")
137 Z=z.CreateObject(
"event_destroy")
140 Z.Slaying=
"/python/pshop/Ice.py"
141 z.Weight=(Fogs-50)*1000
146 for i
in range(Fogs):
148 z=whoami.CreateObject(
"temp_fog")
150 z.Weight=(3+random.randint(1,10+
int(math.sqrt(FogsTmp))))*3
151 Rand=random.randint(1,2+
int(FogsTmp/10))
153 z.Weight*=
int(Rand/10)+1
155 y=z.CreateObject(
"event_time")
158 y.Slaying=
"/python/pshop/Ice.py"
168 elif Params==
"Puddle":
170 whoami=Crossfire.WhoAmI()
179 Mass=
int(math.sqrt(whoami.Weight))
181 for i
in range(IntMass):
182 z=whoami.CreateObject(
"temp_fog")
183 y=z.CreateObject(
"event_time")
186 y.Slaying=
"/python/pshop/Ice.py"
191 z.Weight=(3+random.randint(1,
int(IntMass)+10))
199 if whoami.Weight>20000:
200 a=whoami.CreateObject(
'icecube')
201 Mass=random.randint(1,
int(whoami.Weight/2))
205 Direction=random.randint(1,8)
211 if whoami.Map.Path.find(
"/world/world_")>-1:
214 XY=(whoami.X,whoami.Y)
217 tmp=whoami.Move(Direction)
224 a.Teleport(whoami.Map, whoami.X,whoami.Y)
225 whoami.Teleport(whoami.Map,XY[0],XY[1])
229 tmp=a.Move(Direction)
237 b=a.Map.ObjectAt(a.X,a.Y)
248 elif a.Weight < 3200:
259 if y.Name.find(
"Puddle")>-1:
265 z=a.CreateObject(
"event_time")
266 a.Speed=0.0010000000475*4
270 z.Slaying=
"/python/pshop/Ice.py"
271 z=a.CreateObject(
"event_destroy")
274 z.Slaying=
"/python/pshop/Ice.py"
278 a.Speed=(0.0010000000475*4)
279 if whoami.Weight < 1600:
280 whoami.Face=
"rain1.111"
281 elif whoami.Weight < 3200:
282 whoami.Face=
"rain2.111"
283 elif whoami.Weight<6400:
284 whoami.Face=
"rain3.111"
285 elif whoami.Weight<12800:
286 whoami.Face=
"rain4.111"
288 whoami.Face=
"rain5.111"
289 whoami.Speed=(0.0010000000475*4)+0.0010000000475*whoami.Value/(whoami.Weight/1000)
295 elif Params==
"Timer":
296 whoami=Crossfire.WhoAmI()
298 b=
FindPuddle(whoami.Map.ObjectAt(whoami.X,whoami.Y))
302 b=whoami.CreateObject(
"icecube")
304 z=b.CreateObject(
"event_time")
305 b.Speed=0.0010000000475*4
306 if whoami.Map.Path.find(
"/world_")>-1:
310 z.Slaying=
"/python/pshop/Ice.py"
311 z=b.CreateObject(
"event_destroy")
314 z.Slaying=
"/python/pshop/Ice.py"
321 Mass=
int(100+math.sqrt(whoami.Weight))
322 b.Weight+=
max(Mass,50)
323 whoami.Weight-=
max(Mass,50)
338 whoami.Speed+=0.00010000000475
340 whoami=Crossfire.WhoAmI()
342 activator=Crossfire.WhoIsActivator()
348 t=mymap.ObjectAt(activator.X, activator.Y)
355 Dict=CFDB.get(
"pshop")
357 WL=
str(whoami.WeightLimit)
360 a=(Me[0],(activator.X,activator.Y),Me[2])
365 Dict.update({
str(whoami.WeightLimit):(a[0],a[1],a[2])})
366 CFDB.store(
"pshop",Dict)
368 Crossfire.SetReturnValue(0)
371 whoami.Speed=0.0010000000475*4
372 if activator.Map.Path.find(
"/world_")>-1:
376 whoami.Speed=whoami.Speed*10
379 Crossfire.SetReturnValue(0)