Jump to content

Notícias e Debates

Defenda suas ideias e debata com outros membros, informe-se sobre Tibia e Otserv.


Vamos falar de OTServ?

Seja bem-vindo à seção de debates otserv. Você possui alguma ideia interessante?

 

Crie um tópico aqui e exponha suas ideias, você pode fazer novas amizades ou aprender coisas novas.


Subforums

  1. Formação de Equipes

    Conheça outros membros e convide-os para sua equipe ou encontre um projeto com vagas abertas.

    1.8k
    topics
    1.8k
    posts
  2. Exposições (Show Off)

    Mostre à comunidade o que você está desenvolvendo. Sistemas, gráficos, sites, e outros.

    1.8k
    topics
    1.8k
    posts
  3. 1.4k
    topics
    1.4k
    posts

105 topics in this forum

  1. Aulas de scripting lua 1 2

      2 reactions

    • 28 replies
    • 4.8k views
    • 1 reply
    • 128 views
    • 1 reply
    • 117 views
    • 3 replies
    • 181 views
    • 0 replies
    • 249 views
    • 0 replies
    • 391 views
    • 9 replies
    • 1.9k views
    • 1 reply
    • 1.3k views
    • 0 replies
    • 1.3k views
    • 0 replies
    • 568 views
    • 0 replies
    • 266 views
    • 0 replies
    • 211 views
    • 0 replies
    • 316 views
    • 0 replies
    • 225 views
    • 0 replies
    • 228 views
    • 0 replies
    • 251 views
    • 0 replies
    • 274 views
    • 0 replies
    • 464 views
    • 0 replies
    • 296 views
    • 0 replies
    • 339 views
    • 0 replies
    • 257 views
    • 0 replies
    • 388 views
    • 0 replies
    • 273 views
    • 0 replies
    • 281 views
    • 0 replies
    • 330 views
  • 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...