| version 1.1 | | version 1.2 |
|---|
| | |
| # | | # |
| # authors: majorwoo josh@woosworld.net, Avion temitchell@sourceforge.net | | # authors: majorwoo josh@woosworld.net, Avion temitchell@sourceforge.net |
| | | |
| import CFPython | | import Crossfire |
| import CFGuilds | | import CFGuilds |
| | | |
| import sys | | import sys |
| import string | | import string |
| | | |
| activator=CFPython.WhoIsActivator() | | activator=Crossfire.WhoIsActivator() |
| activatorname=CFPython.GetName(activator) | | activatorname=activator.Name |
| mymap = CFPython.GetMap(activator) | | mymap = activator.Map |
| x=15 | | x=15 |
| y=29 | | y=29 |
| whoami=CFPython.WhoAmI() | | whoami=Crossfire.WhoAmI() |
| guildname=CFPython.GetEventOptions(whoami,6) # 6 is say event | | guildname=Crossfire.ScriptParameters() # 6 is say event |
| | | |
| if (guildname): | | if (guildname): |
| | | |
| guild = CFGuilds.CFGuild(guildname) | | guild = CFGuilds.CFGuild(guildname) |
| text = string.split(CFPython.WhatIsMessage()) | | text = string.split(Crossfire.WhatIsMessage()) |
| guildrecord = CFGuilds.CFGuildHouses().info(guildname) | | guildrecord = CFGuilds.CFGuildHouses().info(guildname) |
| found = 0 | | found = 0 |
| if text[0] == 'enter' or text[0] == 'Enter': | | if text[0] == 'enter' or text[0] == 'Enter': |
| | |
| | | |
| else: | | else: |
| if guildrecord['Status'] == 'probation': | | if guildrecord['Status'] == 'probation': |
| CFPython.Write('This guild is currently under probation.\nPlease see a DM for more information', activator) | | activator.Write('This guild is currently under probation.\nPlease see a DM for more information' |
| | | |
| record = guild.info(activatorname) #see if they are on the board | | record = guild.info(activatorname) #see if they are on the board |
| if record: | | if record: |
| | |
| y=22 | | y=22 |
| else: | | else: |
| message = 'You try my patience %s. BEGONE!' %activatorname | | message = 'You try my patience %s. BEGONE!' %activatorname |
| CFPython.Teleport(activator,mymap,int(x),int(y)) #teleport them | | activator.Teleport(mymap,int(x),int(y)) #teleport them |
| | | |
| elif text[0] == 'buy' or text[0] == 'Buy': | | elif text[0] == 'buy' or text[0] == 'Buy': |
| if guildrecord['Status'] == 'inactive': | | if guildrecord['Status'] == 'inactive': |
| | |
| x = 30 | | x = 30 |
| y = 22 | | y = 22 |
| message = "Proceed, but know ye that three are required to found a guild and the cost is high" | | message = "Proceed, but know ye that three are required to found a guild and the cost is high" |
| CFPython.Teleport(activator,mymap,int(x),int(y)) #teleport them | | activator.Teleport(mymap,int(x),int(y)) #teleport them |
| else: | | else: |
| message = "Sorry you already belong to the %s guild. You must quit that guild before founding your own." %in_guild | | message = "Sorry you already belong to the %s guild. You must quit that guild before founding your own." %in_guild |
| else: | | else: |
| | |
| else: | | else: |
| message = 'Guild Guardian Error, please notify a DM' | | message = 'Guild Guardian Error, please notify a DM' |
| | | |
| CFPython.Say(whoami,message) | | whoami.Say(message) |
| | | |