Files
@ d0840406344b
Branch filter:
Location: games/Awakening/travel.lua
d0840406344b
3.8 KiB
text/x-lua
added a way to find deep temple
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | --[[
Кучер, который будет за деньги возить вас по локациям первой части
]]
char_coachman = obj {
nam = "coachman";
disp = "экипаж";
dsc = [[Неподалеку от вас стоит небольшая двухколесная {повозка} с впряженной лошадью. ]];
act = function(s)
walkin "coachman_dlg";
end;
used = function(s, o)
walkin "coachman_dlg";
end;
};
coachman_responses_ok = {
[[Кэбмен приглашает вас: "Садитесь!". ]],
[[Вы садитесь в повозку и благополучно добираетесь до цели. ]],
[[Вы оплачиваете проезд и садитесь в повозку. ]],
};
coachman_responses_fail = {
[[Кэбмен разочарованно протянул: "Бесплатно я никого не вожу". ]];
[[Кэбмен разочарованно протянул: "Нет денег -- нет поездки". ]];
[[Кэбмен разочарованно протянул: "Сначала оплатите проезд". ]];
};
coachman_dlg = dlg {
nam = "coachman_dlg";
disp = "Кэбмен";
dsc = [[Вы подходите к повозке и кэбмен спрашивает вас: _"Куда поедем?"_]];
hideinv = true;
entered = function(s)
poff(1, 2, 3, 4, 5, 6);
if (where(char_coachman) ~= port_street) then
pon(6);
end;
if (where(char_coachman) ~= hotel_street) then
pon(1);
end;
if (where(char_coachman) ~= wright_house) then
pon(2);
end;
if (where(char_coachman) ~= dock_2 and dock_found) then
pon(5);
end;
if (where(char_coachman) ~= warehouse_18_entry and warehouse18_found) then
pon(3);
end;
if (where(char_coachman) ~= warehouse_32_entry and warehouse32_found) then
pon(4);
end;
end;
phr = {
{1, always = true, "В гостиницу (5 монет). ",
function (s)
if (pl:pay(5)) then
walk 'hotel_street';
return coachman_responses_ok[rnd(#coachman_responses_ok)];
else
back();
return coachman_responses_fail[rnd(#coachman_responses_fail)];
end;
end
},
{2, always = true, "К Райту (5 монет). ",
function (s)
if (pl:pay(5)) then
walk 'wright_house';
return coachman_responses_ok[rnd(#coachman_responses_ok)];
else
back();
return coachman_responses_fail[rnd(#coachman_responses_fail)];
end;
end
},
{3, always = true, "На склад 18 (5 монет). ",
function (s)
if (pl:pay(5)) then
walk 'warehouse_18_entry';
return coachman_responses_ok[rnd(#coachman_responses_ok)];
else
back();
return coachman_responses_fail[rnd(#coachman_responses_fail)];
end;
end
},
{4, always = true, "На склад 32 (5 монет). ",
function (s)
if (pl:pay(5)) then
walk 'warehouse_32_entry';
return coachman_responses_ok[rnd(#coachman_responses_ok)];
else
back();
return coachman_responses_fail[rnd(#coachman_responses_fail)];
end;
end
},
{5, always = true, "К доку 2 (5 монет). ",
function (s)
if (pl:pay(5)) then
walk 'dock_2';
return coachman_responses_ok[rnd(#coachman_responses_ok)];
else
back();
return coachman_responses_fail[rnd(#coachman_responses_fail)];
end;
end
},
{6, always = true, "В порт (5 монет). ",
function (s)
if (pl:pay(5)) then
walk 'port_street';
return coachman_responses_ok[rnd(#coachman_responses_ok)];
else
back();
return coachman_responses_fail[rnd(#coachman_responses_fail)];
end;
end
},
{255, always = true, "Я передумал. ", function(s)
back()
end}
};
};
|