Ir para conteúdo

Nogard

Barão
  • Total de itens

    240
  • Registro em

  • Última visita

  • Dias Ganhos

    56

Tudo que Nogard postou

  1. tenta: local cooldownzin = 3 -- em segundos para esperar a talkaction novamentefunction onSay(cid, words, param, channel)local sagaTransformacao = saga[getPlayerVocation(cid)] if(param == '') then -- *caso nao digite o numero doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce deseja.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end local t = string.explode(param, ",") local transform = sagaTransformacao[tonumber(t[1])] if not sagaTransformacao then -- *caso saga diferente doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerLevel(cid) < transform.level then -- *caso nao tenha level correspondente a transformacao doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao tem level ".. transform.level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, transform.storage) < 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ainda nao completou a saga") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, 5432) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode usar ainda, espere ".. getPlayerStorageValue(cid, 5432) - os.time() .." segundos. ") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end 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 end if tonumber(t[1]) > #sagaTransformacao or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao existe.") return true end if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then -- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "param = " .. tonumber(t[1]) .. "\nstorage = " .. getPlayerStorageValue(cid, sagaTransformacao.storage)) doCreatureAddMana(cid, - saga[getPlayerVocation(cid)].mana) doCreatureAddHealth(cid, - saga[getPlayerVocation(cid)].health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - transform.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - transform.health) setPlayerStorageValue(cid, sagaTransformacao.storage, tonumber(t[1])) doSetCreatureOutfit(cid, {lookType = transform.outfit}, -1) doSendMagicEffect(getThingPos(cid), transform.effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doCreatureSay(cid, "Saga!!", TALKTYPE_ORANGE_1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + transform.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + transform.mana) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setPlayerStorageValue(cid, 5432, os.time() + cooldownzin) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já está transformado nessa saga.") end return trueend
  2. uma dúvida, o player tá dizendo "saga!!"?
  3. em vermelho vai aparecer algo como: param = xxxx storage = xxxx if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "param = " .. tonumber(t[1]) .. "\nstorage = " .. getPlayerStorageValue(cid, sagaTransformacao.storage)) doCreatureAddMana(cid, - transform.mana) doCreatureAddHealth(cid, - transform.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - transform.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - transform.health) end em cima eu acho que você não trocou a função
  4. Bom, vamos lá. Quando você usa, o item some?
  5. if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "param = " .. tonumber(t[1]) .. "\nstorage = " .. getPlayerStorageValue(cid, sagaTransformacao.storage)) doCreatureAddMana(cid, - transform.mana) doCreatureAddHealth(cid, - transform.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - sagaTransformacao.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - sagaTransformacao.health) end me informa de novo a mensagem em vermelho.
  6. agora tenta assim: if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then doCreatureAddMana(cid, -1000) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, transform.mana) doCreatureAddHealth(cid, -sagaTransformacao.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - sagaTransformacao.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - sagaTransformacao.health) end e me informa a mensagem em vermelho que aparecer.
  7. tenta assim e me diz o que ocorreu: if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then doCreatureAddMana(cid, 1000) doCreatureAddHealth(cid, -sagaTransformacao.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - sagaTransformacao.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - sagaTransformacao.health) end
  8. local cooldownzin = 3 -- em segundos para esperar a talkaction novamentefunction onSay(cid, words, param, channel)local sagaTransformacao = saga[getPlayerVocation(cid)] if(param == '') then -- *caso nao digite o numero doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce deseja.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end local t = string.explode(param, ",") local transform = sagaTransformacao[tonumber(t[1])] if not sagaTransformacao then -- *caso saga diferente doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerLevel(cid) < transform.level then -- *caso nao tenha level correspondente a transformacao doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao tem level ".. transform.level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, transform.storage) < 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ainda nao completou a saga") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, 5432) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode usar ainda, espere ".. getPlayerStorageValue(cid, 5432) - os.time() .." segundos. ") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end 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 end if tonumber(t[1]) > #sagaTransformacao or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao existe.") return true end if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then doCreatureAddMana(cid, - sagaTransformacao.mana) doCreatureAddHealth(cid, -sagaTransformacao.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - sagaTransformacao.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - sagaTransformacao.health) end setPlayerStorageValue(cid, sagaTransformacao.storage, tonumber(t[1])) doSetCreatureOutfit(cid, {lookType = transform.outfit}, -1) doSendMagicEffect(getThingPos(cid), transform.effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + transform.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + transform.mana) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setPlayerStorageValue(cid, 5432, os.time() + cooldownzin) return trueend
  9. testa com alguma vocação que exista no índice da array, de preferência 1
  10. tá faltando os créditos nisso aí em! xD
  11. tenta dessa forma: local cooldownzin = 3 -- em segundos para esperar a talkaction novamentefunction onSay(cid, words, param, channel)local sagaTransformacao = saga[getPlayerVocation(cid)] if(param == '') then -- *caso nao digite o numero doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce deseja.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end local t = string.explode(param, ",") local transform = sagaTransformacao[tonumber(t[1])] if not sagaTransformacao then -- *caso saga diferente doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerLevel(cid) < transform.level then -- *caso nao tenha level correspondente a transformacao doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao tem level ".. transform.level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, transform.storage) < 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ainda nao completou a saga") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, 5432) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode usar ainda, espere ".. getPlayerStorageValue(cid, 5432) - os.time() .." segundos. ") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end 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 end if tonumber(t[1]) > #sagaTransformacao or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao existe.") return true end for i=1, #sagaTransformacao do if tonumber(t[1]) ~= getPlayerStorageValue(cid, sagaTransformacao.storage) then doCreatureAddMana(cid, -sagaTransformacao.mana) doCreatureAddHealth(cid, -sagaTransformacao.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - sagaTransformacao.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - sagaTransformacao.health) end end setPlayerStorageValue(cid, sagaTransformacao.storage, tonumber(t[1])) doSetCreatureOutfit(cid, {lookType = transform.outfit}, -1) doSendMagicEffect(getThingPos(cid), transform.effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + transform.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + transform.mana) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) setPlayerStorageValue(cid, 5432, os.time() + cooldownzin) return trueend
  12. se for assim, usa uma storage só e retorna o valor da vocação.
  13. for i=1, #sagaTransformacao do if getPlayerStorageValue(cid, sagaTransformacao.storage) >= 0 then doCreatureAddMana(cid, -sagaTransformacao.mana) doCreatureAddHealth(cid, -sagaTransformacao.health) setCreatureMaxMana(cid, getCreatureMaxMana(cid) - sagaTransformacao.mana) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) - sagaTransformacao.health) end end o que pretendia exatamente adicionando isso?
  14. tenta: doCreatureAddHealth(cid, - getCreatureHealth(cid) + getCreatureMaxHealth(cid))
  15. local sagaTransformacao = saga[getPlayerVocation(cid)] coloca /\ depois de function onSay()
  16. deixa tudo em um arquivo só: local cooldownzin = 3 -- em segundos para esperar a talkaction novamentelocal saga = { [1] = {{outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [2] = {{outfit = 66, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [3] = {{outfit = 91, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [4] = {{outfit = 18, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [5] = {{outfit = 31, level = 36, storage = 2930, mana = 2000, health = 3000},{outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, effect = 111 } local sagaTransformacao = saga[getPlayerVocation(cid)]function onSay(cid, words, param, channel) if(param == '') then -- *caso nao digite o numero doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce deseja.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end local t = string.explode(param, ",") local transform = sagaTransformacao[tonumber(t[1])] if not sagaTransformacao then -- *caso saga diferente doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerLevel(cid) < transform.level then -- *caso nao tenha level correspondente a transformacao doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao tem level ".. transform.level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, transform.storage) < 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ainda nao completou a saga") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, 5432) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode usar ainda, espere ".. getPlayerStorageValue(cid, 5432) - os.time() .." segundos. ") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end 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 end if tonumber(t[1]) > #sagaTransformacao or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao existe.") return true end doSetCreatureOutfit(cid, {lookType = transform.outfit}, -1) doSendMagicEffect(getThingPos(cid), transform.effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) setCreatureMaxHealth(cid, getCreatureHealth(cid) + transform.health) setCreatureMaxMana(cid, getCreatureMana(cid) + transform.mana) doPlayerSetStorageValue(cid, 5432, os.time() + cooldownzin) return trueend
  17. my bad, editei ali local saga = { [1] = {{outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [2] = {{outfit = 66, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [3] = {{outfit = 91, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [4] = {{outfit = 18, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [5] = {{outfit = 31, level = 36, storage = 2930, mana = 2000, health = 3000},{outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, effect = 111 } sagaTransformacao = saga[getPlayerVocation(cid)]
  18. local saga = { [1] = {{outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [2] = {{outfit = 66, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [3] = {{outfit = 91, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [4] = {{outfit = 18, level = 36, storage = 2930, mana = 2000, health = 3000}, {outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, [5] = {{outfit = 31, level = 36, storage = 2930, mana = 2000, health = 3000},{outfit = 71, level = 36, storage = 2930, mana = 2000, health = 3000}}, effect = 111 } sagaTransformacao = saga[getPlayerVocation(cid)] local cooldownzin = 3 -- em segundos para esperar a talkaction novamentefunction onSay(cid, words, param, channel) if(param == '') then -- *caso nao digite o numero doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce deseja.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end local t = string.explode(param, ",") local transform = sagaTransformacao[tonumber(t[1])] if not sagaTransformacao then -- *caso saga diferente doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerLevel(cid) < transform.level then -- *caso nao tenha level correspondente a transformacao doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao tem level ".. transform.level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, transform.storage) < 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ainda nao completou a saga") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, 5432) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode usar ainda, espere ".. getPlayerStorageValue(cid, 5432) - os.time() .." segundos. ") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true end 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 end if tonumber(t[1]) > #sagaTransformacao or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao existe.") return true end doSetCreatureOutfit(cid, {lookType = transform.outfit}, -1) doSendMagicEffect(getThingPos(cid), transform.effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) setCreatureMaxHealth(cid, getCreatureHealth(cid) + transform.health) setCreatureMaxMana(cid, getCreatureMana(cid) + transform.mana) doPlayerSetStorageValue(cid, 5432, os.time() + cooldownzin) return trueend @edit os códigos tão bugando no spoiler, wtf
  19. configura e testa: function onSay(cid, words, param)local saga = {[vocation1] = {[1] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}, [2] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}, [3] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}},[vocation2] = {[1] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}, [2] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}, [3] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}},[vocation3] = {[1] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}, [2] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}, [3] = {storage = xxxx, level = xxxx , outfit = {lookType = XXXX}, effect = XX}}}if not saga[getPlayerVocation(cid)] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode trocar de saga.") return trueendlocal t = string.explode(param, ",") if(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.") return trueend if not (tonumber(t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o numero da saga que voce deseja.") return trueend if tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga nao existe.")return trueendif getPlayerStorageValue(cid, saga[getPlayerVocation(cid)][t[1]].storage) < 1 and getPlayerLevel(cid) < saga[getPlayerVocation(cid)][t[1]].level then doPlayerSendCancel(cid, "storage :".. saga[getPlayerVocation(cid)][t[1]].storage .." = " .. getPlayerStorageValue(cid, saga[getPlayerVocation(cid)][t[1]].storage) .."\n level necessário: ".. saga[getPlayerVocation(cid)][t[1]].level) return true else doSetCreatureOutfit(cid, saga[getPlayerVocation(cid)][t[1]].outfit, -1) doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)][t[1]].effect) doPlayerSendTextMessage(cid, 25, "Voce escolheu uma nova saga!")doCreatureSay(cid, "Saga!!", TALKTYPE_ORANGE_1) return true end end
  20. Conflito não vai dar não, a diferença é que agora você pode configurar um level específico pra cada uma. Se o cara ter o level/storage, vai continuar funcionando da mesma forma. O ideal seria você substituir isso: if 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.")end por isso: if getPlayerStorageValue(cid, saga[t[1]].storage) > 0 and getPlayerLevel(cid) >= saga[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 ".. saga[t[1]].storage .." usar essa saga.")doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "storage :".. saga[t[1]].storage .." = " .. getPlayerStorageValue(cid, saga[t[1]].storage) .."\n level necessário: ".. saga[t[1].level)return trueend assim você configura o level certinho.
  21. 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, effect = 111}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação}} if getPlayerStorageValue(cid, saga[t[1]].storage) < 1 and getPlayerLevel(cid) < saga[t[1]].level then return doPlayerSendCancel(cid, "storage :".. saga[t[1]].storage .." = " .. getPlayerStorageValue(cid, saga[t[1]].storage) .."\n level necessário: ".. saga[t[1].level) and false end
  22. Rapaz, eu compilo normalmente pelo codeblocks. Compartilha aí a solução, otland pode sim.
  23. Você adicionou todas as libs necessárias?
  24. sua variável PATH tá correta?
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...