Smoking pipe script.

git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@6182 282e977c-c81d-0410-88c4-b93c2d0d6712
master
ryo_saeba 2007-05-05 16:56:02 +00:00
parent 3308dad503
commit 0dc753ac81
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
import Crossfire
# archetype that'll be smoked
smoke_what = 'pipeweed'
color = Crossfire.MessageFlag.NDI_BLUE
def smoke():
if who.Type != Crossfire.Type.PLAYER:
return
what = who.Inventory
while what:
if what.ArchName == smoke_what:
break
what = what.Below
if what == None:
who.Write('You don\'t have anything to smoke.', color)
return
what.Quantity = what.Quantity - 1
force = who.CreateObject('force_effect')
force.Speed = 0.1
force.Duration = 50
force.Con = -2
force.Dex = -2
force.Applied = 1
force.SetResist(Crossfire.AttackTypeNumber.FEAR, 100)
who.ChangeAbil(force)
Crossfire.SetReturnValue(1)
me = Crossfire.WhoAmI()
who = Crossfire.WhoIsActivator()
smoke()