Ir para conteúdo

MaTTch

Membro
  • Registro em

  • Última visita

Tudo que MaTTch postou

  1. almente o maxMessageBuffer no config.lua
  2. local pos = {x = 385, y = 759, z = 7} local boss_name = "Nome do Boss" function onStepIn(cid, item, position, fromPosition) if getCreatureName(cid):lower() ~= boss_name:lower() then doTeleportThing(cid, pos) doSendMagicEffect(getThingPos(cid), 10) end return true end
  3. em globalevents
  4. almente o valor para 254 nas sources ou se quiser acima disso pague um C++
  5. Acabei de fazer aqui, mas nao testei: local function doPlayerAddDepotItems(pid, item, count) local result = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1;") if (result:getID() ~= -1) then local ls = tonumber(result:getDataInt("sid")) return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls+1)..", 101, "..item..", "..count..", '');") end end local config = { --[posiçao do rank] = {premio, quantidade} [1] = {2160,100}, -- TOP 1 [2] = {2160,60}, -- TOP 2 [3] = {2160,40}, -- TOP 3 [4] = {2160,20}, -- TOP 4 [5] = {2160,10} -- TOP 5 } local days = {"sunday"} -- {Segunda = Monday, Terça = Tuesday, Quarta = Wednesday, Quinta = Thursday, Sexta = Friday, Sabado = Saturday, Domingo = Sunday} local players = {} function onTimer(interval) for d = 1, #days do if os.date("%A"):lower() ~= days[d]:lower() then return true end end local string = "Ganhadores dos premios TOP Rank:\n" for i = 1, #config do local result = db.getResult("SELECT `name`, `id` FROM `players` WHERE `group_id` < 3 AND deleted = 0 ORDER BY `level` DESC, `experience` DESC LIMIT "..(i-1)..", "..i..";") table.insert(players, result:getDataInt("id")) local name = result:getDataString("name") local on = getPlayerByNameWildcard(name) if isCreature(on) then doPlayerAddItem(on, config[i][1], config[i][2]) else doPlayerAddDepotItems(players[i], config[i][1], config[i][2]) end string = string..""..i.." "..name..", premio: "..config[i][2].." "..getItemNameById(config[i][1])..""..(config[i][2] > 1 and "s" or "").."\n" end return doBroadcastMessage(string, MESSAGE_EVENT_ADVANCE) end TAG: <globalevent name="TopReward" time="21:00" event="script" value="Nome Do Arquivo.lua"/>
  6. Você colocou o script do globalEvents?? e sobre sair mensagem 2 vezes; tente com assim: local storage = 27398 local efeito = 15 local exe = {} function onEquip(cid, item, slot, fromPosition, toPosition) if exe[cid] then exe[cid] = nil return true else exe[cid] = true end local playerpos = getThingPos(cid) local rate = {} if getPlayerLevel(cid) <= 1000 then rate = 2 elseif getPlayerLevel(cid) > 1001 and getPlayerLevel(cid) <= 2000 then rate = 2 elseif getPlayerLevel(cid) > 2001 and getPlayerLevel(cid) <= 3000 then rate = 2 elseif getPlayerLevel(cid) > 3001 and getPlayerLevel(cid) <= 4000 then rate = 2 elseif getPlayerLevel(cid) > 4001 then rate = 2 end doSendMagicEffect(playerpos, efeito) setPlayerStorageValue(cid, storage, 1) doTransformItem(item.uid, 10309, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia foi multiplicada (2x).") doPlayerSetExperienceRate(cid, rate) return true end function onDeEquip(cid, item, slot) setPlayerStorageValue(cid, storage, -1) doTransformItem(item.uid, 10310, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia esta de volta ao normal.") doPlayerSetExperienceRate(cid, 1.0) return true end
  7. local storage = 27398 local efeito = 15 function onEquip(cid, item, slot, fromPosition, toPosition) local playerpos = getThingPos(cid) local rate = {} if getPlayerLevel(cid) <= 1000 then rate = 2 elseif getPlayerLevel(cid) > 1001 and getPlayerLevel(cid) <= 2000 then rate = 2 elseif getPlayerLevel(cid) > 2001 and getPlayerLevel(cid) <= 3000 then rate = 2 elseif getPlayerLevel(cid) > 3001 and getPlayerLevel(cid) <= 4000 then rate = 2 elseif getPlayerLevel(cid) > 4001 then rate = 2 end doSendMagicEffect(playerpos, efeito) setPlayerStorageValue(cid, storage, 1) doTransformItem(item.uid, 10309, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia foi multiplicada (2x).") doPlayerSetExperienceRate(cid, rate) return true end function onDeEquip(cid, item, slot) setPlayerStorageValue(cid, storage, -1) doTransformItem(item.uid, 10310, 1) doPlayerSendTextMessage(cid, 22, "Sua experiencia esta de volta ao normal.") doPlayerSetExperienceRate(cid, 1.0) return true end GlobalEvents: local storage = 27398 local efeito = 15 function onThink(interval, lastExecution) local playerpos = getThingPos(cid) for _, pid in ipairs(getPlayersOnline()) do if getPlayerStorageValue(pid, storage) >= 1 then doSendMagicEffect(playerpos, efeito) end end return true end
  8. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    '-'
  9. Galera tava com uma duvida se existe alguma maneira de checar se uma espada por exemplo ocupa o slot two-handed e retorna o valor (true ou false).
  10. pode ser... eu testei em TFS 0.3.6 e funcionou perfeitamente
  11. MaTTch postou uma resposta no tópico em Suporte Tibia OTServer
    so pra avisa o cid nao é reconhecido antes do function. tenta ae: local time = 2000 local function doEffect(cid) if isCreature(cid) and getPlayerStorageValue(cid, 13540) > 0 then doSendMagicEffect(getThingPos(cid), math.random(10,30)) doSendAnimatedText(getThingPos(cid), "VIP", TEXTCOLOR_DARKRED) addEvent(doEffect, time, cid) end end function onLogin(cid) return doEffect(cid) end
  12. ooi

    MaTTch postou uma resposta no tópico em Playground (Off-topic)
    vai ver tomo toddynho sem agitar...
  13. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    masoq...
  14. jovem na função onThink nao existe o cid, vai ter de utilizar o getPlayersOnline()
  15. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    onde compro os ingressos?
  16. é so alterar o tempo
  17. dependendo da ocasião é bem util.
  18. Na verdade é possivel sim: <attribute key="increaseMagicPercent" value="110" /> mas lembre-se que o value deve ser sempre acima de 100 para aumentar a força, e menor de 100 para diminuir. Exemplo: ali esta 110, entao ele da apenas 10% a mais de porcentagem, pois os 100 representao os 100% do poder do player.
  19. ..... local tempo = 400 local distance_effect = 37 local function getPosDirs(p, dir) return dir == 1 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 2 and {x=p.x-1, y=p.y-1, z=p.z} or dir == 3 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x-1, y=p.y+1, z=p.z} end local f = 1 local function executeEffect(cid) if isCreature(cid) then doSendDistanceShoot(getPosDirs(getThingPos(cid), f), getPosDirs(getThingPos(cid), f+1), distance_effect) if f == 4 then f = 1 else f = f + 1 end addEvent(executeEffect, tempo, cid) end end function onCastSpell(cid, var) if getPlayerStorageValue(cid, 101518) == 1 then executeEffect(cid) setPlayerStorageValue(cid, 101518, 2) else return doPlayerSendCancel(cid, "You cannot use this spell.") and false end return true end
  20. ambos os 2 scripts prescisaria do creaturescripts para o efeito continuar ao logar.
  21. de extrema utilidade.
  22. local tempo = 400 local distance_effect = 37 local function getPosDirs(p, dir) return dir == 1 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 2 and {x=p.x-1, y=p.y-1, z=p.z} or dir == 3 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x-1, y=p.y+1, z=p.z} end local f = 1 local function executeEffect(cid) if isCreature(cid) then doSendDistanceShoot(getPosDirs(getThingPos(cid), f), getPosDirs(getThingPos(cid), f+1), distance_effect) if f == 4 then f = 1 else f = f + 1 end addEvent(executeEffect, tempo, cid) end end function onCastSpell(cid, var) return executeEffect(cid) end
  23. onde esta ali por exemplo: { x=pos.x-1, y=pos.y-1, z=pos.z } deixe : { x=getCreaturePosition(cid).x-1, y=getCreaturePosition(cid).y-1, z=getCreaturePosition(cid).z } me referia a isto. eu prefiro encinar do que dar de mao beijada.
  24. MaTTch postou uma resposta no tópico em Playground (Off-topic)
    Estou pensando nas possibilidades do chaos caso brasil perder
  25. tente removendo o fullmh, se nao dar tente o maxml.

Informação Importante

Confirmação de Termo