Try to not generate errors.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@18693 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
e3ac67f897
commit
aa9637d3aa
|
@ -2,8 +2,6 @@ import random,Crossfire,CFGuilds,sys,string
|
|||
from CFGuildClearance import CheckClearance
|
||||
activator=Crossfire.WhoIsActivator()
|
||||
whoami=Crossfire.WhoAmI()
|
||||
activatorname=activator.Name
|
||||
mymap = activator.Map
|
||||
|
||||
Crossfire.SetReturnValue(1)
|
||||
|
||||
|
@ -14,20 +12,10 @@ def find_player(object):
|
|||
return 0
|
||||
return object
|
||||
|
||||
Corpse = activator.Map.ObjectAt(int (21), int (0))
|
||||
x4=random.randint(21, 23)
|
||||
y4=random.randint(22,24)
|
||||
|
||||
Curse = activator.Map.ObjectAt(int(x4),int(y4))
|
||||
|
||||
|
||||
|
||||
x3=1
|
||||
y3=8
|
||||
Params=Crossfire.ScriptParameters().split()
|
||||
Approved="Access granted" if CheckClearance(Params,activator) else "Access denied"
|
||||
x1 = activator.X
|
||||
Y1 = activator.Y
|
||||
Approved="Access granted" if activator != None and CheckClearance(Params,activator) else "Access denied"
|
||||
x= 26
|
||||
y=0
|
||||
guildname = Params[0]
|
||||
|
@ -36,7 +24,7 @@ guildrecord=CFGuilds.CFGuildHouses().info(guildname)
|
|||
ActionRequired=Params[2]
|
||||
|
||||
# things which are not a player are ok
|
||||
if activator.Type != Crossfire.Type.PLAYER:
|
||||
if activator == None or activator.Type != Crossfire.Type.PLAYER:
|
||||
Approved = 'Access granted'
|
||||
|
||||
|
||||
|
@ -44,6 +32,12 @@ if (Approved != 'Access granted'):
|
|||
if (ActionRequired == "A"):
|
||||
activator.Teleport(Crossfire.ReadyMap('/scorn/misc/jail'),int(15),random.choice([1,3,5,9,11]))
|
||||
elif (ActionRequired == "D"):
|
||||
|
||||
x4=random.randint(21, 23)
|
||||
y4=random.randint(22,24)
|
||||
Corpse = activator.Map.ObjectAt(int (21), int (0))
|
||||
Curse = activator.Map.ObjectAt(int(x4),int(y4))
|
||||
mymap = activator.Map
|
||||
Corpse.Name = str("%s's body" %(activator.Name))
|
||||
Corpse.Race = str("%s's Curse" %(activator.Name))
|
||||
Corpse.Weight = 1
|
||||
|
|
Loading…
Reference in New Issue