Postado Maio 26, 2018 7 anos Autor @Sttorm funcionou certinho vlw! só pra finalizar teria como colocar pra apenas x vocations poderem usar ?
Postado Maio 26, 2018 7 anos @bismarkzika local v = {1, 2, 3, 5} -- Vocations que poderão usar a spell function onSay(cid, words, param, channel) local pos = getCreaturePosition(cid) local t = string.explode(param, ",") local a = getPlayerByNameWildcard(t[1]) local voc = getPlayerVocation(cid) if not isInArray(v, voc) then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Sua vocation não pode usar essa spell") return true end if (param == '') or (not t[1]) or (not t[2]) or (not isNumber(t[2])) then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Parametros incorretos") return true end if not a then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Player não encontrado") return true end if tonumber(t[2]) >= 101 or tonumber(t[2]) == 0 then doSendMagicEffect(pos, 5) doPlayerSendTextMessage(cid, 26, "Somente de 1 a 100") return true end local b = getCreatureMana(cid) / 100 * t[2] doCreatureAddMana(cid, -b) doCreatureAddMana(a, b) 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.