Postado Fevereiro 19, 2017 8 anos ola galera tenho este script, porem queria adicionar 2 funções se possível 1° Escolher quantas vezes ele pode ser usado.. 2° Alterar para % - Ex subir 10% do skill - configuravel <action itemid="21530" event="script" value="aumentarskill/skillaxe.lua"/> function onUse(cid, item) doPlayerSay(cid, "Parabens", TALKTYPE_ORANGE_1) doPlayerAddSkill(cid, SKILL_AXE, 1) doSendMagicEffect(getThingPos(cid), 29) doRemoveItem(item.uid, 1) return true end @KotZletY@Gustavo Ntos Editado Fevereiro 19, 2017 8 anos por robi123 (veja o histórico de edições)
Postado Fevereiro 19, 2017 8 anos 50 minutos atrás, robi123 disse: ola galera tenho este script, porem queria adicionar 2 funções se possível 1° Escolher quantas vezes ele pode ser usado.. 2° Alterar para % - Ex subir 10% do skill - configuravel <action itemid="21530" event="script" value="aumentarskill/skillaxe.lua"/> function onUse(cid, item) doPlayerSay(cid, "Parabens", TALKTYPE_ORANGE_1) doPlayerAddSkill(cid, SKILL_AXE, 1) doSendMagicEffect(getThingPos(cid), 29) doRemoveItem(item.uid, 1) return true end @KotZletY@Gustavo Ntos Não sei se vai funcionar mais tenta: local config = { stor = 678942, -- storage mana max = 10,-- quantas vezes pode usar } local skill = getPlayerSkillLevel(cid, 3)*0.10 function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.stor) == config.max then doPlayerSendTextMessage(cid, 27, "Nao eh possivel mais usar.") return false else doPlayerSay(cid, "Parabens", TALKTYPE_ORANGE_1) doPlayerAddSkill(cid, SKILL_AXE, skill) doSendMagicEffect(getThingPos(cid), 29) doRemoveItem(item.uid, 1) setPlayerStorageValue(cid, config.stor, getPlayerStorageValue(cid, config.stor)+1) end return true end
Postado Fevereiro 19, 2017 8 anos Autor eae @Gustavo Ntos dei este erro no arquivo vlw ai por ta me ajudando
Postado Fevereiro 19, 2017 8 anos 1 minuto atrás, robi123 disse: eae @Gustavo Ntos dei este erro no arquivo vlw ai por ta me ajudando local config = { stor = 678942, -- storage mana max = 10,-- quantas vezes pode usar } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.stor) == config.max then doPlayerSendTextMessage(cid, 27, "Nao eh possivel mais usar.") return false else doPlayerSay(cid, "Parabens", TALKTYPE_ORANGE_1) doPlayerAddSkill(cid, SKILL_AXE, 1) doSendMagicEffect(getThingPos(cid), 29) doRemoveItem(item.uid, 1) setPlayerStorageValue(cid, config.stor, getPlayerStorageValue(cid, config.stor)+1) end return true end
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.