Aew
esta é a minha 1º action e tive a idéia de fazer um estilu de bed system por actions ke naum é igual ao tibia mas alguns ots naum tem bed system.
façam um ficheio bed.lua na pasta actions/scripts
------ Bed System 0.2 by Colex -----max_sleep = 300sleep1 = 150function onUse(cid, item, frompos, item2, topos)if (getPlayerFood(cid) + sleep1 > max_sleep) thendoPlayerSendCancel(cid,"You cannot sleep.")return 1enddoSendMagicEffect(frompos,12)doPlayerSendTextMessage(cid,22,"Good Night")doPlayerSay(cid,"Ohhhhhhhh!!!",16)doPlayerAddHealth(cid,300)doPlayerAddMana(cid,300)doPlayerFeed(cid,sleep1)doPlayerSendTextMessage(cid,22,"You have been Sleeping.")return 1end
Adicione nu ficheiro actions.xml:
-----Beds---- <action itemid="2455" script="bed.lua" /> <action itemid="2457" script="bed.lua" /> <action itemid="2459" script="bed.lua" /> <action itemid="2461" script="bed.lua" /> <action itemid="2471" script="bed.lua" /> <action itemid="2473" script="bed.lua" />-----/Beds----
u cara da use na bed e aumenta logo 300 de hp e mana direto (da pra mudar ao vosso gosto) e dps vai aumentandu tipu food...
Espero ke tenham gostado ^^ se tiverem alguma duvida é só postar ke eu tento ajudar :grin:
flws