(4 flowers work)
Player has to use Waterskin on flower every 24 hours.
First item "bowl with seeds" ID: 7679 (you need NPC/box with this item)
-----------------------------
Tested on TFS 0.3beta3, report bugs.
1. In actions.xml add:
PHP:
<action itemid="7734" script="tools/waterskin.lua"/>
PHP:
local doniczka_z_ziarnami = 7679 -- > 7678(wzrost), 7665(doniczka) (dacay)
local doniczka_z_listkami = 7670 -- > 7680+(math.rand(0,3)*2) (decay)
local roslinki_1 = {7681, 7683, 7685, 7687} -- > id + 7 (decay)
local roslinki_2 = {7689, 7691, 7693, 7695} -- > id - 1 (decay)
local podlane_roslinki = {7665, 7678, 7680, 7682, 7684, 7686, 7688, 7690, 7692, 7694}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(isInArray(podlane_roslinki,itemEx.itemid) == TRUE) then
doCreatureSay(cid, "Your plant doesn't need water.", TALKTYPE_ORANGE_1)
return TRUE
elseif(itemEx.itemid == 7679) then
if(math.random(1,3) == 1) then
doCreatureSay(cid, "Your plant has grown to the next stadium!", TALKTYPE_ORANGE_1)
doTransformItem(itemEx.uid, 7678)
doDecayItem(itemEx.uid)
else
doCreatureSay(cid, "You watered your plant.", TALKTYPE_ORANGE_1)
doTransformItem(itemEx.uid, 7665)
doDecayItem(itemEx.uid)
end
elseif(itemEx.itemid == 7670) then
doCreatureSay(cid, "Your plant has grown to the next stadium!", TALKTYPE_ORANGE_1)
doTransformItem(itemEx.uid, 7680+(math.random(0,3)*2))
doDecayItem(itemEx.uid)
elseif(isInArray(roslinki_1,itemEx.itemid) == TRUE) then
doCreatureSay(cid, "Your plant has grown to the next stadium!", TALKTYPE_ORANGE_1)
doTransformItem(itemEx.uid, itemEx.itemid+7)
doDecayItem(itemEx.uid)
elseif(isInArray(roslinki_2,itemEx.itemid) == TRUE) then
doCreatureSay(cid, "You watered your plant.", TALKTYPE_ORANGE_1)
doTransformItem(itemEx.uid, itemEx.itemid-1)
doDecayItem(itemEx.uid)
end
return TRUE
end
PHP:
</items>
PHP:
<item id="7679" article="a" name="flower bowl with seeds">
<attribute key="weight" value="2000"/>
</item>
<item id="7665" article="a" name="flower bowl with seeds">
<attribute key="weight" value="2000"/>
<attribute key="decayTo" value="7679"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7678" article="a" name="flower bowl">
<attribute key="weight" value="2000"/>
<attribute key="decayTo" value="7670"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7670" article="a" name="flower bowl">
<attribute key="weight" value="2000"/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7680" article="a" name="Lizard Tongue">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be a lizard tongue fern."/>
<attribute key="decayTo" value="7681"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7682" article="a" name="Dryad's Heart">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be a dryad's heart flower."/>
<attribute key="decayTo" value="7683"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7684" article="a" name="Midnight Bloom">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be a midnight bloom flower."/>
<attribute key="decayTo" value="7685"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7686" article="an" name="Ember Queen">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be an ember queen flower."/>
<attribute key="decayTo" value="7687"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7681" article="a" name="Lizard Tongue">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be a lizard tongue fern."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7683" article="a" name="Dryad's Heart">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be a dryad's heart flower."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7685" article="a" name="Midnight Bloom">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be a midnight bloom flower."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7687" article="an" name="Ember Queen">
<attribute key="weight" value="2000"/>
<attribute key="description" value="The plant in it seems to be an ember queen flower."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7688" article="a" name="Lizard Tongue">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown lizard tongue plant in it."/>
<attribute key="decayTo" value="7689"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7690" article="a" name="Dryad's Heart">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown dryad's heart flower in it."/>
<attribute key="decayTo" value="7691"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7692" article="a" name="Midnight Bloom">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown midnight bloom flower in it."/>
<attribute key="decayTo" value="7693"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7694" article="an" name="Ember Queen">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown ember queen flower in it."/>
<attribute key="decayTo" value="7695"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7689" article="a" name="Lizard Tongue">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown lizard tongue plant in it."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7691" article="a" name="Dryad's Heart">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown dryad's heart flower in it."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7693" article="a" name="Midnight Bloom">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown midnight bloom flower in it."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>
<item id="7695" article="an" name="Ember Queen">
<attribute key="weight" value="2000"/>
<attribute key="description" value="There is a fully grown ember queen flower in it."/>
<attribute key="decayTo" value="7674"/>
<attribute key="duration" value="86400"/>
</item>