Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''sistema''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. Ola galera xtibiana!!! O summon system e um sistema de sumonar sistema com algumas novidades. A configuração fica dentro de arquivo xml ficando mais fácil e pratico de modificar. Para sumonar diga /sum(nome do monstro) Para ver a lista de sumons /sumons Então lets go. Dentro de sua pasta "Data" crie um nova pasta chamado de sumon. Depois dentro da pasta sumon crie um novo arquivo XML e coloque isto dentro: <monster name="Demon" mana="3000" level="300" item="2323" health="100" />< <monster name="Bug" mana="2" level="2" item="0" health="0" />< <monster name="Hydra" mana="2000" level="50" item="2323" health="0" />< Esta e minha configuração se quiser pode alterar. Depois vá em talkactions e crie um arquivo lua chamado de sumon e coloque isto: function onSay(cid, words, param, channel) function getSumonInFile() local x = {} local events = io.open("data/sumon/sumon.xml", "r") for i in events:read("*a"):gmatch('<monster name="(.-)" ') do table.insert(x, i) end return x end local function getExistSumonInFile(monster) for i = 1, #getSumonInFile() do if monster == getSumonInFile()[i] then return true end end return false end function getSumonRequiresInFile(monster, attr) local x = {} local events = io.open("data/sumon/sumon.xml", "r") for i in events:read("*a"):gmatch('<monster name="'..monster..'" (.-)/') do local req = tonumber(i:match(''..attr..'="(.-)" ')) table.insert(x, req) end return x[1] or 0 end local mana,level,item,health = getSumonRequiresInFile(param, "mana"),getSumonRequiresInFile(param, "level"),getSumonRequiresInFile(param, "item"),getSumonRequiresInFile(param, "health") local x = {"Vá "..param.." e derrote estes malditos","Seja bem vindo "..param.."","Váaaaa "..param.."","Eae "..param.." esta pronto?!","Vaii "..param.." você e realmente forte"} if param == "" or not param or param == " " then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Precisa de dizer o nome do monsto") and false end if not getExistSumonInFile(param) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este monstro não pode ser sumado") end if getCreatureMana(cid) <= mana then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem "..mana.."de mana para sumonar") and false end if getPlayerLevel(cid) <= level then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem "..level.." de level para summonar") and false end if getPlayerItemCount(cid, item) < 0 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não tem o item "..item.." para summonar") and false end if getCreatureHealth(cid) <= health then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não "..health.."de health para summonar") and false end doSummonMonster(cid, param) doCreatureAddHealth(cid, -health) doCreatureAddMana(cid, -mana) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, x[math.random(1, #x)]) return true end Agora de novo em talkactions crie um arquivo lua chamado de sumons e coloque isto: function onSay(cid, words, param, channel) function getSumonInFile() local x = {} local events = io.open("data/sumon/sumon.xml", "r") for i in events:read("*a"):gmatch('<monster name="(.-)" ') do table.insert(x, i) end return x end function getSumonRequiresInFile(monster, attr) local x = {} local events = io.open("data/sumon/sumon.xml", "r") for i in events:read("*a"):gmatch('<monster name="'..monster..'" (.-)/') do local req = tonumber(i:match(''..attr..'="(.-)" ')) table.insert(x, req) end return x[1] or 0 end str = "" for i = 1, #getSumonInFile() do local sum = getSumonInFile()[i] local mana,level,item,health = getSumonRequiresInFile(sum, "mana"),getSumonRequiresInFile(sum, "level"),getSumonRequiresInFile(sum, "item"),getSumonRequiresInFile(sum, "health") str = ""..str.."\n"..getSumonInFile()[i].." Level - "..level.." health - "..health.." mana - "..mana.."" end doPlayerPopupFYI(cid, str) return true end E prontinho vou ensinar a configuração no seu arquivo xml:
  2. PS: Meu teclado nao tem ascentos nem cedilha, nao reparem na grafia. Eae , vou postar um script que eu fiz. Eu utilizava ele no meu antigo servidor, o Mell World, pois ja que o server esta fexado eu nao queria que esse script fosse esquecido. Ele faz o seguinte: Quando usado, ele oferece 3 opcoes: Ser teleportado para uma area exclusiva de hunt, onde se pode permanecer por no maximo 1 hora (configuravel), uma vez por dia Sumonar um monstro diferente (no meu ot eu tinha criado a Alma Penada, que dropava itens exclusivos) Simplesmente perder 500 vida. Ele so pode ser usado a cada 15 minutos e, dependendo de qual opcao for sorteada, faz o player falar algo. Script (actions/scripts/necronomicon.lua) local hunt = {x=596, y=1037, z=4} local options = { [1] = {name = "teleportar"}, [2] = {name = "sefrodo"}, [3] = {name = "summon"} } function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(cid) then local fazer = options[math.random(1, #options)] if getPlayerStorageValue(cid, 12391) < os.time () then setPlayerStorageValue(cid, 12391, os.time () + 15*60) if fazer.name == "teleportar" then if getPlayerStorageValue(cid, 12481) < os.time () then setPlayerStorageValue(cid, 12481, os.time () + 60*60*24) addEvent(voltarprotemplo, 1000*60*60, cid) doTeleportThing(cid, hunt) setPlayerStorageValue(cid, 24739, 1) doSendMagicEffect(hunt, CONST_ME_TELEPORT) doCreatureSay(cid,"Aha! Consegui decifrar o caminho secreto!",TALKTYPE_ORANGE_1) else doPlayerSendCancel(cid,"Voce nao pode entrar na are 64 mais de uma vez por dia") end elseif fazer.name == "sefrodo" then doCreatureAddHealth(cid, -500) doCreatureSay(cid,"Cada coisa que esta escrita nesse livro... Nao consigo suportar!",TALKTYPE_ORANGE_1) elseif fazer.name == "summon" then doCreateMonster("Alma Penada",getCreaturePosition(cid)) doCreatureSay(cid,"Nao era bem isso que eu queria, mas...",TALKTYPE_ORANGE_1) end else doPlayerSendCancel(cid, "Você so consegue ler a cada 15 minutos! Espere.") end function voltarprotemplo(cid, pos) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) setPlayerStorageValue(cid, 24739, -1) doPlayerSendTextMessage(cid, 22, "Voce ja atingiu seu limite de permanencia na Area 64, voce foi teleportado para o templo") end end return true end
  3. Sistema de Pet V1.0 E ai Galera, suave? Hoje venho trazer pra vocês, meu sistema de pet. É bem do tipo pokemon, mas tenho certeza que irão gostar. Vou liberá-lo porque gosto de compartilhar as coisas, e sei que alguém esta querendo um sistema desses. Assim como eu quis um dia e nunca encontrei um que funcionasse. O sistema está na versão 1.0, mas em em breve trarei um npc para healar o pet e algumas talks para o pet soltar spells. Vamos lá! Primeiramente, vá em data/action/scripts, crie um arquivo com o nome de CatchPet.lua e adicione: local mtrs = { ["Rat"] = {hp = 1000, maxhp = 1000, corpse = 2813, chance = 100}, ["Rotworm"] = {hp = 1000, maxhp = 1000, corpse = 5967, chance = 100}, ["Skeleton"] = {hp = 1000, maxhp = 1000, corpse = 5972, chance = 100}, ["Dragon"] = {hp = 1000, maxhp = 1000, corpse = 3104, chance = 100}, ["Dragon Lord"] = {hp = 1000, maxhp = 1000, corpse = 5984, chance = 100}, } function onUse(cid, item, frompos, item2, topos) for pet_name, v in pairs(mtrs) do if item2.itemid == v.corpse then if math.random(0,100) <= v.chance then doPlayerSendTextMessage(cid, 27, "Você capturou um ".. pet_name .. ".") doRemoveItem(item2.uid, 1) doRemoveItem(item.uid, 1) local itemcatch = doPlayerAddItem(cid, 7632, 1) doItemSetAttribute(itemcatch, "namepet", pet_name) doItemSetAttribute(itemcatch, "description", "Contém um ".. pet_name ..".") doItemSetAttribute(itemcatch, "lifepet", v.hp) doItemSetAttribute(itemcatch, "maxlifepet", v.maxhp) else doPlayerSendTextMessage(cid, 27, "Falhou.") end end end return true end Em seguida, duplique o arquivo, renomeie para VaiVolta e adicione: function onUse(cid, item, frompos, item2, topos) local health = tonumber(getItemAttribute(item.uid, "lifepet")) local mhp = tonumber(getItemAttribute(item.uid, "maxlifepet")) if health <= 0 then return doPlayerSendCancel(cid, "Esse pet esta morto.") end local pet_name = getItemAttribute(item.uid, "namepet") if item.itemid == 7632 then if not getTilePzInfo(getPlayerPosition(cid)) then if #getCreatureSummons(cid) < 1 then doTransformItem(item.uid, 7633) local summon = doSummonCreature(pet_name, getThingPos(cid)) doConvinceCreature(cid, summon) setCreatureMaxHealth(summon, mhp) doCreatureAddHealth(summon, mhp) doCreatureAddHealth(summon, health - mhp) doSendMagicEffect(getCreaturePosition(summon), 67) doCreatureSay(cid, "Vai, ".. pet_name .. "!", TALKTYPE_SAY) else doPlayerSendCancel(cid, "Você já sumonou um Pet.") end else doPlayerSendCancel(cid, "Você não pode estar em Protection Zone para sumonar seu Pet.") end elseif item.itemid == 7633 then local hp, maxhp = getCreatureHealth(getCreatureSummons(cid)[1]), getCreatureMaxHealth(getCreatureSummons(cid)[1]) if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 67) doRemoveCreature(getCreatureSummons(cid)[1]) doTransformItem(item.uid, 7632) doItemSetAttribute(item.uid, "lifepet", hp) doItemSetAttribute(item.uid, "maxlifepet", maxhp) doCreatureSay(cid, "Volta, " .. pet_name .. ".", TALKTYPE_SAY) end end return true end Agora em Actions.xml, adicione as tags: <action itemid="2149" event="script" value="CatchPet.lua"/> <action itemid="7632;7633" event="script" value="VaiVolta.lua"/> Configurando Nesta parte você irá editar: NOME DO PET / HP / HP MÁXIMO / CORPSE ID ( AQUELE QUE FICA QUANDO O MONSTRO MORRE) / CHANCE DE CAPTURA DO PET. Esse são os id's das "pokeballs": Caso queira mudar, troque no script e na tag no actions.xml. Este é o item de captura: <action itemid="2149" event="script" value="CatchPet.lua"/> Bom, é isso galera, espero que gostem e que façam um bom uso do sistema! Aproveitem! Dúvidas? Sugestões? Criticas? Comentem!!
  4. gente preciso de um sistema anti-divulgaçao para baiak versao 8.60 sem site,ja tentei aquele negocio de filtro mais nao funciona. preciso de um script urgente de anti-divulgaçao! peço para quem souber ensina a colocar e explica por favor! URGENTE!
  5. Ola Galera do Xtibia aki venho pra Mostra um sitema de pet Obs: o Sistema não e meu mais eu vou ensina a botalo e editalo Creditos: Snokiuthu: Por fazelo Pokemonfox123: por repostalo e editalo Ta Vamos la: Esse Sistema de pet ede Action Primeiro Vai na pasta data\actions\script e cria um arquivo com nome pet, e coloke isso dentro ta depois vamos no arquivo Action Xml e adicione essa tag Vc pode mudar o Id do item qui vai sair o pet O meu e 11205 mais vc pode mudar a gosto ta vou ensinar a editalo Você esta vendo isso a baixo e simples trocar o Montros e adicionar novos você pode fazer assim Obs:Para o pet não atacar vc vc vai ter qui ir la em Data/Montros ir no Monstro qui vc adicionou e mudar isso Onde Tem Zero vc vai Mudar pra 1 vai ficar assim E Pronto Imagens http://imageshack.us...9/19714900.png/ Creditos Snokiuthu: Por fazelo Pokemonfox123: por repostalo e editalo
  6. » CLASSIC PREMIUM V2 ! « Versão Testada: TFS 0.3.6: 8.60 Opa galera, esse é mais um tópico meu, agora de Estagiário :)) Neste tópico irei apresentar-lhes o Classic Premium v2, que usei algumas coisas de base do Perfect System (by Vodkart), agora contém: • GOD pode checar quantos Premium Days o player tem, pelo comando /checkdays NOMEDOPLAYER • GOD também pode adicionar Premium Days, pelo comando /addpremium NOME, QUANTIDADE • Temos também o comando /removedays NOME, QUANTIDADE que o GOD poderá fazer. • Além disso, temos mais duas novidades, os comandos: !changender e !removeskull, ambos removem 5 Premium Days do player! » Comandos de GOD Vamos lá, primeiramente vá na pasta data/talkactions, crie um arquivo chamadopremiumtalk.lua e adicione isso dentro: function onSay(cid, words, param) local player = getPlayerByName(param) local t = string.explode(param, ",") if words == "/checkdays" then if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true end return doPlayerPopupFYI(cid, "Player checked have "..getPlayerPremiumDays(player).." days of Premium Account!") end if words == "/addpremium" then local t = string.explode(param, ",") local player = getPlayerByNameWildcard(t[1]) if not tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true end doPlayerAddPremiumDays(player, tonumber(t[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You has been added "..tonumber(t[2]).." days of Premium Account to the player! ") doRemoveCreature(player) end if words == "/removedays" then local t = string.explode(param, ",") local player = getPlayerByNameWildcard(t[1]) if not tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true end doPlayerRemovePremiumDays(player, tonumber(t[2])) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You has been removed "..tonumber(t[2]).." Premium Account Days of the player!") end return true end E no arquivo talkactions.xml adicione a tag que vêm a seguir: <talkaction words="/addpremium;/removedays;/checkdays" access="4" event="script" value="premiumtalk.lua"/> » Premium Door e Premium Scroll Muito bem, agora na pasta data/actions/scripts, crie um arquivo chamado scroll.lua e adicione isso dentro: local days_gain = 30 -- Dias que ganham function onUse (cid,item,frompos,item2,topos) if not doRemoveItem(item.uid) then return true end doPlayerAddPremiumDays(cid, days_gain) doSendMagicEffect(getCreaturePosition(cid), 14) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você acaba de ganhar 30 dias de Premium Account, terá áreas exclusivas e 35% a mais de EXP como benefício!") return true end Crie outro arquivo, mas agora com o nome de premiumdoor.lua e ponha isso dentro: function onUse(cid, item, frompos, item2, topos) if not isPremium(cid) then doPlayerSendTextMessage(cid,22,"Você precisa ter Premium Account para passar!") return false end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, frompos, true) return true end Abra o arquivo actions.xml e adicione essas tags: <action itemid="9004" event="script" value="scroll.lua"/> <action actionid="7779" script="premiumdoor.lua"/> OBS: Para fazer com que a porta seja para Premiums, no seu Map Editor, adicione a seguinte ACTIONID nela: 7779! » Classic Premium Tile Em data/movements/scripts, crie um arquivo chamado premiumtile.lua e adicione isso dentro: function onStepIn(cid, item, position, fromPosition) if not isPremium(cid) then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você não tem acesso Premium Account!") doSendMagicEffect(getCreaturePosition(cid), 2) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Bem Vindo á Área Premium!") return true end Ea tag no arquivo movements.xml coloque: <movevent type="StepIn" actionid="19456" event="script" value="premiumtile.lua"/> Para fazer com que apenas Premiums passe pelo piso, adicione a ACTIONID 19456 pelo seu Map Editor no piso! » Classic Mods Na pasta do seu OT, vá na pasta mods, crie um arquivo chamado classic_changender.xml e coloque isso dentro: <?xml version="1.0" encoding="UTF-8"?> <mod name="ChangeSex Classic" version="1.0" author="Roksas" enabled="yes"> <config name="changender_config"><![CDATA[ config = { costPremiumDays = 5 } ]]></config> <talkaction words="!changender" event="buffer"><![CDATA[ domodlib('changender_config') if(getPlayerSex(cid) >= 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao tem sexo para mudar!") return end if(getPlayerPremiumDays(cid) < config.costPremiumDays) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Desculpe, voce nao tem " .. config.costPremiumDays .. " Premium Days necessarios!") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return end if(getPlayerPremiumDays(cid) < 65535) then doPlayerAddPremiumDays(cid, -config.costPremiumDays) end doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce mudou seu sexo e isso lhe custou " .. config.costPremiumDays .. " days de Premium Account! Relogue para que faca efeito.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) ]]></talkaction> </mod> E crie outro arquivo, mas com o nome de classic_removeskull.xml e adicione isso: <?xml version="1.0" encoding="UTF-8"?> <mod name="Classic Remover" version="1.0" author="Roksas" enabled="yes"> <talkaction words="!removeskull" event="script"><![CDATA[ local noRemove = {SKULL_YELLOW} local playerSkull = getPlayerSkullType(cid) if isInArray(noRemove, playerSkull) then doPlayerSendCancel(cid, "Voce nao pode remover esse tipo de skull.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true elseif playerSkull == SKULL_NONE or getPlayerPremiumDays(cid) < 5 then doPlayerSendCancel(cid, "Voce nao tem skull ou 5 days de Premium Account!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true else db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") doPlayerSendTextMessage(cid, 27, "Seus frags,skull e 5 days de Premium Account foram removidos!") doPlayerRemovePremiumDays (cid,5) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED) doSendAnimatedText(getPlayerPosition(cid), "POFF!", 180) doCreatureSetSkullType(cid,0) doPlayerSetSkullEnd(cid, 0, playerSkull) end return true ]]></talkaction> </mod> » Classic Premium Rates Abra a pasta do seu OT, vá em data/creaturescripts/scripts, adicione um arquivo lá chamado premiumrate.lua e coloque isso dentro dele: function onLogin(cid) local rate = 1.35 local days = getPlayerPremiumDays(cid) if isPremium(cid) then doPlayerSetExperienceRate(cid, rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você tem "..((rate - 1)*100).."% de EXP em vantagem, Ainda lhe restam "..days.." dias de Premium!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Tornesse Premium e tenha "..((rate - 1)*100).."% a mais de EXP!") end return true end Agora abra o arquivo login.lua na mesma pasta, procure por um trecho mais ou menos assim: registerCreatureEvent(cid, "kill") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "onPrepareDeath") Ao encontrar, adicione isso no fim ou no começo ou no meio deles: registerCreatureEvent(cid, "ExpVip") Muito bem, agora no arquivo creaturescripts.xml adicione essa tag: <event type="login" name="ExpVip" script="premiumrate.lua"/> Explicando: Para configurar as rates procure por esse trecho no script: local rate = 1.35 O número 35, significa a porcentagem. Ou seja, 35% de Exp Rate em vantagem, ajuste como quiser: 20, 50, 60... Bom galera, isso foi tudo. Espero que tenham gostado da versão v2 do Classic Premium! Aguardo respostas, sugestões e críticas a respeito! Agradeço Vodkart por algumas funções e bases. Encerrarei com algumas ScreenShoots do meu Sistema! Obrigado e BENÇA ) » SCREENSHOOTS
  7. Iaaae galera suave braaits ? Hoje venho trazer para vocês um sistema de Torneio, mas, como funciona? Vários players entram numa sala, falando com o NPC (tem horário configurável para poder falar), e para poder participar deve pagar uma quantia, ao pagar você é teleportado á Arena aonde começa a batalha. O último que sobreviver vence Vamos á instalação? ~~ Vá em data/npc, copie algum arquivo .XML da pasta e cole, renomeie para Tournament, cole isso dentro: Ok, agora vá em data/npc/scripts, copie algum arquivo dessa pasta e cole, renomeie para tournament, cole isso: Configurando: local cfg = { price = 100, -- Money to sign in tournament startPos = {x = 1016, y = 1025, z = 7}, -- Posição central da sala de torneio hour = "18:00:00", -- Hour to start maxhour = "18:15:00" -- Max to start } Price é o preço que paga para entrar no Torneio, startPos é as coordenadas do meio da sala de Torneio, e Hour é a hora do dia que começa, o Torneio no caso é diário, mude o horário de "18:00:00" para o horário desejado, entre aspas e no formato 00:00:00! Já o maxhour determina até quando o NPC vende inscrições, no caso coloquei por 15 minutos. ​ Agora vamos configurar a alavanca e o baú do vencedor! Vá em data/lib, abra o arquivo 050-function.lua ou function.lua, vá até a última linha de todas, pule 2 linhas e cole isso: Essa é a lib que usaremos no nosso Torneio, muito bem, agora vá em data/actions/scripts, copie algum arquivo desta pasta e cole, renomeie para tournament e cole isso dentro: Configurando: local cfg = { salaAward = {x = 1016, y = 1014 , z = 7}, -- Coordenates of the award place } salaAward, coloque as coordenadas da sala de prêmio do vencedor do Torneio! local area = {fromx = 1008, fromy = 1018, fromz = 7, tox = 1025, toy = 1033, toz = 7} fromx - fromy - fromz, coloque as coordenadas (X,Y e Z) do canto superior esquerdo da sala de Torneio, e tox - toy - toz, coloque as coordenadas (X, Y e Z) do canto inferior direito da sala de Torneio. local maxhour = "18:15:00", coloque igual ao script do NPC! Na mesma pasta crie outro arquivo, mas agora com o nome de tournamentchest e adicione isso dentro: ​Configurando: local cfg = { awardId = 2148, -- Item ID of winner prize awardAmount = 100, -- Amount of item ID } awardId coloque o ID do item que vai receber ao ganhar o Torneio, e awardAmount a quantidade! Em actions.xml adicione essas tags: <action actionid="13549" event="script" value="tournament.lua"/> <action uniqueid="5531" event="script" value="tournamentchest.lua"/> Muito bem, dirija-se á data/creaturescripts/scripts, copie algum arquivo da pasta e cole, renomeie para tournamentdeath, e adicione isso dentro: ​Configurando: ​ local cfg = { leftPos = {x = 1008, y = 1018, z = 7}, rightPos = {x = 1025, y = 1033, z = 7}, } leftPos coloque as coordenadas do canto superior esquerdo da Sala de Torneio, e rightPos coloque o canto inferior direito da sala Agora em creaturescripts.xml adicione essa tag: <event type="preparedeath" name="TournamentDeath" event="script" value="tournamentdeath.lua"/> Prontinho galera, agora apenas adicione ACTION ID 13549 na alavanca e UNIQUE ID 5531 no baú do campeão Download Mapa Tournament (Tibia) - 4shared
  8. Eu preciso de um pet system assim. 1.QUE DE PARA CAPTURAR O PET, TIPO USA UM COMANDO OU UM ITEN E PEGA ELE. 2.E QUE DE PARA O PLAYER TER APENAS UM PET. 3.QUE O PET TENHA EVOLUÇÃO E LEVEL 4.E UM NPC QUE REVIVE ELE. APENAS ISSO PFV ME AJUDEM REP+
  9. e ai galera venho aqui traser a voces o war system sem site p systema foi retirado do ot do leozerarox topico clique aqui e testado em outros ots download:clique aqui scan::clique aqui funciona com tfs 0.4 creditos Azimud se houver algum erro no systema me avisa
  10. Vou postar aqui o script da Arena Svargrond, algumas partes do script foram baseadas no script do Gesior. XML do NPC: <npc name="Halvar" script="data/npc/scripts/arena.lua" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"/> </npc> O looktype não está muito certo, se você tiver o certo poste que eu substituo... Script do NPC: (crie com o nome de arena.lua) local focuses = {} local function isFocused(cid) for i, v in pairs(focuses) do if(v == cid) then return true end end return false end local function addFocus(cid) if(not isFocused(cid)) then table.insert(focuses, cid) end end local function removeFocus(cid) for i, v in pairs(focuses) do if(v == cid) then table.remove(focuses, i) break end end end local function lookAtFocus() for i, v in pairs(focuses) do if(isPlayer(v)) then doNpcSetCreatureFocus(v) return end end doNpcSetCreatureFocus(0) end local function getPlayerMoney(cid) return ((getPlayerItemCount(cid, 2160) * 10000) + (getPlayerItemCount(cid, 2152) * 100) + getPlayerItemCount(cid, 2148)) end function onCreatureAppear(cid) end function onCreatureDisappear(cid) if(isFocused(cid)) then selfSay("Hmph!") removeFocus(cid) end end talkstate = 0 function onCreatureSay(cid, type, msg) if((msg == "hi") and not (isFocused(cid))) then addFocus(cid) selfSay("Welcome, ".. getCreatureName(cid) ..". Do you wanna fight at the Arena?", cid) talkstate = 1 elseif isFocused(cid) and talkstate == 1 and msg == "yes" then completed = getPlayerStorageValue(cid, arenaconf.storages.level_completed) current = getPlayerStorageValue(cid, arenaconf.storages.level) money = getPlayerMoney(cid) if getGlobalStorageValue(arenaconf.storages.busy) == -1 then if completed == -1 and current == -1 then if money >= arenaconf.cost[1] then setPlayerStorageValue(cid, arenaconf.storages.level, 1) setPlayerStorageValue(cid, arenaconf.storages.room, 1) current = 1 doPlayerRemoveMoney(cid, arenaconf.cost[1]) selfSay("You will fight at Greenshore level, good luck!", cid) else selfSay("You don't have enough money, you need ".. arenaconf.cost[1] .."gp to fight.", cid) end elseif current == -1 and completed ~= -1 and completed ~= 3 then if money >= arenaconf.cost[completed+1] then setPlayerStorageValue(cid, arenaconf.storages.level, completed+1) setPlayerStorageValue(cid, arenaconf.storages.room, 1) current = completed+1 doPlayerRemoveMoney(cid, arenaconf.cost[current]) selfSay("You will fight at ".. arenaconf.levelname[current] .." level, good luck!", cid) else selfSay("You don't have enough money, you need ".. arenaconf.cost[completed+1] .."gp to fight.", cid) end elseif completed == 3 then selfSay("You already did every arena level.", cid) end else selfSay("Sorry but there is another adventurer fighting right now.", cid) end end end function onPlayerCloseChannel(cid) if(isFocused(cid)) then selfSay("Hmph!") removeFocus(cid) end end function onThink() for i, focus in pairs(focuses) do if(not isCreature(focus)) then removeFocus(focus) else local distance = getDistanceTo(focus) or -1 if((distance > 4) or (distance == -1)) then selfSay("Hmph!") removeFocus(focus) end end end lookAtFocus() end no movements.xml adicione: <movevent type="StepIn" actionid="42321" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42300" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42301" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42302" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42303" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42304" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42305" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42306" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42307" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42308" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42309" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42310" event="script" value="arena teleports.lua"/> <movevent type="StepIn" actionid="42360" event="script" value="arena globet.lua"/> <movevent type="StepOut" actionid="42360" event="script" value="arena globet.lua"/> <movevent type="StepIn" actionid="42370" event="script" value="arena globet.lua"/> <movevent type="StepOut" actionid="42370" event="script" value="arena globet.lua"/> <movevent type="StepIn" actionid="42380" event="script" value="arena globet.lua"/> <movevent type="StepOut" actionid="42380" event="script" value="arena globet.lua"/> crie um arquivo chamado "arena teleports.lua" e adicione: function onStepIn(cid, item, position, fromPosition) room = getPlayerStorageValue(cid, arenaconf.storages.room) level = getPlayerStorageValue(cid, arenaconf.storages.level) if item.actionid == 42321 then setPlayerStorageValue(cid, arenaconf.storages.room, -1) setPlayerStorageValue(cid, arenaconf.storages.level, -1) setGlobalStorageValue(arenaconf.storages.busy, -1) if getCreatureByName(arenaconf.boss[level][room]) ~= nil then doRemoveCreature(getCreatureByName(arenaconf.boss[level][room]), false) end doTeleportThing(cid, arenaconf.position["kick"]) elseif room == 10 and isCreature(getCreatureByName(arenaconf.boss[level][10])) == false then setPlayerStorageValue(cid, arenaconf.storages.room, -1) setPlayerStorageValue(cid, arenaconf.storages.level_completed, level) setPlayerStorageValue(cid, arenaconf.storages.level, -1) setGlobalStorageValue(arenaconf.storages.busy, -1) doTeleportThing(cid, arenaconf.position["rewards"]) elseif room < 10 and item.actionid ~= 42300 and isCreature(getCreatureByName(arenaconf.boss[level][room])) == false then setPlayerStorageValue(cid, arenaconf.storages.room, room+1) room = room+1 setGlobalStorageValue(arenaconf.storages.busy, 1) local pos = arenaconf.position[room] doCreateMonster(arenaconf.boss[level][room], pos) doTeleportThing(cid, {x = (pos.x+1), y = pos.y, z = pos.z}) elseif item.actionid == 42300 then local pos = arenaconf.position[room] doCreateMonster(arenaconf.boss[level][room], pos) doTeleportThing(cid, {x = (pos.x+1), y = pos.y, z = pos.z}) end return true end Crie um arquivo chamado "arena globet.lua" e adicione: STORAGE_GLOBET = {arenaconf.storage_init+6, arenaconf.storage_init+7, arenaconf.storage_init+8} function onStepIn(cid, item, position, fromPosition) local gobletPos = getThingPos(item.uid) level = getPlayerStorageValue(cid, arenaconf.storages.level_completed) glob = getPlayerStorageValue(cid, STORAGE_GLOBET[level]) if item.actionid == 42360 and glob == -1 then if level == 1 then setPlayerStorageValue(cid, STORAGE_GLOBET[1], 1) local goblet = doCreateItemEx(5807, 1) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena greenhorn difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end elseif item.actionid == 42370 and glob == -1 then if level == 2 then setPlayerStorageValue(cid, STORAGE_GLOBET[2], 1) local goblet = doCreateItemEx(5806, 1) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena scrapper difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end elseif item.actionid == 42380 and glob == -1 then if level == 3 then setPlayerStorageValue(cid, STORAGE_GLOBET[3], 1) local goblet = doCreateItemEx(5805, 1) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena warlord difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end end doTransformItem(item.uid, item.itemid - 1) return TRUE end function onStepOut(cid, item, pos) doTransformItem(item.uid, item.itemid + 1) return TRUE end Vá no actions.xml e adicione: <action actionid="42357" event="script" value="global/arena doors.lua"/> <action actionid="42366" event="script" value="global/arena doors.lua"/> <action actionid="42376" event="script" value="global/arena doors.lua"/> <action actionid="42386" event="script" value="global/arena doors.lua"/> <action actionid="42361" event="script" value="global/arena presentbox.lua"/> <action actionid="42362" event="script" value="global/arena sword.lua"/> <action actionid="42363" event="script" value="global/arena axe.lua"/> <action actionid="42364" event="script" value="global/arena club.lua"/> <action actionid="42365" event="script" value="global/arena backpack.lua"/> <action actionid="42371" event="script" value="global/arena presentbox.lua"/> <action actionid="42372" event="script" value="global/arena sword.lua"/> <action actionid="42373" event="script" value="global/arena axe.lua"/> <action actionid="42374" event="script" value="global/arena club.lua"/> <action actionid="42375" event="script" value="global/arena backpack.lua"/> <action actionid="42381" event="script" value="global/arena presentbox.lua"/> <action actionid="42382" event="script" value="global/arena sword.lua"/> <action actionid="42383" event="script" value="global/arena axe.lua"/> <action actionid="42384" event="script" value="global/arena club.lua"/> <action actionid="42385" event="script" value="global/arena backpack.lua"/> Crie um arquivo chamado "arena doors.lua" e adicione nele: function onUse(cid, item, fromPosition, itemEx, toPosition) local cidPosition = getCreaturePosition(cid) if item.actionid ~= 42357 then if (item.actionid == 42366 and getPlayerStorageValue(cid, arenaconf.storages.level_completed) == 1) or (item.actionid == 42376 and getPlayerStorageValue(cid, arenaconf.storages.level_completed) == 2) or (item.actionid == 42386 and getPlayerStorageValue(cid, arenaconf.storages.level_completed) == 3) then if cidPosition.x < toPosition.x then doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE) else doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE) end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not enter room.") return TRUE end elseif (item.actionid == 42357 and getPlayerStorageValue(cid, arenaconf.storages.level) ~= -1 and getGlobalStorageValue(arenaconf.storages.busy) == -1) then setGlobalStorageValue(arenaconf.storages.busy, 1) if cidPosition.x < toPosition.x then doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE) else doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE) end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must pay first.") return TRUE end return FALSE end Crie um arquivo chamdo "arena sword.lua" e adicione: STORAGE_CHEST = {arenaconf.storage_init+3, arenaconf.storage_init+4, arenaconf.storage_init+5} function onUse(cid, item, fromPosition, itemEx, toPosition) level = getPlayerStorageValue(cid, arenaconf.storages.level_completed) if getPlayerStorageValue(cid, STORAGE_CHEST[level]) == -1 then setPlayerStorageValue(cid, STORAGE_CHEST[level], 1) doPlayerAddItem(cid, getItemIdByName(arenaconf.reward["sword"][level])) return true end return true end Crie um arquivo com o nome de "arena axe.lua" e adicione: STORAGE_CHEST = {arenaconf.storage_init+3, arenaconf.storage_init+4, arenaconf.storage_init+5} function onUse(cid, item, fromPosition, itemEx, toPosition) level = getPlayerStorageValue(cid, arenaconf.storages.level_completed) if getPlayerStorageValue(cid, STORAGE_CHEST[level]) == -1 then setPlayerStorageValue(cid, STORAGE_CHEST[level], 1) doPlayerAddItem(cid, getItemIdByName(arenaconf.reward["axe"][level])) return true end return true end Crie um arquivo chamado "arena club.lua" e coloque nele: STORAGE_CHEST = {arenaconf.storage_init+3, arenaconf.storage_init+4, arenaconf.storage_init+5} function onUse(cid, item, fromPosition, itemEx, toPosition) level = getPlayerStorageValue(cid, arenaconf.storages.level_completed) if getPlayerStorageValue(cid, STORAGE_CHEST[level]) == -1 then setPlayerStorageValue(cid, STORAGE_CHEST[level], 1) doPlayerAddItem(cid, getItemIdByName(arenaconf.reward["club"][level])) return true end return true end Crie um arquivo chamado "arena presentbox.lua" e coloque isso nele: STORAGE_CHEST = {arenaconf.storage_init+3, arenaconf.storage_init+4, arenaconf.storage_init+5} function onUse(cid, item, fromPosition, itemEx, toPosition) level = getPlayerStorageValue(cid, arenaconf.storages.level_completed) if getPlayerStorageValue(cid, STORAGE_CHEST[level]) == -1 then setPlayerStorageValue(cid, STORAGE_CHEST[level], 1) pb = doPlayerAddItem(cid, 1990) for t = 1,#arenaconf.reward["presentbox"][level] do doAddContainerItem(pb, getItemIdByName(arenaconf.reward["presentbox"][level][t][1]), arenaconf.reward["presentbox"][level][t][2]) end return true end return true end Crie um arquivo chamdo "arena backpack.lua" e coloque isso nele: STORAGE_CHEST = {arenaconf.storage_init+3, arenaconf.storage_init+4, arenaconf.storage_init+5} function onUse(cid, item, fromPosition, itemEx, toPosition) level = getPlayerStorageValue(cid, arenaconf.storages.level_completed) if getPlayerStorageValue(cid, STORAGE_CHEST[level]) == -1 then setPlayerStorageValue(cid, STORAGE_CHEST[level], 1) bp = doPlayerAddItem(cid, 7342) for t = 1,#arenaconf.reward["backpack"][level] do doAddContainerItem(bp, getItemIdByName(arenaconf.reward["backpack"][level][t][1]), arenaconf.reward["backpack"][level][t][2]) end return true end return true end Agora neste código é que você configurará informações como a posição das salas dos bixos, a sala de recompensas, pra onde o player será kicado quando desistir e todo o resto: arenaconf = {} arenaconf.storage_init = 60000 arenaconf.storages = {} arenaconf.storages.busy = arenaconf.storage_init -- global storage arenaconf.storages.level = arenaconf.storage_init arenaconf.storages.level_completed = arenaconf.storage_init+1 arenaconf.storages.room = arenaconf.storage_init+2 arenaconf.cost = {1000, 5000, 10000} arenaconf.levelname = {"Greenshore", "Scrapper", "Warlord"} arenaconf.boss = {} arenaconf.boss[1] = {"Achad", "Axeitus Headbanger", "Bloodpaw", "Bovinus", "Colerian the Barbarian", "Cursed Gladiator", "Frostfur", "Orcus the Cruel", "Rocky", "The Hairy One"} arenaconf.boss[2] = {"Avalanche", "Drasilia", "Grimgor Guteater", "Kreebosh the Exile", "Slim", "Spirit of Earth", "Spirit of Fire", "Spirit of Water", "The Dark Sorcerer", "The Hag"} arenaconf.boss[3] = {"Darakan the Executioner", "Deathbringer", "Fallen Mooh'Tah Master Ghar", "Gnorre Chyllson", "Norgle Glacierbeard", "Svoren the Mad", "The Masked Marauder", "The Obliverator", "The Pit Lord", "Webster"} arenaconf.position = {} arenaconf.position[1] = {x = 1059, y = 1067, z = 7} arenaconf.position[2] = {x = 1044, y = 1067, z = 7} arenaconf.position[3] = {x = 1030, y = 1067, z = 7} arenaconf.position[4] = {x = 1016, y = 1067, z = 7} arenaconf.position[5] = {x = 1053, y = 1051, z = 7} arenaconf.position[6] = {x = 1038, y = 1051, z = 7} arenaconf.position[7] = {x = 1023, y = 1051, z = 7} arenaconf.position[8] = {x = 1045, y = 1039, z = 7} arenaconf.position[9] = {x = 1030, y = 1039, z = 7} arenaconf.position[10] = {x = 1037, y = 1025, z = 7} arenaconf.position["kick"] = {x = 32222, y = 31094, z = 7} arenaconf.position["rewards"] = {x = 1071, y = 1049, z = 6} arenaconf.reward = {} arenaconf.reward["presentbox"] = {} arenaconf.reward["presentbox"][1] = {{"Piggy Bank", 1}, {"Surprise Bag", 1}, {"Bar of Chocolate", 1}, {"Candy", 10}, {"Ice Cream", 1}} arenaconf.reward["presentbox"][2] = {{"Baby Seal Doll", 1}, {"Bar of Chocolate", 1}, {"Ice Cream", 1}, {"Candy", 10}} arenaconf.reward["presentbox"][3] = {{"Panda Teddy", 1}, {"Bar of Chocolate", 1}, {"Ice Cream", 1}, {"Candy", 10}} arenaconf.reward["backpack"] = {} arenaconf.reward["backpack"][1] = {{"Sniper Arrow", 100}, {"Onyx Arrow", 100}} arenaconf.reward["backpack"][2] = {{"great fireball rune", 50}, {"heavy magic missile rune", 50}, {"Power Bolt", 200}, {"Onyx Arrow", 100}} arenaconf.reward["backpack"][3] = {{"Infernal Bolt", 100}, {"Mastermind Potion", 1}, {"Bullseye Potion", 1}, {"Sudden Death Rune", 50}, {"Ultimate Healing Rune", 50}} arenaconf.reward["axe"] = {"Headchopper", "Heroic Axe", "Royal Axe"} arenaconf.reward["sword"] = {"Blacksteel Sword", "Mystic Blade", "Justice Seeker"} arenaconf.reward["club"] = {"Orcish Maul", "Cranial Basher", "Blessed Sceptre"} Esse código você colocará dentro da pasta lib com o nome de arena.lua, depois disso você tem que pegar um código qualquer desta pasta e adicionar isso no começo ou no final: dofile(getDataDir() .. "lib/arena.lua") Clique aqui para baixar o mapa com os actionids já configurados edit: tinha um pequeno problema com o arquivo arena doors.lua que já foi resolvido
  11. Bom, ontem eu pedi ideias na area de pedidos de uma dessas ideias foi o sistema de clone, que será explicado a seguir: Bom, é bem simples o sistema, e ainda está em sua versão 1.0 então, ainda contem alguns bugs, que serão mostrados também no tópico. O sistema necessita que o jogador digite /clone e, tudo que o jogador fizer o clone vai fazer.. exemplos: mudar roupa, o clone muda atacar, o clone ataca com mesmo dano se curar, o clone se cura também Como Utilizar? digite /clone no jogo. Bugs: Quando o clone atacar, não está saindo distanceEffect (da o dano, mas nao sai o efeitinho vindo do clone) Clone não subindo escadas (depois arrumo isso, é que não tenho a id de todas escadas) Não copia nickname do jogador (para nao ter que modificar sources adicionando createCustomMonster) Instalação: em data/monsters crie o arquvo clone.xml e adicione isso: agora em data/monsters abra o monsters.xml e no meio das tags, adicione isso: <monster name="Clone" file="clone.xml"/> agora, na pasta que fica o executavel do servidor, vá em mods, crie o arquivo clone.xml e adicione isso: Reinicie o servidor (reload não funcionará) e brinque você mesmo.. (digite /clone para se clonar) Créditos: Draky Lucas - Desenvolvimento 100% ThiagoBjiW - Ideia (http://www.xtibia.com/forum/topic/211695-necessito-de-ideias/)
  12. Advanced Vocation Changer Instalação 1º na pasta server/mods cria um arquivo XML chamado Advanced Change Vocation e coloque isso dentro: <?xml version="1.0" encoding="UTF-8"?> <mod name="ADVANCED CHANGE VOCATION" version="1.0" author="josejunior23" contact="x1zy@hotmail.com" enabled="yes"> <talkaction words="/acv" case-sensitive="yes" event="script" value="ACV.lua"/> <event type="logout" name="acv_logout" event="script" value="ACV_logout.lua"/> <event type="login" name="acv_login" event="script" value="ACV_login.lua"/> <event type="death" name="acv_death" event="script" value="ACV_death.lua"/> </mod> 2º na pasta server/mods/scripts cria um arquivo LUA chamado ACV e coloque isso dentro: function onSay(cid, words, param, channel) if(acv_exhaustion.enable == true) and (isExhausted(cid)) then doPlayerSendTextMessage(cid, acv_msg_color, "You can't change your vocation now! You still need to wait: " .. fixTimer(getPlayerStorageValue(cid, acv_exhaustion.storage))) return true end if not (param) or not (isNumber(param)) or (tonumber(param) > 4) or (tonumber(param) < 1) then doPlayerSendTextMessage(cid, acv_msg_color, "You can change your vocation up to 1 till 4 vocations (/acv VOCATIONID)!\n 1 = sorcerer, 2 = druid, 3 = paladin and 4 = knight.") return true end if(tonumber(param) == getVocationCfg(getPlayerVocation(cid))) then doPlayerSendTextMessage(cid, acv_msg_color, "You are already " .. getArticle(getPlayerVocationName(cid)) .. " " .. getPlayerVocationName(cid) .. ".") return true end if(getCreatureCondition(cid, CONDITION_INFIGHT)) then doPlayerSendTextMessage(cid, acv_msg_color, "You may not change your vocation while in battle.") return true end local newvoc = acv_config[tonumber(param)] if(newvoc) then savePlayerVocation(cid) local vocID = getPlayerVocation(cid) local vocStorage = getVocationStorage(vocID) if(acv_fun_cfg.text.doCreatureSay == true) then doCreatureSay(cid, acv_fun_cfg.text.text, acv_fun_cfg.text.talkType) end if(acv_fun_cfg.effect.doSendMagicEffect == true) then doSendMagicEffect(getCreaturePosition(cid), acv_fun_cfg.effect.effect) end if(acv_exhaustion.enable == true) then addExhausted(cid, acv_exhaustion.time) end changePlayerVocation(cid, tonumber(param)) end return true end 3º na pasta server/mods/scripts cria um arquivo LUA chamado acv_login e coloque isso dentro: function onLogin(cid) if(getPlayerPromotionLevel(cid) == 1) and (getPlayerVocation(cid) <= 4) then doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) end if(acv_enable_msg_on_login == true) then doPlayerSendTextMessage(cid, acv_msg_color, "Your vocation is: " .. getPlayerVocationName(cid) .. ".") end local events = {"acv_logout", "acv_death"} for i = 1, #events do registerCreatureEvent(cid, events[i]) end return true end 4º na pasta server/mods/scripts cria um arquivo LUA chamado acv_logout e coloque isso dentro: function onLogout(cid) savePlayerVocation(cid) return true end 5º na pasta server/mods/scripts cria um arquivo LUA chamado acv_death e coloque isso dentro: function onDeath(cid, corpse, deathList) savePlayerVocation(cid) return true end 6º na pasta server/data/lib cria um arquivo LUA chamado ACV_lib e coloque isso dentro: LEMBRE-SE DE CONFIGURAR O CODIGO ESSA PARTE! acv_enable_msg_on_login = true; acv_msg_color = MESSAGE_STATUS_CONSOLE_ORANGE; -- message colour send in default channel acv_exhaustion = {enable = true, storage = "acv_exh", time = 5}; -- time in seconds 60 x 60 = 3600 = 1 hour acv_first_storage = "firstvoc"; -- saves players first vocation acv_fun_cfg = { text = {doCreatureSay = true, text = "#CHANGING VOCATION#", talkType = TALKTYPE_ORANGE_1}, effect = {doSendMagicEffect = true, effect = 10} -- effect 10 = teleport } acv_config = { -- make sure none of those storages are already in use! [1] = 73974, -- sorcerer UNIQUE STORAGE!!! [2] = 73983, -- druid UNIQUE STORAGE!!! [3] = 73992, -- paladin UNIQUE STORAGE!!! [4] = 73991 -- knight UNIQUE STORAGE!!! } getFormula = function(cid) -- how to config -> change the numbers below to the same as vocations.xml (gainhp, gainmana) return { health = { -- Sorcerer [1] = 5, -- sorcerer gains X HEALTH each level (gainhp) [5] = 5, -- master sorcerer gains X HEALTH each level (gainhp) -- Druid [2] = 5, -- druid gains X HEALTH each level (gainhp) [6] = 5, -- elder druid gains X HEALTH each level (gainhp) -- Paladin [3] = 10, -- paladin gains X HEALTH each level (gainhp) [7] = 10, -- royal paladin gains X HEALTH each level (gainhp) -- Knight [4] = 22, -- knight gains X HEALTH each level (gainhp) [8] = 22 -- elite knight gains X HEALTH each level (gainhp) }, mana = { -- Sorcerer [1] = 30, -- sorcerer gains X MANA each level (gainmana) [5] = 30, -- master sorcerer gains X MANA each level (gainmana) -- Druid [2] = 30, -- druid gains X MANA each level (gainmana) [6] = 30, -- elder druid gains X MANA each level (gainmana) -- Paladin [3] = 15, -- paladin gains X MANA each level (gainmana) [7] = 15, -- royal paladin gains X MANA each level (gainmana) -- Knight [4] = 5, -- knight gains X MANA each level (gainmana) [8] = 5 -- elite knight gains X MANA each level (gainmana) } } end function fixTimer(v) local seconds, minutes, hours = v - os.time(), 0, 0 while seconds >= 60 do minutes = minutes + 1 seconds = seconds - 60 end while minutes >= 60 do hours = hours + 1 minutes = minutes - 60 end local str1, str2, str3 = hours > 1 and hours .. " hours, " or "" .. "", minutes > 1 and minutes .. " minutes and " or "" .. "", seconds .. " seconds." or "" .. "" return str1 .. str2 .. str3 end function isExhausted(cid) return getPlayerStorageValue(cid, acv_exhaustion.storage) > os.time() and true or false end function addExhausted(cid, time) -- time in seconds return setPlayerStorageValue(cid, acv_exhaustion.storage, os.time() +time) end function setStorageString(cid, storage, string) return setPlayerStorageValue(cid, storage, "S" .. string) end function getStorageString(cid, storage) return string.sub(getPlayerStorageValue(cid, storage), 2) end function getVocationStorage(id) return acv_config[getVocationCfg(id)] end function getPlayerFirstVocation(cid) return getPlayerStorageValue(cid, acv_first_storage) end function getVocationCfg(id) if(id > 4) then id = id - 4 end return id end function savePlayerVocation(cid) local maglevel, fist, club, sword, axe, dist, shield, fish = getPlayerMagLevel(cid), getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3), getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6) local vocID = getPlayerVocation(cid) local vocStorage = getVocationStorage(vocID) if(getPlayerPromotionLevel(cid) == 1) and (getPlayerVocation(cid) <= 4) then vocID = getPlayerVocation(cid) + 4 doPlayerSetVocation(cid, vocID) end return setStorageString(cid, vocStorage, maglevel .. "-" .. fist .. "-" .. club .. "-" .. sword .. "-" .. axe .. "-" .. dist .. "-" .. shield .. "-" .. fish .. "-" .. vocID) end function setupPlayerVocation(cid, arg) local pid = getPlayerGUID(cid) doRemoveCreature(cid, true) db.executeQuery("UPDATE `players` SET `maglevel` = " .. arg.maglevel .. " WHERE `id` = ".. pid .. ";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.fist .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 0 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.club .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 1 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.sword .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 2 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.axe .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 3 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.dist .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 4 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.shield .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 5 ..";") db.executeQuery("UPDATE `player_skills` SET `value` = " .. arg.fish .. " WHERE `player_id` = ".. pid .. " and `skillid` = ".. 6 ..";") return true end function changePlayerVocation(cid, id) savePlayerVocation(cid) local newVoc = getVocationStorage(id) if(getPlayerStorageValue(cid, newVoc) == -1) or (getPlayerStorageValue(cid, newVoc) == 0) then local level = getPlayerLevel(cid) local vocationsset = { [1] = 1 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 1, -- default Sorcerer [2] = 1 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 2, -- default Druid [3] = 1 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 3, -- default Paladin [4] = 1 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 10 .. "-" .. 4 -- default Knight } setStorageString(cid, newVoc, vocationsset[getVocationCfg(id)]) end if(getPlayerFirstVocation(cid) == -1) or (getPlayerFirstVocation(cid) == 0) then setPlayerStorageValue(cid, acv_first_storage, getPlayerVocationName(cid)) end local get = string.explode(getStorageString(cid, newVoc), "-") local maglevel, fist, club, sword, axe, dist, shield, fish, voc = get[1], get[2], get[3], get[4], get[5], get[6], get[7], get[8], get[9] voc = tonumber(voc) if(getPlayerPromotionLevel(cid) == 1) and (voc <= 4) then voc = voc + 4 end doPlayerSetVocation(cid, voc) setCreatureMaxHealth(cid, getPlayerLevel(cid) * getFormula(cid).health[voc]) doCreatureAddHealth(cid, getPlayerLevel(cid) * getFormula(cid).health[voc]) setCreatureMaxMana(cid, getPlayerLevel(cid) * getFormula(cid).mana[voc]) doCreatureAddMana(cid, getPlayerLevel(cid) * getFormula(cid).mana[voc]) setupPlayerVocation(cid, {maglevel = maglevel, fist = fist, club = club, sword = sword, axe = axe, dist = dist, shield = shield, fish = fish}) return true end Créditos: joséjunior
  13. Venho trazer a versão do 1.0 do banimento system Segue o link: http://www.xtibia.co...to-system-beta/ O script foi todo reformulado. O player fala /ban(nome do player,dias de ban,porque ele foi banido,["true" para banir o ip]) E o player e kikado e depois quando ele tentar logar aparece a mensagem de banimento. O player também podera ver a lista de banidos dizendo /bans. Vá na sua database e execute os seguintes comandos: CREATE TABLE "ban" ( "player" INT NOT NULL, "ip" INT NOT NULL, "time" INT NOT NULL, `coment` text ) Vá em lib e crie um arquivo lua chamado de ban e coloque isto: function setBanTime(cid, time, coment, ip) db.executeQuery("INSERT INTO `ban` VALUES (".. getPlayerGUID(cid) ..", ".. ip ..", ".. os.time() + time*36000 ..", '".. coment .."')") end function getPlayerBans(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` = ".. getPlayerGUID(cid) ..";") if ban:getID() == -1 then return false end local time = ban:getDataInt("time") > os.time() and ban:getDataInt("time") < 100+os.time() return time and false or true end function getPlayerComent(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` = ".. getPlayerGUID(cid) ..";") return ban:getDataString("coment") end function getPlayerTimeBan(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` = ".. getPlayerGUID(cid) ..";") return ban:getDataInt("time") - os.time() end function getPlayerIpBan(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` ORDER BY `time`") if ban:getID() == -1 then return false end while true do local ips = ban:getDataInt("ip") if getPlayerIp(cid) == ips then return true end if not ban:next() then return false end end end function doShowTextBans(cid) local ban = db.getResult("SELECT * FROM `ban` WHERE `player` ORDER BY `time`") str = "Players Banidos:\n\n" if ban:getID() == -1 then doShowTextDialog(cid, 1387, "Não existe nenhum player Banido") return true end while true do local name = ban:getDataInt("player") local player = getPlayerNameByGUID(name) local time = ban:getDataInt("time") - os.time() str = str .. player .. " - Banido por "..math.floor((time/36000)).." \n\n" if not ban:next() then doShowTextDialog(cid, 1397, str) break end end end Vá em talkactions e crie um arquivo lua chamado de ban e coloque isto: function onSay(cid, words, param, channel) local t = string.explode(param, ",") if param == " " or param == "" or not param or isNumeric(param) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque o nome do player dizendo /ban(nome do player,dias de ban,por que ele foi banido)") end if t[2] == " " or t[2] == "" or not t[2] then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque os dias do player dizendo /ban(nome do player,dias de ban,por que ele foi banido)") end if t[3] == " " or t[3] == "" or not t[3] then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Coloque o comentario do banimento dizendo /ban(nome do player,dias de ban,comentario)") end local player = getPlayerByNameWildcard(t[1], false) if not player then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player "..t[1].." não existe") end setBanTime(player, t[2], t[3], t[4] == "true" and getPlayerIp(player) or 0) doRemoveCreature(player) return true end Continuando em talkactions crie um arquivo lua chamado de bans e coloque isto: function onSay(cid, words, param, channel) doShowTextBans(cid) return true end Agora vá em talkactions.xml e coloque estas tags: Agora vá em creaturescripts e crie um arquivo lua chamado de ban e coloque isto: function onLogin(cid) if getPlayerBans(cid) then local time = math.floor(getPlayerTimeBan(cid)/36000) doPlayerPopupFYI(cid, "Você esta banido por "..getPlayerComent(cid).." durante "..time.." dias") return addEvent(doRemoveCreature, 180, cid) end if getPlayerIpBan(cid) then doPlayerPopupFYI(cid, "Seu ip esta banido") return addEvent(doRemoveCreature, 180, cid) end return true end Agora vá em login.lua e registre o evento colocando isto antes do ultimo return: registerCreatureEvent(cid, "ban") Coloque esta tag em talkactions.xml
  14. sistema funciona assim se player fica muito tempo sem comer ele vai morrendo de fome ai ele perde porcentagem do seu life e vai morrendo se não comer nada ate que ele morre check.lua food.lua deathfood.lua Creditos
  15. Vá em data/lib, crie um arquivo .lua com o nome de 130-newquestsystem.lua e adicione isso - Como usar? Criar qualquer action, creatureevent ou o que você quiser para recompensas. Exemplo de código: local reward = { { id = 2400, count = 1, actionid = 1234, description = "holy sword" }, { id = 2160, count = 10 }, { container = 1988, items = { { id = 2400, count = 1, actionid = 1234, description = "holy sword" }, { id = 2160, count = 10 }, { container = 1988, items = { { id = 2400, count = 1, actionid = 1234, description = "holy sword" }, { id = 2160, count = 10 } } } } } } local storage = 1234 local container = 1988 -- main container function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerAddQuest(cid, reward, storage, container) end Créditos - averatec
  16. Olá galera. Tem um bom tempo que não dou sinal de vida aqui no xtibia no sentido de postar sistemas. Vou quebrar esse gelo, fiz um sisteminha aqui e trouxe pra vocês. O que é: Um NPC que limpa o chão, se movendo sozinho. Possui sistema de ignore ids, pra evitar de limpar items valiosos como GPs (configurável). Instalando: Configurando: Usando: /cleaner create -- Cria o Cleaner /cleaner remove -- Remove o cleaner Créditos: - LuckOake (Pelo sistema)
  17. /data/actions/scripts crie um arquivo .lua e renomeie para waterRefill.lua e adicione isso dentro: em actions.xml adicione essa linha: <action itemid = "ID DA POUCH" event = "script" value="waterRefill.lua"/> Agora como fazer para coloca na spell, vá em /data/spells, vá no arquivo da spell desejado, procure o onCastSpell no arquivo, e mude para este. PARTE MUITO IMPORTANTE, NÃO COMETA ERROS. Vá em /data/libs/050-function e adicione essas três funções: Qualquer erro postem no tópico.
  18. e ai galera estou aqui para postar o guild shop system 100% 1:va em www/config/config.php e busque pela linha $config['site']['shop_system'] = 1; de enter e coloque $config['site']['shopguild_system'] = 1; ficara assim $config['site']['shop_system'] = 1; $config['site']['shopguild_system'] = 1; apos isso crie na pasta www o arquivo e renomei para shopguild.php apos isso vai em index e adicione essa linha apos isso va em www\layouts\tibiacom/leyout.php e procure pela linha <a href='?subtopic=shopsystem'> e adicione depois essa linha depois abra seu phpmyadmin e adicione isso a sua db querry 2 querry 3 depois va no seu em talktion e crie um arquivo chamado guildpoints.lua depois va em talkactions.xml e adicione essa linha Créditos: Hastle Host ChaitoSoft Eduardo Lima
  19. Boa Tarde Galera, Hoje venho postar um sistema adaptado que eu desenvolvi. Basicamente eu peguei o sistema de Minning existente no servidor postado pelo Vmspk (http://www.xtibia.co...60-azeroth-rpg/) e modifiquei para corte de árvores ao invés de minério de stones. Bom, vamos ao que interessa: Para quê serve este sistema? R: Ele é um sistema secundário voltado para enfatizar o RPG de servidores, no meu servidor eu o utilizo para obtenção de material para forja. Utilize sua criatividade para implementá-lo no seu servidor. Ele funciona em quais versões de Open Tibia? R: Só testei na versão 9.6 até agora, peço que vocês postem caso estejam conseguindo utiliza-lo em outras versões. primeiramente você precisa adicionar um arquivo chamado cutsystem.lua com o seguinte dentro: local configs = { sign = {{level = {1,99}, quant = {1,2}, percent = 25}, {level = {100,120}, quant = {1,5}, percent = 35}, {level = {121,130}, quant = {1,7}, percent = 45}, {level = {131,140}, quant = {1,8}, percent = 65}, {level = {141,149}, quant = {1,9}, percent = 70}, {level = {150}, quant = {1,10}, percent = 100}}, trees = {2708, 2768, 2767, 2702, 2785, 2700, 2707, 2711, 2706, 2707, 2705, 2719, 7024, 5156, 5157, 2697, 2698, 2701, 2702, 2703, 2704, 2707, 2712, 2718, 2719, 2720, 2709, 2710, 2722, 2725, 2726, 2770, 2786, 4006, 4007, 4008, 4009, 4010, 7020, 7021, 7022, 7023}, wood = {{5901, 'all'}}, tree_delay = 5, --[em minutos MaxLevel = 150, breakChance = 0 } --END Configs-- function onUse(cid, item, fromPosition, itemEx, toPosition, onUse) local STORAGE_SKILL_LEVEL = 20000 local STORAGE_SKILL_TRY = 20001 local skillLevel = getPlayerStorageValue(cid,STORAGE_SKILL_LEVEL) local skillTry = getPlayerStorageValue(cid,STORAGE_SKILL_TRY) local objeto2 = getThingFromPos(toPosition) local player = (cid) if skillLevel == -1 then setPlayerStorageValue(cid,STORAGE_SKILL_LEVEL,1) end for Q = 1, #configs.sign do if configs.sign[Q].level[2] == nil then configs.sign[Q].level[2] = configs.sign[Q].level[1] end if skillLevel >= configs.sign[Q].level[1] and skillLevel <= configs.sign[Q].level[2] then quant = math.random(configs.sign[Q].quant[1],configs.sign[Q].quant[2]) percent = configs.sign[Q].percent break end end for i = 1, #configs.trees do if objeto2.itemid == configs.trees[i] then if math.random(1,100) <= configs.breakChance then doPlayerSendCancel(cid,"Your axe has broke") doSendMagicEffect(toPosition, 3) doRemoveItem(item.uid,1) doPlayerSay(cid,"Broke!",1) return true else if math.random(1,100) <= percent then possible_wood = {{},{}} for h = 1, #configs.wood do if configs.wood[h][2] == objeto2.itemid then possible_wood[1][#possible_wood[1]+1] = configs.wood[h][1] else if configs.wood[h][2] == 'all' then possible_wood[2][#possible_wood[2]+1] = configs.wood[h][1] end end end if possible_wood[1][1] == nil and possible_wood[2][1] == nil then doPlayerSay(cid,"This tree can not be chopped.",1) elseif possible_wood[1][1] ~= nil then doPlayerAddItem(cid,possible_wood[1][math.random(1,#possible_wood[1])],quant) elseif possible_wood[1][1] == nil and possible_wood[2][1] ~= nil then doPlayerAddItem(cid,possible_wood[2][math.random(1,#possible_wood[2])],quant) end if possible_wood[1][1] ~= nil or possible_wood[2][1] ~= nil then if skillTry >= 0 then setPlayerStorageValue(cid,STORAGE_SKILL_TRY,skillTry + 1) else setPlayerStorageValue(cid,STORAGE_SKILL_TRY,1) end doPlayerSay(cid,"I got "..quant.." woods.",1) doItemSetAttribute(objeto2.uid, "name", "remains of wood ore") doSendMagicEffect(toPosition, 3) addEvent(doTreeReturn,configs.tree_delay * 1000/60,toPosition,objeto2.itemid) doTransformItem(objeto2.uid, 8786) break end else doPlayerSendCancel(cid,"You destroyed the tree...") doSendMagicEffect(toPosition, 3) doItemSetAttribute(objeto2.uid, "name", "remains of wood ore") doPlayerSay(cid,"I broke the tree!",1) addEvent(doTreeReturn,configs.tree_delay * 1000/60,toPosition,objeto2.itemid) doTransformItem(objeto2.uid, 8785) break end end else doPlayerSendCancel(cid,"I can only chop trees") end end if skillTry >= ((skillLevel+1)*3) then if skillLevel == configs.MaxLevel then doPlayerSay(cid,"I got the max level in tree cutting.",1) setPlayerStorageValue(cid,STORAGE_SKILL_TRY,0) else setPlayerStorageValue(cid,STORAGE_SKILL_LEVEL,skillLevel + 1) setPlayerStorageValue(cid,STORAGE_SKILL_TRY,0) doPlayerSay(cid,"I advanced from level ".. skillLevel .." to level ".. skillLevel + 1 .." in chopping skill.",1) doPlayerSay(cid,"LEVEL UP!",1) end end end function doTreeReturn(itemposition,oldid) local pos = getThingfromPos(itemposition) doTransformItem(pos.uid,oldid) doSetItemText(pos.uid, getItemNameById(oldid)) doSendMagicEffect(itemposition,math.random(28,30)) end Para editar as configurações do sistema basta modificar as primeiras informações da tabela: sign = {{level = {(do skill)1,(até o skill)99}, quant(quanto você pode conseguir) = {1,2}, percent(chance de dar certo) = 25}, trees(os id's das árvores "cortáveis") = {2708, 2768, 2767, 2702, 2785, 2700, 2707, 2711, 2706, 2707, 2705, 2719, 7024, 5156, 5157, 2697, 2698, 2701, 2702, 2703, 2704, 2707, 2712, 2718, 2719, 2720, 2709, 2710, 2722, 2725, 2726, 2770, 2786, 4006, 4007, 4008, 4009, 4010, 7020, 7021, 7022, 7023}, wood = {{5901, 'all'}}, (troque o id 5901 pelo id do item que você quer dar como recompensa) tree_delay = 5, --[em minutos (tempo que as árvores vão demorar para crescer novamente depois de cortadas) MaxLevel = 150, (só modifique caso você aumentar o level máximo na tabela "sign") breakChance = 0 (a chance em % que o seu item - no meu caso o Axe - tem de quebrar quando usado na árvore) agora vá no seu arquivo actions.xml e adione a seguinte tag: <!-- Tree Cut--> <action itemid="2386" script="cutsystem.lua" /> 2386= Este é o ID do item Axe, caso queira trocar, fique à vontade. é isso aih pessoal... esse é o sisteminha que eu adaptei para meu servidor, espero que seja útil para alguém, abraços.
  20. Permito a publicação em outros fórums, contanto que coloquem meus créditos em um tamanho de fonte grande (algo como 30 basta) Créditos: Draky Lucas -- Desenvolvimento completo do sistema Xampy -- Parte de retirar Frag (copiado do Guild War System 0.3.6 e modificado por mim) LuckOake / Slicer -- Ajudas ao tirar dúvidas na seção de pedidos/duvidas de scripting Testado Com: The Forgotten Server 0.4 rev 3884 - 8.60 Usando MYSQL.. SQLite incompativel com o /install, mas você pode ler a linha e criar a query no sqlite studios manualmente. O que é? é um sistema de reinos, funciona mais ou menos como guild, com poucas diferenças. as pessoas necessitam apenas digitar !reinos e terão todas instruções de como funciona o sistema. Bugs: Está sem promover pessoas (ou seja, patentes intermediarias estão inutilizaveis por enquanto) outros? REPORTE aqui no tópico! Comandos: !reinos !reinos creditos - NAO ALTERAR !reinos criar,Nome do Reino !reinos invitar,Nome do Player !reinos recusar !reinos aceitar !reinos membros !reinos sair !reinos expulsar,Nome do Player Instalação Na pasta Mods do servidor, adicione um arquivo chamado reinos.xml contendo isso: Agora, na pasta data/creaturescripts/scripts crie uma pasta chamada reinos e nela crie três arquivos: look.lua naoAtacarProprioReino.lua reinoMataOutrosReinos.lua no look.lua coloque isso: no naoAtacarProprioReino.lua coloque isso: No reinoMataOutrosReinos.lua (creditos 90% Xampy)coloque isso: Agora em data/creaturescripts abra o creaturescripts.xml e adicione: Agora, abra o servidor (reload não funcionará), entre com um char de groupId acima de 5 e digite !reinos instalar APENAS UMA VEZ! PS: Os creaturescripts estão fora do MOD pois estive tendo problemas com return false no MOD. Confirme no console se o sistema instalou-se corretamente! Enjoy it! SCREENSHOTS: Gostou? REP+ e comente! EDIT 30/03/2013 - Adicionado Spoilers no tópico</event></event></event> EDIT 09/04/2013 - Adicionado Imagens
  21. Sistema de Teleport por Item E ai galera, Suave? Hoje vim trazer um sistema bem legal pra vocês, dessa vez demorei um pouco, pois tive dificuldade com uma parte do script. Mas vamos lá! Primeiramente, adicione essas duas funções na lib. Vá em data/lib, abra o arquivo functions.lua, e cole no final dele estas duas funções: function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)} end Agora vamos ao script! Em data/actions/scripts, copie um arquivo .lua e renomeie para estatue.lua e coloque isso dentro: function onUse(cid, item, frompos, item2, topos) local pos = getCreaturePosition(cid) if item.actionid == 3030 then if getPlayerStorageValue(cid, 12345) == -1 then if getMarkPos(cid).x < 1 then doMarkPos(cid, pos.x, pos.y, pos.z) itemv = doPlayerAddItem(cid, 4863, 1) doSetItemActionId(itemv, 3032) doItemSetAttribute(itemv, "description", "Recipiente Vazio") doPlayerSendTextMessage(cid, 22, "Posição salva") setPlayerStorageValue(cid, 12345, 1) else doPlayerSendTextMessage(cid, 22, "Você já tem uma posição salva") end end end if item.actionid == 3032 then doPlayerSendTextMessage(cid, 22,'Para você ser teleportado, você presisa carregar isto com magia') end if item.actionid == 3031 then setPlayerStorageValue(cid, 12345, -1) setPlayerStorageValue(cid, 12346, -1) doPlayerRemoveItem(cid, 4864, 1) doTeleportThing(cid, getMarkPos(cid)) doSendMagicEffect(getMarkPos(cid),10) doMarkPos(cid, 0, 0, 0) doPlayerSendTextMessage(cid, 22,'Você foi teleportado') end return true end Em actions.xml adicione as tags: <action actionid="3032" event="script" value="estatue.lua"/> <action actionid="3031" event="script" value="estatue.lua"/> <action actionid="3030" event="script" value="estatue.lua"/> 3030 é o action id, que você irá colocar na estatua pelo map editor. Agora em data/talkactions/scripts, copie um arquivo .lua e renomeie para encherrecipiente.lua e coloque isso dentro: function onSay(cid, words, param) posp = getCreaturePosition(cid) mana = getCreatureMana(cid) if getPlayerStorageValue(cid, 12345) == 1 then if getPlayerStorageValue(cid, 12346) == -1 then if getPlayerItemCount(cid,4863) > 0 then if mana >= 300 then local itemv = doPlayerAddItem(cid, 4864,1) doSetItemActionId(itemv, 3031) doItemSetAttribute(itemv, "description", "Recipiente Cheio") doPlayerAddMana(cid, -mana) doPlayerRemoveItem(cid, 4863,1) doPlayerSendTextMessage(cid, 22,'Você carregou o recipiente de magia') doSendMagicEffect(posp,29) doSendMagicEffect(posp,17) setPlayerStorageValue(cid, 12346, 1) else doPlayerSendTextMessage(cid, 22, 'Você não tem mana suficiente para carregar o recipiente de magia') end else doPlayerSendTextMessage(cid, 22,'Você precisa de um recipiente de magia vazio') end else doPlayerSendTextMessage(cid, 22,'Você ja encheu o recipiente com magia') end end end Em talkactions.xml adicione a tag: <talkaction words="!carregarfonte" event="script" value="encherrecipiente.lua"/> Imagens: É isso galera, espero que tenham gostado e que possa servir pra alguém! Abraços e até a próxima! Créditos: Demonbholder - Pelas funções.
  22. galera quero um sistema para quando eu matar o bicho ex infernatil aparecer um tele-port que leve os player a uma aria desejada quero que o tele-port suma depois de 1 ou 2 minutos ai tera que matar de novo o mostro se não entrar nesse tempo
  23. Nome: Perfect Upgrade System Tipo: Biblioteca, Action, Sistema Autor: Oneshot Essa é a versão final do Perfect Refine System ou Perfect Upgrade System criado por mim. É um sistema construído em cima de funções em POO (orientação a objetos), o que o torna muito versátil, possibilitando a outros programadores/scripters criarem seus próprios sistemas com base na biblioteca. A função do sistema é simples. Não passa de um sistema de refino, presente em todos os servidores, onde você usa um item em um equipamento e este fica mais forte e ganha um nome caracterizando o nível de força - bem clichê - mas muito interessante. Meu sistema é um pouco diferente dos outros, pois possui algumas características exclusivas, listadas abaixo: O nível máximo configurável é praticamente ilimitado O sistema funciona com armas de combate corpo-a-corpo, bows e crossbows. O refino pode falhar, não acontecendo nada, regredindo o nível ou resetando ele. Há um sistema nativo de broadcasts, que são enviados quando um jogador consegue refinar um equipamento até um certo nível ou maior. As chances são configuradas manualmente e sua randomização é muito precisa. Há dois modos de instalar o sistema em seu servidor, o primeiro é baixar a pasta com os scripts necessários e apenas copiar as chaves nos arquivos XMLs ou então seguir o curto tutorial de instalação. Crie um arquivo chamado upgradesystem.lua na pasta data/lib e copie o conteúdo abaixo: --[[ PERFECT UPGRADE SYSTEM 2.0 Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- UpgradeHandler = { levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true}, [11] = {10, true, true}, [12] = {5, true, true} }, broadcast = 7, attributes = { ["attack"] = 2, ["defense"] = 1, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, {__index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end})) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() self.item.level = (tonumber(self:getItemName():match("%+(%d+)")) or 0) end function UpgradeHandler:refine(uid, item) if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end self:setItemName((self.item.level > 0 and self:getItemName():gsub("%+(%d+)", "+".. (self.item.level + 1)) or (self:getItemName() .." +1"))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if(self.levels[self.item.level][3] == true and (self:chance().erase * 100) > math.random(1, 10000)) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.erase:format(self.item.name)) self:setItemName(self.item.name) for key, value in pairs(self.attributes) do if self.item[key] > 0 then doItemSetAttribute(self.item.uid, key, self.item[key]) end end elseif(self.levels[self.item.level][2] == true and (self:chance().downgrade * 100) > math.random(1, 10000)) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.downgrade:format(self.item.name, (self.item.level - 1))) self:setItemName((self.item.level == 1 and self.item.name or self:getItemName():gsub("%+(%d+)", "+".. (self.item.level - 1)))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item[key] + value * (self.item.level - 1))) end end else doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.fail:format(self.item.name, (self.item.level + 1))) end return "fail" end end Crie um arquivo chamado upgrade.lua em data/actions/scripts e cole o conteúdo abaixo: function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(itemEx.uid) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end local obj = UpgradeHandler:new(itemEx) if(obj == false) then return doPlayerSendCancel(cid, UpgradeHandler.message.notupgradeable) end local status = obj:refine(cid, item) if status == "success" then --doSendAnimatedText(toPosition, "Success!", COLOR_GREEN) doSendMagicEffect(toPosition, CONST_ME_MAGIC_GREEN) elseif status == "fail" then --doSendAnimatedText(toPosition, "Fail!", COLOR_RED) doSendMagicEffect(toPosition, CONST_ME_POFF) else doSendMagicEffect(toPosition, CONST_ME_POFF) end return true end No arquivo actions.xml, cole a seguinte linha: <action itemid="8306" event="script" value="upgrade.lua"/> Para adicionar mais níveis de refino no sistema, edite a seguinte tabela: levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true} }, Por padrão, ela já está configurado como na maioria dos MMORPGs, 10 níveis de refino, com chances de sucesso, regressão e "quebra". Mas se você quiser, por exemplo, adicionar mais dois níveis, siga o modelo, sempre colocando uma vírgula no final com exceção da última linha da tabela: levels = { [1] = {100, false, false}, [2] = {90, false, false}, [3] = {75, false, false}, [4] = {60, true, false}, [5] = {45, true, false}, [6] = {30, true, false}, [7] = {25, true, false}, [8] = {20, true, true}, [9] = {15, true, true}, [10] = {10, true, true}, [11] = {10, true, true}, [12] = {5, true, true} }, O primeiro valor é chance de sucesso, o segundo se o item pode regredir na tentativa e o terceiro é se o item para "quebrar" (perder todo o nível de refino). Para criar novas ferramentas (itens) de refinar, configure a tabela abaixo: tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, Seguindo o mesmo esquema da tabela anterior, vírgulas em todas as linhas com exceção da última, seguindo o modelo abaixo. Por exemplo, uma ferramenta de ID 8303 que refine do level +6 ao +10, que dê 10% de chance bônus e que seja finita, eu faço assim: tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8310] = {range = {6, 10}, info = {chance = 10, removeable = true}} }, Em breve vídeo de demonstração com sistema em funcionamento. Perfect Upgrade System.rar
  24. Bom galera, estou começando minha carreira na área de scripts, e estou fazendo o possível para postar 1 por semana. Semana passada eu postei o Sistema de Fome E hoje estou postando o Woodcutting Sistem na versão 1.0, em breve updates. Então, vamos lá! Em data/actions/scripts, crie um arquivo.lua com o nome de wood e coloque isso: function onUse(cid, item, frompos, item2, topos) local chance = 70 -- chance de cortar local madeiras = {5941, 5901} -- item que o player irá ganhar local premio = madeiras[math.random(1, #madeiras)] local transformItem = 8786 local texts = {"Tuc", "Toc", "Trec"} local random = texts[math.random(1,#texts)] local vocationUse = 2 local time = 2 -- Minutos para crescer novamente if getPlayerVocation(cid) ~= vocationUse then doPlayerSendTextMessage(cid,22,"Você não tem a vocação necessária para cortar.") return true end if item2.itemid == 2708 or item2.itemid == 2700 or item2.itemid == 6218 or item2.itemid == 2701 or item2.itemid == 2707 then if math.random(1,100) >= chance then doPlayerAddItem(cid,premio, math.random(1, 2)) doTransformItem(item2.uid, transformItem) doSendMagicEffect(topos, 16) doPlayerSendTextMessage(cid,22,"Você cortou uma madeira.") doSendAnimatedText(topos, ""..random.."", TEXTCOLOR_GREEN) doDecayItem(item2.uid) addEvent(doCreateItem, time*60*1000, item2.itemid, 1, getThingPos(item2.uid)) else doSendAnimatedText(topos, ""..random.."", TEXTCOLOR_GREEN) doPlayerSendTextMessage(cid,22,"Você não conseguiu cortar.") end end return true end Em data/actions/actions.xml adicione a tag: <action itemid="4874" event="script" value="wood.lua"/> 4874 é o ID do Dwarven Pickaxe. Imagens: É isso ai galera. Obrigado! Créditos: Roksas, notle2012 e LuckOake por tirarem dúvidas.
  25. Ola galera gostaria de pedir uma função no caso seria de salvar mapa comigo editando ele tipo fiz uma parede no /i <se desliga servidor não salva gostaria que tive-se um comando que salva-se para não precisar sempre utilizar mapa editor , não sei se e póssivel mas ajudaria bastante =) eu tentei faze-lá mas não consegui espero que alguém possa me ajudar
×
×
  • Criar Novo...