Ir para conteúdo

Skydangerous

Membro
  • Total de itens

    1432
  • Registro em

  • Última visita

  • Dias Ganhos

    20

Tudo que Skydangerous postou

  1. Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). Ex. TFS 1.3; Base: TFS 1,2 Qual erro está surgindo/O que você procura? Alguem pode me ajudar a fazer um random na tabulacao do items? pois no codigo atualmente ele so pega o primeiro. Você tem o código disponível? Se tiver publique-o aqui: local rewards = { premios = { [1] = { items = { {itemID = 2160, count = 1}, {itemID = 2170, count = 1}, {itemID = 2155, count = 1}, }, chance = 80, nome = "items", }, [2] = { items = { {itemID = 2160, count = 50}, {itemID = 2160, count = 50}, {itemID = 2160, count = 50}, }, chance = 20, nome = "addons", }, } } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local random = math.random(100) local i = 1 while (i <= #rewards.premios) do local v = rewards.premios[i] for i =1, #v.items do local spot = v.items[i] if (random <= v.chance) then if (v.nome == "items") then local new_item = player:addItem(spot.itemID, spot.count) if (type(new_item) == "table") then new_item = new_item[1] end i = 999 break elseif (v.nome == "addons") then local new_item = player:addItem(spot.itemID, spot.count) if (type(new_item) == "table") then new_item = new_item[1] end i = 999 break end end end i = i + 1 random = math.random(100) end player:sendTextMessage(22,"Clicou") return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  2. a maioria dos servidores que vc baixar, ja vem com as sources e so compilar !! ,
  3. Sistema simples de abrir uma box com algum objeto (No caso uma chave) e ter chance de ganhar outfits, items , montarias ou perder a chave. key_loot_crate.lua (Actions) local config = { key_break = 30, -- Porcentagem de chave quebrar crate_itemid = 1739, -- ItemID da Crate rewards = { [1] = { item = "addon", chance = 10, lookType = { [0] = 142, -- lookType Female [1] = 134, -- lookType Male }, addon = 2, name = "Warrior Sword", }, [2] = { item = "mount", chance = 20, mountId = 40, name = "Noble Lion", }, [3] = { item = {2160, 2}, chance = 30, }, [4] = { item = {2390, 1}, chance = 40, }, [5] = { item = {2195, 1}, chance = 50, }, [6] = { item = {2471, 2}, chance = 60, }, [7] = { item = {2469, 1}, chance = 70, }, [8] = { item = {2492, 2}, chance = 80, }, } } local function broadcast(message) for _, targetPlayer in ipairs(Game.getPlayers()) do targetPlayer:sendTextMessage(MESSAGE_STATUS_WARNING, message) end return true end function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if (itemEx.itemid ~= config.crate_itemid) then return false end if (math.random(100) <= config.key_break) then toPosition:sendMagicEffect(3) player:sendTextMessage(MESSAGE_EVENT_ORANGE, "Na tentativa de abrir a crate, sua chave quebrou!") else local random = math.random(100) local i = 1 while (i <= #config.rewards) do local v = config.rewards[i] if (random <= v.chance) then if (v.item == "addon") then local lookType = v.lookType[player:getSex()] if (not player:hasOutfit(lookType, v.addon)) then player:addOutfitAddon(lookType, v.addon) broadcast(player:getName() .. " abriu uma loot crate e ganhou o addon ".. v.name .. ".") i = 9999 break else random = math.random(100) end elseif(v.item == "mount") then if (not player:hasMount(v.mountId)) then player:addMount(v.mountId) broadcast(player:getName() .. " abriu uma loot crate e ganhou a montaria ".. v.name .. ".") i = 9999 break else random = math.random(100) end else local new_item = player:addItem(v.item[1], v.item[2]) if (type(new_item) == "table") then new_item = new_item[1] end broadcast(player:getName() .. " abriu uma loot crate e ganhou ".. v.item[2] .. " ".. new_item:getName() .. ".") i = 9999 break end end i = i + 1 end if (i == 9999) then toPosition:sendMagicEffect(14) player:sendTextMessage(MESSAGE_EVENT_ORANGE, "Eh uma pena, mas a loot crate estava vazia.") else toPosition:sendMagicEffect(15) end end itemEx:remove() item:remove() return true end actions.xml <action itemid="22607" script="key_loot_crate.lua" /> <!-- Loot Crate Key --> HAVE FUN !
  4. Aqui neste tópico, você pode soltar sua criatividade e escrever alguns sistemas que vem na sua cabeça que você acharia legal existir em um servidor 4FUN (Servidor Fácil).
  5. mas esse script não é para 0.3;04. ? não funciona no tfs 1.x
  6. Poderia ser deste jeito. Quando a pessoa logar, terá um NPC que contará a história da Dungeon e logo após ele poderia escolher o herói que ele será, e teleportaria para a Dungeon. Então ele iria completar a missão, e após completar falando com outro npc, você reseta tudo o personagem, se não me engano deve existir um script semelhante para resetar tudo.
  7. to nada, parei.. agora to cs go, lol ficou muito facil haha..pego qualquer elo agora em qualquer conta, só preciso de tempo.. cs go ta legal pq tem muito amigo
  8. Vai até o monster e verifica a tag que você pois .. geralmente quando coloca uma tag creaturescript nele.. e ela não está configurada corretamente !
  9. Isso se você entrou no no-ip, e registrou um dominio fixo, provavelmente quando alguém entrar com esse ip era para dar certo. Quando seu servidor parou de funcionar, você chegou a trocar de roteador? trocou de anti-virus? algo do tipo? pq é estranho de repente não dar mais certo.
  10. Provavelmente a estrutura do banco que você criou (ou a pessoa que gerou) não suporte esta tipagem, conversão de segundos (Exemplo). Posso estar "errado", mas este timespan serve para transformar um tipo BigInt em Data , Hora, Minutos , Segundos , Milisegundos, o que pode estar errado, é ao Importar suas Tabelas, a pessoa ou você esteja utilizando uma "metabase" desatualizado, não conseguindo converter esse número na devida informação. Enfim, eu sugeria você pegar uma nova estrutura .sql , importar corretamente.. para evitar este tipo de erro.
  11. Verifique se no config.lua está configurado corretamente, inclusive verifique as portas se estão apontando para aqueles que realmente você desbloqueou (7171 e 7172). Caso esteja correto, verifique seu ip no www.meuip.com.br e tente novamente acessar.
  12. Qual a versão do seu .EXE, me parece que o script está usando uma função que não existe na suas libs. e outro erro deve ser algo relacionado ao .xml do globalevents, dá uma verificada novamente na configuração se não esqueceu nenhum passo.
  13. boraa haha
  14. Depois de tanto tempo reclamando para meu pai do notebook, finalmente ganhei um melhor. Chega de LoL 23 fps, sem jogar CS GO kkkk Modelo: GS63VR Stealth Pro Configuração: Intel Core I7 7700HQ (7 Geração) Nvidia Geforce 1060 6GB 16GB RAM DDR4 256 SSD + 1 TB HDD
  15. algum miguxo quer fazer uma equipe cmg pra criarmos um servidor 4fun de exp super alta? chega de lol já cheguei ao meu objetivo e quero me divertir !!
  16. Reward Level [Montaria, Level e Addons] Função: Esse reward você pode alterar para receber addons, montaria, items e coins na loja ! reward_level.lua local storage = 21321 local config = { [252] = {itemid = 2160, amount = 4}, [300] = {lookType = { [0] = 749, -- Female [1] = 750, -- Male }, addons = 3, name = "Sea Dog"}, [350] = {mount = 87, name = "Rift Runner"}, [400] = {coins = 5} } function onAdvance(player, skill, oldLevel, newLevel) if skill ~= SKILL_LEVEL then return true end local sto = player:getStorageValue(storage) for i, reward in pairs(config) do if newLevel >= i and sto < i then if reward.itemid then local new_item = player:addItem(reward.itemid, reward.amount) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Parabens! Voce alcancou o level ".. i .. " e recebeu " .. reward.amount .. " " .. new_item:getName() ..".") elseif reward.lookType then player:addOutfitAddon(reward.lookType[player:getSex()], reward.addons) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Parabens! Voce alcancou o level ".. i .. " e recebeu todas as addons da outfit ".. reward.name ..".") elseif reward.mount then player:addMount(reward.mount) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Parabens! Voce alcancou o level ".. i .. " e recebeu a montaria ".. reward.name ..".") elseif reward.coins then db.asyncQuery("UPDATE `accounts` SET `coins` = coins + ".. reward.coins .." WHERE `id` = '".. player:getAccountId() .."' LIMIT 1;") Game.broadcastMessage(player:getName() .. " atingiu o level ".. i .." e recebeu ".. reward.coins .." premium coins para gastar no SHOP.", MESSAGE_STATUS_WARNING) end player:setStorageValue(storage, newLevel) player:getPosition():sendMagicEffect(30) end end return true end tag xml <event type="advance" name="RewardLevel" script="reward_level.lua" /> Comentem e se testou por favor mande print (:
  17. Online HighScore - Não autorizo postagem em outros fóruns. Função: A cada X minutos aparece os TOP Levels que estão online no servidor. online_highscore.lua (Caso você entenda pode alterar pra aparecer mais ou menos players) function onThink(interval, lastExecution) local players = Game.getPlayers() table.sort(players, function(a, b) return a:getExperience() > b:getExperience() end) local msg = "~ TOP 5 players online" for i = 1, 5 do if not players[i] then break end msg = msg .. "\n" .. i .. ". ".. players[i]:getName() .. " [Lv: ".. players[i]:getLevel() .. "]" end for _, player in pairs(players) do player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, msg) end return true end tag xml <globalevent name="OnlineHighscore" interval="300000" script="online_highscore.lua"/> Testem e comentem, caso funcione poste o print por favor (estou sem ot)
  18. nossa tem tanto site por ai que da spoiler, youtube .. stream , só vc assistir e ver que consegue ter uma noção .. não precisa necessariamente abrir um ot pra ver o que tem nos lugares xD
  19. Alguém? Precisava de feedback ):
  20. Está proibido postar em outros fóruns Informação: 1. Sistema de Alugar montaria via NPC 1.0. Opções por apenas VIP , PREMIUM E FREE 1.1.0. Caso opte por VIP (Exemplo) a montaria não aparecerá para os demais jogadores. 2. Configurável o tempo, tipo da montaria, level e o preço da montaria. 2.1. Acabou o tempo automaticamente remove a montaria. 3.1 Totalmente limpo e fácil de configuração. Instalação: LIB: mount_rent.lua MOUNT_H = { ["war horse"] = {price = 10000, hours = 2, mountid = 17, level = 10, vip = false, premium = false, storage = 500561}, ["fire war horse"] = {price = 30000, hours = 2, mountid = 23, level = 20, vip = true, premium = false, storage = 500562}, ["sandstone scorpion"] = {price = 50000, hours = 1, mountid = 21, level = 10, vip = false, premium = true, storage = 500563} } function Player.checkRentMounts(self) for name, v in pairs(MOUNT_H) do if (self:hasMount(v.mountid)) and (self:getStorageValue(v.storage) ~= -1) and (self:getStorageValue(v.storage) <= os.time()) then self:removeMount(v.mountid) local outfit = self:getOutfit() outfit.lookMount = 0 self:setOutfit(outfit) self:sendTextMessage(MESSAGE_STATUS_WARNING, "The time of your mount ".. name .." has ended.") self:setStorageValue(v.storage, -1) end end return true end TAG: dofile('data/lib/mount_rent.lua') CREATURESCRIPT: mount_rent.lua function onLogin(player) player:checkRentMounts() return true end TAG: <event type="login" name="checkmounts" script="mount_rent.lua"/> GLOBALEVENTS: mount_rent.lua function onThink(interval, lastExecution) for _, player in pairs(Game.getPlayers()) do player:checkRentMounts() end return true end TAG: <globalevent name="CheckMount" interval="60000" script="mount_rent.lua"/> NPC: mount_rent.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local keywords = {"aluguel", "alugar", "rent", "mounts", "mount"} function Player.isVip(self) return false end npcHandler:addModule(FocusModule:new()) function creatureSayCallback(cid, type_, msg) if not npcHandler:isFocused(cid) then return false end local msg = string.lower(msg) local player = Player(cid) if isInArray(keywords, msg) then local str = "You can rent" local amount = 0 for name, v in pairs(MOUNT_H) do if not ((v.premium and player:getPremiumDays() < 1) or (v.vip and not player:isVip()) or (player:getLevel() < v.level) or (player:getStorageValue(v.storage) >= os.time())) then str = str .. " {".. name .. "}," amount = amount + 1 end end if amount > 0 then npcHandler:say(str:sub(1, #str - 1) .. "!", cid) npcHandler.topic[cid] = 1 else npcHandler:say("You are not allowed to rent any mount.", cid) end elseif npcHandler.topic[cid] == 1 and MOUNT_H[msg] then local mount = MOUNT_H[msg] if mount.premium and player:getPremiumDays() < 1 then npcHandler:say("You must be premium to rent this mount.", cid) return true elseif player:getLevel() < mount.level then npcHandler:say("You must be, at least, level " .. mount.level .. " to rent this mount.", cid) return true elseif player:getStorageValue(mount.storage) >= os.time() then npcHandler:say("You already have rented this mount!", cid) return true end local str = "You want to rent ".. msg .." for ".. mount.hours .. " hour".. (mount.hours > 1 and "s" or "") npcHandler:say(str .. " for ".. mount.price .. " gold pieces?", cid) npcHandler.topic[cid] = msg elseif type(npcHandler.topic[cid]) == "string" then local mount = MOUNT_H[npcHandler.topic[cid]] if player:removeMoney(mount.price) then player:addMount(mount.mountid) player:setStorageValue(mount.storage, os.time() + mount.hours * 60) npcHandler:say("Here is your ".. npcHandler.topic[cid] ..", it will last until ".. os.date("%d %B %Y %X", os.time() + mount.hours * 60) ..".", cid) else npcHandler:say("Sorry, you do not have enough money to rent the mount!", cid) end npcHandler.topic[cid] = 0 elseif msgcontains(msg, "no") then npcHandler:say("Ok then.", cid) npcHandler.topic[cid] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Divirta-se (:
  21. Skydangerous

    .

    to tentando logar no sv e ta crashando .. o que pode ser?
  22. Skydangerous

    .

    é tfs ou otx?
  23. Skydangerous

    .

    já vem compilado, eu não consigo compilar no meu notebook .. nem abre direito a ***** do vs
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo