Hello!
I want to show you my baking system.
In actions/actions.xml, change:
to:
Add to actions/actions.xml:
Delete file: actions/scripts/other/createbread.lua.
Create file: actions/scripts/other/baking.lua and write inside:
Create file: actions/scripts/other/blewoutcandle.lua and write inside:
Remove from movements/movements.xml:
Add to movements/movements.xml:
Remove file: movements/scripts/dough.lua
Create file: movements/scripts/partycake.lua and write inside:
How to make (by tibia.wikia.net):
- bread
- cake
- decorated cake
- party cake
- cookies
- chocolate cake
Description by me:
Bunch of wheat:
Use
scythe with wheat field.
Flour:
Use bunch of wheat with
millstone.
Lump of dough:
Use flour with
bucket or
trough of water.
Bread:
Use lump of dough with
oven.
Lump of cake dough:
Use flour with bucket or trough of milk.
Cake:
Use lump of cake dough with oven.
Decorated cake:
Take the cake and use
kitchen knife with
cherry or
strawberry.
Party cake:
Put used-up
candlestick on decorated cake.
Baking tray (with dough):
Use lump of cake dough with
baking tray.
Cookies (12):
Use baking tray (with dough) with oven.
Lump of chocolate dough:
Use lump of cake dough with
bar of chocolate.
Chocolate cake:
Use lump of chocolate dough with oven.
Note: in code you can see:
It's my nick!
If you wanna show it in other forum, send a message to me.
Please, leave a comment!
I want to show you my baking system.
In actions/actions.xml, change:
Code:
<!-- Bread Creating -->
<action itemid="2692" event="script" value="other/createbread.lua"/>
<action itemid="2694" event="script" value="other/createbread.lua"/>
Code:
<!-- Baking -->
<action itemid="2694" script="other/baking.lua"/> <!--Wheat-->
<action itemid="2692" script="other/baking.lua"/> <!--Flour-->
<action itemid="2693" script="other/baking.lua"/> <!--Lump of dough-->
<action itemid="6277" script="other/baking.lua"/> <!--Lump of cake dough-->
<action itemid="2566" script="other/baking.lua"/> <!--Kitchen knife-->
<action itemid="2561" script="other/baking.lua"/> <!--Baking tray-->
<action itemid="8848" script="other/baking.lua"/> <!--Baking tray (with cookies)-->
<action itemid="8846" script="other/baking.lua"/> <!--Lump of chocolate dough-->
Add to actions/actions.xml:
Code:
<action itemid="6280" event="script" value="other/blewoutcandle.lua"/>
Delete file: actions/scripts/other/createbread.lua.
Create file: actions/scripts/other/baking.lua and write inside:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local liquidContainers = {1775, 2005}
local ovens = {1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 6356, 6357, 6358, 6359, 6360, 6361, 6362, 6363}
local lumpsOfChocolateDough = getPlayerItemCount(cid, 6277) + getPlayerItemCount(cid, 6574)
if item.itemid == 2692 and isInArray(liquidContainers, itemEx.itemid) == TRUE and itemEx.type == 1 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, 2693, 1)
doChangeTypeItem(itemEx.uid, item.type - item.type)
elseif item.itemid == 2694 and itemEx.itemid == 1381 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, 2692, 1)
elseif item.itemid == 2693 and isInArray(ovens, itemEx.itemid) == TRUE then
doChangeTypeItem(item.uid, item.type - 1)
doCreateItem(2689, 1, toPosition)
elseif item.itemid == 2692 and isInArray(liquidContainers, itemEx.itemid) == TRUE and itemEx.type == 6 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, 6277, 1)
doChangeTypeItem(itemEx.uid, itemEx.type - itemEx.type)
elseif item.itemid == 6277 and isInArray(ovens, itemEx.itemid) == TRUE then
doChangeTypeItem(item.uid, item.type - 1)
doCreateItem(6278, 1, toPosition)
elseif item.itemid == 2566 and (itemEx.itemid == 2679 or itemEx.itemid == 2680) and getPlayerItemCount(cid, 6278) > 0 then
doRemoveItem(itemEx.uid, 1)
doPlayerRemoveItem(cid, 6278, 1)
doPlayerAddItem(cid, 6279, 1)
elseif item.itemid == 6277 and itemEx.itemid == 2561 then
doRemoveItem(item.uid, 1)
doTransformItem(itemEx.uid, 8848)
elseif item.itemid == 8848 and isInArray(ovens, itemEx.itemid) == TRUE then
doTransformItem(item.uid, 2561)
doCreateItem(2687, 12, toPosition)
elseif item.itemid == 6277 and itemEx.itemid == 6574 then
doRemoveItem(itemEx.uid, 1)
doChangeTypeItem(item.uid, item.type - 1)
if (getPlayerItemCount(cid, 6277) + getPlayerItemCount(cid, 6574)) ~= lumpsOfChocolateDough then
doPlayerAddItem(cid, 8846, 1)
else
doCreateItem(8846, 1, toPosition)
end
elseif item.itemid == 8846 and isInArray(ovens, itemEx.itemid) == TRUE then
doChangeTypeItem(item.uid, item.type - 1)
doCreateItem(8847, 1, toPosition)
else
return FALSE
end
return TRUE
end
--Made by Freewolny
Create file: actions/scripts/other/blewoutcandle.lua and write inside:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
doTransformItem(item.uid, 6279)
doCreatureSay(cid, getPlayerName(cid) .. " blew out the candle.", TALKTYPE_ORANGE_1)
doSendMagicEffect(fromPosition, CONST_ME_POFF)
return TRUE
end
--Made by Freewolny
Remove from movements/movements.xml:
Code:
<!-- Create bread movements -->
<movevent type="AddItem" tileitem="1" itemid="1786" event="script" value="dough.lua"/>
<movevent type="AddItem" tileitem="1" itemid="1788" event="script" value="dough.lua"/>
<movevent type="AddItem" tileitem="1" itemid="1790" event="script" value="dough.lua"/>
<movevent type="AddItem" tileitem="1" itemid="1792" event="script" value="dough.lua"/>
Add to movements/movements.xml:
Code:
<movevent type="AddItem" tileitem="1" itemid="6279" event="script" value="partycake.lua"/>
Remove file: movements/scripts/dough.lua
Create file: movements/scripts/partycake.lua and write inside:
Code:
function onAddItem(moveitem, tileitem, pos)
if moveitem.itemid == 2048 then
doRemoveItem(tileitem.uid, 1)
doRemoveItem(moveitem.uid, 1)
doCreateItem(6280, 1, pos)
end
end
--Made by Freewolny
How to make (by tibia.wikia.net):
- bread
- cake
- decorated cake
- party cake
- cookies
- chocolate cake
Description by me:
Use
Use bunch of wheat with
Use flour with
Use lump of dough with
Use flour with bucket or trough of milk.
Use lump of cake dough with oven.
Take the cake and use
Put used-up
Use lump of cake dough with
Use baking tray (with dough) with oven.
Use lump of cake dough with
Use lump of chocolate dough with oven.
Note: in code you can see:
Code:
--Made by Freewolny
If you wanna show it in other forum, send a message to me.
Please, leave a comment!
Last edited: