Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 04/11/15 em todas áreas

  1. PobrePreto

    [Mods]Double Exp Potion

    Boa Tarde... Venho Trazer a Vocês uma Potion de Double Exp. Essa Potion Você Pode Morrer, Sair, Voltar que ela Não perde o Efeito! Essa Potion Depois de usada, Sua Exp Sera Aumentada conforme a Configuração que Fizer nela! Testada em OTServers 8.6 - 0.4.1 Vamos la! Em mods Crie um Arquivo chamado Doubleexppotion.xml e Dentro dele Adicione: <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 50}, costmana = {TRUE, mana = 300}, addrate = 50, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="7440" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "Voce ja ta Sob o Efeito da Potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce Precisar ser Premium Para Usar") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce Precisa ser " .. configs.needlvl.level .. " Para usar a Potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce Precisar ter " .. configs.costmana.mana .. " de Mana Para usar a Potion") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da Pocao de EXP.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O Efeito da Pocao vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora Voce Esta Recebendo mais EXP por Matar Monstros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "O Efeito da Potion Termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".") end end return TRUE ]]></creaturescript> </mod> Configurações configs = { time = 30, ---- TEMPO EM MINUTOS needpa = TRUE, --- NECESSITA DE PREMIUM OU NÃO, TRUE OU FALSE needlvl = {TRUE, level = 50},---- EXIGE LEVEL TRUE OU FALSE CASO NÃO , E O LEVEL QUE DESEJA USAR NO CASO ESTA 50 costmana = {TRUE, mana = 300}, --- CUSTA MANA TRUE OU NÃO CASO NÃO QUERIA, CUSTARA 300 NO CASO addrate = 50, -- EXP QUE VAI ADICIONAR EM PORCENTAGEM , NO CASO ESTA 50% removeonuse = TRUE --- CASO QUEIRA QUE ELA SUMA APOSTA USAR, DEIXE TRUE, CASO CONTINUE FALSE! Agora vamos escolher uma Potion: Aqui Estamos usando a ID:7440 Procure Por essa Linha: <action itemid="7440" event="script"><![CDATA[ Caso queira deixar Essa Potion, ou Renome-la vá em data/items/items.xml Items.xml e Procure pela ID: 7440 <item id="7440" article="a" name="Double Exp Potion"> <attribute key="weight" value="200" /> <attribute key="description" value="Depois de Tomar Sua EXP Dobrara." /> </item> Salve, e Aproveite! Créditos: MatheusMkalo e a Mim Por Traduzir e trazer pra cá!
    3 pontos
  2. Tony

    [Tutorial] Download Photoshop CC 2014

    Olá, irei ensinar a fazer download do Adobe Photoshop CC 2014. Antes de tudo você tem que ter uma conta no site da "ADOBE" para poder fazer download do aplicativo adobe CreativeCloud LINK PARA SE CADASTRAR. Apos logado na sua conta da adobe, você ira se deparar com a seguinte pagina e irá clicar em DESKTOP. Você foi redirecionado para a pagina onde você ira escolher o seu programa você vai clicar em "Baixar versão de avaliação" após clicar você ira ser levado para uma seguinte pagina onde o download do aplicativo de desktop da Creative Cloud irá iniciar automaticamente APOS BAIXADO Execute o arquivo "CreativeCloudSet-Up.exe" apos isso o aplicativo irá baixar e instalar automaticamente. Apos a instalação o aplicativo ira abrir e você ira acessar com sua conta da adobe novamente porem desta vez no aplicativo. Apos logar você ira "CONTINUAR" e o download do Photoshop CC (2014) Ira Iniciar automaticamente. Apos Photoshop instalado você ira clicar em "AVALIAR" . Depois de clicar em "AVALIAR" seu Photoshop inicia e você tem 30 dias para testar. E é isso ai pessoal, espero que tenham gostado irei deixar o link para o tutorial que ensina cracker os programas Adobe. [Download] Universal Adobe Patcher
    3 pontos
  3. Furabio

    [TFS 1.x] Weather System

    Basicamente é um sistema onde permite chuva e solte raios em determinado local do mapa, use sua criatividade ao usar o sistema. Features : Chuva só nos jogadores, para economizar memória do servidor, em vez de enviar todo o mapa. Se não tiver um telhado, vai enviar o efeito dentro do local mesmo. Assim, se você estiver sob um teto, vai enviar para fora do local. Quando água bate no chão, envia o efeito de splash. Efeito do trovão causa dano. Em global.lua adicione : weatherConfig = { groundEffect = CONST_ME_LOSEENERGY, fallEffect = CONST_ANI_ICE, thunderEffect = true, minDMG = 5, maxDMG = 10 } function Player.sendWeatherEffect(self, groundEffect, fallEffect, thunderEffect) local position, random = self:getPosition(), math.random position.x = position.x + random(-4, 4) position.y = position.y + random(-4, 4) local fromPosition = Position(position.x + 1, position.y, position.z) fromPosition.x = position.x - 7 fromPosition.y = position.y - 5 local tile, getGround for Z = 1, 7 do fromPosition.z = Z position.z = Z tile = Tile(position) if tile then -- If there is a tile, stop checking floors fromPosition:sendDistanceEffect(position, fallEffect) position:sendMagicEffect(groundEffect, self) getGround = tile:getGround() if getGround and ItemType(getGround:getId()):getFluidSource() == 1 then position:sendMagicEffect(CONST_ME_WATERSPLASH, self) end break end end if thunderEffect and tile then if random(2) == 1 then local topCreature = tile:getTopCreature() if topCreature and topCreature:isPlayer() then position:sendMagicEffect(CONST_ME_BIGCLOUDS, self) doTargetCombatHealth(0, self, COMBAT_ENERGYDAMAGE, -weatherConfig.minDMG, -weatherConfig.maxDMG, CONST_ME_NONE) self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You were hit by lightning and lost some health.") end end end end modo de uso : player:sendWeatherEffect(weatherConfig.groundEffect, weatherConfig.fallEffect, weatherConfig.thunderEffect) Em breve vou fazer uns scripts bacana em cima desse sistema, aceito sugestões. Créditos : Printer.
    2 pontos
  4. Fir3element

    !comprar skill/magiclevel

    Nome: Comprar skill/magic level Versão testada: TFS 0.3.6pl1 / 0.4 / 0.3.7 Créditos: fireelement Exemplo de uso: !comprar club !comprar magiclevel Vá em data/talkactions/talkactions.xml e adicione essa tag: <talkaction words="!comprar;/comprar" event="script" value="comprar.lua"/> Agora vá em data/talkactions/scripts/ e crie um arquivo com o nome comprar.lua e cole isso nele: local config = { protectZone = "sim", -- Precisa estar em PZ para usar o comando? skill = { item = 9971, -- Item removido quantidade = 10, -- Quantidade quantidadeskill = 10, -- Skill adicionada limiteskill = 350 -- Limite }, magicLevel = { item = 9971, -- Item removido quantidade = 15, -- Quantidade quantidademl = 5, -- Magic level adicionado limitedeml = 200 -- Limite }, skillID = { -- ID das skills ["club"] = SKILL_CLUB, ["sword"]= SKILL_SWORD, ["axe"] = SKILL_AXE, ["distance"] = SKILL_DISTANCE, ["shielding"] = SKILL_SHIELD }, vocationSkill = { -- Vocações que pode comprar x skill ["club"] = {4, 8}, ["sword"] = {4, 8}, ["axe"] = {4, 8}, ["distance"] = {3, 7}, ["shielding"] = {4, 8} }, vocationMagicLevel = {1, 2, 5, 6}, -- Vocações que pode comprar magic level delay = { skill = { storage = 45, duration = 5 -- Tempo para comprar skill novamente }, magicLevel = { storage = 97, duration = 5 -- Tempo para comprar magic level novamente } } } function onSay(cid, words, param, channel) local playerId = getPlayerGUID(cid) if config.protectZone == "sim" and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "Você precisa estar em protection zone para comprar.") end if param == "magiclevel" then if getPlayerMagLevel(cid) < config.magicLevel.limitedeml then if isInArray(config.vocationMagicLevel, getPlayerVocation(cid)) then if doPlayerRemoveItem(cid, config.magicLevel.item, config.magicLevel.quantidade) then if (os.time() - getPlayerStorageValue(cid, config.delay.magicLevel.storage)) >= config.delay.magicLevel.duration then setPlayerStorageValue(cid, config.delay.magicLevel.storage, os.time()) doRemoveCreature(cid, true) db.executeQuery("UPDATE `players` SET `maglevel` = `maglevel` + " .. config.magicLevel.quantidademl .. " WHERE `id` = " .. playerId) else doPlayerSendCancel(cid, "Espere " .. config.delay.magicLevel.duration .. " segundos para comprar novamente.") end else doPlayerSendCancel(cid, "Você não tem o item requerido.") end else doPlayerSendCancel(cid, "Voce não pode comprar magic level.") end else doPlayerSendCancel(cid, "Você chegou no limite de magic level.") end elseif config.skillID[string.lower(param)] then if getPlayerSkill(cid, config.skillID[string.lower(param)]) < config.skill.limiteskill then if isInArray(config.vocationSkill[string.lower(param)], getPlayerVocation(cid)) then if doPlayerRemoveItem(cid, config.skill.item, config.skill.quantidade) then if (os.time() - getPlayerStorageValue(cid, config.delay.skill.storage)) >= config.delay.skill.duration then setPlayerStorageValue(cid, config.delay.skill.storage, os.time()) doRemoveCreature(cid, true) db.executeQuery("UPDATE `player_skills` SET `value` = `value` + " .. config.skill.quantidadeskill .. " WHERE `player_id` = " .. playerId .. " and `skillid` = " .. config.skillID[string.lower(param)]) else doPlayerSendCancel(cid, "Espere " .. config.delay.skill.duration .. " segundos para comprar novamente.") end else doPlayerSendCancel(cid, "Você não tem o item requerido.") end else doPlayerSendCancel(cid, "Voce não pode comprar este skill.") end else doPlayerSendCancel(cid, "Você chegou no limite de skill.") end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Possíveis parâmetros: club, sword, axe, distance, shielding, magiclevel.") end return true end
    2 pontos
  5. Furabio

    [TFS 1.1] Healer/blessings NPC

    xml: <?xml version="1.0" encoding="UTF-8"?> <npc name="NPCNAME" script="bless_heal.lua" walkinterval="2000" floorchange="0" speechbubble="1"> <health now="100" max="100"/> <look type="138" head="58" body="114" legs="87" addons="3"/> <parameters> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="bless;blessings" /> <parameter key="keyword_reply1" value="I can grant you blessings such as {Wisdom} {of} {Solitude}, {Spark} {of} {The} {Phoenix}, our {Fire} {of} {Two} {Suns}, {Spiritual} {Shielding} and {The Embrace}. I can also grant you {all} of these blessings, just ask me." /> <parameter key="keyword_reply2" value="I can grant you blessings such as {Wisdom} {of} {Solitude}, {Spark} {of} {The} {Phoenix}, our {Fire} {of} {Two} {Suns}, {Spiritual} {Shielding} and {The Embrace}. I can also grant you {all} of these blessings, just ask me." /> </parameters> </npc> bless_heal.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = cid local p = Player(cid) local heal = false local hp = p:getHealth() if msgcontains(msg, "heal") then if getCreatureCondition(cid, CONDITION_FIRE) then selfSay("You are burning. I will help you.", cid) doRemoveCondition(cid, CONDITION_FIRE) heal = true elseif getCreatureCondition(cid, CONDITION_POISON) then selfSay("You are poisoned. I will cure you.", cid) doRemoveCondition(cid, CONDITION_POISON) heal = true elseif getCreatureCondition(cid, CONDITION_ENERGY) then selfSay("You are electrificed. I will help you.", cid) doRemoveCondition(cid, CONDITION_ENERGY) heal = true elseif getCreatureCondition(cid, CONDITION_PARALYZE) then selfSay("You are paralyzed. I will cure you.", cid) doRemoveCondition(cid, CONDITION_PARALYZE) heal = true elseif getCreatureCondition(cid, CONDITION_DROWN) then selfSay("You are drowing. I will help you.", cid) doRemoveCondition(cid, CONDITION_DROWN) heal = true elseif getCreatureCondition(cid, CONDITION_FREEZING) then selfSay("You are cold! I will help you.", cid) doRemoveCondition(cid, CONDITION_FREEZING) heal = true elseif getCreatureCondition(cid, CONDITION_BLEEDING) then selfSay("You are bleeding! I will help you.", cid) doRemoveCondition(cid, CONDITION_BLEEDING) heal = true elseif getCreatureCondition(cid, CONDITION_DAZZLED) then selfSay("You are dazzled! Do not mess with holy creatures anymore!", cid) doRemoveCondition(cid, CONDITION_DAZZLED) heal = true elseif getCreatureCondition(cid, CONDITION_CURSED) then selfSay("You are cursed! I will remove it.", cid) doRemoveCondition(cid, CONDITION_CURSED) heal = true elseif hp < 65 then selfSay("You are looking really bad. Let me heal your wounds.", cid) p:addHealth(65 - hp) heal = true elseif hp < 2000 then selfSay("I did my best to fix your wounds.", cid) p:addHealth(2000 - hp) heal = true end if heal then p:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) else local msgheal = { "You aren't looking really bad, " .. getCreatureName(cid) .. ". I only help in cases of real emergencies. Raise your health simply by eating {food}.", "Seriously? It's just a scratch", "Don't be a child. You don't need any help with your health.", "I'm not an expert. If you need help find a medic.", "Don't even waste my time, I have bigger problems than your scratched armor." } selfSay("" .. msgheal[math.random(1, #msgheal)] .. "", cid) end return true end if msgcontains(msg, "yes") and talkState[talkUser] > 90 and talkState[talkUser] < 96 then if getPlayerBlessing(cid, talkState[talkUser] - 90) then selfSay("You already have this blessing!", cid) else b_price = (2000 + ((math.min(130, getPlayerLevel(cid)) - 30) * 200)) if b_price < 2000 then b_price = 2000 end if doPlayerRemoveMoney(cid, b_price) then selfSay("You have been blessed by one of the five gods!", cid) doPlayerAddBlessing(cid, talkState[talkUser] - 90) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) else selfSay("I'm sorry. We need money to keep this temple up.", cid) end end talkState[talkUser] = 0 return true end if msgcontains(msg, "yes") and talkState[talkUser] == 96 then havebless = {} for i = 1, 5 do if(getPlayerBlessing(cid, i)) then table.insert(havebless,i) end end if #havebless == 5 then selfSay('You already have all available blessings.',cid) talkState[talkUser] = 0 return true end b_price = (2000 + ((math.min(130, getPlayerLevel(cid)) - 30) * 200)) if b_price < 2000 then b_price = 2000 end b_price = ((5 - #havebless) * b_price) if doPlayerRemoveMoney(cid, b_price) then selfSay("You have been blessed by the five gods!", cid) for i = 1, 5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) else selfSay("I'm sorry. We need money to keep this temple up.", cid) end talkState[talkUser] = 0 return true end if msgcontains(msg, "all") then havebless = {} b_price = (2000 + ((math.min(130, getPlayerLevel(cid)) - 30) * 200)) if b_price < 2000 then b_price = 2000 end for i = 1, 5 do if(getPlayerBlessing(cid, i)) then table.insert(havebless,i) end end b_price = ((5 - #havebless) * b_price) if b_price == 0 then selfSay('You already have all available blessings.',cid) talkState[talkUser] = 0 return true end selfSay('Do you want to receive all blessings for ' .. b_price .. ' gold?',cid) talkState[talkUser] = 96 return true end local blesskeywords = {'wisdom', 'spark', 'fire', 'spiritual', 'embrace'} local blessnames = {'Wisdom of Solitude', 'Spark of The Phoenix', 'Fire of Two Suns', 'Spiritual Shielding', 'The Embrace'} for i = 1, #blesskeywords do if msgcontains(msg, blesskeywords[i]) then b_price = (2000 + ((math.min(130, getPlayerLevel(cid)) - 30) * 200)) if b_price < 2000 then b_price = 2000 end selfSay('Do you want me to grant you ' .. blessnames[i] .. ' blessing for ' .. b_price .. ' gold?',cid) talkState[talkUser] = 90 + i return true end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Créditos : zbisu
    2 pontos
  6. Tony

    [Download] Universal Adobe Patcher

    Após você seguir os passos do tutorial [Tutorial] Download Photoshop CC 2014, você agora tem 30 dias para avaliar o Photoshop CC 2014, porem irei ensinar um método ilegal que é cracker o programa usando o Universal Adobe Patcher. Antes de tudo no seu aplicativo CreativeCloud estará assim Ok, com o Photoshop e o Aplicativo fechado, você ira executar o cracker Universal Adobe Patcher Nesse caso você pode notar que esse cracker serve para vários outros tipos de programas da adobe, porem no nosso caso estamos procurando o Adobe Photoshop CC 2014 , caso seu sistema for 32-Bits procure um pouco abaixo, você ira selecionar o programa desejado e clicar em Patch, apos clicar em Patch o programa ira exibir algumas mensagens, Antes de sair abrindo seu Photoshop eu recomendo reiniciar o seu computador e só abrir apos reiniciar e mesmo apos cracker o programa no aplicativo ainda ira aparece 30 Dias porem não se desespere seu programa esta sim crackeado. [DOWNLOAD]
    2 pontos
  7. Krono

    [Creatureevent Mod] Militar Rank mod

    Sistema que adiciona um Rank Militar de acordo com os Frags do jogador. Ou seja, quanto mais o player mata, maior será o seu rank. Achei muito legal, pois dá um ar de disputa por patentes dentro do servidor. Para instalar crie um arquivo dentro da pasta mods do seu servidor como o nome militarrank.xml e cole este script dentro. <?xml version = "1.0" encoding = "UTF-8"?> <mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes"> <config name = "ranks"><![CDATA[ titles = { [1] = "Private First Class", [3] = "Specialista", [5] = "Corporal", [10] = "Sargento", [12] = "Staff Sargento", [15] = "Sargento Primeiro", [20] = "Master Sargento", [22] = "Primeriro Sargento", [25] = "Sargent Major", [30] = "Sargento Major Comando", [35] = "Sargento Major Exercito", [38] = "Segundo Tenente", [40] = "Primeiro Tenente", [45] = "Capitão", [48] = "Major", [50] = "Tenente Coronel", [55] = "Coronel", [100] = "General de Brigada", [110] = "General de Divisão", [120] = "Tenente General", [140] = "General", [170] = "General de Exercito" } fragsStorage = 600 ]]></config> <event type = "look" name = "ranksLook" event = "script"><![CDATA[ domodlib("ranks") function onLook(cid, thing, position, lookDistance) if(isPlayer(thing.uid)) then local rank = {rank = "Private", frags = 0} for k, v in pairs(titles) do if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then if(k - 1 > rank.frags) then rank.rank, rank.frags = v, k - 1 end end end doPlayerSetSpecialDescription(thing.uid, "\n Military rank: " .. rank.rank) end return true end ]]></event> <event type = "kill" name = "ranksKill" event = "script"><![CDATA[ domodlib("ranks") function onKill(cid, target) if(isPlayer(target)) then setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1)) if(titles[getPlayerStorageValue(cid, fragsStorage)]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to military rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!") end end return true end ]]></event> <event type = "login" name = "ranksLogin" event = "script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ranksKill") registerCreatureEvent(cid, "ranksLook") return true end ]]></event> </mod> Gostou? Espero que sim!. credito: Roque
    1 ponto
  8. Furabio

    [TFS 1.1] Addon NPC (Varkhal)

    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) local talkState = {} local rtnt = {} 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 npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. I need your help and I'll reward you with nice addons if you help me! Just say {addons} or {help} if you don't know what to do.") addoninfo = { ['first citizen addon'] = {cost = 0, items = {{5878,20}}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10042}, ['second citizen addon'] = {cost = 0, items = {{5890,50}, {5902,25}, {2480,1}}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10043}, ['first hunter addon'] = {cost = 0, items = {{5876,50}, {5948,50}, {5891,5}, {5887,1}, {5889,1}, {5888,1}}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10044}, ['second hunter addon'] = {cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10045}, ['first knight addon'] = {cost = 0, items = {{5880,50}, {5892,1}}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10046}, ['second knight addon'] = {cost = 0, items = {{5893,50}, {11422,1}, {5885,1}, {5887,1}}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10047}, ['first mage addon'] = {cost = 0, items = {{2182,1}, {2186,1}, {2185,1}, {8911,1}, {2181,1}, {2183,1}, {2190,1}, {2191,1}, {2188,1}, {8921,1}, {2189,1}, {2187,1}, {2392,30}, {5809,1}, {2193,20}}, outfit_female = 138, outfit_male = 130, addon = 1, storageID = 10048}, ['second mage addon'] = {cost = 0, items = {{5903,1}}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10049}, ['first summoner addon'] = {cost = 0, items = {{5878,20}}, outfit_female = 141, outfit_male = 133, addon = 1, storageID = 10050}, ['second summoner addon'] = {cost = 0, items = {{5894,35}, {5911,20}, {5883,40}, {5922,35}, {5879,10}, {5881,30}, {5882,40}, {2392,3}, {5905,30}}, outfit_female = 141, outfit_male = 133, addon = 2, storageID = 10051}, ['first barbarian addon'] = {cost = 0, items = {{5884,1}, {5885,1}, {5910,25}, {5911,25}, {5886,10}}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10011}, ['second barbarian addon'] = {cost = 0, items = {{5880,25}, {5892,1}, {5893,25}, {5876,25}}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10012}, ['first druid addon'] = {cost = 0, items = {{5896,20}, {5897,20}}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10013}, ['second druid addon'] = {cost = 0, items = {{5906,100}}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10014}, ['first nobleman addon'] = {cost = 300000, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 10015}, ['second nobleman addon'] = {cost = 300000, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 10016}, ['first oriental addon'] = {cost = 0, items = {{5945,1}}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10017}, ['second oriental addon'] = {cost = 0, items = {{5883,30}, {5895,30}, {5891,2}, {5912,30}}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 10018}, ['first warrior addon'] = {cost = 0, items = {{5925,40}, {5899,40}, {5884,1}, {5919,1}}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 10019}, ['second warrior addon'] = {cost = 0, items = {{5880,40}, {5887,1}}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 10020}, ['first wizard addon'] = {cost = 0, items = {{2536,1}, {2492,1}, {2488,1}, {2123,1}}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10021}, ['second wizard addon'] = {cost = 0, items = {{5922,40}}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022}, ['first assassin addon'] = {cost = 0, items = {{5912,20}, {5910,20}, {5911,20}, {5913,20}, {5914,20}, {5909,20}, {5886,10}}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10023}, ['second assassin addon'] = {cost = 0, items = {{5804,1}, {5930,10}}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10024}, ['first beggar addon'] = {cost = 0, items = {{5878,30}, {5921,20}, {5913,10}, {5894,10}}, outfit_female = 157, outfit_male = 153, addon = 1, storageID = 10025}, ['second beggar addon'] = {cost = 0, items = {{5883,30}, {2160,2}}, outfit_female = 157, outfit_male = 153, addon = 2, storageID = 10026}, ['first pirate addon'] = {cost = 0, items = {{6098,30}, {6126,30}, {6097,30}}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10027}, ['second pirate addon'] = {cost = 0, items = {{6101,1}, {6102,1}, {6100,1}, {6099,1}}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10028}, ['first shaman addon'] = {cost = 0, items = {{5810,5}, {3955,5}, {5015,1}}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10029}, ['second shaman addon'] = {cost = 0, items = {{3966,5}, {3967,5}}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10030}, ['first norseman addon'] = {cost = 0, items = {{7290,5}}, outfit_female = 252, outfit_male = 251, addon = 1, storageID = 10031}, ['second norseman addon'] = {cost = 0, items = {{7290,10}}, outfit_female = 252, outfit_male = 251, addon = 2, storageID = 10032}, ['first jester addon'] = {cost = 0, items = {{5912,20}, {5913,20}, {5914,20}, {5909,20}}, outfit_female = 270, outfit_male = 273, addon = 1, storageID = 10033}, ['second jester addon'] = {cost = 0, items = {{5912,20}, {5910,20}, {5911,20}, {5912,20}}, outfit_female = 270, outfit_male = 273, addon = 2, storageID = 10034}, ['first demonhunter addon'] = {cost = 0, items = {{5905,30}, {5906,40}, {5954,20}, {6500,50}}, outfit_female = 288, outfit_male = 289, addon = 1, storageID = 10035}, ['second demonhunter addon'] = {cost = 0, items = {{5906,50}, {6500,200}}, outfit_female = 288, outfit_male = 289, addon = 2, storageID = 10036}, ['first nightmare addon'] = {cost = 0, items = {{6500,750}}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10037}, ['second nightmare addon'] = {cost = 0, items = {{6500,750}}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10038}, ['first brotherhood addon'] = {cost = 0, items = {{6500,750}}, outfit_female = 279, outfit_male = 278, addon = 1, storageID = 10039}, ['second brotherhood addon'] = {cost = 0, items = {{6500,750}}, outfit_female = 279, outfit_male = 278, addon = 2, storageID = 10040}, ['first yalaharian addon'] = {cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10041}, ['second yalaharian addon'] = {cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10041} -- next storage 10052 -- next storage 10052 -- next storage 10052 -- next storage 10052 -- next storage 10052 -- next storage 10052 -- next storage 10052 -- } local o = {'citizen', 'hunter', 'knight', 'mage', 'nobleman', 'summoner', 'warrior', 'barbarian', 'druid', 'wizard', 'oriental', 'pirate', 'assassin', 'beggar', 'shaman', 'norseman', 'nighmare', 'jester', 'yalaharian', 'brotherhood'} function creatureSayCallback(cid, type, msg) local talkUser = cid if(not npcHandler:isFocused(cid)) then return false end if addoninfo[msg] ~= nil then if (getPlayerStorageValue(cid, addoninfo[msg].storageID) ~= -1) then npcHandler:say('You already have this addon!', cid) npcHandler:resetNpc() else local itemsTable = addoninfo[msg].items local items_list = '' if table.maxn(itemsTable) > 0 then for i = 1, table.maxn(itemsTable) do local item = itemsTable items_list = items_list .. item[2] .. ' ' .. ItemType(item[1]):getName() if i ~= table.maxn(itemsTable) then items_list = items_list .. ', ' end end end local text = '' if (addoninfo[msg].cost > 0) then text = addoninfo[msg].cost .. ' gp' elseif table.maxn(addoninfo[msg].items) then text = items_list elseif (addoninfo[msg].cost > 0) and table.maxn(addoninfo[msg].items) then text = items_list .. ' and ' .. addoninfo[msg].cost .. ' gp' end npcHandler:say('For ' .. msg .. ' you will need ' .. text .. '. Do you have it all with you?', cid) rtnt[talkUser] = msg talkState[talkUser] = addoninfo[msg].storageID return true end elseif msgcontains(msg, "yes") then if (talkState[talkUser] > 10010 and talkState[talkUser] < 10100) then local items_number = 0 if table.maxn(addoninfo[rtnt[talkUser]].items) > 0 then for i = 1, table.maxn(addoninfo[rtnt[talkUser]].items) do local item = addoninfo[rtnt[talkUser]].items if (getPlayerItemCount(cid,item[1]) >= item[2]) then items_number = items_number + 1 end end end if(getPlayerMoney(cid) >= addoninfo[rtnt[talkUser]].cost) and (items_number == table.maxn(addoninfo[rtnt[talkUser]].items)) then doPlayerRemoveMoney(cid, addoninfo[rtnt[talkUser]].cost) if table.maxn(addoninfo[rtnt[talkUser]].items) > 0 then for i = 1, table.maxn(addoninfo[rtnt[talkUser]].items) do local item = addoninfo[rtnt[talkUser]].items doPlayerRemoveItem(cid,item[1],item[2]) end end doPlayerAddOutfit(cid, addoninfo[rtnt[talkUser]].outfit_male, addoninfo[rtnt[talkUser]].addon) doPlayerAddOutfit(cid, addoninfo[rtnt[talkUser]].outfit_female, addoninfo[rtnt[talkUser]].addon) setPlayerStorageValue(cid,addoninfo[rtnt[talkUser]].storageID,1) npcHandler:say('Here you are.', cid) else npcHandler:say('You do not have needed items!', cid) end rtnt[talkUser] = nil talkState[talkUser] = 0 npcHandler:resetNpc() return true end elseif msgcontains(msg, "addon") then npcHandler:say('I can give you addons for {' .. table.concat(o, "}, {") .. '} outfits.', cid) rtnt[talkUser] = nil talkState[talkUser] = 0 npcHandler:resetNpc() return true elseif msgcontains(msg, "help") then npcHandler:say('To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.', cid) rtnt[talkUser] = nil talkState[talkUser] = 0 npcHandler:resetNpc() return true else if talkState[talkUser] ~= nil then if talkState[talkUser] > 0 then npcHandler:say('Come back when you get these items.', cid) rtnt[talkUser] = nil talkState[talkUser] = 0 npcHandler:resetNpc() return true end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
    1 ponto
  9. Krono

    [Movements] Tp com Limite de Players

    Tp com Limite de Players é um script que determina quantos players podem acessar cada area por vez. Com esse script dá para deixar as hunts mais distribuidas. Veja como funciona com Imagen. Instalando o script: Em data/movements/scripts crie um arquivo com o nome Limitetp.lua e cole este script dentro: local c = { limit = 5, -- Limite de jogadores msgCancel = 'Tp bloqueado. Maximo de jogadores atingido', -- Mensagem quando o limite de jogadores estiver atingido area = { From = {x = 1069, y = 1027, z = 6}, -- Coordenada maxima superior esquerda To = {x = 1071, y = 1030, z = 7}, -- Coordenada minima inferior direita }, pos = {x = 1070, y = 1030, z = 7}, -- Coordenada onde será teletransportado local function getPlayersInArea(fromPos, toPos) local t = {} for _, cid in ipairs(getPlayersOnline()) do if isInRange(getThingPos(cid), fromPos, toPos) then table.insert(t, cid) end end return t end function onStepIn(cid, item, fromPos, toPos) if isPlayer(cid) then if table.getn(getPlayersInArea(c.area.From, c.area.To)) < c.limit then doSendMagicEffect(fromPos, CONST_ME_TELEPORT) doTeleportThing(cid, c.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else doPlayerSendCancel(cid, c.msgCancel) doTeleportThing(cid, toPos, false) end end return true end Em movements.xml adicione a tag: <movevent type="StepIn" uniqueid="9478" event="script" value="Limitetp.lua"/> Veja a imagem da configuração: Espero que gostem e usem!! Credito: Belerofonte
    1 ponto
  10. Danihcv

    Server PokexCyan v3.0

    Features: Pokes adicionados: Sistema de bike funcionando Perfeitamente. Sistema de correr, afk e !invite pras houses. Atenção- os pokes que eu adicionei nao da pra dar /cb pq eu nao sei faser isso nessa base blz so da pra dar /s e /m mas eles estam com atakes. obrBugs removidos: Metang não evoluia pra metagross; Shiny Larvitar tambem não tava virando shiny Pupitar com stone; Larvitar não tava evoluindo; Bug de arvore que ganhava 10mil Dark Ball, 20mil Td, 20mil Boost Stone, e Held Item Removido. Prints: Bike !Invite Mapa Mega Lucario Poke mega e Poke X e Y Pokes Mini Quest Nova Shiny Metagross Reshiram e Zekrom Area De Pesca Downloads: Server Cliente Scans Server (arquivo potencialmente (não quer dizer que realmente seja) prejudicial. Baixe por sua conta e risco) Cliente Créditos Brun - Por Criar o Servidor Slicer - Por Editar o Servidor Mulurka - Pelas outfits Stylo - Pelo tuto do ícone system Noninhu - Por ajudar em alguns spells Dandanrvb - Pelos scripts do icone system Erondino - Por algumas caves ih é só bjundão a all Tioj - Pelas edições Kuuhaku - Pela cave dos geot . AnnaFeeh - Pelo script do ditto system pxg Vudi - Por ter postado originalmente Gabrielbsales pedrojosex - Por ter editado um pouco mais
    1 ponto
  11. Furabio

    [TFS 1.1] Monster Tasks

    Esse npc permite escolher qual task o player irá fazer : Adonai.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Adonai" script="tasks.lua" walkinterval="2000" speed ="0" floorchange="0"> <health now="100" max="100"/> <look type="433" head="58" body="113" legs="50" feet="78" addons="1" mount="688"/> </npc> tasks.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local xmsg = {} 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 storage = 62003 local monsters = { ["Dragons"] = {storage = 5010, mstorage = 19000, amount = 10, exp = 5000, items = {{id = 2157, count = 1}, {id = 2160, count = 3}}}, ["Dragon Lords"] = {storage = 5011, mstorage = 19001, amount = 10, exp = 10000, items = {{id = 2492, count = 1}, {id = 2160, count = 5}}}, ["Hydras"] = {storage = 5012, mstorage = 19002, amount = 10, exp = 18000, items = {{id = 2195, count = 1}, {id = 2157, count = 8}}}, ["Demons"] = {storage = 5013, mstorage = 19003, amount = 10, exp = 20000, items = {{id = 2520, count = 1}, {id = 2160, count = 10}}} } local function getItemsFromTable(itemtable) local text = "" for v = 1, #itemtable do count, info = itemtable[v].count, ItemType(itemtable[v].id) local ret = ", " if v == 1 then ret = "" elseif v == #itemtable then ret = " and " end text = text .. ret text = text .. (count > 1 and count or info:getArticle()).." "..(count > 1 and info:getPluralName() or info:getName()) end return text end local function Cptl(f, r) return f:upper()..r:lower() end function creatureSayCallback(cid, type, msg) local player, cmsg = Player(cid), msg:gsub("(%a)([%w_']*)", Cptl) if not npcHandler:isFocused(cid) then if msg == "hi" or msg == "hello" then npcHandler:addFocus(cid) if player:getStorageValue(storage) == -1 then local text, n = "", 0 for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then n = n + 1 text = text .. ", " text = text .. ""..x.amount.." {"..k.."}" end end if n > 1 then npcHandler:say("I have several tasks for you to kill monsters"..text..", which one do you choose? I can also show you a {list} with rewards and you can {stop} a task if you want.", cid) npcHandler.topic[cid] = 1 xmsg[cid] = msg elseif n == 1 then npcHandler:say("I have one last task for you"..text..".", cid) npcHandler.topic[cid] = 1 else npcHandler:say("You already did all tasks, I have nothing for you to do anymore, good job though.", cid) end elseif player:getStorageValue(storage) == 1 then for k, x in pairs(monsters) do if player:getStorageValue(x.storage) == 1 then npcHandler:say("Did you kill "..x.amount.." "..k.."?", cid) npcHandler.topic[cid] = 2 xmsg[cid] = k end end end else return false end elseif monsters[cmsg] and npcHandler.topic[cid] == 1 then if player:getStorageValue(monsters[cmsg].storage) == -1 then npcHandler:say("Good luck, come back when you killed "..monsters[cmsg].amount.." "..cmsg..".", cid) player:setStorageValue(storage, 1) player:setStorageValue(monsters[cmsg].storage, 1) else npcHandler:say("You already did the "..cmsg.." mission.", cid) end npcHandler.topic[cid] = 0 elseif msgcontains(msg, "yes") and npcHandler.topic[cid] == 2 then local x = monsters[xmsg[cid]] if player:getStorageValue(x.mstorage) >= x.amount then npcHandler:say("Good job, here is your reward, "..getItemsFromTable(x.items)..".", cid) for g = 1, #x.items do player:addItem(x.items[g].id, x.items[g].count) end player:addExperience(x.exp) player:setStorageValue(x.storage, 2) player:setStorageValue(storage, -1) npcHandler.topic[cid] = 3 else npcHandler:say("You didn't kill them all, you still need to kill "..x.amount -(player:getStorageValue(x.mstorage) + 1).." "..xmsg[cid]..".", cid) end elseif msgcontains(msg, "task") and npcHandler.topic[cid] == 3 then local text, n = "", 0 for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then n = n + 1 text = text .. (n == 1 and "" or ", ") text = text .. "{"..k.."}" end end if text ~= "" then npcHandler:say("Want to do another task? You can choose "..text..".", cid) npcHandler.topic[cid] = 1 else npcHandler:say("You already did all tasks.", cid) end elseif msgcontains(msg, "no") and npcHandler.topic[cid] == 1 then npcHandler:say("Ok then.", cid) npcHandler.topic[cid] = 0 elseif msgcontains(msg, "stop") then local text, n = "", 0 for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then n = n + 1 text = text .. (n == 1 and "" or ", ") text = text .. "{"..k.."}" if player:getStorageValue(x.storage) == 1 then player:setStorageValue(x.storage, -1) end end end if player:getStorageValue(storage) == 1 then npcHandler:say("Alright, let me know if you want to continue an other task, you can still choose "..text..".", cid) else npcHandler:say("You didn't start any new task yet, if you want to start one, you can choose "..text..".", cid) end player:setStorageValue(storage, -1) npcHandler.topic[cid] = 1 elseif msgcontains(msg, "list") then local text = "Tasks\n\n" for k, x in pairs(monsters) do if player:getStorageValue(x.mstorage) < x.amount then text = text ..k .." ["..(player:getStorageValue(x.mstorage) + 1).."/"..x.amount.."]:\n Rewards:\n "..getItemsFromTable(x.items).."\n "..x.exp.." experience \n\n" else text = text .. k .." [DONE]\n" end end player:showTextDialog(1949, "" .. text) npcHandler:say("Here you are.", cid) elseif msgcontains(msg, "bye") then npcHandler:say("Bye.", cid) npcHandler:releaseFocus(cid) else npcHandler:say("What?", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) creaturescripts.xml <event type="kill" name="Tasks" script="killtasks.lua"/> login.lua player:registerEvent("Tasks") killtasks.lua local config = { ['dragon'] = {amount = 10, storage = 19000, startstorage = 5010, startvalue = 1}, ['dragon lord'] = {amount = 10, storage = 19001, startstorage = 5011, startvalue = 1}, ['hydra'] = {amount = 10, storage = 19002, startstorage = 5012, startvalue = 1}, ['demon'] = {amount = 10, storage = 19003, startstorage = 5013, startvalue = 1} } function onKill(player, target) local monster = config[target:getName():lower()] if target:isPlayer() or not monster or target:getMaster() then return true end local stor = player:getStorageValue(monster.storage)+1 if stor < monster.amount and player:getStorageValue(monster.startstorage) >= monster.startvalue then player:setStorageValue(monster.storage, stor) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Task message: '..(stor +1)..' of '..monster.amount..' '..target:getName()..'s killed.') end if (stor +1) == monster.amount then player:sendTextMessage(MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..(stor +1)..' '..target:getName()..'s and completed the '..target:getName()..'s mission.') player:setStorageValue(monster.storage, stor +1) end return true end ___________________________________________________________________________________________ Como funciona ? O NPC oferece-lhe várias task, você pode escolher qual você deseja fazer. Se você não matar todos os monstros, o NPC irá dizer-lhe quantos você ainda tem que matar. Você pode para ver a lista de recompensa e as tasks que você já fez. Você pode parar com as tasks e ir fazer outra e depois continuar a antiga. Ao terminar as task elas não serão mais mencionados pelo NPC mas será mostrado como terminado na lista. Quando terminar as task o npc, dirá que todas foram completadas. Créditos : Limos
    1 ponto
  12. Neptune Server + Website Completo Servidor com alto nivel de Rpg. Excelente opção para novos servidores serios que desejam se diferenciar dos demais. Informações 10 cidades Custom map Baseado no Devland Map Quests Npcs Montarias Addons Outfits E mais! Imagens Layout Website Download https://www.sendspace.com/file/w6ufzp Scan https://www.virustot...sis/1426956753/ Créditos Alvanea
    1 ponto
  13. Achei esse script magnifico na internet que tira qualquer servidor da mesmisse dando um ar mais RPG e inovador a qualquer otserver!! Este script randomiza o item ganho em uma quest, levando em consideração. Os itens do dia: 1 dos itens disponiveis no dia é dado ao player (escolhido aleatoriamente) A quantidade: alguns dos itens tem a possibilidade de ganhos em dobro triplo..etc. Vamos ao Script Em data/actions/actions/scripts adicione um arquivo com o nome de questxday.lua function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local config = { storage = 45392, exstorage = 40822, days = { ["Monday"] = { {itemid = 8839, count = math.random(1, 3)} }, ["Tuesday"] = { {itemid = 2681, count = 1}, {itemid = 2682, count = 1}, {itemid = 2683, count = 1} }, ["Wednesday"] = { {itemid = 2674, count = math.random(1, 10)}, {itemid = 2675, count = math.random(1, 10)}, {itemid = 2676, count = math.random(1, 10)}, {itemid = 2673, count = math.random(1, 10)} }, ["Thursday"] = { {itemid = 2679, count = math.random(2, 15)}, {itemid = 2680, count = math.random(1, 5)} }, ["Friday"] = { {itemid = 2788, count = math.random(1, 3)} }, ["Saturday"] = { {itemid = 6393, count = 1} }, ["Sunday"] = { {itemid = 2389, count = math.random(2, 12)}, {itemid = 2690, count = math.random(1, 5)} } } } local player = Player(cid) local x = config.days[os.date("%A")] if player:getStorageValue(config.storage) == tonumber(os.date("%w")) and player:getStorageValue(config.exstorage) > os.time() then return player:sendCancelMessage("The chest is empty, come back tomorrow for a new reward.") end local c = math.random(#x) local info = ItemType(x[c].itemid) if x[c].count > 1 then text = x[c].count .. " " .. info:getPluralName() else text = info:getArticle() .. " " .. info:getName() end local itemx = Game.createItem(x[c].itemid, x[c].count) if player:addItemEx(itemx) ~= RETURNVALUE_NOERROR then player:getPosition():sendMagicEffect(CONST_ME_POFF) text = "You have found a reward weighing " .. itemx:getWeight() .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." player:setStorageValue(config.storage, tonumber(os.date("%w"))) player:setStorageValue(config.exstorage, os.time() + 24*60*60) end player:sendTextMessage(MESSAGE_INFO_DESCR, text) return true end Em actions.xml adicione a tag: <action uniqueid="3001" script="questxday.lua"/> Espero que gostem e utilizem!! Credito :Vancinis
    1 ponto
  14. Bem, desde tempos remotos uma das maiores duvidas dos donos de servidores é descobrir quantos players ele pode colocar online SEM LAG Hoje vou ensinar para vocês como calcular, é claro que não é um método 100% preciso porque não existe nada que te leve a essa precisão pelo fato das conexões na internet serem variaveis mas eu garanto que vc vai conseguir uma boa idéia ao final desse tutorial e utilizando o bom senso vai poder proporcionar qualidade ao numero maximo de players que sua internet suportar 2º Você deve descobrir o seu UPLOAD, bem destacado mesmo, porque o download praticamente não é utilizado por um servidor e eu vou provar isso pra vocês mais a frente. Então entre em http://www.speedtest.net, faça o teste no ponto recomendado, vou mostrar para voCês o meu resultado Download: 15Mbps Upload: 1.07Mbps Vamos esclarecer umas coisinhas aqui... Esses valores são Megabits por segundo, que é a oitava parte do Megabyte por segundo que é o que você está acostumado a ver por ai nos tamanhos dos seus arquivos Isso significa que uma musica de 3Megabytes por exemplo tem 24Megabits... Seguindo a mesma lógica, 15/8= 1.875Megabytes e 1.07/8 = 0.133 Megabytes que é aproximadamente 136Kilobytes por segundo(KB/s) Mas o que nos interessa mesmo é o upload, vou arredondar para 1Mbps assim os calculos ficam mais tranquilos... Eu fiz um teste com um programa de monitoramento de internet para descobrir quanto de banda o Tibia usa, confia abaixo Veja no youtube em 720p e tela cheia para fica mais legível. Minha conclusão foi a seguinte, o Tibia usa de 200 à 1200 Bytes da internet, tudo depende do que está acontecendo com o seu char no momento. (assista o video para mais detalhes com monitoração em tempo real) Como não podemos nivelar por baixo porque se não vai dar lag, vamos nivelar pelo alto, vamos assumir que cada char utilize 1024Bytes de internet, isso significa 1 Kilobyte. Mas tio, isso é de Upload ou Download? R: Depende. Como tudo na internet, sempre tem alguém enviando e alguém recebendo. O teste que eu fiz foi do ponto de vista do cliente, aquele que recebe. Mas para receber alguém tem que enviar, então podemos convencionar que se eu estou recebendo 1024 Bytes o servidor está enviando 1024 Bytes Por isso que o Upload é a coisa que mais importa para os servidores, porque o que ele vai receber do cliente é uma pequena fração do que ele vai ter que enviar. Mas voltando lá para o meu exemplo de 1 Mbps... Se cada char utiliza 1 Kilobyte e eu tenho 125 Kilobytes inteiros de banda (1Mbps/8=125Kilobytes) (repare no ponto) (ninguém vai ficar no youtube com o servidor ligado, ok? se não, não há calculo que resolva.) isso significa que eu posso colocar 125 players online né? Resposta: Apenas teoricamente. Como eu disse há variações, tanto paraa mais quanto para menos na banda que os chars usam, ai entra o bom senso, vamos limitar para 100 players, afinal quando estiver rolando aquela War massiva ninguém quer lag né? E o site? Meus caros amigos, o site é o seu maior inimigo. (Intrigaaaa!) Falando sério, ter que enviar toda a página para o player que está acessando consome muita banda e pode lagar o servidor Imagine um servidor de 100 players online, pelo menos 10 estão vendo o ranking, acessando a conta, criando chars novos... Ja pensou no estrago? Site é muito legal meus amigos, mas não é util para quem tem um servidor caseiro que ter ter o maximo de players que sua internet aguentar Utilizem ACC Manager, rank/guild ingame, se você quiser mesmo o site (o que eu acho até muito interessante/importante) faça uso de um Blog (Wordpress é uma boa pedida) você pode criar páginas com informações sobre o servidor, doações e etc.. ou faça um site mesmo só que totalmente desconectado do servidor, é a melhor maneira de previnir o lag. (e de previnir alguns zé manés atualizando as paginas do site só pra lagar de propósito) Conclusão: Em resumo, cada player utiliza: Aproximadamente 1024Bytes = 1Kb = 0.01Mbps do upload o servidor Vou deixar uma tabelinha para o que eu faria com um servidor meu, se vc quiser testar outros valores é com você Upload: 0.256mbps (256kbps) = 25 Players online 0.5 mbps (512 kbps) = 50 Players online 1mbps (1024kbps) = 100 Players online E por ai vai, essas são as 3 velocidades de upload mais populares do Brasil. Nota: 1024kb = 128Kb kb = Kilobits Kb = KiloBytes
    1 ponto
  15. Danihcv

    [PDA] Pokemon Whots 1.0

    Hoje eu vim trazer um servidor de pokemon tibia chamado "Pokemon Whots" Features: Rep+ System Comando de Correr Comando de !luz Comando de !afk Comando de !bug (voltar ao cp) Sistema de Anúcio Ex: "!anucio aeae galera." Vai aparecer em verde [Anuncio]Seunick : aeae galera. Para todo o servidor Entre outros Sistemas Muito Legais!!!!! Pokemon da 1° até 6° Geração (Incompleta) Downloads: Servidor Cliente Scans: Servidor Cliente Créditos: Equipe Skyfall - Base Zet0N0Murmurou - Editar Muitas Coisas Lucasmc - Por Umas sprites como Iniciais de Kalos e Sprite de Meloetta
    1 ponto
  16. Furabio

    [TFS 0.4] NEW LOTTERY SYSTEM

    O evento se resume a cada x horário configurável, é escolhido dentre os player online, 1 pessoa e ela recebe uma surprise bag (com items aleatórios para ganhar também configurável). Globalevents/scripts ---> lottery.lua local config = { lottery_hour = "1 Hours", -- after how many hours should lottery begin, explains itself really... reward_count = 4, -- How much items/rewards? so you want 4 random items then write 4... website = 1 -- Doesn't need explanation } function onThink(interval, lastExecution) local players = getPlayersOnline() local list = {} for i, tid in ipairs(players) do list[i] = tid end local winner = list[math.random(1, #list)] if(config.website == 1) then db.executeQuery("INSERT INTO `lottery` (`name`) VALUES ('".. getCreatureName(winner) .."');") end doBroadcastMessage('[LOTTERY SYSTEM] Winner: '.. getCreatureName(winner) ..', Reward: Suprise Bag' ..'! - Congratulations! (Next Lottery in '.. config.lottery_hour ..')') doPlayerAddItem(winner, 6571,config.reward_count) return TRUE end globalevents.xml <globalevent name="lottery" interval="4050000" event="script" value="lottery.lua"/> Actions/scripts --> surprisebag.lua -- CREATED BY GHETTOBIRD --! local PRESENT_BLUE = {2494, 2472} -- Add more items if you want just seperate them with an item id... local PRESENT_RED = {2160, 2514} -- same as above function onUse(cid, item, fromPosition, itemEx, toPosition) local count = 1 if(item.itemid == 6570) then local randomChance = math.random(1, #PRESENT_BLUE) if(randomChance == 1) then count = 2 elseif(randomChance == 2) then count = 2 end doPlayerAddItem(cid, PRESENT_BLUE[randomChance], count) elseif(item.itemid == 6571) then local randomChance = math.random(1, #PRESENT_RED) if randomChance > 0 and randomChance < 4 then count = 2 end doPlayerAddItem(cid, PRESENT_RED[randomChance], count) end doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS) doRemoveItem(item.uid, 1) return true end actions.xml <action fromid="6570" toid="6571" event="script" value="surprisebag.lua"/> Créditos : ghetobird
    1 ponto
  17. Furabio

    Ninja Vocation Spells

    AREA1 = { {0, 0, 0}, {0, 3, 0}, {0, 0, 0} } local function sendHealingEffect(cid, position, loopCount) local player = Player(cid) if not player then return end position:sendDistanceEffect(player:getPosition(), CONST_ANI_SMALLHOLY) player:addHealth(math.max(100, 150)) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) if loopCount == 0 then player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) end end function onCastSpell(creature, var) local playerPos = creature:getPosition() local loopCount = 12 creature:say('Heal me my brothers!', TALKTYPE_MONSTER_SAY) for i = 1, loopCount do local position = Position(playerPos.x + math.random(-4, 3), playerPos.y + math.random(-3, 2), playerPos.z) addEvent(doAreaCombatHealth, i * 75, creature:getId(), COMBAT_PHYSICALDAMAGE, position, createCombatArea(AREA1), 0, 0, CONST_ME_ASSASSIN) addEvent(sendHealingEffect, i * 75, creature:getId(), position, loopCount - i) end return false end local function targetEffect(cid) local player = Player(cid) if not player then return end local effect = CONST_ANI_REDSTAR local orig = player:getPosition() local d1, d2 = {z = orig.z}, {z = orig.z} d1.x = orig.x - 5 d2.x = orig.x + 5 for i = -2, 2 do d1.y = orig.y + i d2.y = d1.y orig:sendDistanceEffect(d1, effect) orig:sendDistanceEffect(d2, effect) end d1.y = orig.y - 3 d2.y = orig.y + 3 for i = -4, 4 do d1.x = orig.x + i d2.x = d1.x orig:sendDistanceEffect(d1, effect) orig:sendDistanceEffect(d2, effect) end end local function backOldPosition(cid, oldPosition) local player = Player(cid) if not player then return end player:teleportTo(oldPosition) player:setGhostMode(false) end local function jumpEffect(cid, target) local player = Player(cid) if not player then return end local target = Creature(target) if target then player:getPosition():sendDistanceEffect(target:getPosition(), CONST_ANI_EXPLOSION) end end local function jumpOnTarget(cid, target, targetCount, oldPosition) local player = Player(cid) if not player then return end local target = Creature(target) if target then addEvent(targetEffect, 100, cid) player:teleportTo(target:getPosition()) player:setGhostMode(true) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -1, -100, CONST_ME_ASSASSIN) if targetCount == 0 then addEvent(backOldPosition, 400, cid, oldPosition) end end end local function extractRandomValuesFromTable(tbl) --By Printer(This will make sure not to select a value twice from the table) if #tbl == 0 then return false end return table.remove(tbl, math.random(#tbl)) end function onCastSpell(creature, var) local targets = {} local playerPos = creature:getPosition() local spectators = Game.getSpectators(playerPos, false, false, 0, 10, 0, 10) for i = 1, #spectators do local specs = spectators[i] if specs ~= creature and not specs:isNpc() then targets[#targets+1] = specs end end if #targets == 0 then creature:sendCancelMessage('There is no targets in sight.') playerPos:sendMagicEffect(CONST_ME_POFF) return false end local targetCount = #targets for i = 1, #targets do local randTarget = extractRandomValuesFromTable(targets) addEvent(jumpOnTarget, i * 400, creature:getId(), randTarget:getId(), targetCount - i, playerPos) addEvent(jumpEffect, i * 300, creature:getId(), randTarget:getId()) end return false end local function sendDistanceEffectDelay(cid, fromPos, toPos, effect) local player = Player(cid) if not player then return end fromPos:sendDistanceEffect(toPos, effect) end local function ninjaJumpDash(cid, target, oldPos, lastJump, back) local player = Player(cid) if not player then return end local target = Creature(target) if not target then player:setGhostMode(false) return end if lastJump then player:setGhostMode(false) end if back then player:teleportTo(oldPos) else player:teleportTo(target:getPosition()) end doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -1, -100, CONST_ME_THUNDER) end function onCastSpell(creature, var) local cid = creature:getId() local playerPos = creature:getPosition() creature:setGhostMode(true) addEvent(ninjaJumpDash, 0, cid, target:getId(), playerPos, false, false) addEvent(sendDistanceEffectDelay, 100, cid, playerPos, target:getPosition(), CONST_ANI_ENERGY) addEvent(sendDistanceEffectDelay, 300, cid, target:getPosition(), playerPos, CONST_ANI_ENERGY) addEvent(ninjaJumpDash, 400, cid, target:getId(), playerPos, false, true) addEvent(ninjaJumpDash, 600, cid, target:getId(), playerPos, false, false) addEvent(sendDistanceEffectDelay, 700, cid, playerPos, target:getPosition(), CONST_ANI_ENERGY) addEvent(sendDistanceEffectDelay, 1000, cid, target:getPosition(), playerPos, CONST_ANI_ENERGY) addEvent(ninjaJumpDash, 1100, cid, target:getId(), playerPos, false, true) addEvent(ninjaJumpDash, 1300, cid, target:getId(), playerPos, false, false) addEvent(sendDistanceEffectDelay, 1400, cid, playerPos, target:getPosition(), CONST_ANI_ENERGY) addEvent(sendDistanceEffectDelay, 1700, cid, target:getPosition(), playerPos, CONST_ANI_ENERGY) addEvent(ninjaJumpDash, 1800, cid, target:getId(), playerPos, true, true) return false end function isWalkable(cid, pos) local tile = Tile(pos) if not tile then return false end if tile:queryAdd(cid) == 1 and not tile:hasFlag(TILESTATE_PROTECTIONZONE) then return true end return false end local function jumpBehindTarget(cid, target) local player = Player(cid) local target = Creature(target) local targetPos = target:getPosition() local targetPositions = { north = Position(targetPos.x, targetPos.y-1, targetPos.z), east = Position(targetPos.x+1, targetPos.y, targetPos.z), west = Position(targetPos.x-1, targetPos.y, targetPos.z), south = Position(targetPos.x, targetPos.y+1, targetPos.z) } local targetDir = target:getDirection() if targetDir == NORTH then dir = targetPositions.south elseif targetDir == EAST then dir = targetPositions.west elseif targetDir == WEST then dir = targetPositions.east elseif targetDir == SOUTH then dir = targetPositions.north end return dir end local function oldPos(cid, oldPos) local player = Player(cid) if not player then return end player:teleportTo(oldPos) end local function checkHasTarget(cid, count, oldPos) local player = Player(cid) if not player then return end if count < 1 then player:setGhostMode(false) return end local target = player:getTarget() if target then local behindTarget = jumpBehindTarget(cid, target:getId()) if isWalkable(cid, behindTarget) then player:teleportTo(behindTarget) else player:teleportTo(target:getPosition()) addEvent(backOldPos, 100, cid, oldPos) end player:setDirection(target:getDirection()) player:setGhostMode(false) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -20, -100, CONST_ME_FIREATTACK) return true end addEvent(checkHasTarget, 1 * 100, cid, count - 1) end function onCastSpell(creature, var) local playerPos = creature:getPosition() creature:setGhostMode(true) playerPos:sendMagicEffect(CONST_ME_POFF) addEvent(checkHasTarget, 1 * 250, creature:getId(), 50, playerPos) return false end Créditos : Printer
    1 ponto
  18. Krono

    Criando Acc God [tfs 1.0+] [mysql]

    Olá Xtibians. Upando Muito? Beleza então, mais tarde a cave é minha!! então leave. Bom mais enquanto isso estou postando pra vocês um tutorial simples, porém util nesta seção, é uma forma facil de criar Conta God. Espero com esse tutorial ajudar pelo menos 1 pessoa pois pra min ja vai valer a pena!! (mesmo sabendo que escrevi esse tutorial 2 vezes) Bom vamos lá. 1º Acesso o PhpMyAdmin --> Banco de dados do servidor 2º Abra a tabela Account 3 Procure pela Account Name ja criada para que a mesma se torne sua Conta God 4 Clique em Editar 5 Altere o valor Type para "5" e clique em execultar 5º Agora acesse a tabela "Player" e procure o character da mesma conta que será o seu God 6º Clique em editar. 7º Altere o valor de Group_Id para "3' Pronto!! Facil não? Até a proxima, vou pra minha cave agora. ~~Sujestão de tutoriais via PM acepted!!
    1 ponto
  19. Krono

    [Talkaction] Changename

    É um script que eu realmente achei excelente, e ajuda muito a servidores onde esse serviço não é vendido. Segue o script Em data/talkactions/scripts adicione um arquivo com o nome de changename.lua com o seguinte script: local config = { item = { Id = 1111, count = 0, }, maxTextLenght = 15, blacklistParam = {"account manager", "god", "cm", "gm", "tutor", "tester"}, minWordLenght = 3, delay = 2 } function onSay(cid, words, param, channel) local textCancel, t = config.text, string.explode(param, ",") if(param == '') then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") elseif((getPlayerGUIDByName(t[1]) ~= nil) and (not getBooleanFromString(t[2]))) then textCancel = "That name is already in use." elseif(getPlayerItemCount(cid, config.item.Id) < config.item.count) then textCancel = "You do not fulfill the requirements." elseif(not getTilePzInfo(getCreaturePosition(cid))) then textCancel = "You must be inside a protection zone to use this command." elseif(string.len(tostring(t[1])) >= config.maxTextLenght) then textCancel = "You can only use a maximum of " .. config.maxTextLenght .. " characters." elseif(string.find(t[1]:lower(), "[^%l%s]") ~= nil) then textCancel = "You cannot use symbols." else for blacklist = 1, table.maxn(config.blacklistParam) do if(string.find(t[1]:lower(), config.blacklistParam[blacklist]) ~= nil) then textCancel = "Invalid name entry." break end end end if(config.text ~= textCancel) then doPlayerSendCancel(cid, textCancel) return true end local paramTemp, space, oldName = '', '', getCreatureName(cid) for word in string.gmatch(t[1], "%a+") do if(string.len(word) < config.minWordLenght) then doPlayerSendCancel(cid, "Each word must have a minimum of " .. config.minWordLenght .. " characters.") return true end paramTemp = "" .. paramTemp .. "" .. space .. "" .. word .. "" if(space == '') then space = " " end end local guid = getPlayerGUID(cid) t[1] = paramTemp doPlayerRemoveItem(cid, config.item.Id, config.item.count) if(pcall(doPlayerChangeName, guid, oldName, t[1]) == false) then db.executeQuery("INSERT INTO `player_namelocks` (`player_id`, `name`, `new_name`, `date`) VALUES (" .. guid .. ", " .. db.escapeString(oldName) .. ", " .. db.escapeString(t[1]) .. ", " .. os.time() .. ");") db.executeQuery("UPDATE `players` SET `name` = " .. db.escapeString(t[1]) .. " WHERE `id` = " .. guid .. " LIMIT 1;") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your name has been changed successfully. You will be kicked in " .. config.delay .. " seconds.") addEvent(function(cid, forceLogout) if(isPlayer(cid)) then doRemoveCreature(cid, forceLogout) end end, config.delay * 1000, cid, false) return true end Em talkactions.xml adicione a tag: <talkaction words="!changename;/changename;!namechange;/namechange" script="changename.lua" /> Funcional em tfs 0.3.7 / 0.4.0 Credito: Ratser Espero que aproveitem esse super script
    1 ponto
  20. Krono

    Redirecionando ao moldem

    "Nat Setup" acredito que seja igual a "Nat Options". Se não achar tenta procurar nas outras opções, pois isso pode variar o nome de modem para modem. Vou pesquisar e ver se encontro alguma solução, caso encontre postarei no topico.
    1 ponto
  21. Krono

    xTibia, o RETORNO!

    Vamos que Vamos!!! Trazer de volta aquela sensação de extase toda vez que um servidor é inaugurado. A vontade de acessar o furúm a cada 10 minutos para conferir quem comentou os seus posts. A amizade eterna criada atravez de cada ajuda. O Xtibia que amamos e mantinhamos vivo em nossos corações e que junto da esperança de um dia voltar, Voltou. E voltou a hora é agora!! Conto com vocês. ~~Att Krono
    1 ponto
  22. Este mode é util em eventos, pois permite criar tps atravez de cordenadas, e também permite limitar o numero de players que poderão entrar no teleporte. Para instalar crie um arquivo dentro da pasta mods do seu servidor como o nome tpevent.xml e cole este script dentro. <?xml version="1.0" encoding="utf-8"?> <mod name="Portal" version="2.0" enabled="yes"> <description> Faz um portal no seu pe , e as pessoas podem entrar ex. /portal x,y,z,quantas pessoas ex. /portal 1000,1000,7,15 </description> <talkaction words="/portal" access="5" event="script"><![CDATA[ function onSay(cid, words, param) param = param.explode(param, ',') if param then teleport = doCreateTeleport(1387, {x=param[1], y=param[2], z=param[3]}, getPlayerPosition(cid)) doItemSetAttribute(teleport, "description", 'The portal may enter '..param[4]..' people left.') doItemSetAttribute(teleport, "aid", 100+param[4]) else doPlayerSendCancel(cid, "You must set param.") end return TRUE end ]]></talkaction> <movement type="StepIn" itemid="9740" event="script"><![CDATA[ function onStepIn(cid, item, position, fromPosition) if item.actionid > 100 then doItemSetAttribute(item.uid, "description", 'The portal may enter '..(item.actionid-101)..' people left.') doItemSetAttribute(item.uid, "aid", item.actionid-1) elseif item.actionid == 100 then doBroadcastMessage("The Portal has ran out of energy and collapsed.", MESSAGE_EVENT_ADVANCE) doSendMagicEffect(position, 2) doRemoveItem(item.uid, 1) end return true end ]]></movement> </mod> Utilizando o comando Modo de usar: / portal X, Y, Z, quantas pessoas podem entrar no portal Exemplo /portal 1050, 2000, 7, 15 espero com ajudar a muitas pessoas com esse Mod. creditos: não encontrado
    1 ponto
  23. Krono

    [Talkaction Mod] Rent itens System

    Ta de bobeira? dé uma inovada em seu servidor colocando novos sistemas. Veja este por exemplo. Ele dá a possibilidade de colocar itens para aluguel, ou seja ao execultar o comando o player pode adquirir um item por um tempo determinado em troca de alguma grana!. Comando para alugar o item: !rent itemname: Aluga o item desejado !rent list: Exibe a lista dos itens disponiveis para aluguel Para instalar: Crie um arquivo com o nome de rentitens.xml que deve ser intalado na pasta mods do seu servidor e insira neste arquivo o seguinte codigo. <?xml version="1.0" encoding="UTF-8"?> <mod name="Rent System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes"> <config name="rent_config"><![CDATA[ messages = { sucess = MESSAGE_INFO_DESCR, fail = MESSAGE_STATUS_WARNING, } warningStorage = 45768 items = { ["knight armor"] = {id=2476, time=1, price=3000, premium=true, cap=false}, ["demon legs"] = {id=2495, time=3, price=3000, premium=true, cap=true}, ["blue legs"] = {id=7730, time=2, price=3000, premium=true, cap=true}, ["demon shield"] = {id=2520, time=1, price=3000, premium=true, cap=true}, } function doWarningItemWasRemoved(cid) if (getCreatureStorage(cid, warningStorage) > -1) then local item = items[getItemNameById(getCreatureStorage(cid, warningStorage))] doPlayerSendTextMessage(cid, messages.sucess, "Ok, "..item.time..(item.time > 1 and " minutes" or " minute").." has passed, the rent of "..getItemNameById(item.id).." ended.") doCreatureSetStorage(cid, warningStorage, -1) end end ]]></config> <talkaction words="!rent" event="buffer"><![CDATA[ domodlib('rent_config') local item, itemuid = items[param:lower()], math.random(1000, 65535) if (param == "") then return doPlayerSendTextMessage(cid, messages.fail, "Sorry, you need to inform parameters.") end if (param == "list") then local str = "~* Rent System by Kimoszin *~\n\n" for name, iten in pairs(items) do str = str..string.sub(name, 0, 1):upper()..string.sub(name, 2):lower().." - "..iten.price.."gps \n" end str = str .."\n WWW.TIBIAKING.COM" return doPlayerPopupFYI(cid, str) end if not(item) then return doPlayerSendTextMessage(cid, messages.fail, "Sorry, but it is not possible to rent this item.") end if (item.premium and not(isPremium(cid))) then return doPlayerSendTextMessage(cid, messages.fail, "You need a premium account.") end if (item.cap and not(getPlayerFreeCap(cid) >= getItemWeightById(item.id, 1, 1))) then return doPlayerSendTextMessage(cid, messages.fail, "You don't have capacity.") end if not(doPlayerRemoveMoney(cid, item.price)) then return doPlayerSendTextMessage(cid, messages.fail, "Sorry, you do not have any money.") end doItemSetAttribute(doPlayerAddItem(cid, item.id, 1), "uid", itemuid) doPlayerSendTextMessage(cid, messages.sucess, "You rented a "..getItemNameById(item.id).." for "..item.time.. (item.time > 1 and " minutes" or " minute")..".") doCreatureSetStorage(cid, warningStorage, item.id) local player_id = getPlayerGUID(cid) addEvent(function() local player = getPlayerByGUID(player_id) if not(isPlayer(player)) then db.executeQuery("DELETE FROM `player_items` WHERE `player_items`.`player_id` = "..player_id.." AND `itemtype` = "..item.id..";") else doPlayerSendTextMessage(cid, messages.sucess, "Ok, "..item.time..(item.time > 1 and " minutes" or " minute").." has passed, the rent of "..getItemNameById(item.id).." ended.") doCreatureSetStorage(cid, warningStorage, -1) doRemoveItem(itemuid, 1) end end, item.time * 60 * 1000) ]]></talkaction> <creatureevent name="rentLogin" type="login" event="buffer"><![CDATA[ domodlib('rent_config') doWarningItemWasRemoved(cid) ]]></creatureevent> </mod> Aqui você adiciona, remove ou configura os itens: items = { ["knight armor"] = {id=2476, time=1, price=3000, premium=true, cap=false}, ["demon legs"] = {id=2495, time=3, price=3000, premium=true, cap=true}, ["blue legs"] = {id=7730, time=2, price=3000, premium=true, cap=true}, ["demon shield"] = {id=2520, time=1, price=3000, premium=true, cap=true}, } Configuração: [" item name"] = {i d=itemid, time=tempo, price=valor, premium=requer premium(true/false), cap=requer capacidade(true/false) Qualquer duvida estou a disposição! espero que aproveitem. Edit: trocando o titulo para um mais claro. Credito Kimoszin
    1 ponto
Líderes está configurado para São Paulo/GMT-03:00
×
×
  • Criar Novo...