Update maps to use the new potion name (invulnerability is now shielding)
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@7259 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
add325d613
commit
0c12e4b464
|
@ -643,7 +643,7 @@ arch afloor_left
|
||||||
x 6
|
x 6
|
||||||
y 4
|
y 4
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 6
|
x 6
|
||||||
y 4
|
y 4
|
||||||
end
|
end
|
||||||
|
|
|
@ -103,7 +103,7 @@ arch potioncon
|
||||||
x 2
|
x 2
|
||||||
y 7
|
y 7
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 2
|
x 2
|
||||||
y 8
|
y 8
|
||||||
end
|
end
|
||||||
|
|
|
@ -457,7 +457,7 @@ arch hugenugget
|
||||||
x 9
|
x 9
|
||||||
y 7
|
y 7
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 9
|
x 9
|
||||||
y 8
|
y 8
|
||||||
end
|
end
|
||||||
|
|
|
@ -1491,7 +1491,7 @@ arch waybread
|
||||||
x 9
|
x 9
|
||||||
y 2
|
y 2
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 9
|
x 9
|
||||||
y 2
|
y 2
|
||||||
end
|
end
|
||||||
|
@ -1867,7 +1867,7 @@ arch waybread
|
||||||
x 11
|
x 11
|
||||||
y 2
|
y 2
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 11
|
x 11
|
||||||
y 2
|
y 2
|
||||||
end
|
end
|
||||||
|
|
|
@ -314,7 +314,7 @@ arch flagstone
|
||||||
x 2
|
x 2
|
||||||
y 18
|
y 18
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 2
|
x 2
|
||||||
y 18
|
y 18
|
||||||
end
|
end
|
||||||
|
|
|
@ -931,7 +931,7 @@ arch ring
|
||||||
end
|
end
|
||||||
arch wiz_hat
|
arch wiz_hat
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
end
|
end
|
||||||
arch potion_magic
|
arch potion_magic
|
||||||
end
|
end
|
||||||
|
|
|
@ -338,7 +338,7 @@ x 2
|
||||||
y 1
|
y 1
|
||||||
connected 1
|
connected 1
|
||||||
lifesave 1
|
lifesave 1
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
name potion of gem essence
|
name potion of gem essence
|
||||||
name_pl potions of gem essence
|
name_pl potions of gem essence
|
||||||
resist_physical 0
|
resist_physical 0
|
||||||
|
|
|
@ -1738,7 +1738,7 @@ end
|
||||||
arch diamond_converter
|
arch diamond_converter
|
||||||
name 500 large nuggets -> a potion
|
name 500 large nuggets -> a potion
|
||||||
slaying largenugget
|
slaying largenugget
|
||||||
other_arch potion_invulnerability
|
other_arch potion_shielding
|
||||||
food 500
|
food 500
|
||||||
x 20
|
x 20
|
||||||
y 11
|
y 11
|
||||||
|
|
|
@ -3559,7 +3559,7 @@ arch shop_empty
|
||||||
x 24
|
x 24
|
||||||
y 14
|
y 14
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 24
|
x 24
|
||||||
y 14
|
y 14
|
||||||
end
|
end
|
||||||
|
|
|
@ -796,7 +796,7 @@ arch dungeon_floor
|
||||||
x 5
|
x 5
|
||||||
y 6
|
y 6
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 5
|
x 5
|
||||||
y 6
|
y 6
|
||||||
end
|
end
|
||||||
|
|
|
@ -1588,7 +1588,7 @@ arch afloor_right
|
||||||
x 7
|
x 7
|
||||||
y 8
|
y 8
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 7
|
x 7
|
||||||
y 8
|
y 8
|
||||||
end
|
end
|
||||||
|
|
|
@ -723,7 +723,7 @@ Wis 3
|
||||||
x 2
|
x 2
|
||||||
y 28
|
y 28
|
||||||
carrying 2100
|
carrying 2100
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
end
|
end
|
||||||
arch key2
|
arch key2
|
||||||
name Wizard's key
|
name Wizard's key
|
||||||
|
|
|
@ -21,9 +21,21 @@ import CFGuilds
|
||||||
import CFItemBroker
|
import CFItemBroker
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
x=6
|
||||||
|
y=7
|
||||||
|
x1=31
|
||||||
|
x2=32
|
||||||
|
x3=33
|
||||||
|
x4=34
|
||||||
|
x5=35
|
||||||
|
y1=9
|
||||||
|
y2=10
|
||||||
|
y3=11
|
||||||
|
y4=12
|
||||||
|
y5=13
|
||||||
activator=Crossfire.WhoIsActivator()
|
activator=Crossfire.WhoIsActivator()
|
||||||
activatorname=activator.Name
|
activatorname=activator.Name
|
||||||
|
mymap = activator.Map
|
||||||
whoami=Crossfire.WhoAmI()
|
whoami=Crossfire.WhoAmI()
|
||||||
|
|
||||||
remarklist = ['Excellent','Thank You','Thank You','Thank You', 'Thank You', 'Great', 'OK', 'Wonderful', 'Swell', 'Dude', 'Big Spender']
|
remarklist = ['Excellent','Thank You','Thank You','Thank You', 'Thank You', 'Great', 'OK', 'Wonderful', 'Swell', 'Dude', 'Big Spender']
|
||||||
|
@ -35,7 +47,7 @@ text = string.split(Crossfire.WhatIsMessage())
|
||||||
|
|
||||||
if (guildname):
|
if (guildname):
|
||||||
guild = CFGuilds.CFGuild(guildname)
|
guild = CFGuilds.CFGuild(guildname)
|
||||||
cointype = "imperial" #What type of token are we using for guild dues?
|
cointype = "jadecoin" #What type of token are we using for guild dues?
|
||||||
object = activator.CheckInventory(cointype)
|
object = activator.CheckInventory(cointype)
|
||||||
|
|
||||||
if text[0] == 'help' or text[0] == 'yes':
|
if text[0] == 'help' or text[0] == 'yes':
|
||||||
|
@ -62,4 +74,4 @@ if (guildname):
|
||||||
message = "Howdy %s, paying some guild dues today?" %(random.choice(buddylist))
|
message = "Howdy %s, paying some guild dues today?" %(random.choice(buddylist))
|
||||||
whoami.Say(message)
|
whoami.Say(message)
|
||||||
else:
|
else:
|
||||||
activator.Write('Guildname Error, please notify a DM')
|
activator.Write('Guildname Error, please notify a DM')
|
|
@ -1,21 +1,22 @@
|
||||||
import Crossfire
|
import Crossfire
|
||||||
import CFGuilds
|
import CFGuilds
|
||||||
|
|
||||||
activator=Crossfire.WhoIsActivator()
|
activator=Crossfire.WhoIsActivator()
|
||||||
activatorname=activator.Name
|
activatorname=activator.Name
|
||||||
whoami=Crossfire.WhoAmI()
|
whoami=Crossfire.WhoAmI()
|
||||||
mymap = activator.Map
|
mymap = activator.Map
|
||||||
mapname = mymap.Name
|
mapname = mymap.Name
|
||||||
trank = 0
|
trank = 0
|
||||||
|
|
||||||
points=Crossfire.ScriptParameters() # 1 is apply event
|
points=Crossfire.ScriptParameters() # 1 is apply event
|
||||||
|
|
||||||
if points:
|
if points:
|
||||||
guild = CFGuilds.SearchGuilds(activatorname)
|
guild = CFGuilds.SearchGuilds(activatorname)
|
||||||
if guild:
|
if guild:
|
||||||
CFGuilds.CFGuild.add_questpoints(activatorname,points)
|
CFGuilds.CFGuild.add_questpoints(activatorname,points)
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
print 'Error, no points specified in %s on map %s' %(whoami,mapname)
|
print 'Error, no points specified in %s on map %s' %(whoami,mapname)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
import Crossfire
|
import Crossfire
|
||||||
import CFGuilds
|
import CFGuilds
|
||||||
|
|
||||||
def mycmp(a, b):
|
def mycmp(a, b):
|
||||||
return cmp(a[1], b[1])
|
return cmp(a[1], b[1])
|
||||||
|
|
||||||
activator=Crossfire.WhoIsActivator()
|
activator=Crossfire.WhoIsActivator()
|
||||||
guilds = CFGuilds.CFGuildHouses()
|
guilds = CFGuilds.CFGuildHouses()
|
||||||
|
|
||||||
activator.Write('Guild Standings:')
|
activator.Write('Guild Standings:')
|
||||||
activator.Write('Guild - Points - Status')
|
activator.Write('Guild - Points - Status')
|
||||||
|
|
||||||
guildlist = guilds.list_guilds()
|
guildlist = guilds.list_guilds()
|
||||||
standings = []
|
standings = []
|
||||||
for guild in guildlist:
|
for guild in guildlist:
|
||||||
record = guilds.info(guild)
|
record = guilds.info(guild)
|
||||||
if record['Status'] != 'inactive':
|
if record['Status'] != 'inactive':
|
||||||
standings.append([record['Points'], guild, record['Status']])
|
standings.append([record['Points'], guild, record['Status']])
|
||||||
standings.sort(mycmp)
|
standings.sort(mycmp)
|
||||||
for item in standings:
|
for item in standings:
|
||||||
activator.Write('%s - %s - %s' %(item[1],item[0],item[2]))
|
activator.Write('%s - %s - %s' %(item[1],item[0],item[2]))
|
||||||
|
|
||||||
|
|
|
@ -1,57 +1,58 @@
|
||||||
import Crossfire
|
import Crossfire
|
||||||
import CFGuilds
|
import CFGuilds
|
||||||
|
|
||||||
whoami=Crossfire.WhoAmI()
|
whoami=Crossfire.WhoAmI()
|
||||||
guildname=Crossfire.ScriptParameters() # 1 is 'apply' event
|
guildname=Crossfire.ScriptParameters() # 1 is 'apply' event
|
||||||
|
|
||||||
def find_player(object):
|
def find_player(object):
|
||||||
while (object.Type != 1) : #1 is type 'Player'
|
while (object.Type != 1) : #1 is type 'Player'
|
||||||
object = object.Above
|
object = object.Above
|
||||||
if not object:
|
if not object:
|
||||||
return 0
|
return 0
|
||||||
return object
|
return object
|
||||||
|
|
||||||
activator=Crossfire.WhoIsActivator()
|
activator=Crossfire.WhoIsActivator()
|
||||||
map = activator.Map
|
map = activator.Map
|
||||||
|
|
||||||
players = []
|
players = []
|
||||||
names = []
|
names = []
|
||||||
|
|
||||||
if (guildname):
|
if (guildname):
|
||||||
#find players by coords
|
#find players by coords
|
||||||
ob1=map.ObjectAt(33,24)
|
ob1=map.ObjectAt(33,24)
|
||||||
ob2=map.ObjectAt(33,26)
|
ob2=map.ObjectAt(33,26)
|
||||||
objects = [ob1, ob2]
|
objects = [ob1, ob2]
|
||||||
for object in objects:
|
for object in objects:
|
||||||
temp = find_player(object)
|
temp = find_player(object)
|
||||||
if temp:
|
if temp:
|
||||||
players.append(temp)
|
players.append(temp)
|
||||||
players.append(activator)
|
players.append(activator)
|
||||||
|
|
||||||
for player in players:
|
for player in players:
|
||||||
names.append(player.Name)
|
names.append(player.Name)
|
||||||
|
|
||||||
if len(players) == 3:
|
if len(players) == 3:
|
||||||
print '%s,%s and %s found guild %s' %(names[0], names[1], names[2], guildname)
|
print '%s,%s and %s found guild %s' %(names[0], names[1], names[2], guildname)
|
||||||
|
|
||||||
CFGuilds.CFGuildHouses().establish(guildname)
|
CFGuilds.CFGuildHouses().establish(guildname)
|
||||||
#Masterize them
|
#Masterize them
|
||||||
for player, name in zip(players, names):
|
for player, name in zip(players, names):
|
||||||
CFGuilds.CFGuild(guildname).add_member(name, 'GuildMaster')
|
CFGuilds.CFGuild(guildname).add_member(name, 'GuildMaster')
|
||||||
guildmarker = player.CreateObject("marker")
|
guildmarker = player.CreateObject("marker")
|
||||||
guildmarker.Speed = 0
|
guildmarker.Speed = 0
|
||||||
guildmarker.Name=guildname
|
guildmarker.Name=guildname
|
||||||
guildmarker.Slaying='GuildMaster'
|
guildmarker.Slaying='GuildMaster'
|
||||||
|
|
||||||
#teleport them
|
#teleport them
|
||||||
player.Teleport(map,int(11),int(16))
|
player.Teleport(map,int(11),int(16))
|
||||||
message = "You have purchased the %s guild. Rule it wisely. (I would type 'save' right about now...)"%guildname
|
message = "You have purchased the %s guild. Rule it wisely. (I would type 'save' right about now...)"%guildname
|
||||||
|
|
||||||
else:
|
else:
|
||||||
message = 'To purchase a guild requires two additional persons to stand on the alcoves above.'
|
message = 'To purchase a guild requires two additional persons to stand on the alcoves above.'
|
||||||
else:
|
else:
|
||||||
print 'Guild Purchase Error: %s, %s' %(guildname, activatorname)
|
print 'Guild Purchase Error: %s, %s' %(guildname, activatorname)
|
||||||
message = 'Guild Purchase Error, please notify a DM'
|
message = 'Guild Purchase Error, please notify a DM'
|
||||||
|
|
||||||
whoami.Say(message)
|
whoami.Say(message)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,63 +1,64 @@
|
||||||
# guildjoin.py - operates perilous chair for Hall of Joining in crossfire guilds
|
# guildjoin.py - operates perilous chair for Hall of Joining in crossfire guilds
|
||||||
#
|
#
|
||||||
# Copyright (C) 2004 Todd Mitchell
|
# Copyright (C) 2004 Todd Mitchell
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
#
|
#
|
||||||
# The author can be reached via e-mail at temitchell@sourceforge.net
|
# The author can be reached via e-mail at temitchell@sourceforge.net
|
||||||
#
|
#
|
||||||
|
|
||||||
import Crossfire
|
import Crossfire
|
||||||
import CFGuilds
|
import CFGuilds
|
||||||
|
|
||||||
def find_player(object):
|
def find_player(object):
|
||||||
while (object.Type != 1) : #1 is type 'Player'
|
while (object.Type != 1) : #1 is type 'Player'
|
||||||
object = object.Above
|
object = object.Above
|
||||||
if not object:
|
if not object:
|
||||||
return 0
|
return 0
|
||||||
return object
|
return object
|
||||||
|
|
||||||
activator=Crossfire.WhoIsActivator()
|
activator=Crossfire.WhoIsActivator()
|
||||||
activatorname=activator.Name
|
activatorname=activator.Name
|
||||||
map = activator.Map
|
map = activator.Map
|
||||||
whoami=Crossfire.WhoAmI()
|
whoami=Crossfire.WhoAmI()
|
||||||
|
|
||||||
guildname=Crossfire.ScriptParameters() # 1 is 'apply' event
|
guildname=Crossfire.ScriptParameters() # 1 is 'apply' event
|
||||||
|
|
||||||
if (guildname):
|
if (guildname):
|
||||||
guild = CFGuilds.CFGuild(guildname)
|
guild = CFGuilds.CFGuild(guildname)
|
||||||
#find players by coords
|
#find players by coords
|
||||||
ob=map.ObjectAt(9,16)
|
ob=map.ObjectAt(9,16)
|
||||||
player = find_player(ob)
|
player = find_player(ob)
|
||||||
if player: # look for player
|
if player: # look for player
|
||||||
charname=player.Name
|
charname=player.Name
|
||||||
in_guild = CFGuilds.SearchGuilds(charname)
|
in_guild = CFGuilds.SearchGuilds(charname)
|
||||||
if in_guild == 0:
|
if in_guild == 0:
|
||||||
if guild.info(charname):
|
if guild.info(charname):
|
||||||
#already a member
|
#already a member
|
||||||
message = '%s is already a member.' %charname
|
message = '%s is already a member.' %charname
|
||||||
else:
|
else:
|
||||||
guild.add_member(charname, 'Initiate')
|
guild.add_member(charname, 'Initiate')
|
||||||
message = 'Added %s to the guild' %charname
|
message = 'Added %s to the guild' %charname
|
||||||
else:
|
else:
|
||||||
message = 'It appears that %s is already a member of the %s guild' %(charname, in_guild)
|
message = 'It appears that %s is already a member of the %s guild' %(charname, in_guild)
|
||||||
else:
|
else:
|
||||||
message = 'No one is in the chair!'
|
message = 'No one is in the chair!'
|
||||||
else:
|
else:
|
||||||
print 'Guild Join Error: %s' %(guildname)
|
print 'Guild Join Error: %s' %(guildname)
|
||||||
message = 'Guild Join Error, please notify a DM'
|
message = 'Guild Join Error, please notify a DM'
|
||||||
|
|
||||||
whoami.Say(message)
|
whoami.Say(message)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,156 +1,157 @@
|
||||||
# Script for say event of guild member board
|
# Script for say event of guild member board
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
#
|
#
|
||||||
# authors: majorwoo josh@woosworld.net, Avion temitchell@sourceforge.net
|
# authors: majorwoo josh@woosworld.net, Avion temitchell@sourceforge.net
|
||||||
|
|
||||||
import Crossfire
|
import Crossfire
|
||||||
import CFGuilds
|
import CFGuilds
|
||||||
import CFLog
|
import CFLog
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import string
|
import string
|
||||||
|
|
||||||
activator=Crossfire.WhoIsActivator()
|
activator=Crossfire.WhoIsActivator()
|
||||||
activatorname=activator.Name
|
activatorname=activator.Name
|
||||||
whoami=Crossfire.WhoAmI()
|
whoami=Crossfire.WhoAmI()
|
||||||
isDM=activator.DungeonMaster
|
isDM=activator.DungeonMaster
|
||||||
|
|
||||||
log=CFLog.CFLog()
|
log=CFLog.CFLog()
|
||||||
guildname=Crossfire.ScriptParameters() # 6 is say event
|
guildname=Crossfire.ScriptParameters() # 6 is say event
|
||||||
print "Activated %s" %guildname
|
print "Activated %s" %guildname
|
||||||
|
|
||||||
if (guildname):
|
if (guildname):
|
||||||
guild = CFGuilds.CFGuild(guildname)
|
guild = CFGuilds.CFGuild(guildname)
|
||||||
guildhouse = CFGuilds.CFGuildHouses()
|
guildhouse = CFGuilds.CFGuildHouses()
|
||||||
text = string.split(Crossfire.WhatIsMessage())
|
text = string.split(Crossfire.WhatIsMessage())
|
||||||
|
|
||||||
if guild.info(activatorname) == 0 and isDM == 0:
|
if guild.info(activatorname) == 0 and isDM == 0:
|
||||||
message = 'You don\'t belong to this guild!'
|
message = 'You don\'t belong to this guild!'
|
||||||
elif text[0] == 'help' or text[0] == 'yes':
|
elif text[0] == 'help' or text[0] == 'yes':
|
||||||
if isDM:
|
if isDM:
|
||||||
message = '\nList of commands:\n-list\n-add <name>\n-remove <member>\n-info <member>\n-promote <member>\n-demote <member>\n-status <member> <status>\n-guildstatus <status>'
|
message = '\nList of commands:\n-list\n-add <name>\n-remove <member>\n-info <member>\n-promote <member>\n-demote <member>\n-status <member> <status>\n-guildstatus <status>'
|
||||||
else:
|
else:
|
||||||
message='\nList of commands:\n-list\n-remove <member>\n-info <member>\n-promote <member>\n-demote <member>\n-status <member> <status>'
|
message='\nList of commands:\n-list\n-remove <member>\n-info <member>\n-promote <member>\n-demote <member>\n-status <member> <status>'
|
||||||
|
|
||||||
elif text[0] == 'info':
|
elif text[0] == 'info':
|
||||||
if len(text)==2:
|
if len(text)==2:
|
||||||
record = guild.info(text[1])
|
record = guild.info(text[1])
|
||||||
if record:
|
if record:
|
||||||
message = '%s' %record
|
message = '%s' %record
|
||||||
else:
|
else:
|
||||||
message = '%s is not a member' %text[1]
|
message = '%s is not a member' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Usage "info <member_name>"'
|
message = 'Usage "info <member_name>"'
|
||||||
|
|
||||||
elif text[0] == 'remove':
|
elif text[0] == 'remove':
|
||||||
if len(text)==2:
|
if len(text)==2:
|
||||||
if guild.info(text[1]):
|
if guild.info(text[1]):
|
||||||
message = 'Removed %s from the guild' %text[1]
|
message = 'Removed %s from the guild' %text[1]
|
||||||
#delete them
|
#delete them
|
||||||
guild.remove_member(text[1])
|
guild.remove_member(text[1])
|
||||||
else:
|
else:
|
||||||
#if we didn't find them on the board
|
#if we didn't find them on the board
|
||||||
message = '%s was not a member' %text[1]
|
message = '%s was not a member' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Usage "remove <member_name>"'
|
message = 'Usage "remove <member_name>"'
|
||||||
|
|
||||||
elif text[0] == 'list':
|
elif text[0] == 'list':
|
||||||
list = guild.list_members()
|
list = guild.list_members()
|
||||||
for member in list:
|
for member in list:
|
||||||
activator.Write(member)
|
activator.Write(member)
|
||||||
message = 'Total members = ' + str(len(list))
|
message = 'Total members = ' + str(len(list))
|
||||||
|
|
||||||
elif text[0] == 'promote':
|
elif text[0] == 'promote':
|
||||||
if len(text)==2:
|
if len(text)==2:
|
||||||
record = guild.info(text[1])
|
record = guild.info(text[1])
|
||||||
if record:
|
if record:
|
||||||
if guild.promote_member(text[1]):
|
if guild.promote_member(text[1]):
|
||||||
record = guild.info(text[1]) #refresh record
|
record = guild.info(text[1]) #refresh record
|
||||||
message = '%s promoted to %s' %(text[1], record['Rank'])
|
message = '%s promoted to %s' %(text[1], record['Rank'])
|
||||||
else:
|
else:
|
||||||
message = 'You cannot promote %s' %text[1]
|
message = 'You cannot promote %s' %text[1]
|
||||||
else:
|
else:
|
||||||
message = '%s is not a member' %text[1]
|
message = '%s is not a member' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Usage "promote <member_name>"'
|
message = 'Usage "promote <member_name>"'
|
||||||
|
|
||||||
elif text[0] == 'demote':
|
elif text[0] == 'demote':
|
||||||
if len(text)==2:
|
if len(text)==2:
|
||||||
record = guild.info(text[1])
|
record = guild.info(text[1])
|
||||||
if record:
|
if record:
|
||||||
if guild.demote_member(text[1]):
|
if guild.demote_member(text[1]):
|
||||||
record = guild.info(text[1]) #refresh record
|
record = guild.info(text[1]) #refresh record
|
||||||
message = '%s demoted to %s' %(text[1], record['Rank'])
|
message = '%s demoted to %s' %(text[1], record['Rank'])
|
||||||
else:
|
else:
|
||||||
message = 'You cannot demote %s' %text[1]
|
message = 'You cannot demote %s' %text[1]
|
||||||
else:
|
else:
|
||||||
message = '%s is not a member' %text[1]
|
message = '%s is not a member' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Usage "demote <member_name>"'
|
message = 'Usage "demote <member_name>"'
|
||||||
|
|
||||||
elif text[0] == 'status':
|
elif text[0] == 'status':
|
||||||
if len(text)==3:
|
if len(text)==3:
|
||||||
record = guild.info(text[1])
|
record = guild.info(text[1])
|
||||||
if record:
|
if record:
|
||||||
if guild.change_status(text[1],text[2]):
|
if guild.change_status(text[1],text[2]):
|
||||||
record = guild.info(text[1]) #refresh record
|
record = guild.info(text[1]) #refresh record
|
||||||
message = '%s now has status of %s' %(text[1], record['Status'])
|
message = '%s now has status of %s' %(text[1], record['Status'])
|
||||||
else:
|
else:
|
||||||
message = '%s is not a valid status' %text[2]
|
message = '%s is not a valid status' %text[2]
|
||||||
else:
|
else:
|
||||||
message = '%s is not a member' %text[1]
|
message = '%s is not a member' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Usage "status <member_name> <status>\n%s"' %str(guild.status)
|
message = 'Usage "status <member_name> <status>\n%s"' %str(guild.status)
|
||||||
|
|
||||||
# DM commands
|
# DM commands
|
||||||
#add user directly
|
#add user directly
|
||||||
elif text[0] == 'add' and isDM:
|
elif text[0] == 'add' and isDM:
|
||||||
if len(text)==2:
|
if len(text)==2:
|
||||||
#check if they are a player
|
#check if they are a player
|
||||||
if log.info(text[1]):
|
if log.info(text[1]):
|
||||||
#see if they are on the board already
|
#see if they are on the board already
|
||||||
if guild.info(text[1]):
|
if guild.info(text[1]):
|
||||||
#already a member
|
#already a member
|
||||||
message = '%s is already a member.' %text[1]
|
message = '%s is already a member.' %text[1]
|
||||||
else:
|
else:
|
||||||
guild.add_member(text[1], 'Initiate')
|
guild.add_member(text[1], 'Initiate')
|
||||||
message = 'Added %s to the guild' %text[1]
|
message = 'Added %s to the guild' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Sorry, I don\'t know any %s' %text[1]
|
message = 'Sorry, I don\'t know any %s' %text[1]
|
||||||
else:
|
else:
|
||||||
message = 'Usage "add <membername>"'
|
message = 'Usage "add <membername>"'
|
||||||
|
|
||||||
#change guild status
|
#change guild status
|
||||||
elif text[0] == 'guildstatus' and isDM:
|
elif text[0] == 'guildstatus' and isDM:
|
||||||
if len(text)==2:
|
if len(text)==2:
|
||||||
record = guildhouse.info(guildname)
|
record = guildhouse.info(guildname)
|
||||||
if record:
|
if record:
|
||||||
if guildhouse.change_status(guildname,text[1]):
|
if guildhouse.change_status(guildname,text[1]):
|
||||||
record = guildhouse.info(text[1]) #refresh record
|
record = guildhouse.info(text[1]) #refresh record
|
||||||
message = '%s now has status of %s' %(guildname, record['Status'])
|
message = '%s now has status of %s' %(guildname, record['Status'])
|
||||||
else:
|
else:
|
||||||
message = '%s is not a valid status' %text[1]
|
message = '%s is not a valid status' %text[1]
|
||||||
else:
|
else:
|
||||||
message = '%s is not a guild' %guildname
|
message = '%s is not a guild' %guildname
|
||||||
else:
|
else:
|
||||||
message = 'Usage "guildstatus <status>\n%s"' %str(guildhouse.status)
|
message = 'Usage "guildstatus <status>\n%s"' %str(guildhouse.status)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
message = 'What did you need?'
|
message = 'What did you need?'
|
||||||
|
|
||||||
else:
|
else:
|
||||||
message = 'Board Error'
|
message = 'Board Error'
|
||||||
whoami.Say(message)
|
whoami.Say(message)
|
||||||
|
|
||||||
|
|
|
@ -3233,7 +3233,7 @@ arch marble
|
||||||
x 16
|
x 16
|
||||||
y 19
|
y 19
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 16
|
x 16
|
||||||
y 19
|
y 19
|
||||||
end
|
end
|
||||||
|
|
|
@ -233,7 +233,7 @@ end
|
||||||
arch potion_fire
|
arch potion_fire
|
||||||
x 7
|
x 7
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 8
|
x 8
|
||||||
end
|
end
|
||||||
arch potion_generic
|
arch potion_generic
|
||||||
|
|
|
@ -142,7 +142,7 @@ x 1
|
||||||
y 7
|
y 7
|
||||||
no_pick 1
|
no_pick 1
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 1
|
x 1
|
||||||
y 7
|
y 7
|
||||||
no_pick 1
|
no_pick 1
|
||||||
|
|
|
@ -3233,7 +3233,7 @@ arch marble
|
||||||
x 16
|
x 16
|
||||||
y 19
|
y 19
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
x 16
|
x 16
|
||||||
y 19
|
y 19
|
||||||
end
|
end
|
||||||
|
|
|
@ -933,7 +933,7 @@ arch ring
|
||||||
end
|
end
|
||||||
arch wiz_hat
|
arch wiz_hat
|
||||||
end
|
end
|
||||||
arch potion_invulnerability
|
arch potion_shielding
|
||||||
end
|
end
|
||||||
arch potion_magic
|
arch potion_magic
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue