Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
23 from time
import localtime, strftime, time
26 from CFDataFile
import CFDataFile, CFData
29 sys.path.append(os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(),
'templates',
'guild'))
30 from guilds
import guilds
31 guildlisting =
list(
map(
lambda x: x.id, guilds))
32 Crossfire.Log(Crossfire.LogDebug,
'Found guilds: %s' % guildlisting)
33 for guild
in guildlisting:
36 Crossfire.Log(Crossfire.LogInfo,
'New Guild: %s' %guild)
40 for guild
in guildlist:
41 memberlist =
CFGuild(guild).list_members()
42 for member
in memberlist:
48 '''Inter-Guild management class'''
51 guildhousesheader= [
'Founded_Date',
'Points',
'Status',
'Quest_points']
52 self.
status=[
'active',
'suspended',
'probation',
'inactive']
69 ,
'Founded_Date' :
'never'
71 ,
'Status' :
'inactive'
81 record = self.
info(name)
82 date = strftime(
"%a, %d %b %Y", localtime(
time()))
84 record[
'Founded_Date'] = date
85 record[
'Status'] =
'active'
92 record = self.
info(name)
95 record[
'Status'] = status
104 record = self.
info(name)
106 temp = int(record[
'Quest_points'])
107 if temp + number >= self.
qpcap:
111 record[
'Quest_points'] = temp
118 record = self.
info(name)
120 temp = int(record[
'Points'])
125 record[
'Points'] = temp
135 guildheader = [
'Join_date',
'Rank',
'Status',
'Dues',
'Demerits',
'Quest_points']
136 self.
ranks=[
'Initiate',
'Novice',
'Guildman',
'Journeyman',
'Master',
'GuildMaster']
137 self.
status=[
'suspended',
'probation',
'good']
145 date = strftime(
"%a, %d %b %Y", localtime(
time()))
182 record = self.
info(name)
184 temp = int(record[
'Demerits'])
189 record[
'Demerits'] = temp
196 record = self.
info(name)
198 temp = int(record[
'Demerits'])
199 if temp - number <=0:
203 record[
'Demerits'] = temp
210 record = self.
info(name)
212 temp = int(record[
'Quest_points'])
213 if temp + number >= self.
qpcap:
217 record[
'Quest_points'] = temp
224 record = self.
info(name)
226 temp = int(record[
'Dues'])
227 if temp + number >= self.
duescap:
231 record[
'Dues'] = temp
240 record = self.
info(name)
249 record = self.
info(name)
252 record[
'Status'] = status
261 record = self.
info(name)
263 currentrank = record[
'Rank']
264 if currentrank !=
'GuildMaster':
267 record[
'Rank'] = self.
ranks[newrank]
276 record = self.
info(name)
278 currentrank = record[
'Rank']
279 if currentrank !=
'Initiate':
281 Crossfire.Log(Crossfire.LogDebug,
"ranknum = %d"%ranknum)
283 record[
'Rank'] = self.
ranks[newrank]
def clear_dues(self, name, number)
def promote_member(self, name)
def add_member(self, name, rank)
non standard information is not specified or uptime this means how long since the executable has been started A particular host may have been running a server for quite a long time
def remove_demerits(self, name, number)
def change_status(self, name, status)
def change_status(self, name, status)
def add_guild(self, name)
def update_points(self, name, number)
def remove_member(self, name)
def establish(self, name)
def pay_dues(self, name, number)
def add_questpoints(self, name, number)
def demote_member(self, name)
def __init__(self, guildname)
How to Install a Crossfire Server on you must install a python script engine on your computer Python is the default script engine of Crossfire You can find the python engine you have only to install them The VisualC Crossfire settings are for but you habe then to change the pathes in the VC settings Go in Settings C and Settings Link and change the optional include and libs path to the new python installation path o except the maps ! You must download a map package and install them the share folder Its must look like doubleclick on crossfire32 dsw There are projects in your libcross lib and plugin_python You need to compile all Easiest way is to select the plugin_python ReleaseLog as active this will compile all others too Then in Visual C press< F7 > to compile If you don t have an appropriate compiler you can try to get the the VC copies the crossfire32 exe in the crossfire folder and the plugin_python dll in the crossfire share plugins folder we will remove it when we get time for it o Last showing lots of weird write to the Crossfire mailing list
def add_demerits(self, name, number)
def add_questpoints(self, name, number)