Ir para conteúdo

Tabela de Classificação


Conteúdo Mais Visto

Exibindo conteúdo com a maior reputação em 2em todas áreas

  1. 1 ponto
    lucas-giovanni

    [Revscriptsys] Online Points

    [Revscriptsys] Online Points data/scripts/custom/online_points.lua local config = { storage = 20000, pointItemId = 25380, pointsPerHour = 1, checkDuplicateIps = false } local onlinePointsEvent = GlobalEvent("GainPointPerHour") function onlinePointsEvent.onThink(interval) local players = Game.getPlayers() if #players == 0 then return true end local checkIp = {} for _, player in pairs(players) do local ip = player:getIp() if ip ~= 0 and (not config.checkDuplicateIps or not checkIp[ip]) then checkIp[ip] = true local seconds = math.max(0, player:getStorageValue(config.storage)) if seconds >= 3600 then player:setStorageValue(config.storage, 0) local item = player:addItem(config.pointItemId, config.pointsPerHour) if item then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voce recebeu um Online Token por estar online por uma hora.") end return true end player:setStorageValue(config.storage, seconds +math.ceil(interval/1000)) end end return true end onlinePointsEvent:interval(10000) onlinePointsEvent:register()
  2. 1 ponto
    lucas-giovanni

    [Revscriptsys][Talkaction][Modal] Buy Runes, Potions and Arrows

    [Revscriptsys][Talkaction][Modal] Buy Runes, Potions and Arrows data/scripts/custom/ local arrows = { titleMsg = "Arrow e Bolt", mainMsg = "Selecione para comprar.", moneyMsg = "Voce nao tem dinheiro!", capacityMsg = "Voce esta sem cap.", buyMsg = "Voce comprou ", [1] = {potion = "spectral bolt", itemID = 40737, price10 = 100, price50 = 50000, price100 = 10000}, [2] = {potion = "diamond arrow", itemID = 40736, price10 = 100, price50 = 5000, price100 = 10000}, [3] = {potion = "assassin star", itemID = 7368, price10 = 100, price50 = 5000, price100 = 10000}, } local buyarrows = TalkAction("!arrows") function buyarrows.onSay(player, words, param) player:sendShopWindow(arrows) return true end buyarrows:separator(" ") buyarrows:register() local potions = { titleMsg = "Loja de Potion", mainMsg = "Selecione uma para comprar.", moneyMsg = "Voce nao tem dinheiro!", capacityMsg = "Voce esta sem cap.", buyMsg = "Voce comprou ", [1] = {potion = "Health Potion", itemID = 7318, price10 = 450, price50 = 2250, price100 = 4500}, [2] = {potion = "Mana Potion", itemID = 7620, price10 = 500, price50 = 2500, price100 = 5000}, [3] = {potion = "Strong Mana Potion", itemID = 7589, price10 = 800, price50 = 4000, price100 = 8000}, [4] = {potion = "Strong Health Potion", itemID = 7588, price10 = 1000, price50 = 5000, price100 = 10000}, [5] = {potion = "Great Health Potion", itemID = 7591, price10 = 1900, price50 = 9500, price100 = 19000}, [6] = {potion = "Great Mana Potion", itemID = 7590, price10 = 1200, price50 = 6000, price100 = 12000}, [7] = {potion = "Great Spirit Potion", itemID = 8472, price10 = 1900, price50 = 9500, price100 = 19000}, [8] = {potion = "Ultimate Health Potion", itemID = 8473, price10 = 3100, price50 = 15500, price100 = 31000}, [9] = {potion = "Ultimate Mana Potion", itemID = 26029, price10 = 3500, price50 = 17500, price100 = 35000}, [10] = {potion = "Ultimate Spirit Potion", itemID = 26030, price10 = 3500, price50 = 17500, price100 = 35000}, [11] = {potion = "Supreme Health Potion", itemID = 26031, price10 = 5000, price50 = 25000, price100 = 50000}, } local buypotions = TalkAction("!potions") function buypotions.onSay(player, words, param) player:sendShopWindow(potions) return true end buypotions:separator(" ") buypotions:register() local runes = { titleMsg = "Loja de Runas", mainMsg = "Selecione uma para comprar.", moneyMsg = "Voce nao tem dinheiro!", capacityMsg = "Voce esta sem cap.", buyMsg = "Voce comprou ", [1] = {potion = "sudden death rune", itemID = 2268, price10 = 500, price50 = 2500, price100 = 5000}, [2] = {potion = "explosion rune", itemID = 2313, price10 = 310, price50 = 1550, price100 = 3100}, [3] = {potion = "fire bomb rune", itemID = 2305, price10 = 550, price50 = 2750, price100 = 5500}, [4] = {potion = "wild growth rune", itemID = 2269, price10 = 1600, price50 = 8000, price100 = 16000}, [5] = {potion = "ultimate healing rune", itemID = 2273, price10 = 1750, price50 = 8750, price100 = 17500}, [6] = {potion = "paralyze rune", itemID = 2278, price10 = 5000, price50 = 25000, price100 = 50000}, [7] = {potion = "magic wall rune", itemID = 2293, price10 = 550, price50 = 2750, price100 = 5500}, [8] = {potion = "great fireball rune", itemID = 2304, price10 = 450, price50 = 2250, price100 = 4500}, [9] = {potion = "avalanche rune", itemID = 2274, price10 = 250, price50 = 1250, price100 = 2500}, } local buyrunes = TalkAction("!runes") function buyrunes.onSay(player, words, param) player:sendShopWindow(runes) return true end buyrunes:separator(" ") buyrunes:register() data/lib/lib.lua dofile('data/lib/custom/buy_arrows.lua') dofile('data/lib/custom/buy_runes.lua') dofile('data/lib/custom/buy_potions.lua') data/lib/custom/buy_arrows.lua function Player:sendShopWindow(arrows) local function buttonCallback(button, choice) local count = 0 local price = 0 local arrow = arrows[choice.id] if not arrow then print("Something went wrong with choice id: " .. choice.id) return false end if button.text == "100" then count = 100 price = arrow.price100 elseif button.text == "500" then count = 500 price = arrow.price500 elseif button.text == "1000" then count = 1000 price = arrow.price1000 else print("Something went wrong with button: " .. button.text) return false end if self:getMoney() < price then self:say(arrows.moneyMsg, TALKTYPE_MONSTER_SAY) return false end local arrowEx = Game.createItem(arrow.itemID, count) if self:addItemEx(arrowEx, false) ~= RETURNVALUE_NOERROR then self:getPosition():sendMagicEffect(CONST_ME_POFF) self:say(arrows.capacityMsg, TALKTYPE_MONSTER_SAY) return true end self:removeMoney(price) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, arrows.buyMsg .. count .. "x ".. arrow.arrow .."s") self:sendShopWindow(arrows) end local window = ModalWindow { title = arrows.titleMsg, message = arrows.mainMsg, } window:addButton("cem", buttonCallback) window:addButton("500", buttonCallback) window:addButton("1000", buttonCallback) window:addButton("Cancel") window:setDefaultEnterButton("100") window:setDefaultEscapeButton("Cancel") for i = 1, #arrows do local o = arrows[i].arrow local choice = window:addChoice(o) choice.id = i end window:sendToPlayer(self) end data/lib/custom/buy_runes.lua function Player:sendShopWindow(runes) local function buttonCallback(button, choice) local count = 0 local price = 0 local rune = runes[choice.id] if not rune then print("Something went wrong with choice id: " .. choice.id) return false end if button.text == "100" then count = 100 price = rune.price100 elseif button.text == "50" then count = 50 price = rune.price50 elseif button.text == "10" then count = 10 price = rune.price10 else print("Something went wrong with button: " .. button.text) return false end if self:getMoney() < price then self:say(runes.moneyMsg, TALKTYPE_MONSTER_SAY) return false end local runeEx = Game.createItem(rune.itemID, count) if self:addItemEx(runeEx, false) ~= RETURNVALUE_NOERROR then self:getPosition():sendMagicEffect(CONST_ME_POFF) self:say(runes.capacityMsg, TALKTYPE_MONSTER_SAY) return true end self:removeMoney(price) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, runes.buyMsg .. count .. "x ".. rune.rune .."s") self:sendShopWindow(runes) end local window = ModalWindow { title = runes.titleMsg, message = runes.mainMsg, } window:addButton("10", buttonCallback) window:addButton("50", buttonCallback) window:addButton("100", buttonCallback) window:addButton("Cancel") window:setDefaultEnterButton("100") window:setDefaultEscapeButton("Cancel") for i = 1, #runes do local o = runes[i].rune local choice = window:addChoice(o) choice.id = i end window:sendToPlayer(self) end data/lib/custom/buy_potions.lua function Player:sendShopWindow(potions) local function buttonCallback(button, choice) local count = 0 local price = 0 local potion = potions[choice.id] if not potion then print("Something went wrong with choice id: " .. choice.id) return false end if button.text == "100" then count = 100 price = potion.price100 elseif button.text == "50" then count = 50 price = potion.price50 elseif button.text == "10" then count = 10 price = potion.price10 else print("Something went wrong with button: " .. button.text) return false end if self:getMoney() < price then self:say(potions.moneyMsg, TALKTYPE_MONSTER_SAY) return false end local potionEx = Game.createItem(potion.itemID, count) if self:addItemEx(potionEx, false) ~= RETURNVALUE_NOERROR then self:getPosition():sendMagicEffect(CONST_ME_POFF) self:say(potions.capacityMsg, TALKTYPE_MONSTER_SAY) return true end self:removeMoney(price) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, potions.buyMsg .. count .. "x ".. potion.potion .."s") self:sendShopWindow(potions) end local window = ModalWindow { title = potions.titleMsg, message = potions.mainMsg, } window:addButton("10", buttonCallback) window:addButton("50", buttonCallback) window:addButton("100", buttonCallback) window:addButton("Cancel") window:setDefaultEnterButton("100") window:setDefaultEscapeButton("Cancel") for i = 1, #potions do local o = potions[i].potion local choice = window:addChoice(o) choice.id = i end window:sendToPlayer(self) end
  3. 1 ponto
    lucas-giovanni

    [Revscriptsys][Modal] Boss Eye

    Boss Eye (Revscriptsys + Modal) Um script que você usa um item e ele abre um modal com tempo que falta para você poder matar o boss novamente. Script configurado com o servidor OTBR, para configurar basta colocar o storage que leva o tempo do boss. data/scripts/custom local bossDoll = Action() local bosseye = { -- Config mainTitle = "Boss Eye", mainMsg = "Status dos boss", } function bossDoll.onUse(player, item, fromPosition, itemEx, toPosition, isHotkey) player:sendBossWindow(bosseye) return true end bossDoll:id(18526) bossDoll:register() data/lib/lib.lua -- Boss eye dofile('data/lib/custom/boss_eye.lua') data/lib/custom/boss_eye.lua function Player:sendBossWindow(bosseye) -- Modal window design local window = ModalWindow { title = bosseye.mainTitle, -- Title of the modal window message = bosseye.mainMsg, -- The message to be displayed on the modal window } -- Add buttons to the window (Note: if you change the names of these you must change the functions in the modal window functionallity!) window:addButton("Cancel") -- Set what button is pressed when the player presses enter or escape window:setDefaultEscapeButton("Cancel") window:addChoice("-- Soul War Bosses --") if self:getStorageValue(Storage.AlavancaBosses.GoshnarsHatred) > os.time() then window:addChoice("Goshnars Hatred [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.GoshnarsHatred)) .."]") else window:addChoice("Goshnars Hatred [ON]") end if self:getStorageValue(Storage.AlavancaBosses.GoshnarsMalice) > os.time() then window:addChoice("Goshnars Malice [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.GoshnarsMalice)) .."]") else window:addChoice("Goshnars Malice [ON]") end if self:getStorageValue(Storage.AlavancaBosses.GoshnarsSpite) > os.time() then window:addChoice("Goshnars Spite [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.GoshnarsSpite)) .."]") else window:addChoice("Goshnars Spite [ON]") end if self:getStorageValue(Storage.AlavancaBosses.GoshnarsCruelty) > os.time() then window:addChoice("Goshnars Cruelty [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.GoshnarsCruelty)) .."]") else window:addChoice("Goshnars Cruelty [ON]") end if self:getStorageValue(Storage.AlavancaBosses.GoshnarsGreed) > os.time() then window:addChoice("Goshnars Greed [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.GoshnarsGreed)) .."]") else window:addChoice("Goshnars Greed [ON]") end if self:getStorageValue(Storage.AlavancaBosses.GoshnarsMegalomania) > os.time() then window:addChoice("Goshnars Megalomania [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.GoshnarsMegalomania)) .."]") else window:addChoice("Goshnars Megalomania [ON]") end window:addChoice("-----------------------") window:addChoice("-- Cobra Bastion --") if self:getStorageValue(Storage.GraveDanger.CobraBastion.ScarlettTimer) > os.time() then window:addChoice("Scarlett Etzel [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.GraveDanger.CobraBastion.ScarlettTimer)) .."]") else window:addChoice("Scarlett Etzel [ON]") end window:addChoice("-----------------------") window:addChoice("-- Kilmaresh --") if self:getStorageValue(Storage.Kilmaresh.UrmahlulluTimer) > os.time() then window:addChoice("Urmahlullu [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.Kilmaresh.UrmahlulluTimer)) .."]") else window:addChoice("Urmahlullu [ON]") end window:addChoice("-----------------------") window:addChoice("-- Falcons Bastion --") if self:getStorageValue(Storage.TheSecretLibrary.TheOrderOfTheFalcon.OberonTimer) > os.time() then window:addChoice("Oberon [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.TheSecretLibrary.TheOrderOfTheFalcon.OberonTimer)) .."]") else window:addChoice("Oberon [ON]") end window:addChoice("-----------------------") window:addChoice("-- Lions Bastion --") if self:getStorageValue(Storage.AlavancaBosses.Drume) > os.time() then window:addChoice("Drume [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.Drume)) .."]") else window:addChoice("Drume [ON]") end window:addChoice("-----------------------") window:addChoice("-- Warzone --") if self:getStorageValue(Storage.AlavancaBosses.TheBaronFromBelow) > os.time() then window:addChoice("The Baron From Below [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.TheBaronFromBelow)) .."]") else window:addChoice("The Baron From Below [ON]") end if self:getStorageValue(Storage.AlavancaBosses.Versperoth) > os.time() then window:addChoice("Versperoth [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.Versperoth)) .."]") else window:addChoice("Versperoth [ON]") end if self:getStorageValue(Storage.AlavancaBosses.TheDukeOfTheDepths) > os.time() then window:addChoice("The Duke Of The Depths [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.TheDukeOfTheDepths)) .."]") else window:addChoice("The Duke Of The Depths [ON]") end if self:getStorageValue(Storage.AlavancaBosses.Deathstrike) > os.time() then window:addChoice("Deathstrike [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.Deathstrike)) .."]") else window:addChoice("Deathstrike [ON]") end if self:getStorageValue(Storage.AlavancaBosses.Gnomevil) > os.time() then window:addChoice("Gnomevil [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.Gnomevil)) .."]") else window:addChoice("Gnomevil [ON]") end window:addChoice("-----------------------") window:addChoice("-- Forgotten Knowledge --") if self:getStorageValue(Storage.ForgottenKnowledge.LadyTenebrisTimer) > os.time() then window:addChoice("Lady Tenebris [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.ForgottenKnowledge.LadyTenebrisTimer)) .."]") else window:addChoice("Lady Tenebris [ON]") end if self:getStorageValue(Storage.AlavancaBosses.Lloyd) > os.time() then window:addChoice("Lloyd [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.Lloyd)) .."]") else window:addChoice("Lloyd [ON]") end if self:getStorageValue(Storage.ForgottenKnowledge.ThornKnightTimer) > os.time() then window:addChoice("Mounted Thorn Knight [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.ForgottenKnowledge.ThornKnightTimer)) .."]") else window:addChoice("Mounted Thorn Knight [ON]") end if self:getStorageValue(Storage.ForgottenKnowledge.DragonkingTimer) > os.time() then window:addChoice("Dragonking Zyrtarch [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.ForgottenKnowledge.DragonkingTimer)) .."]") else window:addChoice("Dragonking Zyrtarch [ON]") end if self:getStorageValue(Storage.ForgottenKnowledge.HorrorTimer) > os.time() then window:addChoice("Melting Frozen Horror [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.ForgottenKnowledge.HorrorTimer)) .."]") else window:addChoice("Melting Frozen Horror [ON]") end if self:getStorageValue(Storage.ForgottenKnowledge.TimeGuardianTimer) > os.time() then window:addChoice("The Time Guardian [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.ForgottenKnowledge.TimeGuardianTimer)) .."]") else window:addChoice("The Time Guardian [ON]") end if self:getStorageValue(Storage.ForgottenKnowledge.LastLoreTimer) > os.time() then window:addChoice("The Last Lore Keeper [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.ForgottenKnowledge.LastLoreTimer)) .."]") else window:addChoice("The Last Lore Keeper [ON]") end window:addChoice("-----------------------") window:addChoice("-- Bosses --") if self:getStorageValue(Storage.AlavancaBosses.KingZelos) > os.time() then window:addChoice("King Zelos [" .. os.date('%d/%m/%Y - %H:%M:%S', self:getStorageValue(Storage.AlavancaBosses.KingZelos)) .."]") else window:addChoice("King Zelos [ON]") end -- Send the window to player window:sendToPlayer(self) end
Esta tabela de classificação está definida como São Paulo/GMT-03:00
×