Ir para conteúdo

Storm

Héroi
  • Registro em

  • Última visita

Tudo que Storm postou

  1. local key = 378378 -- Storage do reset local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) function onGetFormulaValues(cid, level, skill, attack, factor) local k = getPlayerStorageValue(cid, key) local skillTotal, levelTotal = skill + attack, level / 5 return -(skillTotal * 1.5 + levelTotal)-(skillTotal * 1.5 + levelTotal)*(k*0.1), -(skillTotal * 2.5 + levelTotal)-(skillTotal * 2.5 + levelTotal)*(k*0.1) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  2. O player tem que relogar para que a vida/mana mude.
  3. @Toulouse Tenta assim local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1, -80, 85, 100, 105, 120) local key = 378378 function onCastSpell(cid, var) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA) setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, -60, -1 * getCreatureStorage(cid, key), -80 * getCreatureStorage(cid, key), 85, 100, 105, 120) if getCreatureStorage(cid, key) >= 1 then return doCombat(cid, combat2, var) end return doCombat(cid, combat, var) end
  4. @Jociel Tenta assim local t = { [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra} } local itemid, count = 2150 , 5 -- ID do item que precisa local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local a = t[getPlayerVocation(cid)] local outfit = {lookType = a[2]} if msgcontains(msg, "yes") then if a then if doPlayerRemoveItem(cid, itemid, count) then doPlayerSetVocation(cid, a[1]) doCreatureChangeOutfit(cid, outfit) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + a[3]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + a[4]) selfSay("Congratulations!!", cid) else selfSay("Sua vocation não tem promotion", cid) end else selfSay("Sua vocation não tem promotion", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  5. @Jociel Cheque se configurou a tabela corretamente , cada vocation terá um tipo de looktype [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra}
  6. Tenta mudar doSetCreatureOutfit(cid, a[2], -1) Para doSetCreatureOutfit(cid, { looktype = a[2] }, -1)
  7. Seria por porcentagem ou pela quantidade maxima de vida ?
  8. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    local storage = 43214 function onUse(cid, item, frompos, item2, topos) if getCreatureStorage(cid, storage) == 1 then doPlayerSendTextMessage(cid, 27, "Você só pode usar esse item uma vez") return true end if item.itemid == item.itemid then doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doRemoveItem(item.uid,1) doCreatureSetStorage(cid, storage, 1) doSendMagicEffect(frompos, 28) doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE) return true end end
  9. Pode ser parecido com a chuva de itens ou você quer de algum outro modo ?
  10. @mullino if getDistanceBetween (playerPos, targetPos) > 1 then return true end Está vendo o número 1 ? então , vou ler o código pra você se a distancia entre dois jogadores (player que usa a spell, target que sofre com a spell) for maior que 1 então retornar verdadeiro e acabar por ai Onde está o número 1 , coloque o limite de quadrados entre os players para poder a usar a spell
  11. function onEquip(cid, item, slot) storageStatus = getPlayerStorageValue (cid, 23000) print (storageStatus) if storageStatus == 0 or storageStatus == -1 then setPlayerStorageValue(cid, 23000, storageStatus + 1) elseif storageStatus == 1 then setPlayerStorageValue(cid, 23000, storageStatus + 1) elseif storageStatus == 2 then setPlayerStorageValue(cid, 23000, storageStatus + 1) elseif storageStatus == 3 then setPlayerStorageValue(cid, 23000, storageStatus + 1) elseif storageStatus == 4 then setPlayerStorageValue(cid, 23000, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "MODE = ".. getPlayerStorageValue(cid, 23000)) return true end
  12. Storm postou uma resposta no tópico em Suporte Tibia OTServer
    Identei esse código , tava meio feio e tinha um end onde não devia local storage = 43214 local time = 5.0 -- Segundos de exhaust function onUse(cid, item, frompos, item2, topos) if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Você tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end if item.itemid == item.itemid then doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doPlayerAddSkillTry(cid,0,doPlayerAddSkill(cid, 0)) doPlayerAddSkillTry(cid,1,doPlayerAddSkill(cid, 1)) doPlayerAddSkillTry(cid,2,doPlayerAddSkill(cid, 2)) doPlayerAddSkillTry(cid,3,doPlayerAddSkill(cid, 3)) doPlayerAddSkillTry(cid,4,doPlayerAddSkill(cid, 4)) doPlayerAddSkillTry(cid,5,doPlayerAddSkill(cid, 5)) doPlayerAddSkillTry(cid,6,doPlayerAddSkill(cid, 6)) doRemoveItem(item.uid,1) exhaustion.set(cid, storage, time) doSendMagicEffect(frompos, 28) doSendAnimatedText(getPlayerPosition(cid), "Skill Up", TEXTCOLOR_BLUE) return true end end
  13. Òbvio , sem o item em mão não tem como um player doar o item para o outro.
  14. Você não está configurando corretamente , eu testei em meu próprio servidor e funcionou corretamente. Certifique que colocou o ID da mana potion aqui local id = 2150 -- ID da mana Potion e de que está colocando os parâmetros corretamente
  15. Observe o que ele disse em suas ultimas palavras , que era pra estar a ilustração da hunting spear e não da crystal arrow , ou seja , meu modo também é correto. Antes de querer corrigir os outros , vai aprender a ler , analfabeto funcional.
  16. <item id="ID DO ITEM" article="a" name="NOME DO ITEM"> <attribute key="weight" value="5500" /> <attribute key="slotType" value="ammo" /> <attribute key="Tipo do elemento" value="VALOR inteiro(1, 2, 3...)acima de 1" /> </item> Em tipo de elemento , eles podem ser : <attribute key="elementFire" value="VALOR" /> <attribute key="elementIce" value="VALOR" /> <attribute key="elementEarth" value="VALOR" /> <attribute key="elementEnergy" value="VALOR" /> Os outros elementos não testei , esse é o que tenho certeza que funciona
  17. @Jociel local t = { [255] = {256, 50, 3000, 3000} -- {old vocation} = {New vocation, looktype, life extra, mana extra} } local itemid, count = 2150 , 5 -- ID do item que precisa local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local a = t[getPlayerVocation(cid)] if msgcontains(msg, "yes") then if a then if doPlayerRemoveItem(cid, itemid, count) then doPlayerSetVocation(cid, a[1]) doSetCreatureOutfit(cid, a[2], -1) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + a[3]) setCreatureMaxMana(cid, getCreatureMaxMana(cid) + a[4]) selfSay("Congratulations!!", cid) else selfSay("Sua vocation não tem promotion", cid) end else selfSay("Sua vocation não tem promotion", cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  18. Apenas essa vocation 255 conseguiria fazer a super promotion ou seria por uma tabela ?
  19. Não cara , não tem .
  20. Você cria um novo NPC com essa mesma script e apenas adiciona na tabela da creaturescripts , nada além disso.
  21. @Emanueldk -- CreatureScripts -- Registre no login.lua = registerCreatureEvent(cid, "noPush") -- XML = <event type="push" name="noPush" event="script" value="noPush.lua"/> function onPush(cid, target) local pos = getCreaturePosition(target) local actionid = 3124 -- Action ID do piso if getTileInfo(pos).actionid == actionid then doPlayerSendTextMessage(cid, 27, "Você não pode puxar neste local") return false end return true end
  22. Me lembro de já ter te passado uma script dessa .
  23. Você vai ter que mudar a sprite pela otItemEditor e pelo client
  24. Uai mas a script que te passei do utani gran hur faz isso , não te permite usar a spell se estiver com paralyze
  25. Você quer que a spell remova a speed que a script dá ?

Informação Importante

Confirmação de Termo