Ir para conteúdo

zipter98

Membro
  • Registro em

  • Última visita

Tudo que zipter98 postou

  1. zipter98 postou uma resposta no tópico em Suporte Tibia OTServer
    Troca: onPokeHealthChange(cid) por: if getPlayerSlotItem(cid, 8) then onPokeHealthChange(cid) end e troca: doPlayerChangeModeIcon(cid) por: if getPlayerSlotItem(cid, 8) then doPlayerChangeModeIcon(cid) end
  2. zipter98 postou uma resposta no tópico em Suporte Tibia OTServer
    Troca: if getCreatureOutfit(cid).lookType =~ cfg.lookType then por: if getCreatureOutfit(cid).lookType ~= cfg.lookType then
  3. local msg = "Mensagem que vc qr" function onLogin(cid) if getCreatureName(cid) ~= "Account Manager" then if getPlayerStorageValue(cid, 1691) ~= 1 then doPlayerPopupFYI(cid, msg) setPlayerStorageValue(cid, 1691, 1) end end return true end @loreal Suicide pediu seu config.lua, não login.lua.
  4. Coloquei fora do mod, my bad. Troca: <action actionid="84005" event="script"><![CDATA[ domodlib('guild_func') function onUse(cid, item, frompos, item2, topos) local MyGuild = getPlayerGuildName(cid) if not HaveGuild(cid) then return doPlayerSendTextMessage(cid,22,"Sorry, you're not in a guild.") elseif not HaveAcess(MyGuild) then return doPlayerSendTextMessage(cid,22,"Your guild no has access to this area.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, TRUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome,The access of your guild in this area ends in "..getAcessDate(getGuildWinnerName())) return true end]]></action> por: <movevent type="StepIn" actionid="9089" event="script"><![CDATA[ domodlib("guild_func") function onStepIn(cid, item, position, fromPosition) local guild = getPlayerGuildName(cid) if not isPlayer(cid) then return true elseif not HaveGuild(cid) then return doPlayerSendCancel(cid, "Sorry, you're not in a guild.") and doTeleportThing(cid, fromPosition) elseif not HaveAcess(guild) then return doPlayerSendCancel(cid, "Your guild no has access to this area.") and doTeleportThing(cid, fromPosition) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Welcome, the access of your guild in this area ends in "..getAcessDate(getGuildWinnerName())) return true end]]></movement> PS: Não mexo com MODs, então não é certeza que vai funcionar. Mas não custa tentar.
  5. Np. Mas com esse novo código que enviei o erro continua acontecendo?
  6. Na função da lib, abaixo de: local status = getPokemonStatus(pokemon) você coloca: local bonus_level = getItemAttribute(item, "b_level") or 0 Depois, abaixo de: doItemSetAttribute(item, "level", newlevel) você coloca: doItemSetAttribute(item, "b_level", bonus_level + 1) No código do look, você troca: table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n [Bonus level: "..(getItemAttribute(thing.uid, "level")).."].\n") por: local bonus_level = getItemAttribute(thing.uid, "b_level") or 0 table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." [level "..getItemAttribute(thing.uid, "level").."].\n [Bonus level: +"..bonus_level.."].\n") PS: Isso só vai funcionar com pokémons criados/capturados após a atualização acima.
  7. Tenta esse movement: function onStepIn(cid, item, position, fromPosition) local guild = getPlayerGuildName(cid) if not isPlayer(cid) then return true elseif not HaveGuild(cid) then return doPlayerSendCancel(cid, "Sorry, you're not in a guild.") and doTeleportThing(cid, fromPosition) elseif not HaveAcess(guild) then return doPlayerSendCancel(cid, "Your guild no has access to this area.") and doTeleportThing(cid, fromPosition) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Welcome, the access of your guild in this area ends in "..getAcessDate(getGuildWinnerName())) return true end
  8. Hm, tenta assim: local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_TEAL) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 0) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.0, 0, -35.5, 0) local function onCastSpell1(parameters) if isCreature(parameters.cid) then doCombat(parameters.cid, parameters.combat1, parameters.var) end end function twb1(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 53) end end function onCastSpell(cid, var) local parameters = {cid = cid, var = var, combat1 = combat1} for k = 1, 10 do addEvent(function() if isCreature(cid) then onCastSpell1(parameters) twb1(cid) end end, 1 + ((k-1) * 200)) end return true end
  9. /comando dias_premium Por exemplo, /comando 60 O comando você configura na tag.
  10. local days = { [30] = 10, --[dias] = diamonds, [60] = 18, [90] = 25, } local id = 2145 --ID do diamond. function onSay(cid, words, param) if param == "" then return doPlayerSendCancel(cid, "Especify a parameter.") elseif not tonumber(param) then return doPlayerSendCancel(cid, "Say a valid number of premium days.") elseif not days[tonumber(param)] then return doPlayerSendCancel(cid, "You can't buy this quantity of premium days.") end local p_days = days[tonumber(param)] if getPlayerItemCount(cid, id) >= p_days then doPlayerAddPremiumDays(cid, tonumber(param)) doPlayerRemoveItem(cid, id, p_days) doPlayerSendTextMessage(cid, 27, "You bought "..param.." premium days.") else return doPlayerSendCancel(cid, "You do not have enough "..getItemNameById(id).." ["..p_days.."].") end return true end
  11. Já corrigi o erro, foi falta de atenção minha. PS: Quando um código não funciona, informe o erro. Ninguém aqui lê mentes, suponho.
  12. Troca: function twb1(cid) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 53) end por: function twb1(cid) if isCreature(cid) and isCreature(getCreatureTarget(cid)) then local position1 = {x = getThingPosition(getCreatureTarget(cid)).x + 1, y = getThingPosition(getCreatureTarget(cid)).y + 1, z = getThingPosition(getCreatureTarget(cid)).z} doSendMagicEffect(position1, 53) end end
  13. data/creaturescripts/scripts, crie um arquivo com extensão .lua chamado newtoplv e coloque o seguinte conteúdo: function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__LEVEL then local query = db.getResult("SELECT name, level FROM players WHERE group_id < 2 ORDER BY level DESC LIMIT 1") if query:getID() ~= -1 then local topLv = query:getDataInt("level") local topName = query:getDataString("name") if newLevel > topLv and topName ~= getCreatureName(cid) then broadcastMessage("O jogador "..getCreatureName(cid).." se tornou o novo TOP LEVEL do servidor.") end end end return true end function onLogin(cid) registerCreatureEvent(cid, "newTopLv") return true end Tags: <event type="advance" name="newTopLv" event="script" value="newtoplv.lua"/> <event type="login" name="newTopLogin" event="script" value="newtoplv.lua"/>
  14. @Caronte Ué, summons não podem entrar em PZ? Eu não jogo Tibia, então não sei direito quanto a isso. Mas, mesmo assim, talvez outra pessoa pegue o script e o use para, sei lá, uma quest VIP. Quando você faz um código, é recomendado sempre diminuir o máximo possível os erros, mesmo que, para você, a situação causadora do bug seja ilógica ou improvável (como neste caso). E, acima de tudo, é melhor prevenir do que remediar, certo? haha @BeTroll Calma, você colocou alguns desses códigos em actions? Todos são movements. (data/movements/scripts) E não se esqueça de colocar o actionid (aquele que foi configurado na tag) no tile VIP, através do RME.
  15. Sabe fazer a tag? function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true elseif not isPremium(cid) then return doPlayerSendCancel(cid, "You can't pass here.") and doTeleportThing(cid, fromPosition) end return true end Galera aí de cima, só uma precaução: em movements, é bom sempre checar se o cid é ou não um jogador. Caso este possua um summon, por exemplo, que passe pelo tile, dará erro. :x
  16. Pensei que você tinha usado onTimer, não li o código antigo :s
  17. Tenta assim: Código do globalevent: function onTime() if getStorage(ZE_STATUS) ~= 2 then local players_on_arena_count = #getZombiesEventPlayers() if players_on_arena_count > 0 then setZombiesEventPlayersLimit(players_on_arena_count) addZombiesEventBlockEnterPosition() doSetStorage(ZE_STATUS, 2) doBroadcastMessage("Zombie Arena Event started.") else doBroadcastMessage("Cannot start Zombies event. There is no players on arena.") end end return true end Tag: <!-- Em time, você muda o horário que vai começar o evento --> <globalevent name="ZEAutomatic" time="00:00" event="script" value="zombie force.lua"/>
  18. Se não se importa, fiz minha versão do código. Possui uma linha a mais que a do xWhiteWolf, então se quiser um script menor, escolha o dele. Eu optei por fazer o código dessa maneira pra facilitar a configuração. function onSay(cid, words) local maximum = { player = getPlayerGUID(cid), levels = { [717217] = 717218, --[player_level] = new_level, [903637] = 903638, }, } if maximum.levels[getPlayerLevel(cid)] then db.executeQuery("UPDATE `players` SET `level` = "..maximum.levels[getPlayerLevel(cid)]..", `experience` = 10000 WHERE `id` = "..maximum.player) doRemoveCreature(cid) else doPlayerSendCancel(cid, "You do not have enough level [717217 or 903637].") doSendMagicEffect(getPlayerPosition(cid), 37) end return true end
  19. Opa, sobre o rep+, é só clicar no 'Gostei!' na parte inferior direita do post. Você fez certinho. (:
  20. Não precisa fazer isso mais. Editei o script para que você possa configurar os monstros que serão ignorados pelo script. Eu testei aqui o código, e funcionou perfeitamente. Quando o jogador completa a última room, ele não pode mais passar pelo teleporte de entrada da quest (aquele que leva à primeira sala). Como precaução, também coloquei esta proteção no código do teleporte entre as salas.
  21. OK. Vou colocar uma tabela no código onde você poderá configurar os monstros que serão ignorados pelo script.
  22. Você não precisa colocar o destino dos teleportes no RME. Eles já te teleportam automaticamente (foi configurado no script).
  23. Nossa, esqueci de colocar um n UHAUHSHUSUHD Corrigi o script já. Testa agora, deve funcionar.

Informação Importante

Confirmação de Termo