Ir para conteúdo

Zanrix

Membro
  • Registro em

  • Última visita

Tudo que Zanrix postou

  1. Antes da primeira linha do código, coloca isso: local function isChampionknocker(cid) return isInArray({13, 14}, getPlayerVocation(cid)) end
  2. Qual ID da vocação champion? No caso essa que pode usar o comando !comprar skillfist e !comprar skillfist10
  3. Correto. Estranho estar podendo pegar mais de uma vez. Pode postar alguma outra quest do server? Pra ver a diferença
  4. Coloca um return true antes do último end
  5. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    @Exura ATS Aí simm, curti, fico feliz em ter ajudado
  6. Estranho, só coloquei uma mensagem. Tem outro script de Quest pra dar uma comparada?
  7. @diarmaint Coloca o unique ID do baú no map editor como 8945, ou então muda no script ali pra qual você quer <action uniqueid="8945" script="reflectquest.lua"/> function onUse(cid, item, frompos, item2, topos) if item.uid == 8945 then local queststatus = getPlayerStorageValue(cid, 31320) local max_gold = 50 if queststatus == -1 then local qtd_gold = math.random(1,50) doPlayerSendTextMessage(cid,22,"Parabéns você acabou de completar a reflect quest e recebeu ".. qtd_gold .." golds em uma quantidade aleatória de 0 a ".. max_gold ..". ") setPlayerStorageValue(cid, 45455, 1) doPlayerAddItem(cid, 2148, qtd_gold) setPlayerStorageValue(cid, queststatus, 1) else doPlayerSendTextMessage(cid,22,"Está vazio.") end end end
  8. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Opa, malz. Nesse último script muda o 139 pra 142 e o 131 pra 134.
  9. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Difícil dizer o que está dando erro, só vejo o código em si ali na distro. Agora pouco não estava dando erro, não é? Não consegue reverter? Ia falar pra tentar assim agora (Mas não tem nada a ver com o erro): if getPlayerVocation(cid) == 3 then setPlayerStorageValue(cid, 40003, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, {lookType = 137, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) else doCreatureChangeOutfit(cid, {lookType = 129, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) end end if getPlayerVocation(cid) == 4 then setPlayerStorageValue(cid, 40004, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, {lookType = 139, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) else doCreatureChangeOutfit(cid, {lookType = 131, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) end end if getPlayerVocation(cid) == 2 then setPlayerStorageValue(cid, 40002, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, {lookType = 148, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) else doCreatureChangeOutfit(cid, {lookType = 144, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) end end if getPlayerVocation(cid) == 1 then setPlayerStorageValue(cid, 40001, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, {lookType = 149, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) else doCreatureChangeOutfit(cid, {lookType = 145, lookHead = 86, lookBody = 86, lookLegs = 86, lookFeet = 86, lookTypeEx = 0, lookAddons = 0}) end end
  10. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Você criou um char novo? Que estranho
  11. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Na parte que mudamos no FirstItens.xml, substitui por isso: if getPlayerVocation(cid) == 3 then setPlayerStorageValue(cid, 40003, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, 137) else doCreatureChangeOutfit(cid, 129) end end if getPlayerVocation(cid) == 4 then setPlayerStorageValue(cid, 40004, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, 139) else doCreatureChangeOutfit(cid, 131) end end if getPlayerVocation(cid) == 2 then setPlayerStorageValue(cid, 40002, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, 148) else doCreatureChangeOutfit(cid, 144) end end if getPlayerVocation(cid) == 1 then setPlayerStorageValue(cid, 40001, 1) if getPlayerSex(cid) == 0 then doCreatureChangeOutfit(cid, 149) else doCreatureChangeOutfit(cid, 145) end end
  12. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Você trocou ali os números na tag "quest", muda pra isso no seu outfits.xml: <?xml version="1.0"?> <outfits> <outfit id="2" quest="40001"> <list gender="0" lookType="137" name="Hunter"> </list> <list gender="1" lookType="129" name="Hunter"> </list> </outfit> <outfit id="7" quest="40002"> <list gender="0" lookType="142" name="Warrior"> </list> <list gender="1" lookType="134" name="Warrior"> </list> </outfit> <outfit id="9" quest="40003"> <list gender="0" lookType="148" name="Druid"> </list> <list gender="1" lookType="144" name="Druid"> </list> </outfit> <outfit id="10" quest="40004"> <list gender="0" lookType="149" name="Wizard"> </list> <list gender="1" lookType="145" name="Wizard"> </list> </outfit> <outfit id="32" access="3" premium="no"> <list gender="0-3" lookType="75" name="Gamemaster"/> </outfit> <outfit id="33" access="4" premium="no"> <list gender="0-3" lookType="266" name="Community Manager"/> </outfit> <outfit id="34" access="5" premium="no"> <list gender="0-3" lookType="302" name="God"/> </outfit> <outfit id="" access="5" premium="no"> <list gender="0-3" lookType="12" name="Archdemon"/> </outfit> </outfits> E eu esqueci de perguntar se você quer tirar a outfit citizen das vocações, se sim, adiciona isso no código: <outfit id="1" quest="40000"> <list gender="0" lookType="136" name="Citizen"/> <list gender="1" lookType="128" name="Citizen"/> </outfit>
  13. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Da uma olhada como eu te passei ali, tem umas aspas erradas no seu código.
  14. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    O teu é por mod, nunca mexi com isso... Mas tenta colocar em cima disso "-- All Vocation".
  15. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    em outfit.xml, faça essas alterações: <outfit id="2" quest="40001"> <list gender="0" lookType="137" name="Hunter"/> <list gender="1" lookType="129" name="Hunter"/> </outfit> <outfit id="7" quest="40002"> <list gender="0" lookType="142" name="Warrior"/> <list gender="1" lookType="134" name="Warrior"/> </outfit> <outfit id="9" quest="40003"> <list gender="0" lookType="148" name="Druid"/> <list gender="1" lookType="144" name="Druid"/> </outfit> <outfit id="10" quest="40004"> <list gender="0" lookType="149" name="Wizard"/> <list gender="1" lookType="145" name="Wizard"/> </outfit> em creaturescripts\scripts\firstitems.lua, em baixo de: if getPlayerStorageValue(cid, 30001) == -1 then coloca: if getPlayerVocation(cid) == 3 then setPlayerStorageValue(cid, 40001, 1) end if getPlayerVocation(cid) == 4 then setPlayerStorageValue(cid, 40002, 1) end if getPlayerVocation(cid) == 2 then setPlayerStorageValue(cid, 40003, 1) end if getPlayerVocation(cid) == 1 then setPlayerStorageValue(cid, 40004, 1) end
  16. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Você pode colocar um storage no outfits.xml, na tag outfit, tipo assim: quest="45000". O jogador vai precisar ter esse storage pra usar a outfit, aí você pode fazer ele ganhar essa storage do jeito que quiser, no primeiro login dele, por exemplo.
  17. <event type="statschange" name="reflect" event="script" value="reflect.lua"/> login.lua: registerCreatureEvent(cid, "reflect") reflect.lua: local config = { chance = 100, -- chance de sair o reflect (1 = 1% de chance) valor_reflect = 15, -- % do dano do reflect storage = 45455 -- storage do reflect } function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, config.storage) > 0 then if type == STATSCHANGE_HEALTHLOSS and isPlayer(cid) and isCreature(attacker) then if math.random (1,100) <= config.chance then doCreatureSay(cid, "Reflect!", TALKTYPE_MONSTER_SAY) local danoReflect = value * (config.valor_reflect/100) doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -danoReflect, -danoReflect, CONST_ME_EXPLOSIONAREA) return true end end end return true end
  18. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    Uma possibilidade é colocar a função doCreatureCastSpell, que tem aqui no forum, colocar na source e aí colocar nos scripts das magias pro summon repetir a magia que você tá usando
  19. Acredito que nenhum, seria o ID da sprite, do item mesmo.
  20. Pelo que parece você já tem o script de mandar a mensagem, confere no mapa se o ID do chão onde apareceria a mensagem bate com um desses: <movevent type="StepIn" itemid="416" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="417" event="script" value="tiles.lua"/> <movevent type="StepIn" itemid="426" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="425" event="script" value="tiles.lua"/> <movevent type="StepIn" itemid="446" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="447" event="script" value="tiles.lua"/> <movevent type="StepIn" itemid="3216" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="3217" event="script" value="tiles.lua"/> <movevent type="StepIn" itemid="3202" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="3215" event="script" value="tiles.lua"/> <movevent type="StepIn" itemid="11062" event="script" value="tiles.lua"/> <movevent type="StepOut" itemid="11063" event="script" value="tiles.lua"/>
  21. Ali diz que você tem o script movements/scripts/tiles.lua, posta ele
  22. Você precisa mandar o script pra poder fazer isso sem dar conflito no código. Ao menos o movements.xml você tem que ter.
  23. Poderia postar seu movements.xml, e se tiver, em movements/scripts o script tiles.lua?
  24. Zanrix postou uma resposta no tópico em Suporte Tibia OTServer
    setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_FIRE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_ENERGY) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_DROWN) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_CURSED) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_BLEEDING)
  25. @diarmaint Testa aí local voc_inical = 2 -- id da vocação antes de se transformar local vocation = 4 -- id da vocação que a magia vai transformar local outfit = 250 -- looktype da outfit que a magia vai transformar local mana = 10 -- quanto de mana por segundo a magia vai dar local segundos = 30 -- quantos segundos a magia vai durar local efeito1 = CONST_ME_MAGIC_BLUE -- efeito de quando se transformar local efeito2 = CONST_ME_MAGIC_BLUE -- efeito de quando acabar a transformação local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, efeito1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_TICKS, 1 * segundos * 1000) setConditionParam(condition, CONDITION_PARAM_MANAGAIN, mana) setConditionParam(condition, CONDITION_PARAM_MANATICKS, 1000) local condition2 = createConditionObject(CONDITION_OUTFIT) setConditionParam(condition2, CONDITION_PARAM_TICKS, 1 * segundos * 1000) addOutfitCondition(condition2, {lookType = outfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}) setCombatCondition(combat, condition) setCombatCondition(combat, condition2) local function onCastSpell1(parameters) doPlayerSetVocation(parameters.cid, vocation) end local function onCastSpell2(parameters) if isCreature(parameters.cid) then doSendMagicEffect(getPlayerPosition(parameters.cid), efeito2) doPlayerSetVocation(parameters.cid, voc_inical) end end function onCastSpell(cid, var) local cd_stg = 98765 local cd_time = 20 -- tempo de cooldown (20 = 20 segundos) local tempo = segundos * 1000 local parameters = { cid = cid, var = var } if exhaustion.check(cid, cd_stg) == false then addEvent(onCastSpell1, 1, parameters) addEvent(onCastSpell2, tempo, parameters) exhaustion.set(cid, cd_stg, cd_time) return doCombat(cid, combat, var) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) doPlayerSendCancel(cid, "Spells is on cooldown [" ..exhaustion.get(cid, cd_stg).."s].") return false end end

Informação Importante

Confirmação de Termo