Ir para conteúdo
Banner com Efeitos

Fabi Marzan

Membro
  • Registro em

  • Última visita

Tudo que Fabi Marzan postou

  1. Imagino que o CONST_ME_SLASH seja igual para todos os direçãos, você teria que criar outro efeito mas para o outro lado então você tem que usar if creature:getDirection() == DIRECTION_NORTH then if creature:getDirection() == DIRECTION_EAST then if creature:getDirection() == DIRECTION_SOUTH then if creature:getDirection() == DIRECTION_WEST then
  2. Comecei a olhar seu código e você tinha um END demais. local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_ORANGE) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -135.8, 0, -140.9, 0) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_RED) setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -170.8, 0, -175.9, 0) local combat3 = createCombatObject() setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -150.8, 0, -155.9, 0) local function onCastSpell1(parameters) doCombat(parameters.cid, parameters.combat1, parameters.var) end local function onCastSpell2(parameters) doCombat(parameters.cid, parameters.combat2, parameters.var) end local function onCastSpell3(parameters) doCombat(parameters.cid, parameters.combat3, parameters.var) end function yagai1(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 399) end end function yagai2(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 411) end end function yagai3(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 398) end end function yagai4(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 396) end end function yagai5(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 438) end end function yagai6(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position = { x = getThingPosition(getCreatureTarget(cid)).x + 2, y = getThingPosition(getCreatureTarget(cid)).y + 2, z = getThingPosition(getCreatureTarget(cid)).z } doSendMagicEffect(position, 439) end end function onCastSpell(cid, var) local waittime = 3.0 -- Tempo de exhaustion local storage = 143512 -- não mecha local storage2 = 55512 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.") return false end local parameters = {cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3} if getPlayerStorageValue(cid, storage2) == 5 then addEvent(onCastSpell2, 650, parameters) addEvent(yagai3, 50, cid) addEvent(yagai4, 650, cid) elseif getPlayerStorageValue(cid, storage2) == 4 then addEvent(onCastSpell2, 650, parameters) addEvent(yagai3, 50, cid) addEvent(yagai4, 650, cid) elseif getPlayerStorageValue(cid, storage2) == 3 then addEvent(onCastSpell3, 650, parameters) addEvent(yagai5, 50, cid) addEvent(yagai6, 650, cid) else addEvent(onCastSpell1, 650, parameters) addEvent(yagai1, 50, cid) addEvent(yagai2, 650, cid) end exhaustion.set(cid, storage, waittime) return true end
  3. Fabi Marzan postou uma resposta no tópico em Códigos C++
    ussando sendCreatureSquare() player:sendCreatureSquare(creature, color)
  4. todo IF sempre termina com END ex: if getPlayerStorageValue(cid, storage2) == 3 then addEvent(onCastSpell3, 650, parameters) addEvent(yagai5, 50, cid) addEvent(yagai6, 650, cid) else --Function end Não sei muito inglês, mas até o próprio console informa. 'end' expected (to close 'function' at line 67) near '<eof>'
  5. Fabi Marzan postou uma resposta no tópico em Suporte Websites
    Eu apenas entendo que você precisa ter os personagens Samples, Sorcerer Sample, Druid Sample, Paladin Sample, Knight Sample para criar um personagem.
  6. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_HITCOLOR, COLOR_RED) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 134) setCombatArea(combat,createCombatArea( {{1, 1, 1}, {1, 3, 1}, -- Area 3X3 {1, 1, 1}} )) function onGetFormulaValues(cid, level, magiclevel, factor) local skillTotal, levelTotal = magiclevel * 6, level / 6 -- 3000 // 83 no level 500 com skill 100 e arma 100 local min = -(skillTotal * 30 + levelTotal) -- 3683 local max = -(skillTotal * 31 + levelTotal) -- 14.483 return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var) local waittime = 1.5 -- Tempo de exhaustion local storage = 151504 if exhaustion.check(cid, storage) then return false end local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z} local position2 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 37) doSendMagicEffect(position2, 197) exhaustion.set(cid, storage, waittime) return doCombat(cid, combat, var) end
  7. Ao fazer um videogame, Tibia é uma boa base para começar, um exemplo claro é Ravendawn.
  8. você terá o xampp instalado?
  9. Fiquei confuso, é return true function onSay(cid, words, param) local playerCoinsItemId = 2625 -- ID do item de moeda local itemToSellId = 10311 -- ID do item a ser vendido if doPlayerRemoveItem(cid, playerCoinsItemId, 8) then -- Verifica se o jogador tem as moedas necessárias local newItem = doPlayerAddItem(cid, itemToSellId, 1) -- Adiciona o item ao jogador if newItem > 0 then doItemSetAttribute(newItem, "owner", getPlayerGUID(cid)) -- Define o dono do item como o jogador atual doItemSetAttribute(newItem, "Descricao", "Item Comprado por " .. getCreatureName(cid) .. ".") -- Define a descrição do item doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce comprou o item.") else -- Lidar com o caso de falha ao adicionar o item ao jogador end else doPlayerSendCancel(cid, 'Voce nao tem 8 Fiapo Credito.') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA) end return true end
  10. function onSay(cid, words, param) local playerCoinsItemId = 2625 -- ID do item de moeda local itemToSellId = 10311 -- ID do item a ser vendido if doPlayerRemoveItem(cid, playerCoinsItemId, then -- Verifica se o jogador tem as moedas necessárias local newItem = doPlayerAddItem(cid, itemToSellId, 1) -- Adiciona o item ao jogador if newItem > 0 then doItemSetAttribute(newItem, "owner", getPlayerGUID(cid)) -- Define o dono do item como o jogador atual doItemSetAttribute(newItem, "Descricao", "Item Comprado por " .. getCreatureName(cid) .. ".") -- Define a descrição do item doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce comprou o item.") else -- Lidar com o caso de falha ao adicionar o item ao jogador end else doPlayerSendCancel(cid, 'Voce nao tem 8 Fiapo Credito.') doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA) end return false end Se você colocar return false, faz com que o texto não apareça quando você disser o comando.
  11. Não tem no caso do otx2
  12. Você já tem o sistema Castle 24? por que estaria colocando isso em Login.lua doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , "O castelo 24H é ".. nome ..".")
  13. O segundo erro é que está faltando uma: , Em setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -45.4, -100 -55, 0) E o primeiro é um AddEvent que é executado instantaneamente com um intervalo para que quando a criatura não esteja mais no alvo ou morra, ocorre aquele erro de que ela não encontra o alvo. Embora eu não tenha certeza hehe
  14. ????? Eu não vejo o problema a única coisa foi que você colocou ao contrário doPlayerSendTextMessage(cid, 22, "Você precisa ser VIP ou falar com o ADM para passar por este piso.") e doPlayerSendTextMessage(cid, 22, "Você precisa ser level 717217 ou falar com o ADM para passar por este piso.") function onStepIn(cid, item, position, fromPosition) if getPlayerGuildId(cid) > 0 then if getPlayerLevel(cid) >= 717217 then if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then doPlayerSendTextMessage(cid, 22, "WELCOME!") doSendMagicEffect(getCreaturePosition(cid), 28) else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa ser VIP ou falar com o ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa ser level 717217 ou falar com o ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa fazer parte de alguma guild ou fala com ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end return TRUE end
  15. Conheço alguém que vende modal window e mounts para oldclient a um preço justo. Discord: Sharingan
  16. @GM Vortex Muito interessante, estou muito interessado em um repositório de mounts e modal window. Para me dar uma ideia do que precisa ser adicionado
  17. Não tenho conhecimento disso mas o jeito que eu sei seria modificar os scripts para que não detecte os nomes da lista, como neste caso os scripts acima if not isInArray(blocked_name, getPlayerName(cid)) then -- scripts return true end
  18. Fabi Marzan postou uma resposta no tópico em Suporte Tibia OTServer
    Honestamente, nao sou especialista em lua ou em fazer spells, mas fiz algo rapido para voce aqui: local combatOne = createCombatObject() setCombatParam(combatOne, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combatOne, COMBAT_PARAM_HITCOLOR, COLOR_MAYABLUE) setCombatFormula(combatOne, COMBAT_FORMULA_LEVELMAGIC, -1.0, -500, -1.0, -650) setCombatArea(combatOne,createCombatArea( {{1, 1, 1}, {1, 3, 1}, -- Area 3X3 {1, 1, 1}} )) local function meteor_1(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x - math.random(2, 5), y = pos.y - 4, z = pos.z} local toposition = {x = post.x - math.random(1, 2), y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local function meteor_2(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x + math.random(2, 5), y = pos.y - 4, z = pos.z} local toposition = {x = post.x + math.random(1, 2), y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local function meteor_3(cid, target) if isCreature(target) then local pos = getCreaturePosition(target) local post = getThingPosition(getCreatureTarget(cid)) local fromposition = {x = pos.x, y = pos.y - 4, z = pos.z} local toposition = {x = post.x, y = post.y, z = post.z} doSendDistanceShoot(fromposition, toposition, CONST_ANI_FIRE) doSendMagicEffect(pos, CONST_ME_FIREAREA) end end local config = { hit = 1, time = 1200, -- meteor_1 time_2 = 1300, -- meteor_2 time_3 = 1500, -- meteor_3 numberOfAttacks = 3, attackInterval = 200 } function onCastSpell(cid, var) addEvent(function() doCombat(cid, combatOne, var) end, 1200) local pos = getCreaturePosition(cid) for i = 1, config.numberOfAttacks do addEvent(function() doSendDistanceShoot(pos, {x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, CONST_ANI_FIRE) end, config.attackInterval * i) end for fbn = 1, config.hit do addEvent(meteor_1, config.time * fbn, cid, getCreatureTarget(cid)) addEvent(meteor_2, config.time_2 * fbn, cid, getCreatureTarget(cid)) addEvent(meteor_3, config.time_3 * fbn, cid, getCreatureTarget(cid)) end return true end
  19. Isso pode ser modificado em seus scripts de loterry. local blocked_name = {"Account Manager", "Sorcerer Sample", "Druid Sample", "Paladin Sample", "Knight Sample"} if isInArray(blocked_name, getPlayerName(cid)) then return true end
  20. Não vejo problema porque está causando o debug, acabei de testar o sistema no otx 2 e funciona bem, talvez a posição local pos = {x = 154, y = 51, z = 7} ou addEvent(EddyHavoc, 3 * 1000, cid)??? tente ver: function onSay(cid, words, param) if words == "!buyvip" then -- Check player with VIP if getPlayerStorageValue(cid, 13545) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já tem vip, espere seu tempo acabar, para verificar com !vipdays.") return true end local itemid = 6535 local count = 1 if doPlayerRemoveItem(cid, itemid, count) then local days = 31 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() local time if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if string.find(tostring(getCreatureName(cid)), "[[VIP]]") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem " .. (quantity < 0 and 0 or quantity) .. " dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local name = getCreatureName(cid) db.executeQuery("UPDATE `players` SET `name` = '[VIP] " .. name .. "' WHERE `id` = " .. getPlayerGUID(cid) .. ";") doRemoveCreature(cid) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de [" .. count .. " " .. getItemNameById(itemid) .. "] para colocar VIP.") end elseif words == "!vipdays" then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end elseif words == "/checkvip" then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") else local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow) / (24 * 60 * 60)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end end end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end elseif words == "/addvip" then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local playerName = t[1] local player = getPlayerByName(playerName) local name = getCreatureName(player) local days = tonumber(t[2]) local pid = getPlayerByNameWildcard(playerName) if not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn't exist or is offline.") return TRUE end local daysvalue = days * 3600 * 24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) if string.find(tostring(getCreatureName(pid)), "[[VIP]]") then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow) / (3600 * 24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem " .. quantity .. " dias de VIP restantes.") else setPlayerStorageValue(player, 13545, time) db.executeQuery("UPDATE `players` SET `name` = '[VIP] " .. name .. "' WHERE `id` = " .. getPlayerGUID(player) .. ";") doRemoveCreature(player) end end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end elseif words == "/delvip" then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if param == "" then return TRUE, doPlayerSendTextMessage(cid, 18, "Command param required.") end local C, t = {}, string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2])) * 3600 * 24 -- Tempo da VIP por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) -- Dias de VIP. if getPlayerStorageValue(C.uid, 13545) < C.time then doPlayerSendTextMessage(cid, dec, 'O jogador ' .. t[1] .. ' não possui ' .. C.days .. ' dias de VIP.') else doPlayerSendTextMessage(cid, dec, 'Você removeu ' .. C.days .. ' dias de VIP do player ' .. t[1] .. '.') setPlayerStorageValue(C.uid, 13545, getPlayerStorageValue(C.uid, 13545) - C.time) end doSendMagicEffect(C.pos, math.random(28, 30)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end end return true end ------------------------------ função onLogin function removeVipName(cid) local newName = string.gsub(getCreatureName(cid), "%[VIP%]", "") newName = newName:trim() db.executeQuery("UPDATE `players` SET `name` = '" .. newName .. "' WHERE `id` = " .. getPlayerGUID(cid) .. ";") doRemoveCreature(cid) end function onLogin(cid) local vipStorage = getPlayerStorageValue(cid, 13545) if vipStorage > 0 then local currentTime = os.time() if vipStorage <= currentTime then setPlayerStorageValue(cid, 13545, -1) doPlayerPopupFYI(cid, "Sua [VIP] Acabou.") if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then addEvent(removeVipName, 3 * 1000, cid) end else local daysLeft = math.ceil((vipStorage - currentTime) / (24 * 60 * 60)) --local pos = {x = 146, y = 389, z = 7} --doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Voce Ainda Tem " .. daysLeft .. " Dias de [VIP] Restantes.") end end return true end
  21. algo assim? function onLogin(cid) local premiumRate = 1.5 local vipRate = 4.0 local config = { welpre = "Voce Tem "..((premiumRate - 1)*300).."% de [EXP]! Aproveite as Vantagens [PREMIUM]-[P.A]!", welvip = "Voce Tem "..((vipRate - 1)*300).."% de [EXP]! Aproveite as Vantagens [VIP]-[P.A]!", not_vip = "Olá jogador Aproveite as Vantagens [VIP]-[P.A], Voce Ganhará "..((vipRate - 1)*300).."% Mais de XP!", } if isPremium(cid) then doPlayerSetExperienceRate(cid, premiumRate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.welpre) elseif getPlayerStorageValue(cid, 13545) == 1 then doPlayerSetExperienceRate(cid, vipRate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.welvip) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, config.not_vip) end return TRUE end
  22. function onSay(cid, words, param, channel) local moedaId = 11192 local itemCount = getPlayerItemCount(cid, moedaId) local itemName = getItemNameById(moedaId) if itemCount > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. itemCount .. " " .. itemName .. (itemCount > 1 and "s" or "") .. " coin" .. (itemCount ~= 1 and "s" or "") .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have any " .. getItemNameById(moedaId) .. " coin.") end return false end

Informação Importante

Confirmação de Termo