Jump to content

Imprensa

Grrr... O que há de novo?


Subforums

  1. Notícias e Discussões - OTServ

    Grrr... O que há de novo?

    1
    topic
    1
    post
  2. Notícias e Discussões - Tibia Global

    Espaço para as notícias e discussões do mundo de Tibia, onde nossa equipe de imprensa trará as novidades do que está rolando por aí.

    2.7k
    topics
    2.7k
    posts
  3. Exposições de Characters

    Do you play Tibia? If you have an knight, paladin, druid or sorcerer, show us!

    165
    topics
    165
    posts
  4. Show-OFF OTserv

    Você joga Tibia Global? Se você tiver um knight, paladin, druid ou sorcerer, mostre-nos e fique conhecido!

     

    47
    topics
    47
    posts

0 topics in this forum

There are no topics in this forum yet

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Popular Contributors

  • Topics

  • Últimos Posts

    • local regenEvent = {} -- Tabela para armazenar os identificadores de eventos por jogador. function onEquip(cid, item, position, fromPosition) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Activated Strength Blessing.") doSendAnimatedText(getPlayerPosition(cid), "Reloading!!", 210) doPlayerSay(cid, "POWER-UP!", 16) doSendMagicEffect(getPlayerPosition(cid), 95) local function regenVida() if isPlayer(cid) then doPlayerAddHealth(cid, 1000) -- Adiciona vida ao jogador. regenEvent[cid] = addEvent(regenVida, 1 * 1000) -- Reagendar o evento. end end regenEvent[cid] = addEvent(regenVida, 1 * 1000) -- Inicializa o evento. return TRUE end function onDeEquip(cid, item, position, fromPosition) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Strength Blessing Disabled.") doSendAnimatedText(getPlayerPosition(cid), "Weakening!!", 210) doPlayerSay(cid, "Losing Strength!", 16) doSendMagicEffect(getPlayerPosition(cid), 95) -- Parar o evento associado ao jogador. if regenEvent[cid] then stopEvent(regenEvent[cid]) -- Cancela o evento em execução. regenEvent[cid] = nil -- Remove o identificador para evitar uso futuro. end return TRUE end  
    • Estou com esse script q to criando, a função já está pegando certinho, porem não para de funfar kkk o stopevent não ta funcionando alguem me ajuda?     function onEquip(cid, item, position, fromPosition)     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Activated Strength Blessing.")     doSendAnimatedText(getPlayerPosition(cid), "Reloading!!", 210)     doPlayerSay(cid, "POWER-UP!", 16)     doSendMagicEffect(getPlayerPosition(cid), 95)         local function regenVida(cid)       doPlayerAddHealth(cid, 1000)       addEvent(regenVida, 1 * 1000, cid)     end     regenVida(cid)         return TRUE   end     function onDeEquip(cid, item, position, fromPosition)     doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Strength Blessing Disabled.")     doSendAnimatedText(getPlayerPosition(cid), "Weakening!!", 210)     doPlayerSay(cid, "Losing Strength!", 16)     doSendMagicEffect(getPlayerPosition(cid), 95)         local function regenVida(cid)     stopEvent(regenVida) end   return TRUE   end       se estiver no local errado por favor mover.
    • [URL=https://casualmatch.site]Explore Exciting Connections for One-Night Fun in Your Town[/URL] [URL=https://pills.casualmatch.site] Pharmacy, wholesale prices, shipping to any location.[/URL]
    • 1.Adicione um comando para escolher o Pokémon: Digamos que você adicione !choosepokemon para configurar o Pokémon que o jogador deseja derrotar. 2.Adapte a função resetDailyKill para usar essa escolha:   function choosePokemon(cid, pokemonName) if isPlayer(cid) then local mode = killModes[(getCatchMode(cid))] local pokemons = mode.pokemons if table.contains(pokemons, pokemonName) then local count = math.random(getPlayerLevel(cid) * 2) local day = tostring(""..getNumberDay().."-"..getNumberMonth().."-"..getNumberYear().."") setPlayerStorageValue(cid, killModes.storage, "|"..getCatchMode(cid).."|"..day.."|"..pokemonName.."|false|"..count) setPlayerStorageValue(cid, killModes.storage2, -1) setPlayerStorageValue(cid, 24003, 0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have chosen: " .. pokemonName .. " as your daily kill target.") else doPlayerSendCancel(cid, "Invalid Pokémon. Choose from the list.") end end end 3.Implementar comando para escolha:   function onSay(cid, words, param) if param == "" then doPlayerSendCancel(cid, "Use: !choosepokemon <pokemon_name>") return true end choosePokemon(cid, param:trim()) return true end  
    • Para o comando !sell:   function onSay(cid, words, param) local config = { levelNeeded = 8, muteTime = 120, -- tempo em segundos storage = 7896 } if param == "" then doPlayerPopupFYI(cid, "Use: !sell itemName, price in GP") return true end local t = string.explode(param, ",") if not(t[1]) or not(t[2]) then doPlayerSendCancel(cid, "Command requires more than one parameter.") return true end if getPlayerLevel(cid) >= config.levelNeeded then if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, os.time()) elseif getPlayerStorageValue(cid, config.storage) > os.time() then doPlayerSendCancel(cid, "You can only place one offer in " .. config.muteTime .. " seconds.") return true else local itemName = t[1]:trim() local price = tonumber(t[2]) if price <= 0 then doPlayerSendCancel(cid, "Invalid price.") return true end local itemId = getItemIdByName(itemName) if getPlayerItemCount(cid, itemId) > 0 then doBroadcastMessage("Player " .. getPlayerName(cid) .. " is selling " .. itemName .. " for " .. price .. " gold coins.") setPlayerStorageValue(cid, config.storage, (os.time() + config.muteTime)) else doPlayerSendCancel(cid, "You don't have the item '" .. itemName .. "' to sell.") end end else doPlayerSendCancel(cid, "Only players with level " .. config.levelNeeded .. " can broadcast an offer.") end return true end Para o comando !buy:   function onSay(cid, words, param) local config = { levelNeeded = 8, muteTime = 120, storage = 7896 } if param == "" then doPlayerPopupFYI(cid, "Use: !buy itemName, price in GP") return true end local t = string.explode(param, ",") if not(t[1]) or not(t[2]) then doPlayerSendCancel(cid, "Command requires more than one parameter.") return true end if getPlayerLevel(cid) >= config.levelNeeded then if getPlayerStorageValue(cid, config.storage) == -1 then setPlayerStorageValue(cid, config.storage, os.time()) elseif getPlayerStorageValue(cid, config.storage) > os.time() then doPlayerSendCancel(cid, "You can only place one offer in " .. config.muteTime .. " seconds.") return true else local itemName = t[1]:trim() local price = tonumber(t[2]) if price <= 0 then doPlayerSendCancel(cid, "Invalid price.") return true end -- Logica de compra do item: verificar se algum jogador está vendendo o item -- e o preço condiz com a oferta. Se sim, retirar o item do vendedor e -- transferir para o comprador doBroadcastMessage("Player " .. getPlayerName(cid) .. " is buying " .. itemName .. " for " .. price .. " gold coins.") setPlayerStorageValue(cid, config.storage, (os.time() + config.muteTime)) end else doPlayerSendCancel(cid, "Only players with level " .. config.levelNeeded .. " can broadcast an offer.") end return true end  
×
×
  • Create New...