3 horas atrás, Henrique Gomes disse:Eae Galera blz ? Eu pedir para se algum de vocês pode editar essa script de saga para min
local saga = {[1] = {[1] = 180, [2] = 438, [3] = 182, effect = 10}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação}[2] = {[1] = 64, effect = 10} --TESTE}local level = 25 -- Limite para liberar uma saga novafunction onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") return true endif not saga[getPlayerVocation(cid)] thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.")return trueendlocal t = string.explode(param, ",") if(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.") return true end if not (tonumber(t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") return true endif tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.")return trueendif getPlayerLevel(cid) >= (tonumber(t[1])*level) thendoSetCreatureOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}, -1)doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect)doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!")doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1)elsedoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.")endreturn trueendEu queria que invés de ser level fixo, que eu podes-se escolher o level de cada transformação de cada vocation, e que não pode-se usar esse comando em área de proteção, se alguém poder min ajudar, estou no aguardo, desde já, OBRIGADO.
testa isso aqui:
local saga = {[1] = {{[1] = 180, lvl = 50}, {[2] = 438, lvl = 100}, {[3] = 182, lvl = 150}, effect = 10},[2] = {{[1] = 180, lvl = 50}, {[2] = 438, lvl = 100}, {[3] = 182, lvl = 150}, effect = 10},[3] = {{[1] = 180, lvl = 50}, {[2] = 438, lvl = 100}, {[3] = 182, lvl = 150}, effect = 10},[4] = {{[1] = 180, lvl = 50}, {[2] = 438, lvl = 100}, {[3] = 182, lvl = 150}, effect = 10},}--[vocation] = {{[saga 1] = 180, level(lvl) = 50}, {[saga 2] = 438, level = 100}}----------- se a vocação é 1 e o player tiver o level 50, ele pode usar a saga 1.function onSay(cid, words, param, channel)if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.")return trueendlocal t = string.explode(param, ",")local nSaga = tonumber(t[1])local vocation = getPlayerVocation(cid)if not saga[vocation] thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.")return trueendif nSaga == nil or nSaga > #saga[vocation] or nSaga < 1 or type(nSaga) ~= 'number' thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.")return trueendfor i, pid in pairs(saga) do if i == vocation then if pid[nSaga] then if getPlayerLevel(cid) >= pid[nSaga].lvl then doSetCreatureOutfit(cid, {lookType = pid[nSaga][nSaga]}, -1) doSendMagicEffect(getThingPos(cid), pid.effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..pid[nSaga].lvl.." para usar essa saga.") end end endendreturn trueend






info
Grupo: Visconde
Registrado: 15/03/16
Posts: 327
Reputação: +12
Gênero: Masculino
Eae Galera blz ? Eu pedir para se algum de vocês pode editar essa script de saga para min
Eu queria que invés de ser level fixo, que eu podes-se escolher o level de cada transformação de cada vocation, e que não pode-se usar esse comando em área de proteção, se alguém poder min ajudar, estou no aguardo, desde já, OBRIGADO.