Ir para conteúdo

Maahzeera

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Obrigado
    Maahzeera deu reputação a ernaix69 em Outfit Animada   
    Você precisa compilar suas spr com essas opçoes  e ativar essas features no otc 

    g_game.enableFeature(GameSpritesAlphaChannel)
    g_game.enableFeature(GameIdleAnimations)
    g_game.enableFeature(GameEnhancedAnimations)
  2. Obrigado
    Maahzeera deu reputação a FeeTads em Spell Fast Attack (Efeito no Target)   
    quando der esse pensa, como vou acertar algo que ja está morto / não existe mais?
    como checar isso?
     
    local target = getCreatureTarget(cid) if target > 0 then if isCreature(target) then ... função ... end end
    checando se ainda existe aquele creature com "isCreature", pq se não tiver mais la, não fará nada no script

    pode ser basicamente assim:
     
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 70) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -40.5, 0) local function onCastSpell1(cid, target, parameters) local position1 = {x=getThingPosition(target).x+0, y=getThingPosition(target).y+0, z=getThingPosition(target).z} doSendMagicEffect(position1, 31) if isCreature(parameters.cid) and isCreature(target) and getCreatureTarget(parameters.cid) > 0 then return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat1, parameters.var) end end function onCastSpell(cid, var) local parameters = {cid = cid, var = var, combat1 = combat1} local target = getCreatureTarget(cid) if target <= 0 then return false -- se não tiver target retorna false end for k = 1, 7 do addEvent(function() if isCreature(cid) and isCreature(target) then --checa tanto o cid quanto o target addEvent(onCastSpell1, 1, cid, target, parameters) --passa o parametro do creature target pra função end end, 1 + ((k-1) * 225)) end return true end  
     
     
     nessa linha ele passa

    cid, target, parameters

    o que pode ser desnecessário, pq o parameters, ja possui na table o cid
    parameters.cid é a mesma coisa que cid
  3. Obrigado
    Maahzeera deu reputação a quemtuacha em Spell Fast Attack (Efeito no Target)   
    deve funcionar:
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 70) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -40.5, 0) function onTargetCreature(cid, target) local position = {x = getThingPosition(target).x+0, y = getThingPosition(target).y+0, z = getThingPosition(target).z} -- aqui configura a posição do efeito doSendMagicEffect(position, 31) -- aqui muda o efeito ao acertar o player end setCombatCallback(combat1, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") local function onCastSpell1(parameters) if isCreature(parameters.cid) and getCreatureTarget(parameters.cid) then return isCreature(parameters.cid) and doCombat(parameters.cid, parameters.combat1, parameters.var) end end function onCastSpell(cid, var) local parameters = {cid = cid, var = var, combat1 = combat1} for k = 1, 7 do addEvent(function() if isCreature(cid) then addEvent(onCastSpell1, 1, parameters) end end, 1 + ((k-1) * 225)) end return true end  
  4. Obrigado
    Maahzeera deu reputação a ShyX em Spell Fast Attack (Efeito no Target)   
    @Maahzeera Tinha esquecido uma coisa.
     
     
  5. Obrigado
    Maahzeera deu reputação a ShyX em Spell Fast Attack (Efeito no Target)   
    Tenta:
     
  6. Obrigado
    Maahzeera deu reputação a Maniaco em Effect Spell   
    Tenta assim:
     
     
  7. Obrigado
    Maahzeera deu reputação a koyotestark em Sprite sumindo no mapa   
    isso pq a sprite eh grande, cm a ponta fica la atraz ela para de mostrar na tela, aconselho a dividir ela em pedaços menores tipo 4 pedaços de 2
  8. Curtir
    Maahzeera deu reputação a Anderson Sacani em Spell Cura   
    Este funcionará perfeitamente:
    local config = { heal = 500, -- Quanto irá curar? Obs.: Valor fixo. } local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function onGetFormulaValues(cid, level, maglevel) local max = config.heal local min = max return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end  
  9. Obrigado
    Maahzeera deu reputação a FeeTads em (Resolvido)Script de Reborn (Wodbo)   
    esse erro no console
    "atempt do call global ..." significa que está tentando puxar um funçao da LIB que não existe.

    você não tem na LIB a função "doReborn"

    cola essa função em qualquer lib sua e reabra o OT
     
    function doReborn(cid, level, looktype, vocation) local playerID = getPlayerGUID(cid) setPlayerStorageValue(cid, 30023, 4) setPlayerStorageValue(cid, 30025, looktype) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+50250) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+50250) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) if isCreature(cid) then doRemoveCreature(cid, true) end db.query("UPDATE `players` SET `level` = " .. level .. " WHERE `id` = " .. playerID .. ";") db.query("UPDATE `players` SET `looktype` = " .. looktype .. " WHERE `id` = " .. playerID .. ";") db.query("UPDATE `players` SET `vocation` = " .. vocation .. " WHERE `id` = " .. playerID .. ";") return TRUE end
    e use esse código aqui como reborn, otimizei ele pra outro DBO:
     
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg:lower()) end function onThink() npcHandler:onThink() end local talkState = {} local config = { -- [voc atual] = {level apos reborn, looktype após reborn, pra qual vocação vai} [5] = {to_level = 8, looktype = 10, to_voc = 6}, [18] = {to_level = 8, looktype = 821, to_voc = 19}, [36] = {to_level = 8, looktype = 38, to_voc = 37}, [49] = {to_level = 8, looktype = 50, to_voc = 50}, [62] = {to_level = 8, looktype = 909, to_voc = 63}, [75] = {to_level = 8, looktype = 842, to_voc = 76}, [87] = {to_level = 8, looktype = 81, to_voc = 87}, [99] = {to_level = 8, looktype = 88, to_voc = 100}, [115] = {to_level = 8, looktype = 1373, to_voc = 116}, [131] = {to_level = 8, looktype = 113, to_voc = 132}, [144] = {to_level = 8, looktype = 50, to_voc = 145}, [156] = {to_level = 8, looktype = 128, to_voc = 157}, [168] = {to_level = 8, looktype = 144, to_voc = 169}, [181] = {to_level = 8, looktype = 153, to_voc = 182}, [210] = {to_level = 8, looktype = 169, to_voc = 211}, [222] = {to_level = 8, looktype = 180, to_voc = 223}, [234] = {to_level = 8, looktype = 194, to_voc = 235}, [248] = {to_level = 8, looktype = 205, to_voc = 249}, [260] = {to_level = 8, looktype = 212, to_voc = 261}, [272] = {to_level = 8, looktype = 221, to_voc = 273}, [284] = {to_level = 8, looktype = 227, to_voc = 285}, [296] = {to_level = 8, looktype = 235, to_voc = 297}, [308] = {to_level = 8, looktype = 246, to_voc = 309}, [320] = {to_level = 8, looktype = 257, to_voc = 321}, [332] = {to_level = 8, looktype = 265, to_voc = 333}, [344] = {to_level = 8, looktype = 277, to_voc = 345}, [356] = {to_level = 8, looktype = 285, to_voc = 357}, [368] = {to_level = 8, looktype = 296, to_voc = 369}, [380] = {to_level = 8, looktype = 302, to_voc = 381}, [392] = {to_level = 8, looktype = 308, to_voc = 393}, [404] = {to_level = 8, looktype = 321, to_voc = 405}, [417] = {to_level = 8, looktype = 335, to_voc = 418}, [429] = {to_level = 8, looktype = 347, to_voc = 430}, [441] = {to_level = 8, looktype = 357, to_voc = 442}, [453] = {to_level = 8, looktype = 368, to_voc = 454}, [465] = {to_level = 8, looktype = 375, to_voc = 466}, [482] = {to_level = 8, looktype = 578, to_voc = 483}, [503] = {to_level = 8, looktype = 556, to_voc = 504}, --pra inserir mais é só copiar e colar e mudar da mesma forma } local need_level = {200, 600} local rstorage = 149501 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) local vocation = getPlayerVocation(cid) local t = config[vocation] local levelP = getPlayerLevel(cid) if isInArray({"reborn", "rebornar", "reset", "resetar"}, msg) then if getPlayerStorageValue(cid, 30023) == 4 then npcHandler:say("Desculpe! Você ja está rebornado!", cid) npcHandler:releaseFocus(cid) return true end if not t then npcHandler:say("Você precisa estar na ultima transformação para rebornar!", cid) return true end if t then if levelP < need_level[1] or levelP > need_level[2] then npcHandler:say("Apenas level 200 até 600 podem rebornar!", cid) return true else npcHandler:say("Você tem certeza que deseja rebornar?", cid) talkState[talkUser] = 1 end end elseif isInArray({"yes", "sim", "quero", "yeah"}, msg) and talkState[talkUser] == 1 then setPlayerStorageValue(cid, rstorage, getPlayerLevel(cid)) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) doReborn(cid, t.to_level, t.looktype, t.to_voc) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  

Informação Importante

Confirmação de Termo