Scripted house (in Navar), first version.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@6063 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
d136b2427b
commit
93ee7c5d4b
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
|||
import Crossfire
|
||||
import random
|
||||
|
||||
obj = Crossfire.WhoAmI()
|
||||
|
||||
Crossfire.SetReturnValue(1)
|
||||
|
||||
messages = ["Midane says: I don't see what could interest you in this %s.",
|
||||
"Midane says: Trust me, there is nothing interesting in this %s.",
|
||||
"Midane says: Leave this poor %s alone!"
|
||||
]
|
||||
|
||||
obj.Map.Print(messages[random.randint(0, len(messages)-1)] %obj.Name, Crossfire.MessageFlag.NDI_NAVY + Crossfire.MessageFlag.NDI_UNIQUE)
|
|
@ -0,0 +1,30 @@
|
|||
import Crossfire
|
||||
|
||||
def do_repel():
|
||||
who.Say("%s, you're too violent, get out of here IMMEDIATELY!"%pl.Name)
|
||||
|
||||
ex = who.Map.ObjectAt(exit_x, exit_y)
|
||||
while ex:
|
||||
if ex.Type == Crossfire.Type.EXIT:
|
||||
map = Crossfire.ReadyMap(ex.Slaying)
|
||||
if map:
|
||||
pl.Teleport(map, ex.HP, ex.SP)
|
||||
pl.Write('You feel a powerful force repel you!', Crossfire.MessageFlag.NDI_UNIQUE + Crossfire.MessageFlag.NDI_ORANGE)
|
||||
return
|
||||
ex = ex.Above
|
||||
|
||||
|
||||
Crossfire.SetReturnValue(1)
|
||||
|
||||
who = Crossfire.WhoAmI()
|
||||
who.HP = who.MaxHP
|
||||
|
||||
exit_x = 5
|
||||
exit_y = 1
|
||||
|
||||
pl = Crossfire.WhoIsActivator()
|
||||
while pl.Owner != None:
|
||||
pl = pl.Owner
|
||||
|
||||
if pl.Map == who.Map:
|
||||
do_repel()
|
|
@ -0,0 +1,17 @@
|
|||
import Crossfire
|
||||
import random
|
||||
|
||||
obj = Crossfire.WhoAmI()
|
||||
|
||||
Crossfire.SetReturnValue(1)
|
||||
|
||||
messages = ["Midane says: %p, you thief! Leave this %i where it is!",
|
||||
"Midane says: Tell me, %p, what do you plan to do with this %i?",
|
||||
"Midane says: I'm sure you don't need any %i, do you, %p?"
|
||||
]
|
||||
|
||||
msg = messages[random.randint(0, len(messages)-1)]
|
||||
msg = msg.replace('%i', obj.Name)
|
||||
msg = msg.replace('%p', Crossfire.WhoIsActivator().Name)
|
||||
|
||||
obj.Map.Print(msg, Crossfire.MessageFlag.NDI_NAVY + Crossfire.MessageFlag.NDI_UNIQUE)
|
|
@ -0,0 +1,47 @@
|
|||
# Script for Midane's house.
|
||||
#
|
||||
# Copyright 2007 Nicolas Weeger
|
||||
# Released as GPL
|
||||
|
||||
import Crossfire
|
||||
import CFDataFile
|
||||
|
||||
who = Crossfire.WhoAmI()
|
||||
|
||||
data = CFDataFile.CFData('midane', ['state'])
|
||||
|
||||
if not Crossfire.GetPrivateDictionary().has_key('on_map'):
|
||||
on_map = []
|
||||
Crossfire.GetPrivateDictionary()['on_map'] = on_map
|
||||
else:
|
||||
on_map = Crossfire.GetPrivateDictionary()['on_map']
|
||||
|
||||
def check_player(player):
|
||||
|
||||
if player in on_map:
|
||||
return
|
||||
|
||||
on_map.append(player)
|
||||
|
||||
if not data.exist(player.Name):
|
||||
who.Say('Well, welcome, stranger.')
|
||||
record = { '#' : player.Name,
|
||||
'state' : 'seen' }
|
||||
data.put_record(record)
|
||||
return
|
||||
|
||||
record = data.get_record(player.Name)
|
||||
if record['state'] == 'seen':
|
||||
who.Say('Welcome back, stranger.')
|
||||
return
|
||||
|
||||
who.Say('Welcome back, %s'%player.Name)
|
||||
|
||||
def on_time():
|
||||
for player in Crossfire.GetPlayers():
|
||||
if player.Map == who.Map:
|
||||
check_player(player)
|
||||
elif on_map.count(player) != 0:
|
||||
on_map.remove(player)
|
||||
|
||||
on_time()
|
|
@ -9529,6 +9529,10 @@ arch cobblestones2
|
|||
x 36
|
||||
y 43
|
||||
end
|
||||
arch city_tower_west
|
||||
x 36
|
||||
y 43
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 36
|
||||
y 44
|
||||
|
@ -9582,6 +9586,15 @@ arch cobblestones2
|
|||
x 36
|
||||
y 48
|
||||
end
|
||||
arch city_tower_west
|
||||
name Tower of Illusions
|
||||
name_pl Tower of Illusions
|
||||
slaying /navar_city/illusion/illtow1
|
||||
hp 17
|
||||
sp 17
|
||||
x 36
|
||||
y 48
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 36
|
||||
y 49
|
||||
|
@ -9877,6 +9890,14 @@ x 37
|
|||
y 39
|
||||
move_block all
|
||||
end
|
||||
arch collesium
|
||||
name Collesium
|
||||
slaying /navar_city/collosium
|
||||
hp 17
|
||||
sp 22
|
||||
x 37
|
||||
y 39
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 37
|
||||
y 40
|
||||
|
@ -10145,6 +10166,10 @@ arch grass
|
|||
x 38
|
||||
y 29
|
||||
end
|
||||
arch city_tower_west
|
||||
x 38
|
||||
y 29
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 38
|
||||
y 30
|
||||
|
@ -10197,6 +10222,10 @@ arch grass
|
|||
x 38
|
||||
y 35
|
||||
end
|
||||
arch city_tower_west
|
||||
x 38
|
||||
y 35
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 38
|
||||
y 36
|
||||
|
@ -10506,6 +10535,10 @@ arch grass
|
|||
x 39
|
||||
y 29
|
||||
end
|
||||
arch house_larg_west
|
||||
x 39
|
||||
y 29
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 39
|
||||
y 30
|
||||
|
@ -11006,6 +11039,13 @@ arch grass
|
|||
x 40
|
||||
y 45
|
||||
end
|
||||
arch house_long
|
||||
slaying /navar_city/city1houses
|
||||
hp 7
|
||||
sp 19
|
||||
x 40
|
||||
y 45
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 40
|
||||
y 46
|
||||
|
@ -11241,6 +11281,10 @@ arch grass
|
|||
x 41
|
||||
y 31
|
||||
end
|
||||
arch capitalhold_west
|
||||
x 41
|
||||
y 31
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 41
|
||||
y 32
|
||||
|
@ -11413,6 +11457,13 @@ arch grass
|
|||
x 41
|
||||
y 47
|
||||
end
|
||||
arch house_long
|
||||
slaying /navar_city/city1houses2
|
||||
hp 28
|
||||
sp 22
|
||||
x 41
|
||||
y 47
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 41
|
||||
y 48
|
||||
|
@ -12054,6 +12105,15 @@ arch grass
|
|||
x 43
|
||||
y 39
|
||||
end
|
||||
arch guild_west
|
||||
name Casino Infernal
|
||||
name_pl Casino Infernal
|
||||
slaying /navar_city/casino_infernal/casino_infernal1
|
||||
hp 15
|
||||
sp 28
|
||||
x 43
|
||||
y 39
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 43
|
||||
y 40
|
||||
|
@ -12781,6 +12841,14 @@ arch grass
|
|||
x 45
|
||||
y 39
|
||||
end
|
||||
arch temple1
|
||||
name Temple of Gorokh
|
||||
slaying /navar_city/temples/gorokh
|
||||
hp 7
|
||||
sp 13
|
||||
x 45
|
||||
y 39
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 45
|
||||
y 40
|
||||
|
@ -12805,6 +12873,13 @@ arch grass
|
|||
x 45
|
||||
y 42
|
||||
end
|
||||
arch house_long
|
||||
slaying /navar_city/city1houses
|
||||
hp 16
|
||||
sp 7
|
||||
x 45
|
||||
y 42
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 45
|
||||
y 43
|
||||
|
@ -13492,6 +13567,10 @@ arch grass
|
|||
x 47
|
||||
y 39
|
||||
end
|
||||
arch t_house2
|
||||
x 47
|
||||
y 39
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 47
|
||||
y 40
|
||||
|
@ -13749,6 +13828,10 @@ arch grass
|
|||
x 48
|
||||
y 29
|
||||
end
|
||||
arch city_tower_west
|
||||
x 48
|
||||
y 29
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 48
|
||||
y 30
|
||||
|
@ -13801,6 +13884,10 @@ arch grass
|
|||
x 48
|
||||
y 35
|
||||
end
|
||||
arch city_tower_west
|
||||
x 48
|
||||
y 35
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 48
|
||||
y 36
|
||||
|
@ -14235,6 +14322,14 @@ arch grass
|
|||
x 49
|
||||
y 39
|
||||
end
|
||||
arch house_up
|
||||
name Large house
|
||||
slaying /navar_city/misc/midane
|
||||
hp 6
|
||||
sp 2
|
||||
x 49
|
||||
y 39
|
||||
end
|
||||
arch dungeon_magic
|
||||
x 49
|
||||
y 40
|
||||
|
@ -14322,94 +14417,3 @@ arch cobblestones2
|
|||
x 49
|
||||
y 49
|
||||
end
|
||||
arch city_tower_west
|
||||
x 36
|
||||
y 43
|
||||
end
|
||||
arch city_tower_west
|
||||
name Tower of Illusions
|
||||
name_pl Tower of Illusions
|
||||
slaying /navar_city/illusion/illtow1
|
||||
hp 17
|
||||
sp 17
|
||||
x 36
|
||||
y 48
|
||||
end
|
||||
arch collesium
|
||||
name Collesium
|
||||
slaying /navar_city/collosium
|
||||
hp 17
|
||||
sp 22
|
||||
x 37
|
||||
y 39
|
||||
end
|
||||
arch city_tower_west
|
||||
x 38
|
||||
y 29
|
||||
end
|
||||
arch city_tower_west
|
||||
x 38
|
||||
y 35
|
||||
end
|
||||
arch house_larg_west
|
||||
x 39
|
||||
y 29
|
||||
end
|
||||
arch house_long
|
||||
slaying /navar_city/city1houses
|
||||
hp 7
|
||||
sp 19
|
||||
x 40
|
||||
y 45
|
||||
end
|
||||
arch capitalhold_west
|
||||
x 41
|
||||
y 31
|
||||
end
|
||||
arch house_long
|
||||
slaying /navar_city/city1houses2
|
||||
hp 28
|
||||
sp 22
|
||||
x 41
|
||||
y 47
|
||||
end
|
||||
arch guild_west
|
||||
name Casino Infernal
|
||||
name_pl Casino Infernal
|
||||
slaying /navar_city/casino_infernal/casino_infernal1
|
||||
hp 15
|
||||
sp 28
|
||||
x 43
|
||||
y 39
|
||||
end
|
||||
arch temple1
|
||||
name Temple of Gorokh
|
||||
slaying /navar_city/temples/gorokh
|
||||
hp 7
|
||||
sp 13
|
||||
x 45
|
||||
y 39
|
||||
end
|
||||
arch house_long
|
||||
slaying /navar_city/city1houses
|
||||
hp 16
|
||||
sp 7
|
||||
x 45
|
||||
y 42
|
||||
end
|
||||
arch t_house2
|
||||
x 47
|
||||
y 39
|
||||
end
|
||||
arch city_tower_west
|
||||
x 48
|
||||
y 29
|
||||
end
|
||||
arch city_tower_west
|
||||
x 48
|
||||
y 35
|
||||
end
|
||||
arch house_up
|
||||
x 49
|
||||
y 39
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue