[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-wastesedge-commits] Release_0-3-1 cfc73d0 039/237: ADDED Alek
From: |
Kai Sterker |
Subject: |
[adonthell-wastesedge-commits] Release_0-3-1 cfc73d0 039/237: ADDED Alek Endhelm |
Date: |
Mon, 25 Jul 2016 18:14:55 +0000 (UTC) |
tag: Release_0-3-1
commit cfc73d025ba6dd916936eba22e1298264b1220fb
Author: adondev <adondev>
Commit: adondev <adondev>
ADDED Alek Endhelm
---
scripts/dialogues/Makefile.am | 2 +-
scripts/dialogues/alek_start.py | 447 +++++++++++++++++++++++++++++++++++++
scripts/dialogues/orloth_start.py | 2 +
scripts/init.py | 10 +
scripts/schedules/Makefile.am | 3 +-
scripts/schedules/alek.py | 57 +++++
6 files changed, 519 insertions(+), 2 deletions(-)
diff --git a/scripts/dialogues/Makefile.am b/scripts/dialogues/Makefile.am
index 941182d..10c2b51 100755
--- a/scripts/dialogues/Makefile.am
+++ b/scripts/dialogues/Makefile.am
@@ -2,7 +2,7 @@ pkgdatadir = $(gamedatadir)/scripts/dialogues
pkgdata_DATA = orloth_start.py lucia_start.py sarin_start.py \
janesta_start.py erek_start.py oliver_start.py bjarn_start.py \
- frostbloom_start.py talan_start.py
+ frostbloom_start.py talan_start.py alek_start.py
EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/dialogues/alek_start.py b/scripts/dialogues/alek_start.py
new file mode 100755
index 0000000..afb7ecc
--- /dev/null
+++ b/scripts/dialogues/alek_start.py
@@ -0,0 +1,447 @@
+class alek_start:
+ loop = []
+ strings = ["And who do we have here? A damn freak Half-Elf I say!",
"That's $name, you ass! I'm working for Lady Silverhair.", "For Lady
Silverhair, eh? Now that scares the shit out of me, Half-Elf. Go and bother
somebody else!", "I'll be damned if that's not our freakish Half-Elf! Still
pokin' your nose in other peoples business?", "Listen! Need we really go
through all this crap again?", "You're getting on my nerves, Half-Elf. Go ahead
then, ask your stupid questions.", "I don't li [...]
+
+ def set_name (self, new_name):
+ pass
+
+ def set_npc (self, new_npc):
+ pass
+
+ def set_portrait (self, new_portrait):
+ pass
+
+ def __init__(self):
+ self.dialogue = [self.start, self.answer1, self.answer4, self.answer6,
self.answer8, self.answer9, self.answer11, self.answer13, self.answer14,
self.answer15, self.answer16, self.answer18, self.answer19, self.answer22,
self.answer23, self.answer27, self.answer28, self.answer29, self.answer31,
self.answer32, self.answer34, self.answer36, self.answer37, self.answer38,
self.answer39, self.answer40, self.answer42, self.answer44, self.answer45,
self.answer46, self.answer48, self.answe [...]
+
+ def clear (self):
+ del self.dialogue
+
+ def __getattr__ (self, name):
+ return 0
+
+ def run (self, answer):
+ self.npc = []
+ self.player = []
+ self.cont = []
+ self.dialogue[answer]()
+
+ def start (self):
+ if the_npc.get_val ("talked_to") == 0:
+
+ self.color = 0
+ self.npc.append (56)
+ self.cont.append (33)
+ self.player.append (-1)
+ else:
+
+ self.color = 0
+ self.npc.append (68)
+ self.cont.append (38)
+ self.player.append (-1)
+
+ def answer68 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (3)
+ self.cont.append (-1)
+ self.player.append (4)
+ self.cont.append (2)
+ self.player.append (-1)
+
+ def answer4 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (5)
+ self.cont.append (-1)
+ self.player.append (23)
+ self.cont.append (14)
+ if not self.eavesdrop and quests["demo"].get_val
("know_alek_eavesdrop"):
+
+ self.player.append (54)
+ self.cont.append (32)
+ if quests["demo"].get_val ("know_aleks_room") == 1:
+
+ self.player.append (40)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer40 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (41)
+ self.cont.append (-1)
+ self.player.append (42)
+ self.cont.append (26)
+ self.player.append (-1)
+
+ def answer42 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (43)
+ self.cont.append (-1)
+ self.player.append (44)
+ self.cont.append (27)
+ self.player.append (45)
+ self.cont.append (28)
+ self.player.append (46)
+ self.cont.append (29)
+ self.player.append (-1)
+
+ def answer46 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (47)
+ self.cont.append (-1)
+ self.player.append (48)
+ self.cont.append (30)
+ self.player.append (-1)
+
+ def answer48 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (49)
+ self.cont.append (-1)
+ quests["demo"].set_val ("ask_packed_gems" , 1)
+
+ self.player.append (44)
+ self.cont.append (27)
+ self.player.append (45)
+ self.cont.append (28)
+ self.player.append (-1)
+
+ def answer45 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (50)
+ self.cont.append (-1)
+ self.player.append (66)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer66 (self):
+ pass
+
+ def answer44 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (51)
+ self.cont.append (-1)
+ self.player.append (59)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer59 (self):
+ pass
+
+ def answer54 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (61)
+ self.cont.append (-1)
+ self.player.append (53)
+ self.cont.append (31)
+ self.player.append (-1)
+
+ def answer53 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (62)
+ self.cont.append (-1)
+ self.player.append (63)
+ self.cont.append (36)
+ self.player.append (44)
+ self.cont.append (27)
+ self.player.append (-1)
+
+ def answer63 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (24)
+ self.cont.append (-1)
+ self.player.append (66)
+ self.cont.append (-1)
+ if quests["demo"].get_val ("bjarn_door_open") == 3:
+
+ self.player.append (64)
+ self.cont.append (37)
+ self.player.append (-1)
+
+ def answer64 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (65)
+ self.cont.append (-1)
+ self.player.append (67)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer67 (self):
+ pass
+
+ def answer23 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (25)
+ self.cont.append (-1)
+ self.player.append (36)
+ self.cont.append (21)
+ self.player.append (-1)
+
+ def answer36 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (26)
+ self.cont.append (-1)
+ self.player.append (27)
+ self.cont.append (15)
+ self.player.append (28)
+ self.cont.append (16)
+ self.loop.append (28)
+ self.player.append (-1)
+
+ def answer28 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (55)
+ self.cont.append (-1)
+ self.player.append (29)
+ self.cont.append (17)
+ self.player.append (57)
+ self.cont.append (34)
+ self.player.append (-1)
+
+ def answer57 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (58)
+ self.cont.append (-1)
+ self.player.append (59)
+ self.cont.append (-1)
+ self.player.append (60)
+ self.cont.append (35)
+ self.player.append (-1)
+
+ def answer60 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (30)
+ self.cont.append (-1)
+ self.player.append (32)
+ self.cont.append (19)
+ self.player.append (34)
+ self.cont.append (20)
+ self.player.append (-1)
+
+ def answer34 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (35)
+ self.cont.append (-1)
+ self.player.append (38)
+ self.cont.append (23)
+ if not self.eavesdrop and quests["demo"].get_val
("know_alek_eavesdrop"):
+
+ self.player.append (54)
+ self.cont.append (32)
+ if quests["demo"].get_val ("know_aleks_room") == 1:
+
+ self.player.append (40)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer38 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (39)
+ self.cont.append (24)
+ self.player.append (-1)
+
+ def answer39 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (52)
+ self.cont.append (-1)
+ self.player.append (66)
+ self.cont.append (-1)
+ self.player.append (-1)
+
+ def answer32 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (31)
+ self.cont.append (18)
+ self.player.append (-1)
+
+ def answer31 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (33)
+ self.cont.append (-1)
+ self.player.append (38)
+ self.cont.append (23)
+ if not self.eavesdrop and quests["demo"].get_val
("know_alek_eavesdrop"):
+
+ self.player.append (54)
+ self.cont.append (32)
+ if quests["demo"].get_val ("know_aleks_room") == 1:
+
+ self.player.append (40)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer29 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (30)
+ self.cont.append (-1)
+ self.player.append (32)
+ self.cont.append (19)
+ self.player.append (34)
+ self.cont.append (20)
+ self.player.append (-1)
+
+ def answer27 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (30)
+ self.cont.append (-1)
+ self.player.append (32)
+ self.cont.append (19)
+ self.player.append (34)
+ self.cont.append (20)
+ self.player.append (-1)
+
+ def answer56 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (0)
+ self.cont.append (-1)
+ self.player.append (1)
+ self.cont.append (1)
+ self.player.append (6)
+ self.cont.append (3)
+ self.player.append (-1)
+
+ def answer6 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (7)
+ self.cont.append (-1)
+ self.player.append (8)
+ self.cont.append (4)
+ self.player.append (9)
+ self.cont.append (5)
+ self.player.append (-1)
+
+ def answer9 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (10)
+ self.cont.append (-1)
+ self.player.append (11)
+ self.cont.append (6)
+ self.player.append (-1)
+
+ def answer11 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (12)
+ self.cont.append (-1)
+ self.player.append (13)
+ self.cont.append (7)
+ if quests["demo"].get_val ("know_alek_eavesdrop"):
+
+ self.player.append (14)
+ self.cont.append (8)
+ self.player.append (-1)
+
+ def answer14 (self):
+ self.eavesdrop = 1
+
+ self.color = the_npc.get_color()
+ self.npc.append (15)
+ self.cont.append (9)
+ self.player.append (-1)
+
+ def answer15 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (16)
+ self.cont.append (10)
+ self.player.append (-1)
+
+ def answer16 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (21)
+ self.cont.append (-1)
+ self.player.append (22)
+ self.cont.append (13)
+ self.player.append (53)
+ self.cont.append (31)
+ self.player.append (-1)
+
+ def answer22 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (20)
+ self.cont.append (-1)
+ self.player.append (23)
+ self.cont.append (14)
+ if not self.eavesdrop and quests["demo"].get_val
("know_alek_eavesdrop"):
+
+ self.player.append (54)
+ self.cont.append (32)
+ if quests["demo"].get_val ("know_aleks_room") == 1:
+
+ self.player.append (40)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer13 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (20)
+ self.cont.append (-1)
+ self.player.append (23)
+ self.cont.append (14)
+ if not self.eavesdrop and quests["demo"].get_val
("know_alek_eavesdrop"):
+
+ self.player.append (54)
+ self.cont.append (32)
+ if quests["demo"].get_val ("know_aleks_room") == 1:
+
+ self.player.append (40)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer8 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (17)
+ self.cont.append (-1)
+ self.player.append (18)
+ self.cont.append (11)
+ self.player.append (19)
+ self.cont.append (12)
+ self.player.append (-1)
+
+ def answer19 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (20)
+ self.cont.append (-1)
+ self.player.append (23)
+ self.cont.append (14)
+ if not self.eavesdrop and quests["demo"].get_val
("know_alek_eavesdrop"):
+
+ self.player.append (54)
+ self.cont.append (32)
+ if quests["demo"].get_val ("know_aleks_room") == 1:
+
+ self.player.append (40)
+ self.cont.append (25)
+ self.player.append (-1)
+
+ def answer18 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (2)
+ self.cont.append (-1)
+ work = quests["demo"].get_val ("work_4_shair")
+ work = work | 2
+ quests["demo"].set_val ("work_4_shair" , work)
+
+ self.player.append (37)
+ self.cont.append (22)
+ self.player.append (-1)
+
+ def answer37 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (12)
+ self.cont.append (-1)
+ self.player.append (13)
+ self.cont.append (7)
+ if quests["demo"].get_val ("know_alek_eavesdrop"):
+
+ self.player.append (14)
+ self.cont.append (8)
+ self.player.append (-1)
+
+ def answer1 (self):
+ self.color = the_npc.get_color()
+ self.npc.append (2)
+ self.cont.append (-1)
+ work = quests["demo"].get_val ("work_4_shair")
+ work = work | 2
+ quests["demo"].set_val ("work_4_shair" , work)
+
+ self.player.append (37)
+ self.cont.append (22)
+ self.player.append (-1)
diff --git a/scripts/dialogues/orloth_start.py
b/scripts/dialogues/orloth_start.py
index 0cebdee..5add552 100755
--- a/scripts/dialogues/orloth_start.py
+++ b/scripts/dialogues/orloth_start.py
@@ -390,6 +390,8 @@ class orloth_start:
self.color = the_npc.get_color()
self.npc.append (14)
self.cont.append (-1)
+ quests["demo"].set_val ("know_aleks_room" , 1)
+
self.player.append (15)
self.cont.append (11)
self.player.append (16)
diff --git a/scripts/init.py b/scripts/init.py
index 1471e6d..a9a8205 100755
--- a/scripts/init.py
+++ b/scripts/init.py
@@ -572,6 +572,16 @@ if retval < 5:
talan.stand_north ()
talan.set_schedule ("talan")
+ # -- that's a clone for now
+ alek = characters ["Alek Endhelm"]
+ alek.set_dialogue ("dialogues/alek_start")
+ alek.load ("servant2.mchar")
+ alek.set_map (map_engine.get_landmap ())
+ alek.jump_to (1, 1, 3)
+ alek.set_action ("action_talk")
+ alek.stand_south ()
+ alek.set_schedule ("alek")
+
oliver = characters ["Oliver Redwyne"]
oliver.set_dialogue ("dialogues/oliver_start")
oliver.load ("oliver.mchar")
diff --git a/scripts/schedules/Makefile.am b/scripts/schedules/Makefile.am
index bec143d..315bbf4 100755
--- a/scripts/schedules/Makefile.am
+++ b/scripts/schedules/Makefile.am
@@ -1,6 +1,7 @@
pkgdatadir = $(gamedatadir)/scripts/schedules
pkgdata_DATA = action_talk.py center_player.py keyboard_control.py orloth.py \
- sarin.py frostbloom.py silverhair.py oliver.py erek.py talan.py
+ sarin.py frostbloom.py silverhair.py oliver.py erek.py talan.py \
+ alek.py
EXTRA_DIST = $(pkgdata_DATA)
diff --git a/scripts/schedules/alek.py b/scripts/schedules/alek.py
new file mode 100755
index 0000000..7d7fccf
--- /dev/null
+++ b/scripts/schedules/alek.py
@@ -0,0 +1,57 @@
+#
+# (C) Copyright 2001 Kai Sterker <address@hidden>
+# Part of the Adonthell Project http://adonthell.linuxgames.com
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY.
+#
+# See the COPYING file for more details
+#
+
+# -- Movement schedule for Alek Endhelm
+#
+# He'll walk between his table and the bar
+
+import schedules
+import random
+
+speech = [" More Ale!", \
+ "I'll cut 'em open like ripe fruits.", \
+ "They should sort out this business like real men!"]
+
+todo = myself.get_val ("switch_direction")
+
+# -- calculate a new direction
+if todo == 0:
+ # -- the time we stay at one side of the gata
+ delay = random.randint (60, 150) * 20
+
+ # -- walk to table
+ if myself.posx () == 1:
+ myself.set_val ("switch_direction", -delay)
+
+ # -- walk to bar
+ else:
+ myself.set_val ("switch_direction", delay)
+
+# -- walk to table
+elif todo < 0:
+ myself.set_val ("switch_direction", todo + 1)
+ if schedules.simple_goto_xy (myself, 12, 5) == 1:
+ myself.stand_north ()
+
+# -- walk to bar
+else:
+ myself.set_val ("switch_direction", todo - 1)
+ if schedules.simple_goto_xy (myself, 1, 3) == 1:
+ myself.stand_south ()
+
+# -- utter a random remark
+tmp = myself.get_val ("say_something")
+myself.set_val ("say_something", tmp - 1)
+if tmp == 0:
+ schedules.speak (myself, speech[random.randint (0, 2)])
+ delay = random.randint (40, 80) * 25
+ myself.set_val ("say_something", delay)
- [adonthell-wastesedge-commits] Release_0-3-1 9a014b6 191/237: FIXES to the extro, (continued)
- [adonthell-wastesedge-commits] Release_0-3-1 9a014b6 191/237: FIXES to the extro, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 770b604 235/237: REMOVED ^M's from end of line, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 eb644d3 229/237: FIXED Audio should now be in sync with the extro, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 4c2c7ff 214/237: Finished entrance for veranda effect., Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 148ae8b 012/237: This module has nothing to do here and may crash everything! (Alex), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 ecf6760 220/237: ADDED Initial Game Data, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 623d0fc 190/237: *** empty log message ***, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 b27fa89 169/237: FIXED Erek's dialogue (I hope), Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 4306c41 202/237: FIXED Running Alek, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 f286520 193/237: ADDED line about Frostbloom's noise, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 cfc73d0 039/237: ADDED Alek Endhelm,
Kai Sterker <=
- [adonthell-wastesedge-commits] Release_0-3-1 dfabd4e 205/237: REMIXED some of the tunes, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 6f37ab3 213/237: MADE Veranda fully walkable, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 5b397b2 207/237: Varanda is now walkable, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 9b0ce0b 233/237: Fixed running alek animation, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 11fcf14 167/237: ADDED Searching of Silverhair's luggage, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 a447f09 156/237: FIXED some small plot holes, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 b2d5538 216/237: ADDED two more action events, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 de63776 087/237: Experimental Python scripting, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 5975389 197/237: Fixed a typo, Kai Sterker, 2016/07/25
- [adonthell-wastesedge-commits] Release_0-3-1 95f5a33 223/237: FIXED some typos, Kai Sterker, 2016/07/25