Postado Julho 21, 2014 10 anos Olá, Alguem me ajuda com script preciso de um code pro player usar e recuperar toda stamina dele e outro pro item dar todas as bless ao player. E tem um detalhe, o item de stamina só pode usa 1x e o de bless infinito. obrigado
Postado Julho 21, 2014 10 anos Brother, fiz agora o da stamina, qualquer erro me avise. data/actions/scripts crie absolutestamina.lua e adicione dentro: function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") doPlayerRemoveItem(cid, 16999, 1) end return true end Em actions.xml: <action itemid="16999" event="script" value="absolutestamina.lua"/> Aqui em doPlayerRemoveItem(cid, 16999, 1) = 16999 é o ID do item da stamina que vai ser removido
Postado Julho 23, 2014 10 anos Brother, fiz agora o da stamina, qualquer erro me avise. data/actions/scripts crie absolutestamina.lua e adicione dentro: function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Your stamina is already full.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") doPlayerRemoveItem(cid, 16999, 1) end return true end Em actions.xml: <action itemid="16999" event="script" value="absolutestamina.lua"/> Aqui em doPlayerRemoveItem(cid, 16999, 1) = 16999 é o ID do item da stamina que vai ser removido Não funcionou aqui não
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.