Add a sage to scorn castle who will record the rank and title of the players who pass by.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13373 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
2e1f919c58
commit
83c7fcac20
|
@ -0,0 +1,40 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2010 The Crossfire Development Team
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
import Crossfire
|
||||||
|
import CFDataFile
|
||||||
|
|
||||||
|
player = Crossfire.WhoIsActivator()
|
||||||
|
|
||||||
|
nobledata = CFDataFile.CFData('scorn_nobility', ['rank', 'title'])
|
||||||
|
currentstep = player.QuestGetState("scorn/Aristocracy")
|
||||||
|
currentrecord = { '#' : player.Name, 'rank' : currentstep, 'title' : player.Title }
|
||||||
|
lastrecord = nobledata.get_record(player.Name)
|
||||||
|
Crossfire.Log(Crossfire.LogDebug, "castle_write: previous record %s, new record %s." % (lastrecord, currentrecord))
|
||||||
|
if lastrecord == 0:
|
||||||
|
lastrecord = { '#' : player.Name, 'rank' : -10, 'title' : 'The Default' }
|
||||||
|
if currentrecord['rank'] > 0 and currentrecord['rank'] == int(lastrecord['rank']) and currentrecord['title'] == lastrecord['title']:
|
||||||
|
Crossfire.Log(Crossfire.LogDebug, "castle_write, no update needed for player %s." % player.Name)
|
||||||
|
else:
|
||||||
|
Crossfire.Log(Crossfire.LogDebug, "castle_write, updating player %s, old state %s, new state %d" %(player.Name, lastrecord['rank'], currentstep))
|
||||||
|
nobledata.put_record(currentrecord)
|
||||||
|
player.Message("The castle sage scribbles as you walk past")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ enter_x 11
|
||||||
enter_y 20
|
enter_y 20
|
||||||
msg
|
msg
|
||||||
Created: 1997-04-27
|
Created: 1997-04-27
|
||||||
Modified: 2010-05-04 Cavesomething
|
Modified: 2010-06-07 Cavesomething
|
||||||
endmsg
|
endmsg
|
||||||
maplore
|
maplore
|
||||||
@quest Lursendis
|
@quest Lursendis
|
||||||
|
@ -1691,6 +1691,15 @@ title Python
|
||||||
slaying python/quests/QuestTriggerConnect.py
|
slaying python/quests/QuestTriggerConnect.py
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
arch check_floor
|
||||||
|
hp 1
|
||||||
|
x 11
|
||||||
|
y 15
|
||||||
|
arch event_trigger
|
||||||
|
title Python
|
||||||
|
slaying python/maps/scorn/castle_write.py
|
||||||
|
end
|
||||||
|
end
|
||||||
arch cobblestones2
|
arch cobblestones2
|
||||||
x 11
|
x 11
|
||||||
y 16
|
y 16
|
||||||
|
@ -1937,6 +1946,15 @@ title Python
|
||||||
slaying python/quests/QuestTriggerConnect.py
|
slaying python/quests/QuestTriggerConnect.py
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
arch check_floor
|
||||||
|
hp 1
|
||||||
|
x 12
|
||||||
|
y 15
|
||||||
|
arch event_trigger
|
||||||
|
title Python
|
||||||
|
slaying python/maps/scorn/castle_write.py
|
||||||
|
end
|
||||||
|
end
|
||||||
arch cobblestones2
|
arch cobblestones2
|
||||||
x 12
|
x 12
|
||||||
y 16
|
y 16
|
||||||
|
@ -2107,6 +2125,13 @@ arch cobblestones2
|
||||||
x 13
|
x 13
|
||||||
y 14
|
y 14
|
||||||
end
|
end
|
||||||
|
arch sage
|
||||||
|
name castle scribe
|
||||||
|
x 13
|
||||||
|
y 14
|
||||||
|
type 0
|
||||||
|
stand_still 1
|
||||||
|
end
|
||||||
arch magic_mouth
|
arch magic_mouth
|
||||||
msg
|
msg
|
||||||
The guards bow to the Noble of Scorn
|
The guards bow to the Noble of Scorn
|
||||||
|
|
Loading…
Reference in New Issue