Postado Janeiro 22, 2018 7 anos Autor solução da script está aqui crie um script com nome que quiser no meu caso vou colocar health potion abra a pasta data/actions/health potion.lua cole isso dentro Spoiler health potion.lua -- Exhausted Settings -- local exhausted_seconds = 1 local exhausted_storagevalue = 9894 local large_health_fluid = 14454 -- Exhausted Settings END -- --- edita os valos aqui de quanto vai healar function onUse(cid, item, frompos, item2, topos) min = (20*getPlayerMaxHealth(cid)/100 +450) -- minimo de healer max = (20*getPlayerMaxHealth(cid)/100 +505) -- max de healer de 100 if (exhaust(cid, 1000, 1) > 0) then -------- storage = 9893 health = math.random(min,max) doPlayerAddHealth(cid,health) doSendAnimatedText(getPlayerPosition(cid), "Aaaahh..", 180) doSendMagicEffect(getCreaturePosition(cid), 12) else doPlayerSendCancel(cid,"Você não pode usar este objeto.") end return 1 end TAG em actions.xml <action itemid="14454" script="health potion"/> -- -- CONFIGURAÇÃO -- -- HEALTH POTION.XML TROQUE O ONDE ESTÁ EM VEMELHO O ID DO ITEM PARA O ITEM QUE DESEJAR NO SCRIPT HEALTH POTION.LUA local large_health_fluid = 14454 ACTION.XML TROQUE ONDE ESTÁ EM VEMELHO PARA O ID DO SEU ITEM <action itemid="14454" script="health potion"/> CREDITOS AO @Roy PELA AJUDA !!! PODEM FECHAR O TOPICO !!! Editado Janeiro 22, 2018 7 anos por Micheel15 (veja o histórico de edições)
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.