local saga = {[1] = {[1] = 71, level = XXXX, storage = YYYY, [2] = 66, [3] = 91, [4] = 18, [5] = 31, [6] = 92, [7] = 40, [8] = 49, [9] = 25, [10] = 179, [11] = 952, [12] = 951, [13] = 291, [14] = 302, [15] = 487, [16] = 54, [17] = 743, [18] = 1000, [19] = 1001, [20] = 954, [21] = 955, [22] = 953, ef
talkactions.xml: <talkaction log="yes" words="!saga" event="script" value="transform.lua"/> talkactions/scripts/transform.lua: local cooldownzin = 3 -- em segundos para esperar a talkaction novamentesaga = { [1] = {{outfit = 71, level = 36, storage = 2221, mana = 2000, health = 3000}, {outfit = 71,
info
Grupo: Marquês
Registrado: 05/12/11
Posts: 1.2k
Reputação: +173
Gênero: Masculino
Fala guys será que alguém pode me ajudar a editar o script saga para transformar gostaria que ele pedisse level e storage igual ele pede a id da outfit ou sejá que ficasse configuravel no caso toda vez que ele mudar a transformar necessitar de uma storage
local saga = {[1] = {[1] = 71, [2] = 66, [3] = 91, [4] = 18, [5] = 31, [6] = 92, [7] = 40, [8] = 49, [9] = 25, [10] = 179, [11] = 952, [12] = 951, [13] = 291, [14] = 302, [15] = 487, [16] = 54, [17] = 743, [18] = 1000, [19] = 1001, [20] = 954, [21] = 955, [22] = 953, effect = 111}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação}[2] = {[1] = 64, effect = 10} --TESTE}local level = 36 -- Limite para liberar uma saga novafunction onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce 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 numero da saga que voce deseja.") return true endif tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao 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, voce precisa de level "..(tonumber(t[1]) * level).." usar essa saga.")endreturn trueendno caso ficando assim
local saga = {
[1] = {[1] = roupa, level, storage [2] = 66, [3] = 91, [4] = 18, [5] = 31, [6] = 92, [7] = 40, [8] = 49, [9] = 25, [10] = 179, [11] = 952, [12] = 951, [13] = 291, [14] = 302, [15] = 487, [16] = 54, [17] = 743, [18] = 1000, [19] = 1001, [20] = 954, [21] = 955, [22] = 953, effect = 111},
--[Vocation] = {[1] = Level, Storage, Roupa,effect = Efeito da transformação}
Ele vai verificar a vocação o level ai se o player tem a storage caso tiver tudo isso ele muda a roupa fazendo o efeito só precisava dessa alteração
se alguém puder me ajudar a fazer isso ficarei extremamente agradecido
Editado Junho 27 por Poccnn