Postado Setembro 20, 2017 7 anos @JcA Tenta assim. --- Dodge System by Night Wolf local config = { effectonuse = 14, -- efeito que sai levelsdodge = 100, --- leveis que terão storagedodge = 48902 -- storage que será verificado } local notallowed = {1,2,3,4} function onUse(cid, item, frompos, item2, topos) if not isInArray(notallowed, getPlayerVocation(cid)) then if getPlayerStorageValue(cid, config.storagedodge) < config.levelsdodge then doRemoveItem(item.uid, 1) doSendMagicEffect(topos,config.effectonuse) doPlayerSendTextMessage(cid,22,"You've Leveled your Dodge Skill to ["..(getPlayerStorageValue(cid, config.storagedodge)+1).."/100].") setPlayerStorageValue(cid, config.storagedodge, getPlayerStorageValue(cid, config.storagedodge)+1) elseif getPlayerStorageValue(cid, config.storagedodge) >= config.levelsdodge then doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Dodge Skill.\nCongratulations!!!!") if getPlayerStorageValue(cid, 37237) < 1 then setPlayerStorageValue(cid, 37237, 1) doBroadcastMessage("The player ".. getCreatureName(cid).. " conquered the 100 dodge stone. Congratulations!") end return 0 end else doPlayerSendTextMessage(cid,22,"You can't learn this skill because you're "..getPlayerVocationName(cid)..". Your need to promotion for use.") return 0 end return 1 end Editado Setembro 20, 2017 7 anos por pablobion (veja o histórico de edições) Scriptszinhos: Spoiler [CREATURESCRIPT] Auto TP depois de matar boss [ACTION] Clean Area [TALKACTION] !FelizAnoNovo [ACTION + MOVEMENT] Cartas ao GOD [CREATURESCRIPT] Always Emblem System [ACTION] Anihi simples [TALKACTIONS] Urinar / fazer xixi Não abandone seu tópico, quando você tiver a dúvida resolvida sozinho tente ensinar aos outros como resolve-la (você pode não ser o único com o problema) e quando ela for resolvida por outra pessoa não se esqueça de marcar como melhor resposta e deixar o gostei.
Postado Setembro 20, 2017 7 anos Autor 2 minutos atrás, pablobion disse: @JcA Tenta assim. --- Dodge System by Night Wolf local config = { effectonuse = 14, -- efeito que sai levelsdodge = 100, --- leveis que terão storagedodge = 48902 -- storage que será verificado } local notallowed = {1,2,3,4} function onUse(cid, item, frompos, item2, topos) if not isInArray(notallowed, getPlayerVocation(cid)) then if getPlayerStorageValue(cid, config.storagedodge) < config.levelsdodge then doRemoveItem(item.uid, 1) doSendMagicEffect(topos,config.effectonuse) doPlayerSendTextMessage(cid,22,"You've Leveled your Dodge Skill to ["..(getPlayerStorageValue(cid, config.storagedodge)+1).."/100].") setPlayerStorageValue(cid, config.storagedodge, getPlayerStorageValue(cid, config.storagedodge)+1) elseif getPlayerStorageValue(cid, config.storagedodge) >= config.levelsdodge then doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Dodge Skill.\nCongratulations!!!!") if getPlayerStorageValue(cid, 37237) < 1 then -- verifica se o valor da storage é menor que um. setPlayerStorageValue(cid, 37237, 1) -- atribui o valor 1 para a storage. definimos a "storage" la em cima. doBroadcastMessage("The player ".. getCreatureName(cid).. " conquered the 100 dodge stone. Congratulations!") end return 0 end else doPlayerSendTextMessage(cid,22,"You can't learn this skill because you're "..getPlayerVocationName(cid)..". Your need to promotion for use.") return 0 end return 1 end Deu certo, faz no outro script também, no critical
Postado Setembro 20, 2017 7 anos Solução 2 minutos atrás, JcA disse: Deu certo, faz no outro script também, no critical CRITICAL. local config = { effectonuse = 13, -- efeito que sai levelscrit = 100, --- leveis que terão storagecrit = 48903 -- storage que será verificado } local notallowed = {1,2,3,4} function onUse(cid, item, frompos, item2, topos) if not isInArray(notallowed, getPlayerVocation(cid)) then if getPlayerStorageValue(cid, config.storagecrit) < config.levelscrit then doRemoveItem(item.uid, 1) doSendMagicEffect(topos,config.effectonuse) doPlayerSendTextMessage(cid,22,"You've Leveled your Critical Skill to ["..(getPlayerStorageValue(cid, config.storagecrit)+1).."/100].") setPlayerStorageValue(cid, config.storagecrit, getPlayerStorageValue(cid, config.storagecrit)+1) elseif getPlayerStorageValue(cid, config.storagecrit) >= config.levelscrit then doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Critical Skill.\nCongratulations!!!!") if getPlayerStorageValue(cid, 37238) < 1 then -- verifica se o valor da storage é menor que um. setPlayerStorageValue(cid, 37238, 1) -- atribui o valor 1 para a storage. definimos a "storage" la em cima. doBroadcastMessage("The player ".. getCreatureName(cid).. " conquered the 100 critical stone. Congratulations!") end return 0 end else doPlayerSendTextMessage(cid,22,"You can't learn this skill because you're "..getPlayerVocationName(cid)..". Your need to promotion for use.") return 0 end return 1 end Scriptszinhos: Spoiler [CREATURESCRIPT] Auto TP depois de matar boss [ACTION] Clean Area [TALKACTION] !FelizAnoNovo [ACTION + MOVEMENT] Cartas ao GOD [CREATURESCRIPT] Always Emblem System [ACTION] Anihi simples [TALKACTIONS] Urinar / fazer xixi Não abandone seu tópico, quando você tiver a dúvida resolvida sozinho tente ensinar aos outros como resolve-la (você pode não ser o único com o problema) e quando ela for resolvida por outra pessoa não se esqueça de marcar como melhor resposta e deixar o gostei.
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.