- messages an regionen versenden

Eressea:
- Besucher von Muschelplateau kriegen ein Spezialgimmick
- Diverse magische Items im Gewicht auf 0 reduziert.
This commit is contained in:
Enno Rehling 2005-12-11 11:43:18 +00:00
parent 4635c46ec2
commit 28be52c1b2
8 changed files with 115 additions and 59 deletions

View File

@ -140,6 +140,15 @@ public:
return E_OK;
}
int send_region(region& r) {
if (mtype==0) return E_INVALID_MESSAGE;
if (msg==NULL) {
msg = msg_create(mtype, args);
}
add_message(&r.msgs, msg);
return E_OK;
}
protected:
int get_param(const char * param) {
for (int i=0;i!=mtype->nparameters;++i) {
@ -177,5 +186,6 @@ bind_message(lua_State * L)
.def("set_int", &lua_message::set_int)
.def("set_string", &lua_message::set_string)
.def("send_faction", &lua_message::send_faction)
.def("send_region", &lua_message::send_region)
];
}

View File

@ -1605,54 +1605,6 @@
<text locale="de">Saphirne Schlüssel</text>
<text locale="en">sapphire keys</text>
</string>
<string name="hornofdancing">
<text locale="de">Horn des Tanzes</text>
<text locale="en">horn of dancing</text>
</string>
<string name="hornofdancing_p">
<text locale="de">Hörner des Tanzes</text>
<text locale="en">horns of dancing</text>
</string>
<string name="instantartacademy">
<text locale="de">Miniatur einer Akademie der Künste</text>
<text locale="en">academy of arts in a box</text>
</string>
<string name="instantartacademy_p">
<text locale="de">Miniaturen einer Akademie der Künste</text>
<text locale="en">academies of arts in a box</text>
</string>
<string name="instantartsculpture">
<text locale="de">Miniatur einer Skulptur</text>
<text locale="en">art sculpture in a box</text>
</string>
<string name="instantartsculpture_p">
<text locale="de">Miniaturen einer Skulptur</text>
<text locale="en">art sculptures in a box</text>
</string>
<string name="trappedairelemental">
<text locale="de">Gefangener Windgeist</text>
<text locale="en">trapped air elemental</text>
</string>
<string name="trappedairelemental_p">
<text locale="de">Gefangene Windgeister</text>
<text locale="en">trapped air elementals</text>
</string>
<string name="aurapotion50">
<text locale="de">Auratrank</text>
<text locale="en">aura potion</text>
</string>
<string name="aurapotion50_p">
<text locale="de">Auratränke</text>
<text locale="en">aura potions</text>
</string>
<string name="bagpipeoffear">
<text locale="de">Dudelsack der Furcht</text>
<text locale="en">bagpipe of fear</text>
</string>
<string name="bagpipeoffear_p">
<text locale="de">Dudelsäcke der Furcht</text>
<text locale="en">bagpipes of fear</text>
</string>
<!--herb singular -->
<string name="h0">

View File

@ -3,28 +3,28 @@
<resource name="instantartsculpture">
<function name="change" value="changeitem"/>
<item weight="1">
<item weight="0">
<function name="use" value="use_instantartsculpture"/>
</item>
</resource>
<resource name="instantartacademy">
<function name="change" value="changeitem"/>
<item weight="1">
<item weight="0">
<function name="use" value="use_instantartacademy"/>
</item>
</resource>
<resource name="aurapotion50">
<function name="change" value="changeitem"/>
<item weight="1">
<item weight="0">
<function name="use" value="use_aurapotion50"/>
</item>
</resource>
<resource name="bagpipeoffear">
<function name="change" value="changeitem"/>
<item weight="1">
<item weight="0">
<function name="use" value="use_bagpipeoffear"/>
</item>
</resource>

View File

@ -1,5 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
<strings>
<string name="seashell">
<text locale="de">Muschel</text>
<text locale="en">seashell</text>
</string>
<string name="seashell_p">
<text locale="de">Muscheln</text>
<text locale="en">seashells</text>
</string>
<string name="newbie_info_2">
<text locale="de">Die ersten beiden Züge mußt du abgeben, sonst wird deine Partei sofort wieder gelöscht, um Karteileichen zu vermeiden.</text>
</string>
@ -82,4 +91,55 @@
</string>
<!-- ending here: Wildente and Jadee's wedding -->
<!-- art rewards begin -->
<string name="hornofdancing">
<text locale="de">Horn des Tanzes</text>
<text locale="en">horn of dancing</text>
</string>
<string name="hornofdancing_p">
<text locale="de">Hörner des Tanzes</text>
<text locale="en">horns of dancing</text>
</string>
<string name="instantartacademy">
<text locale="de">Miniatur einer Akademie der Künste</text>
<text locale="en">academy of arts in a box</text>
</string>
<string name="instantartacademy_p">
<text locale="de">Miniaturen einer Akademie der Künste</text>
<text locale="en">academies of arts in a box</text>
</string>
<string name="instantartsculpture">
<text locale="de">Miniatur einer Skulptur</text>
<text locale="en">art sculpture in a box</text>
</string>
<string name="instantartsculpture_p">
<text locale="de">Miniaturen einer Skulptur</text>
<text locale="en">art sculptures in a box</text>
</string>
<string name="trappedairelemental">
<text locale="de">Gefangener Windgeist</text>
<text locale="en">trapped air elemental</text>
</string>
<string name="trappedairelemental_p">
<text locale="de">Gefangene Windgeister</text>
<text locale="en">trapped air elementals</text>
</string>
<string name="aurapotion50">
<text locale="de">Auratrank</text>
<text locale="en">aura potion</text>
</string>
<string name="aurapotion50_p">
<text locale="de">Auratränke</text>
<text locale="en">aura potions</text>
</string>
<string name="bagpipeoffear">
<text locale="de">Dudelsack der Furcht</text>
<text locale="en">bagpipe of fear</text>
</string>
<string name="bagpipeoffear_p">
<text locale="de">Dudelsäcke der Furcht</text>
<text locale="en">bagpipes of fear</text>
</string>
<!-- art rewards end -->
</strings>

View File

@ -1,15 +1,22 @@
<?xml version="1.0"?>
<resources>
<!-- ambassador rewards -->
<resource name="seashell">
<item cursed="true" weight="0">
<function name="use" value="lua_useitem"/>
</item>
</resource>
<!-- art rewards -->
<resource name="trappedairelemental">
<item weight="1">
<item weight="0">
<function name="use" value="use_trappedairelemental"/>
</item>
</resource>
<resource name="hornofdancing">
<item weight="1">
<item weight="0">
<function name="use" value="use_hornofdancing"/>
</item>
</resource>
@ -32,7 +39,7 @@
<!-- gimmicks, etc. -->
<resource name="aog">
<!-- Amulett des Treffens -->
<item notlost="yes" weight="0"/>
<item notlost="yes" cursed="true" weight="0"/>
</resource>
<resource name="ao_daemon">
@ -60,12 +67,12 @@
<resource name="questkey1" appearance="key">
<!-- Key for an old quest. placeholder item -->
<item notlost="yes" weight="1" />
<item notlost="yes" weight="0" />
</resource>
<resource name="questkey2" appearance="key">
<!-- Key for an old quest. placeholder item -->
<item notlost="yes" weight="1" />
<item notlost="yes" weight="0" />
</resource>
<resource name="jadee_ring" appearance="ring">

View File

@ -85,7 +85,7 @@
</resource>
<resource name="wand_of_tears">
<item notlost="yes" weight="1">
<item notlost="yes" weight="0">
<function name="use" value="use_wand_of_tears"/>
</item>
</resource>

View File

@ -91,7 +91,7 @@
<resources>
<resource name="phoenixfeather">
<function name="change" value="changeitem"/>
<item weight="1"/>
<item weight="0"/>
</resource>
</resources>

View File

@ -35,6 +35,32 @@ function run_scripts()
end
end
function use_seashell(u, amount)
-- Muschelplateau...
local visit = u.faction.objects["muschel"]
if visit~=nil then
local turns = get_turn() - visit
local msg = message("msg_event")
msg:set_string("string", tostring(u) .. " erzählt den Bewohnern von " .. r.name .. " von Muschelplateau, das seine Partei vor " .. turns .. " Wochen besucht hat." )
msg:send_region(u.region)
end
end
function update_special()
-- Muschelplateau
local r = get_region(165,30)
if r~=nil then
local u
for u in r.units do
if u.faction.objects["muschel"]~=nil then
if (u.faction.add_item("muschel", 1)>0) then
u.faction.objects["seashell"] = get_turn()
end
end
end
end
end
function process(orders)
-- initialize starting equipment for new players
equipment_setitem("new_faction", "conquesttoken", "1");
@ -68,6 +94,7 @@ function process(orders)
process_orders()
-- post-turn updates:
update_special()
update_guards()
update_scores()