diff --git a/python/Move_Fog.py b/python/Move_Fog.py new file mode 100644 index 000000000..07a82a5e9 --- /dev/null +++ b/python/Move_Fog.py @@ -0,0 +1,11 @@ +import Crossfire,random,math +Params=Crossfire.ScriptParameters() +if Params=="Fog": + whoami=Crossfire.WhoAmI() + Rand=random.randint(0,8) + if Rand!=0: + whoami.Move(Rand) + + whoami.Weight-=1 + if whoami.Weight>=0: + Crossfire.SetReturnValue(1) \ No newline at end of file diff --git a/python/Moving_Fog.py b/python/Moving_Fog.py new file mode 100644 index 000000000..b6072f1d0 --- /dev/null +++ b/python/Moving_Fog.py @@ -0,0 +1,40 @@ +import Crossfire,random,math +whoami=Crossfire.WhoAmI() +Params=Crossfire.ScriptParameters() + +if Params=="GenerateFog": + + Fogs=int(whoami.Weight/1000) + Fogs=max(Fogs,1) + a=whoami.Inventory + while a !=None: + a.Remove() + a=whoami.Inventory + FogsTmp=Fogs + if whoami.Name=="fog": + FogsTmp=whoami.Value + if Fogs > 50: + z=whoami.CreateObject("temp_fog") + Z=z.CreateObject("event_destroy") + Z.Name="PuddleDeath" + Z.Title="Python" + Z.Slaying="/python/pshop/Ice.py" + z.Weight=(Fogs-50)*1000 + Fogs=50 + z.Speed*=2 + z.Value=FogsTmp + + for i in range(Fogs): + + z=whoami.CreateObject("temp_fog") + z.Speed+=0.01 + z.Weight=(3+random.randint(1,10+int(math.sqrt(FogsTmp))))*1 + Rand=random.randint(1,2+int(FogsTmp/10)) + z.Speed*=Rand + z.Weight*=int(Rand/10)+1 + + y=z.CreateObject("event_time") + y.Name="Fog" + y.Title="Python" + y.Slaying="/python/Move_Fog.py" + z.Speed/=3 \ No newline at end of file