Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 06/21/14 em todas áreas

  1. PokéGhost

    lucasmacaca e 5 outros reagiu a Wend por uma resposta no tópico

    6 pontos
    Eae Galera do Fórum, Estava editando esse Server Para deixar online Mais estava Sem tempo e Achei Melhor Postar para usarem como Base • Menu: ├ Informações; ├ Ediçoes; ├ Erros; ├ Prints; ├ Download; └ Creditos. • Informações Basicas • • Erros Do Servidor • • PrintScreen • bike distro client iniciais • Download's • Servidor:: http://www.4shared.com/rar/0m4KyxiTba/Server_PokeGhost.html Client:: http://www.4shared.com/rar/anjpN7YWce/PokGhost.html scan:: 4Shared Já faz Scan *--* Para nossa Alegria • Creditos • GOD ZERO AnnaFeeh Absolute
  2. PDA By: [GOD Anna]

    arcaydecom e um outro reagiu a Wend por uma resposta no tópico

    2 pontos
    Eae Galera do Fórum, Estava editando esse Server Para deixar online Mais estava Sem tempo e Achei Melhor Postar para usarem como Base • Menu: ├ Informações; ├ Ediçoes; ├ Erros; ├ Prints; ├ Download; └ Creditos. • Informações Basicas • • Edições / Ajustes • • Erros Do Servidor • • PrintScreen • Novos Lendarios:: Ancient Aero:: Articuno Quest:: NPC de Teleport:: • Download's • Servidor:: http://www.4shared.com/rar/06OG8lB5ba/pda_by_bolz_verso_god_anna.html? OtClient:: http://www.4shared.com/rar/x5LgTQKLce/otclient.html? Scan:: 4Shared Já faz Scan *--* Para nossa Alegria @Atualizado v2 • Menu: ├ Ediçoes; ├ Prints; ├ Download; • Edições / Ajustes • • PrintScreen • Ditto System:: Held System:: • Download's • Servidor v2:: http://www.4shared.com/rar/_lB31rwxba/pda_by_bolz_verso_god_anna_v2.html? OTClient v2:: http://www.4shared.com/rar/aiqka_kQce/otclient_v2.html? Scan 4Shared Já faz Scan • Creditos • Slicer (pelo servidor) Brun123 (por alguns scripts, e por criar o pda) Stylo Maldoso (pelo mapa) Bolz (por editar Maior Parte do Server) Gabrielsales (Pelo Held System) Eu (Por Minhas Edições) Xtibia (por alguns scripts)
  3. SynHUD {JXScript}

    ShionM e um outro reagiu a EdsonJunior por uma resposta no tópico

    2 pontos
    -- SynHUD Advanced Configuration --------------------------------------------------------------------------------------------- -- This config is optional and the HUD will work without it. It just unlocks more features. -- Place the script in the 'Documents/XenoBot' directory. Not the scripts directory! -- To enable, set the 'enabled' value to 'true', and edit the values to your desire. -- If you do not need a certain config, you may delete or disable it. -- Please post in the thread 'http://forums.xenobot.net/showthread.php?13829' for support. -- Thanks for your support. Yours truly, Syntax. --------------------------------------------------------------------------------------------- -- Example: override default loot values/supply costs/ring durations. -- Official itemid list: http://forums.xenobot.net/showthread.php?10295 -- Tip: Make sure to add the active ring ids (sparkling) -- Tip: Include durations for items you want to track by time usage -- Tip: The items included in the example are already default values, you can delete them. synhud.items = { enabled = true, -- axe ring, costs 500, sells for 100, lasts 30 minutes [3095] = {cost=500, value=100, duration=30} } -- Example: override default theme value (disable outfit theming to use) -- Uses hex colors, use http://www.colorpicker.com/ or a similar tool for the values. -- itemValueAlt, is the second value in the supply column, incase you were wondering synhud.theme = { enabled = false, panelHeader = 'FFFFFF', itemLabel = 'FFF3CC', itemValue = 'CECECE', itemValueAlt = 'DCDCDC' } -- Example: global config, specific player configs will override this. synhud.global = { enabled = false, xbst = "Setting 1", showIcons = true, showHourlyItemRates = true, useOutfit = false, useLog = true } -- Example: single player config synhud["First Character"] = { enabled = false, xbst = "Setting 1", showIcons = true, showHourlyItemRates = true, useOutfit = true, useLog = true } -- Example: multiple player config synhud["Player Name, Second Name"] = { enabled = false, xbst = "Setting 1", showIcons = false, showHourlyItemRates = true, useOutfit = true, useLog = true } Download: SynHUD.rar
  4. Quase terminando Sword Art Online

    Norris e um outro reagiu a migao por uma resposta no tópico

    2 pontos
    Eai pessoas do TK Estou criando um SAO ( Sword Art Online ) Sempre gostei de SAO e meu amigos também, mas nunca achavamos um server de Sword Art Online, Então resolvi começar esse projeto... Ele está quase full, para deixar online xD, Porém preciso que alguém me ajude na parte de Scripts, Somente Scripts. Se alguém tiver interesse somente responder o tópico. Data prevista será 27/06/2014 Por que essa data? Pois ai terei muito mais tempo para deixar ele 100% para que todo mundo jogue. Quais as classes? Espadachim,Escudeiro,Invocador e Healler. Spells quase prontas, Algumas bugadas, mas irei arrumar. Mapa 60% com 25 Andares ( Por Enquanto) A cada 10 andares, 1 distrito. O que é distrito? Distrito seria as Citys xD Todos andares com quest's, ao matar o boss ganhará um Bonus, contando o loot do BOSS, que será muito foda. Vocações vips a parte né... Seria para manter o server on, mas por enquanto corta essa parte xD Bem é isso, to falando um pouquinho do server, tem muito mais coisas... Flw xD Scripter: [Eu/Vago] Spriter: [Eu/Vago] Mapper: [Eu]
  5. (Resolvido)Invalid Password

    SliceFalso e um outro reagiu a Wend por uma resposta no tópico

    2 pontos
    Era só para trocar um nome besta troquei para você:: config.lua
  6. vá na pasta do seu servidor:; data/items e copiei o arquivo items.otb e items.xml agora vá em:: C:\Program Files\Remere's Map Editor\data\854 e cole lá dentro tente agora *--*
  7. {Duvida} Rme Com Client Extendido

    SliceFalso e um outro reagiu a Wend por uma resposta no tópico

    2 pontos
    Já existe um RME com suporte a arquivos estendidos. Versões suportadas: 7.40 - 10.37 http://www.4shared.com/rar/YPgAc2hAce/remeres_map_editor.html 2.2 rev131 com suporte a arquivos estendidos e transparência. Para habilitar a opção, vá ao menu File > Preferences > Client Version e selecione extended. Uma vez selecionada, não será possível abrir arquivos não estendidos. O scan acusa 3 arquivos suspeitos. No entanto foram usadas as mesmas DLLs disponibilizadas pelo Remere em seu repositório. Créditos: EdMignari, Baxnie.
  8. {Duvida} Rme Com Client Extendido

    SliceFalso e um outro reagiu a Wend por uma resposta no tópico

    2 pontos
    Use o RME que Aceite os arquivos Dat e Spr extendidos *--*
  9. abra seu RME e aperte ctrl+g e coloque essas coordenadas:: {x = 53, y = 71, z = 7}, ai quando for Para o local desejado escolha o lugar onde o Player vai nascer e mim passe as coordenas *--*
  10. [Castle War 24H] Conquiste o trono!

    rkkksalgado reagiu a Absolute por uma resposta no tópico

    1 ponto
    Fala galera linduxa do TK; hoje trago a vocês o tão desejado CASTLE WAR 24 HORAS, isto gera disputa intensa entre as guilds de seu servidor, atraindo assim mais jogadores que se interessam por guerras e seus demais sistemas! Modificado e com funções diferentes, no tópico ensinarei como instalar e como funciona. Como funciona? WOOOOOOOOW! Há um portal 24h aberto em algum lugar do seu mapa que ficará com o castle disponível 24h (avá). Quando uma guild qualquer acessar o portal do castelo, irá aparecer para o servidor que a X guild está tentando dominar o castelo, então o líde da guild dominante atual irá dizer !gocastle para teleportar ao castelo e defende-lo. O Objetivo para conquista do mesmo é invadi-lo derrotar os defensor da guild atual para abrir passagem, digamos assim, e subir ao trono, quando um membro da guild invadir o templo do trono e subir no mesmo a antiga guild dominadora é teleportada para o templo e o castelo fica sob domínio da nova guild. Você poderá colocar como premiação acesso a áreas exclusivas do castelo, no caso hunts e cia. (Fica a vosso critério) Evento testado nas versões 8.6; 9.6; 9.83; 9.86! Observação: Comando !gocastle faz com que o líder possa teleportar todos os membros da sua guild online para perto dele, desde que ele esteja no castle. Comando pode ser usado a cada 3 horas (exhausted). Vamos aos scripts do sistema; Em data/actions/scripts crie um arquivo com o nome de naviocastle.lua e coloque dentro: function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.actionid == 65500) then if getTopCreature({x=32464,y=32378,z=5}).uid > 0 then doTeleportThing(getTopCreature({x=32464,y=32378,z=5}).uid, {x=32526,y=32421,z=5}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) else doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.") return true end elseif (item.actionid == 65501) then if getTopCreature({x=32526,y=32421,z=5}).uid > 0 then doTeleportThing(getTopCreature({x=32526,y=32421,z=5}).uid, {x=32464,y=32378,z=5}) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) else doPlayerSendCancel(cid, "Você precisa estar em cima do tapete.") end end return true end Em actions.xml adicione a seguinte linha: <action actionid="65500-65501" event="script" value="naviocastle.lua"/> Pós feito isto, em data/lib crie um arquivo com o nome de 015-COH e adicione dentro dele: -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas) COH_AREA = {{x = 32458, y = 32332, z = 7}, {x = 32558, y = 32429, z = 7}} -- Canto superior esquerdo / inferior direito do Castle -- // Não mexa daqui para baixo COH_STATUS = 201320111714 COH_PREPARE1 = 201320111715 COH_PUSHSTOR = 201320111716 COH_PREPARE2 = 201320111717 function doCastleRemoveEnemies() for index, creature in ipairs(getPlayersOnline()) do if isInArea(getThingPos(creature), COH_AREA[1], COH_AREA[2]) then if getPlayerGuildName(creature) ~= getGlobalStorageValue(COH_STATUS) then doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature))) end end end return true end Proximo passo, em data/monster.xml adicione a seguinte linha: <monster name="Castle Guardian" file="Castle Guardian.xml"/> Em data/monsters crie um arquivo com o nome de Castle Guardian.xml e adicione o seguinte: <?xml version="1.0" encoding="UTF-8"?> <monster name="Castle Guardian" nameDescription="a castle guardian" race="blood" experience="0" speed="0" manacost="0"> <health now="800000" max="800000"/> <look type="131" head="57" body="19" legs="57" feet="95" addons="1" corpse="6080"/> <targetchange interval="5000" chance="30"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="4"/> <flag staticattack="90"/> <flag runonhealth="800"/> </flags> <attacks> <attack name="melee" interval="2000" min="-60" max="-180"/> <attack name="physical" interval="1000" chance="35" range="7" min="-205" max="-385"> <attribute key="shootEffect" value="energy"/> </attack> <attack name="manadrain" interval="1000" chance="17" range="7" min="-205" max="-560"/> <attack name="speed" interval="1000" chance="12" range="7" speedchange="-600" duration="40000"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="45" range="7" radius="3" target="1" min="-250" max="-420"> <attribute key="shootEffect" value="burstarrow"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="20" range="7" radius="2" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="25" length="8" spread="0" min="-265" max="-445"> <attribute key="areaEffect" value="energy"/> </attack> <attack name="speed" interval="6000" chance="10" range="5" speedchange="-600" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </attack> </attacks> <defenses armor="1" defense="1"/> <elements> <element firePercent="100"/> <element energyPercent="100"/> <element icePercent="100"/> <element earthPercent="90"/> <element holyPercent="-25"/> <element physicalPercent="-33"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="deathspawn" interval="1500" chance="0" max="0"/> </summons> <loot> <item id="2148" countmax="20" chance1="100000" chancemax="0"/> </loot> </monster> Pós isto; Em data/movements/scripts crie um arquivo com o nome de COH.lua e adicione o seguinte: -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onStepIn(cid, item, pos, fromPosition) local pos = getThingPos(cid) if item.actionid == 16203 then if not isPlayer(cid) then return true end if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then doSendMagicEffect(getThingPos(cid), 14) doSendAnimatedText(pos, "CoH", math.random(1, 255)) else doSendMagicEffect(getThingPos(cid), 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não pertence á guild "..getGlobalStorageValue(COH_STATUS)..".") end return true end if item.actionid == 16202 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then if (getGlobalStorageValue(COH_STATUS) ~= getPlayerGuildName(cid)) then doPlayerSendTextMessage(cid, 20, "[Castle of Honor] Você e sua guild estão no comando, os antigos donos ["..tostring(getGlobalStorageValue(COH_STATUS)).."] podem se vingar!") setGlobalStorageValue(COH_PREPARE1, -1) setGlobalStorageValue(COH_PREPARE2, -1) setGlobalStorageValue(COH_STATUS, getPlayerGuildName(cid)) doCastleRemoveEnemies() doBroadcastMessage("[Castle of Honor] O jogador ["..getCreatureName(cid).."] e sua guild ["..getPlayerGuildName(cid).."] estão no comando do castelo, vá dominar e impedir isso!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.") end return true end if item.actionid == 16200 then if not isPlayer(cid) then return true end if getPlayerGuildId(cid) > 0 then doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid)) doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está tentando dominar o castelo, preparem-se!") end else doSendMagicEffect(pos, 2) doTeleportThing(cid, fromPosition, false) doPlayerSendCancel(cid, "[CoH] Você não possui uma guild.") return true end end if item.actionid == 16201 then if not isPlayer(cid) then return true end doSendAnimatedText(pos, "CoH", math.random(1, 255)) if (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid)) doBroadcastMessage("[Castle of Honor] Atenção! A guild "..getPlayerGuildName(cid).." está muito próxima do domínio, ataquem!") end end return true end Em data/movements/movements.xml adicione a seguinte linha: <movevent type="StepIn" actionid="16200-16203" event="script" value="COH.lua"/> Próximo passo: Em data/talkactions/scripts crie um arquivo com o nome de COHABSOLUTE.lua e adicione o seguinte: -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- // function onSay(cid, words, param) if getPlayerGuildLevel(cid) == GUILDLEVEL_LEADER then if getPlayerStorageValue(cid, COH_PUSHSTOR) < os.time() then if getGlobalStorageValue(COH_STATUS) == getPlayerGuildName(cid) then if isInArea(getThingPos(cid), COH_AREA[1], COH_AREA[2]) then if #getMembersOnline(getPlayerGuildId(cid)) > 0 then for index, creature in ipairs(getMembersOnline(getPlayerGuildId(cid))) do if (getTileInfo(getThingPos(creature)).protection ~= true) then return doPlayerSendCancel(cid, "[CoH] Os membros devem estar em área PZ.") end doTeleportThing(creature, getThingPos(cid)) end setPlayerStorageValue(cid, COH_PUSHSTOR, os.time() + COH_PUSHTIME) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "[Castle of Honor] Você teleportou seus membros, comando pode ser usado a cada "..tostring(COH_PUSHTIME / 60).." minuto(s).") else doPlayerSendCancel(cid, "[CoH] Para executar isso, sua guild deve ter 2 ou mais membros online.") end else doPlayerSendCancel(cid, "[CoH] Você deve estar no castelo.") end else doPlayerSendCancel(cid, "[CoH] Sua guild não é dona do castelo.") end else doPlayerSendCancel(cid, "[CoH] Você deve aguardar "..tostring(math.ceil((getPlayerStorageValue(cid, COH_PUSHSTOR) - os.time()) / 60)).." minuto(s) para usar este comando.") end else doPlayerSendCancel(cid, "[CoH] Você deve ser líder de uma guild para executar este comando.") end return true end function getMembersOnline(id) local mbr = {} for index, creature in ipairs(getPlayersOnline()) do if getPlayerGuildId(creature) == id then if getCreatureSkullType(creature) < 3 then table.insert(mbr, creature) end end end return mbr or #mbr end Em data/talkactions/talkactions.xml adicione a seguinte linha: <talkaction words="!castlepush;!pushmembers;!gocastle" event="script" value="COHABSOLUTE.lua"/> Quem disponibiliza o mapa do castelo a vocês é nosso amigo ViitinG, segue o link do tópico para download do mesmo já adaptado para este Castle: http://www.tibiaking.com/forum/topic/35730-mapa-evento-war-castle/ Explicação das actions e demais (caso não use o mapa disponibilizado pelo Viiting lembre de adicionar ao castelo); ActionID 16200 - No meio do caminho para o castelo, ActionID 16201 - Perto do castelo, ActionID 16202 - No piso, trono que faz com que domine, e ActionID 16203 - Para a passagem de acesso ás hunts / city exclusivas da guild vencedora. Importante: Para colocar uma passagem para as hunts ou o que for a premiação da guild vencedora, coloque um caminho único com os actionIDS 16203, assim só a guild dominante do castelo poderá passar neste local. É importante lembrar que este script é de autoria do Roksas Nunez, ex scripter da empresa chaitosoft, fiz simples modificações de otimização. Qualquer dúvida peço que entre em contato comigo e poste aqui no tópico. Créditos: Absolute Roksas ViitinG Espero que gostem, afinal raro alguém disponibilizar algo tão desejado e útil assim! Até o próximo sistema. Absolute on tibiaking =p
  11. Sistema de Loterias por globalevents. Crie um arquivo .lua com o nome lottery dentro da pasta data/globalevents/scripts/loterry.lua, adicione dentro do arquivo o seguinte code: local config = { lottery_hour = "2 hours", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2494, 2472, 2514, 2160}, -- ID dos Itens Sorteados na Loteria crystal_counts = 10, -- Usado somente se a rewards_id for crystal coin (ID: 2160). website = "yes", -- Only if you have php scripts and table `lottery` in your database! days = { "Monday-08:00", "Monday-13:00", "Monday-19:30", "Tuesday-08:00", "Tuesday-13:00", "Tuesday-19:30", "Wednesday-08:00", "Wednesday-13:00", "Wednesday-19:30", "Thursday-08:00", "Thursday-13:00", "Thursday-19:30", "Friday-01:22", "Friday-13:00", "Friday-19:30", "Saturday-21:27", "Saturday-21:28", "Saturday-21:29", "Sunday-08:00", "Sunday-13:00", "Sunday-19:30" } } local function getPlayerWorldId(cid) if not(isPlayer(cid)) then return false end local pid = getPlayerGUID(cid) local worldPlayer = 0 local result_plr = db.getResult("SELECT * FROM `players` WHERE `id` = "..pid..";") if(result_plr:getID() ~= -1) then worldPlayer = tonumber(result_plr:getDataInt("world_id")) result_plr:free() return worldPlayer end return false end local function getOnlineParticipants() local players = {} for _, pid in pairs(getPlayersOnline()) do if getPlayerAccess(pid) <= 2 and getPlayerStorageValue(pid, 281821) <= os.time() then table.insert(players, pid) end end if #players > 0 then return players end return false end function onThink(cid, interval) if table.find(config.days, os.date("%A-%H:%M")) then if(getWorldCreatures(o) <= 0)then return true end local query = db.query or db.executeQuery local random_item = config.rewards_id[math.random(1, #config.rewards_id)] local item_name = getItemNameById(random_item) local data = os.date("%d/%m/%Y - %H:%M:%S") local online = getOnlineParticipants() if online then local winner = online[math.random(1, #online)] local world = tonumber(getPlayerWorldId(winner)) if(random_item == 2160) then doPlayerSetStorageValue(winner, 281821, os.time() + 3600 * 24) doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .." " .. getItemNameById(random_item) .. "s! Congratulations! (Next lottery in " .. config.lottery_hour .. ")") else doPlayerSetStorageValue(winner, 281821, os.time() + 3600 * 24) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " ..getItemNameById(random_item) .. "! Congratulations! (Next lottery in " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then query("INSERT INTO `lottery` (`name`, `item`, `world_id`, `item_name`, `date`) VALUES ('".. getCreatureName(winner).."', '".. random_item .."', '".. world .."', '".. item_name .."', '".. data .."');") end else print("Ninguem OnLine pra ganhar na loteria") end end return true end Recomendamos modificar: - rewards_id = {2494, 2472, 2514, 2160}, -- ID dos Itens Sorteados na Loteria Recomendo de item count apenas o 2160, outros podem bugar. - crystal_counts = 10, -- Usado somente se a rewards_id for crystal coin (ID: 2160). Altere pra mais ou menos o dinheiro. - "Monday-08:00", Ajuste os dias e horários como desejado. Em globalevents.xml, adicione: <!-- Lottery --> <globalevent name="lottery" interval="60000" event="script" value="lottery.lua"/> Não mexa no code acima. Certo, essa é a parte do servidor, agora vamos adicionar as querys necessárias no MySql: CREATE TABLE `lottery` ( `id` int(11) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `item` varchar(255) NOT NULL, `world_id` tinyint(2) unsigned NOT NULL default '0', `item_name` varchar(255) NOT NULL, `date` varchar(256) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; Caso você queria adicionar uma query pra testar o site, veja: INSERT INTO `lottery` (`id`, `name`, `item`, `world_id`, `item_name`, `date`) VALUES(NULL, 'Character', '2470', '0', 'golden legs', '22/05/2014 - 04:49:50'); Agora vamos pra parte do site, crie um arquivo .php com o nome lottery, adicione dentro do arquivo o seguinte code: <?PHP $main_content .= '<center><h1>Lottery</h1><h3>Lotterys held at 09:00, 14:00 and 20:30 hour, brazil time.</h3></center><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><tr BGCOLOR="'.$config['site']['vdarkborder'].'"><td CLASS=white><center><b>Player Name</b></center></td><td CLASS=white width=184 colspan=2><center><b>Winning Item</b></center></td><td width=50 CLASS=white><center><b>World</b></center></td><td width=100 CLASS=white><center><b>Date and Time</b></center></td></tr>'; $lottery = $SQL->query('SELECT id, name, item, world_id, item_name, date FROM lottery WHERE world_id = 0 ORDER BY id DESC;'); foreach($lottery as $result) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=35%><center><a href="?subtopic=characters&name='.urlencode($result['name']).'">'.$result['name'].'</a></center></td><TD WIDTH=5%><img src=\'/item_images/'.urlencode($result['item']).'.gif\'></td><TD WIDTH=30%><center>'.$result['item_name'].'</center></td><TD WIDTH=7%><center>MegaTibia</center></td></td><TD WIDTH=30%><center>'.$result['date'].'</center></td></tr>'; } $main_content .= '</table>'; ?> Em index.php adicione: case "lottery"; $topic = "Lottery"; $subtopic = "lottery"; include("lottery.php"); break; Em layouts.php adicione o code abaixo: <a href="?subtopic=lottery"> <div id="submenu_lottery" class="Submenuitem" onmouseover="MouseOverSubmenuItem(this)" onmouseout="MouseOutSubmenuItem(this)"> <div class="LeftChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> <div id="ActiveSubmenuItemIcon_lottery" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_lottery" class="SubmenuitemLabel">Lottery</div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> Pronto galera só isso, não esqueça clica em GOSTEI! Comente, participe do tópico, isso nos ajuda muito. Créditos: .lua - Killua e Matheus .php - Matheus e Natanael Beckman querys - Natanael Beckman e Matheus Atualização 24/05/2014 - Adicionado regras pra não sorteá membro da staff(GM, GOD) - Adicionando sistema de Storage pra não correr o risco de um player ganhar 2x no mesmo dia.
  12. Trade OFF - Shop Offline

    Trunksontibia reagiu a Natanael Beckman por uma resposta no tópico

    1 ponto
    Esse sistema disponibiliza uma negociação offline, onde você oferta um item e esse item é divulgado no site do server e qualquer player pode comprar o item utilizando um comando especificado. Crie uma arquivo .lua dentro da pasta data/talkactions/scripts com o nome auctionsystem.lua, dentro do mesmo adicione o code: local config = { levelRequiredToAdd = 20, maxOffersPerPlayer = 5, SendOffersOnlyInPZ = true, blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933} } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") if(t[1] == "add") then if((not t[2]) or (not t[3]) or (not t[4])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end if(not tonumber(t[3]) or (not tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.") return true end if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.") return true end local item = getItemIdByName(t[2]) if(not item) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end if(getPlayerLevel(cid) < config.levelRequiredToAdd) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.") return true end if(isInArray(config.blocked_items, item)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.") return true end if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).") return true end local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";") if(check:getID() == -1) then elseif(check:getRows(true) >= config.maxOffersPerPlayer) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.") return true end end if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.") return true end local itemcount, costgp = math.floor(t[4]), math.floor(t[3]) doPlayerRemoveItem(cid, item, itemcount) db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.") end if(t[1] == "buy") then if(not tonumber(t[2])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(buy:getID() ~= -1) then if(getPlayerMoney(cid) < buy:getDataInt("cost")) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.") buy:free() return true end if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.") buy:free() return true end if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.") buy:free() return true end if(isItemStackable((buy:getDataString("item_id")))) then doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count")) else for i = 1, buy:getDataInt("count") do doPlayerAddItem(cid, buy:getDataString("item_id"), 1) end end doPlayerRemoveMoney(cid, buy:getDataInt("cost")) db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!") db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";") buy:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "remove") then if((not tonumber(t[2]))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") return true end if(config.SendOffersOnlyInPZ) then if(not getTilePzInfo(getPlayerPosition(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.") return true end end local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";") if(delete:getID() ~= -1) then if(getPlayerGUID(cid) == delete:getDataInt("player")) then db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";") if(isItemStackable(delete:getDataString("item_id"))) then doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count")) else for i = 1, delete:getDataInt("count") do doPlayerAddItem(cid, delete:getDataString("item_id"), 1) end end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!") end delete:free() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.") end end if(t[1] == "withdraw") then local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";") if(balance:getDataInt("auction_balance") < 1) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.") balance:free() return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!") doPlayerAddMoney(cid, balance:getDataInt("auction_balance")) db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";") balance:free() end return true end Em seguida em talkactions.xml adicione a tag: <talkaction words="!offer" event="script" value="auctionsystem.lua"/> No banco de dados execute as querys: CREATE TABLE `auction_system` ( `id` int(11) NOT NULL auto_increment, `player` int(11), `item_id` int(11), `item_name` varchar(255), `count` int(11), `cost` int(11), `date` int(11), PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0'; Na pasta do seu site crie um arquivo chamado tradeoff.php, em seguida adicione o code: <?PHP $auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll(); $players = 0; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small><br /><br /><b>!offer withdraw</b><br /><small>Use this command to get money for sold items.</small></center></TR></TD></TABLE><br />'; if(empty($auctions)) { $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>'; } else { foreach($auctions as $auction) { $players++; if(is_int($players / 2)) $bgcolor = $config['site']['lightborder']; else $bgcolor = $config['site']['darkborder']; $cost = round($auction['cost']/1000, 2); $content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="/item_images/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>'; } $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>'; $main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vdk.1553/">vDk</a>.</small></p>'; } ?> Em layouts.php adcione o code: <a href="?subtopic=tradeoff"> <div id="submenu_tradeoff" class="Submenuitem" onmouseover="MouseOverSubmenuItem(this)" onmouseout="MouseOutSubmenuItem(this)"> <div class="LeftChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> <div id="ActiveSubmenuItemIcon_tradeoff" class="ActiveSubmenuItemIcon" style="background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);"></div> <div id="ActiveSubmenuItemLabel_tradeoff" class="SubmenuitemLabel">Trade Off</div> <div class="RightChain" style="background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);"></div> </div> </a> Pra finalizar em index.php adicione esse code: case "tradeoff"; $topic = "Trade Off"; $subtopic = "tradeoff"; include("tradeoff.php"); break; - E pronto galera clica em GOSTEI e comenta no tópico.
  13. 1 ponto
    Bom eu procurei e muito por um tutorial de como colocar xat no site gesior e n achei nada. Então resolvi criar um, fui tentando até que consegui. Chega de conversa e vamos ao que interessa. 1. Vc precisa criar um grupo no Xat.com, cria seu grupo : 2. Agora precisa confirmar seu e-mail na Hotmail.com : 3. Depois de Ativado você vai em Edit Your Chat e depois em Extra Features... 4. Na Pagina de Recursos que se abre, você vai no campo aonde está o seu Código : 5. Agora vamos para a parte do site vá na pasta xampp/htdocs copie qualquer arquivo.php e renomeie para xat.php e coloque isso dentro e salve : 6. Agore abre o seu Index.php e adicione isso e salve : 7. Agora abra a pasta xampp/htdocs/layout/tibiacom/layout.php e adicione isso dentro e salve : 8. Explicação - Passo 5: 9. Pronto seu Xat está Pronto (o meu é de Support ai fica a critério) :
  14. [TalkAction] Scripts para PokeTIBIA

    GniusPlay reagiu a Doughell por uma resposta no tópico

    1 ponto
    Olá a todos! Estou aqui para mostrar um script aonde será bem útil a servidores de Pokémon. Não é nada mais do quem um SHOP in-game. Como assim? Com estes 3 comandos será possível comprar Revives, Hyper Potions, Ultra Balls, trocar de nome pelo jogo e até mesmo comprar o Ditto. Detalhe o tipo de moeda que utilizei foi Small Diamonds, caso queria modificar leia passo a passo. Como se percebe, a maioria de servidores hoje em dia vende apenas estes items e outros, mais esses são os padrões. Chega de enrolação e vamos direto ao script. Changename Script: Primeiramente crie um arquivo em otserv/talkactions/scripts chamado changename.lua e adicione isso em seu arquivo. (Este script serve para modificar o nome do jogador pelo jogo). -- Creditos a Doughell function onSay(cid, words, param) local maxLen = 15 -- tamanho maximo do nome local itemid = 2145 ------ Numero do Item que ser&#225; removido local proibido = [{"!","@","*"}-- simbolos proibidos for i = 1, #proibido do if string.find(tostring(param), proibido[i]) then doPlayerSendCancel(cid,"[AUTO SHOP] You can not use symbols in their name.") return TRUE end end if tostring(param) == "" then -- checkar se n&#227;o &#233; nome vazio doPlayerSendCancel(cid, "[AUTO SHOP] Choose a name to make the change of his surname.") return TRUE end if string.len(tostring(param)) > maxLen then doPlayerSendCancel(cid, "[AUTO SHOP] You can use a maximum of " .. maxLen .. " letters.") return TRUE end if not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid,"[AUTO SHOP] Can only be used in Protection Zone.") return TRUE end if getPlayerItemCount(cid, itemid) >= 1 then doPlayerRemoveItem(cid, itemid, 5) db.executeQuery("UPDATE `players` SET `name` = '"..param.."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"[AUTO SHOP] You will be logged out in 5 seconds for the changes to be made.") addEvent(doRemoveCreature, 5*1000, cid, true) else doPlayerSendCancel(cid,"[AUTO SHOP] You don't have " .. getItemNameById(itemid) .. " to make the purchase of changename.") end return TRUE end Agora em talkactions.xml adicione em Players: <talkaction words="!changename" event="script" value="changename.lua"/> -- Explicação do Script (Changename): local maxLen = 15 -- tamanho maximo do nome O número 15 e a quantidade máxima de caracteres que poderá ser utilizado na troca de nome. local itemid = 2145 ------ Numero do Item que será removido Este e o ID do item que será removido, no caso do 2145 e Small Diamonds (moeda principal do PokeXGames). Aconselho a usar Small Diamonds. local proibido = {"!","@","*"} -- simbolos proibidos Estes e os símbolos proibidos, caso queria adicionar mais faça o seguinte: {"!","@","*","?"} adicionando dessa seguinte maneira: ,"?"} Ditto Script: Crie um arquivo em otserv/talkactions/scripts com o nome de ditto2.lua e adicione isso em seu arquivo: (Este script serve para adicionar a caixa do Ditto no jogador). function onSay(cid,words,param) if doPlayerRemoveItem(cid,2145,10) == TRUE then doPlayerAddItem(cid,1738,1) doCreatureSay(cid,"[AUTO SHOP] You bought your Pokemon Ditto, it cost 10 diamonds.",TALKTYPE_ORANGE_1) else doCreatureSay(cid,"[AUTO SHOP] You do not have two diamonds to make the purchase.",TALKTYPE_ORANGE_1) end end Agora em talkactions.xml adicione em Players: <talkaction words="!buyditto" event="script" value="ditto2.lua"/> A segunda parte do script você precisa ir otserv/actions/scripts crie um arquivo chamado ditto_.lua e adicione o seguinte: (Este script serve para o id da caixa ser usado para conseguir o Ditto) function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 15215) <= 100 then doPlayerSendTextMessage(cid, 20,"[AUTO SHOP] Thank donations.") setPlayerStorageValue(cid, 15215, 1) local pox = getTownTemplePosition(1) local health = 325 local maxhealth = 325 local description = "Contains a Ditto." local poke1 = "This is Ditto's pokeball. HP = ["..health.."/"..maxhealth.."]" item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", poke1) doItemSetAttribute(item, "nome", "Ditto") doItemSetAttribute(item, "apelido", "Ditto") doItemSetAttribute(item, "description", description) doPlayerAddItemEx(cid, item, true) doTransformItem(item, 2222) doPlayerSendTextMessage(cid, 27, "[AUTO SHOP] You just get the Pokemon Ditto.") doPlayerSendTextMessage(cid, 27, "Do not forget to donate this item has a cost of 10 diamonds, and you can not get this Pokemon through quests / npcs / catchs.") doTeleportThing(cid, pox) doSendMagicEffect(pox, 21) doPlayerAddSoul(cid, 1) doPlayerRemoveItem(cid,1738,1) setPlayerStorageValue(cid, 54842, "Ditto, ") return TRUE else doPlayerSendTextMessage(cid, 20, "Have you got this Pokemon.") end end Agora em actions.xml adicione: <action itemid="1738" event="script" value="ditto_.lua"/> -- Explicação do Script (Ditto): PARTE DAS TALKACTIONS if doPlayerRemoveItem(cid,2145,10) == TRUE then O número 2145 e o id da Small Diamonds, já o número 10 e a quantidade de Small Diamonds que precisa para comprar o Ditto. doPlayerAddItem(cid,1738,1) O número 1738 e o id da box, caso modificar este número modifique tambem em actions.xml! PARTE DAS ACTIONS doSendMagicEffect(pox, 21) O número 21 e o número do efeito que vai ser utilizado ao abrir a box, pode ser modificado em qual você preferir. doPlayerAddSoul(cid, 1) Será adicionado 1 de soul, como se fosse 1 de catch (dependendo de alguns servidores) se preferir retire a linha inteira. doPlayerRemoveItem(cid,1738,1) Este e o id da box, caso você muda-lá na talkactions, e na actions.xml mude aqui tambem. Kit Script: Crie um arquivo em otserv/talkactions/scripts chamado kit.lua e adicione isso dentro dele: (Este script serve para receber Revives, Ultra Balls e Hyper Potions). function onSay(cid,words,param) if doPlayerRemoveItem(cid,2145,2) == TRUE then doPlayerAddItem(cid,2269,100) doPlayerAddItem(cid,2275,100) doPlayerAddItem(cid,2146,100) doCreatureSay(cid,"[AUTO-SHOP]: You just buy ultra ball 100x, 100x revive and 100x hyper potion. All this will cost 2 diamonds!",TALKTYPE_ORANGE_1) else doCreatureSay(cid,"[AUTO-SHOP]: You do not have two diamonds to make the purchase.",TALKTYPE_ORANGE_1) end end Agora em talkactions.xml adicione: <talkaction words="!buykit" event="script" value="kit.lua"/> -- Explicação do Script (Kit): if doPlayerRemoveItem(cid,2145,2) == TRUE then O id 2145 e o Small Diamonds e o número 2 e a quantidade que será retirada para a realização da compra do kit. doPlayerAddItem(cid,2269,100) O id 2269 e o da Ultra Ball e o número 100 e a quantidade que o player receberá de Ultra Balls. doPlayerAddItem(cid,2275,100) O id 2275 e o do Revive, e o número 100 e a quantidade que o player receberá de Revives. doPlayerAddItem(cid,2146,100) O id 2146 e o da Hyper Potion, e o número 100 e a quantidade que o player receberá de Hyper Potions. Bom, estes são os scripts prometido, mas se alguém quiser coloca outras talkactions como a !buykit vou colocar abaixo o que poderam usar de base: function onSay(cid,words,param) if doPlayerRemoveMoney(cid,10000) == TRUE then doPlayerAddItem(cid,2173,1) doCreatureSay(cid,"Mensagem que ele conseguiu comprar o item.",TALKTYPE_ORANGE_1) else doCreatureSay(cid,"Mensagem quando n&#227;o possui dinheiro ou diamantes suficientes.",TALKTYPE_ORANGE_1) end end if doPlayerRemoveMoney(cid,10000) == TRUE then Essa função diz que irá remover 10k para comprar o item, se você quiser que remova outra coisa por exemplo um shield você adiciona a seguinte função no lugar dessa: doPlayerRemoveItem(cid,1738,1) ficando assim: doPlayerRemoveItem(cid,1738,1) = TRUE then O id do shield você modifica no 1738 e a quantidade no número 1. doPlayerAddItem(cid,2173,1) Esas função adiciona o item e a quantidade no jogador, exemplo: 2173 e o ID do item, e o número 1 e a quantidade só modificar do seu gosto. O que você pode adicionar em um script? Efeitos, para adicionar um efeito basta colocar essa função: doSendMagicEffect(getThingPos(cid), 132) O número 132 e o número do efeito, para pesquisar mais procure pelo jogo no GOD o seguinte: /z 1, /z 2, /z 3 até o seu limite. É isso ai galera, qualquer dúvida postem ou dêem sujestões! Detalhe: as cores nos scripts foram retiradas por bug, em outra hora adicionarei novamente!
  15. Mapa Subwat Kamikaze

    luccheseoficial reagiu a juniordresch por uma resposta no tópico

    1 ponto
    ESSE E MEU SEGUNDO TOPICO INTAO N SEI SE VAO GOSTAR.. MAPA SUBWAT EDITADO POR ADM KAMIKAZE: NOVOS COMANDOS COMO !BUYLIFESCROLL !BUYMANASCROLL !LIFESCROLL !MANASCROLL NOVOS MONSTROS,HUNTS,NPCS,QUESTS,ITENS KAMIKAZE , E IMPERIAL,RUNAS E ETC... AQUI VAI ALGUMAS IMAGENS: TEMPLO Treiners Novas Hunts: Download : http://www.4shared.c...ikazev10_2.html GOSTOU ??/ + REP AE PLIZ
  16. Salve, salve galera do Tibia King, blz ?! Vamos primeiro deixar a Exp mais dificil ? Vamos lá....... 1º Vá no Config.lua aperte CTRL + F e digite Rates. Deixe o seu Rates igual ou Parecido, vou explicar: Agora vá em Data/XML/Stages Se tiver igual ou parecido deixe ou modifique, como desejar. Se não estiver desse jeito, copie e cole. Ali em "minlevel="1" É o minimo lvl ou seja lvl "1" até o lvl 20 o xp do serv vai ser 6 minlevel é o minimo level minimo, maxlevel é do minimo level até um certo lvl, ou seja o level maxlevel. O xp vem do multiplier. Você pode ir modificando com a sua preferencia. Agora vamos configurar o Catch !! Vá em data/actions/scripts abra o arquivo "catch.lua" Procure por isso: local monster = getItemName(itemEx.uid):match("dead (.*)") if item.itemid == ID_GREATBALL then chances = (chance[monster]) * 2 elseif item.itemid == ID_SUPERBALL then chances = (chance[monster]) * 3 elseif item.itemid == ID_ULTRABALL then chances = (chance[monster]) *4 else chances = chance[monster] end Ali é só modificar os numeros para a capacidade de catar pokemon. Ajudei ? Não custa nada dar Rep + Qualquer duvida comentem
  17. [9.80/9.81] Voods OTServer

    Andrey Emanuel reagiu a .HuRRiKaNe por uma resposta no tópico

    1 ponto
    Informações: Montarias 100%; Items 97%; Outfits 100%; Trainers Offline, Estatuas e Camas 100%; Zona VIP; Quest VIP; Set Premium; Hunts Melhoradas; Servidor 100 Estável; E mais! Imagens: Download Server: http://www.mediafire.com/?k7b2iq2u6bcu69r Scan Server; https://www.virustotal.com/file/950c8f5057a999e030045d89fbf045c15b6de3b3b59e4eb8b666b09f229a6eda/analysis/ Créditos: Thez BT Animal Pak ACC GOD: tibia/tibia
  18. 1 ponto
    Eai galeira vim postar uma Novas Hotkey Quase Ninguem Conheçe Serve Para Todos Mapa que tenha Muita Mana . Ou Xp Alta né Para Baiak Nao Funciona Ja Testei Nao Funciono Essa hotkey é antiga .. De Utito é auto 200 listas 'utito' | if [$strengthtime <= 1000] say 'Utito Tempo "" De Dancing auto 1 listas 'Dancing' | wait 100 |turnn| wait 100 |turnw| wait 100 De Utani Tempo Hur auto 200 if [$hasted ==0] say 'Utani Tempo Hur " - De Soltar SD é auto 200 attack target | sd target De Dar Utamo Vita Sozinho é auto 200 manashield Apenás Isso Por Hoje obrigado por ve o topico . e por visitar tibia King Bjos até +
  19. Dicer Script

    skinadawong1991 reagiu a EdsonJunior por uma resposta no tópico

    1 ponto
    Aholaaaaaaaaaaaaaa! Aproveitando que eu estou bebado (vou me arrepender depois) Estarei disponibilizando o script Dicer do XenoBot! Como usar: ANTES DE MAIS NADA, USE O SEGUINTE LOGIN: alvarocp2 Logando com o login acima, usando o XenoBot Cracked, abra o arquivo Casino_Alvaro.lua, em algum editor de texto, configure as BP´s de acordo com o seu personagem (TODAS AS BP DEVEM ESTAR NO SEU DEPOT CHEST) depois dê load nos scripters abaixos: Casino_Alvaro.lua Casino_Alvaro.lua casino2.lua casino2.lua Ira abrir uma "channel" escreva /help para as opções, ou, /start pra que comece a funcionar o script Aproveitem, estou bêbado e disponibilizando esse script! Quem não der REP+ (Agregar status no camarote do TK) vão tomar no c# ;*
  20. Subwat Kamikaze V27

    morxx reagiu a Delaks por uma resposta no tópico

    1 ponto
    Pessoal estou ressuscitando meu último mapa, e a última versão do Subwat Kamikaze V27. Estou sem imagens e estou sem informações do mapa,pois deixei em um fórum,no qual o mesmo fechou inesperadamente,postei o mapa aproximadamente 7 mesês,me desculpem. Estou sem o RME tambêm porém vou deixar o link para baixarem. Qualquer coisa Administradores ou Players me mandem um PM por aqui, obrigado. Subwat Kamikaze V27: http://www.4shared.com/rar/0Wbu6pwj/subwat_kamikaze_v27.html?
  21. Rookwar Editado v23 8.60

    welington132 reagiu a Lipedr2 por uma resposta no tópico

    1 ponto
    OLÁ PESSOAL TRAGO MAIS UM MAPA ROOK WAR 8.60 EDITADO BY [Lipedr2] OQUE MUDOU? tirei bugs do Npc Teste error do distro ot fexa sozinho Arrumei o Summon tava muito cháto trainers Arrumado tava bugado fiz nova area só de NPCS Adicionei Fast Attack Ativado Quest 30k è bom ir com um Bloker Quest Boh é bom ir com um Bloker Annihilator Quest apenas 4 pessoas! Começa Level 130 Depot de baixo do Templo Criei um local pra war desert war City Rook-War City Ice-War City Desert-War Criei novos intens no Npc VIP Seller War Axe - Attack 60 Def 40 War Sword - Attack 60 Def 40 War Spear - Attack 80 War Wand. <Sorcerer> War Rod. <Druid> Acc do god:god/god TEMPLO ROOK WAR CITY TRAINER CITY ICE WAR AREA SÓ DE NPCS ANNIHILATOR !! DEPOT INTENS EDITADOS DOWNLOAD http://www.mediafire...bxr5jksshxv5klb SCAN https://www.virustot...sis/1357793276/ {Genriot} Pelo mapa {Liper} Por tira bugs e edita Meu primeiro mapa galera não sei mexer muito beleza
  22. Mega-Rpg Monster World [8.60] *

    VonHohenheim reagiu a Raell5 por uma resposta no tópico

    1 ponto
    Download * http://www.speedyshare.com/8sbvs/Mega-Rpg-Monster-Map.rar Skan * Creditos * Rewana Raell Deads
  23. (Resolvido)Site de poketibia error

    vudi reagiu a MarcosFraga por uma resposta no tópico

    1 ponto
    Agora tenta executar a ultima tabela para ver se funciona.. não to sacando por que não esta criando,
  24. AJUDA REP+

    Lekstar reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Man, eu estou sem um site aqui para te dizer ao certo, mas, no meu antigo site tu tinhas que adicionar o icone do item na pasta htdocs/images/items. Aí quando você adiciona um item no shop, aparece o ID que ele tem (id no site), se o ID for, por exemplo, 16, o nome da imagem na pasta tem que ser 16.. Se tiver qualquer dúvida é só dizer que eu tento explcar melhor.
  25. problema com ip

    lordefmorte reagiu a Lekstar por uma resposta no tópico

    1 ponto
    abra as configurações do seu roteador e procure por DHCP Server e static Address Allocation. em IP Address coloque o ip que deseja de 1 a 254 (exemplo : 192.168.1.70) em Mac Address coloque o MAC da sua maquina. depois basta salvar e pronto. Te Ajudei ? REP +
  26. Tibia UnBinder

    Tiago1234 reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Relaxa, é que não sei o que fazer.. Boa sorte
  27. Tibia UnBinder

    Tiago1234 reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Qual client está tentando descompilar? Passa o link se puder, eu tento descompilar também.
  28. Tibia UnBinder

    Tiago1234 reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Esse aí eu não sei usar , o que eu upei não funcionou? Se não funcionou não sei o que fazer..
  29. (Resolvido)Colocar imagem no gesior

    Zauster reagiu a luanluciano93 por uma resposta no tópico

    1 ponto
    <img src="./layouts\tibiacom\images\menu/anthack.jpg"> ou <img src="./'.$layout_name.'\images\menu/anthack.jpg"> [se tiver dentro do php] <img src="./<?php $layout_name ?>\images\menu/anthack.jpg"> [se tiver fora do php]
  30. (Resolvido)[Dúvida] RME ?

    EduardoRox reagiu a Alidev por uma resposta no tópico

    1 ponto
    aueauea, ok, passa seu skype que te explico certinho.
  31. erro no sqlite

    jvsa13 reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Ali, cara: Após clicar cole o que o kelvin.shirazi enviou e aperte F9.
  32. 1 ponto
    Tente assim: Se não der tente esse:
  33. (Resolvido)Como mudar dados da website

    maresoft reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Procura em htdocs/, dentro do lastestnews.php. Aredito que seja lá.
  34. Problema de distro no DEDICADO!

    Tib reagiu a Absolute por uma resposta no tópico

    1 ponto
    Veja: http://www.tibiaking.com/forum/topic/33395-tfs-04-dev-anti-dv-warsystem-cast-system-sem-bugs/
  35. Problema de distro no DEDICADO!

    Tib reagiu a Absolute por uma resposta no tópico

    1 ponto
    Creio que a source (DISTRO) não é compatível com seu windows, no caso seu windows deve ser 32bits e a distro 64.
  36. (Resolvido)[HELP] Pequeno erro Gesior "Abas"

    1uri reagiu a MarcosFraga por uma resposta no tópico

    1 ponto
    Procura no seu layout nas abas que estão vindo aberta : Algo parecido : function LoadMenu() { document.getElementById("submenu_"+activeSubmenuItem).style.color = "#000000"; document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible"; if(self.name.lastIndexOf("&") == -1) { self.name = "news=1&library=0&community=0&forum=0&account=0&shops=0<?PHP if($config['site']['shop_system'] > 1) echo "&support=0"; ?>&"; } FillMenuArray(); InitializeMenu(); } function SaveMenu() { if(unloadhelper == false) { SaveMenuArray(); unloadhelper = true; } } Seleciona o que você gostaria de deixar fechado: 1 = true 0 = false "news=1" (aberto) "community=0" (fechado)
  37. [Poketibia] Poke PAD

    abmauromacedo reagiu a ZORAN por uma resposta no tópico

    1 ponto
    Olá, pessoal eu venho aqui para chamar os itereçados em me ajudar no projeto PAD Online, bem o que e PAD Online, Pad online e Pokemon Adventure Dash Online e um novo servidor que estou desevolvendo solitariamente e i rei postar uma base para o pessoal ele tem source e alguns erros, por esse motivo venho recrutar amigos que queiram ajudar. ERROS DO SERVER: Catch não pega pokemons GoBack não retorna pokemons e os duplica Pokemons do player quando morre não retorna e alguns outros erros Erro na source isPokeball O QUE TERÁ(apenas projeto): Servidor base pokemon Dash do Ricardo Atenção: averá duas Bases uma com level system e evolução por stones e a outra sem level system Bostmachine 100% Boost sendo mostrado no nome do pokemon stones 100% Pokemon da 1 a 2 Geração full todos os moves de m1 a m12 Muitas outras coisas. O QUE EU FIZ: Adicionei RACE_STEEL e RACE_DARK Arumei o erro de event. Walk O QUE VOU FAZER. Arumar as casas melhorar o mapa atualizar as sprints de pokemon 1 e 2 geração Retirar do client as Sprints de tibia E outras coisitas. VAGAS para equipe: Designer: abmauromacedo Scripter : Vago Vago Programador: Vago Caso saiba fazer outra coisa poste ai em baixo que vamos chamando diacordo com o necessario. Se quiser ajudar me ADD NO FACEBOOK OU no SKYPE: michel-helmer , e Deixe uma messagem ai em baixo, com Seu nome e o que faz. OBS: mande uma mensagem com o nome de, quero ajudar o POKE PAD. Um grande abraço e fique com Deus!
  38. Imagem Para Otclient

    xWhiteWolf reagiu a Toony por uma resposta no tópico

    1 ponto
  39. {PEDIDO} Efeito no Player

    glacialot reagiu a Eduardo Carvalho por uma resposta no tópico

    1 ponto
    creaturescripts.. local storage = 13500 local efeito = 30 local time = 5 function effect(cid) if isPlayer(cid) then if getPlayerStorageValue(cid, storage) >= 1 then doSendMagicEffect(getCreaturePosition(cid), efeito) addEvent(effect, time * 1000, cid) end end end function onLogin(cid) if getPlayerStorageValue(cid, storage) >= 1 then doSendMagicEffect(getCreaturePosition(cid), efeito) addEvent(effect, time * 1000, cid) end return true end <event type="login" name="PlayerEffect" event="script" value="NomeDoArquivo.lua"/> obs : para o efeito sair o player tem que deslogar 1 vez depois de ganhar a storage.
  40. Problemas com tutorial antigo...

    darkjaques reagiu a Rusherzin por uma resposta no tópico

    1 ponto
    Vá em htdocs/config/config.ini Vai estar mais ou menos assim: install = "no" server_path = "D:/Minhas imagens/Anderson/Arquivos Que Eu Mais Uso/The End V0.6/Sem WAR Baiak Edited by DaNgeR [8.60] MySQL/" signatures = "1" Você deixa assim: install = "yes" server_path = "DIRETORIO DO SEU SERVER" signatures = "1" E coloca ali o diretório do seu servidor, ou seja, o caminho até a pasta onde ele está.
  41. 1 ponto
    Disponha! REP+ se ajudei
  42. ~Yomokiro [Show Off] (em andamento).

    soildee reagiu a yomokiro por uma resposta no tópico

    1 ponto
    Hm... acho que ele é uma estatua "SOLO"!!! Mais, quem sabe na proxima ele não ganha amigos, ou ele morre!
  43. ~Yomokiro [Show Off] (em andamento).

    soildee reagiu a yomokiro por uma resposta no tópico

    1 ponto
    So, foi para infeitar mesmo kk' é que eu achei que ele ia fica gatão ali, ai deixei :3 ele fica-va me chamando!
  44. [NPC] Troca Premium por Diamonds

    otskay reagiu a Kuchiki Kenpachi por uma resposta no tópico

    1 ponto
    Bom, este é um NPC que troca Premium por Diamond como no proprio Titulo já diz ! Bom vamos Direto ao assunto.... Vá em data/npc e crie um Premium.xml e cole isso dentro: Agora vai em npc/scripts e cria um premium.lua e cola isso dentro: ID do Diamond e a quantidade ! Agora vá em movements/scripts e crie um premium.lua e cole isso dentro: Agora vá em movements.xml e cole isso dentro: Action ID, tem que ser o mesmo actionid na script e na tag do movements.xml. Para fazer a área vip só dar 2 cliques no tile e colocar o actionid ! Gostou? Não custa nada dar REP+
  45. (Resolvido)[DUVIDA] Addon Doll - FREE -

    Marjer reagiu a Digoshow por uma resposta no tópico

    1 ponto
    Obrigado, eu fiz isso e coloquei no config.lua addonsOnlyPremium = false , e deu certo, obrigado REP+
  46. [Resolvido] [Pedido] Reset com look

    Guizeraah reagiu a narazaky por uma resposta no tópico

    1 ponto
    Onde ponho isso?
  47. Rookwar Editado v23 8.60

    1123243253sssa reagiu a thiagobji por uma resposta no tópico

    1 ponto
    Cara, hospeda o OT no 4shared, pois no speedy jaja ele expira e não tem como baixar Obrigado pela contribuição.
  48. Legal ! so não entendi o link externo porque nao postou aki pelo forum !
  49. Patterns

    MaTTch reagiu a Ryzor por uma resposta no tópico

    1 ponto
    Pattern Pattern ("Padrão" em pt-br) é uma poderosa funcionalidade para manipulação de strings (caso você não saiba o que é uma "string", busque saber antes de continuar, recomendo também ter um certo domínio sobre a biblioteca string), e usada para buscar um padrão de texto pré-definido. Porque aprender ? Possui recursos indispensáveis quando se precisa trabalhar com strings, alta aplicabilidade em scripts direcionados a otserv (talkactions), não que se vá usar isso a todo o momento, mas é altamente recomendado que se saiba trabalhar com patterns, é extremamente útil as vezes. Funções Algumas funções da biblioteca padrão string que aceitam pattern em seus parâmetros: string.find( string , pattern ) – Procura a primeira instância da pattern na string string.gfind( string , pattern ) – Quando for chamada repetidamente, retorna cada instância da pattern na string string.gsub( string , pattern , replace ) – Retorna uma string em que todas as instâncias da pattern foram substituidas por replace string.match( string , pattern , init ) – Retorna uma lista de ocorrências da pattern na string, começando em init (1 significa o primeiro caractere da string, 2 o segundo, assim por diante) Conjuntos Quando se constrói uma pattern, se utiliza alguns caracteres, cada um representando um conjunto diferente: x (onde "x" não é um caractere mágico ^$()%.[]*+-? ) → Representa o caractere "x" mesmo; . → Representa todos os caracteres; %a → Representa todas as letras; %c → Representa todos os caracteres de controle; %d → Representa todos os dígitos; %l → Representa todas as letras minusculas; %p → Representa todos os caracteres de pontuação; %s → Representa todos os caracteres de espaço; %u → Representa todas as letras maiúsculas; %w → Representa todos os caracteres alfanuméricos; %x → Representa todos os dígitos hexadecimais; %z → Representa o caractere com a representação do 0 (zero). Ao usar zeros na pattern ela não irá funciona, use esta nesse caso; Ao usar letra maiúscula, isso faz representar o contrário (Exemplo: %A → Representa tudo que não for letras; %D → Representa tudo que não for um digito; assim por diante...).Como dito anteriormente, para se criar uma pattern é necessário utilizar esses conjuntos, uma pattern é feita de uma sequência desses conjuntos. Se você quisesse criar uma pattern para encontrar uma certa string em um texto, por exemplo, para encontrar os números da string "23otserv", você teria que usar esta pattern "%d%dotserv", assim você estaria definindo que quer os numeros que estão ao lado da palavra ‘otserv’. Mas e se tivesse que encontrar um numero com 10 "casas" ? Por isso existe os modificadores, para evitar essa repetição desnecessária. Modificadores Servem principalmente para poupar serviço e são quatro, entenda 'x' como sendo algum conjunto (%a, %c, %d, ...): x * → Retorna 0 ou mais repetições do conjunto x. Sempre retornará a maior cadeia possível encontrada; x + → Retorna 1 ou mais repetições do conjunto x. Sempre retornará a maior cadeia possível encontrada; x - → Retorna 0 ou mais repetições do conjunto x. Sempre retornará a menor cadeia possível encontrada; x ? → Retorna 0 ou 1 ocorrência de x; Elementos especiais Existe também quatro elementos especiais: %n → Sendo n um numero entre 1 e 9, busca a enésima captura (apenas vi sendo usada na função string.gsub); %bxy → Procura uma string que inicia com x e termina com y; ^ → Quando está no começo da pattern, força a pattern a ser encontrada no começo da string; $ → Quando está no final da pattern, força a pattern a ser encontrada no fim da string;Nota: Se ^ ou $ estiverem em outros lugares da pattern, não fazem nada, apenas representam eles mesmos. Construindo uma pattern Vamos construir algumas patterns com os elementos citados acima. Primeiro alguns exemplos e depois uma explicação mais detalhada de cada elemento da pattern: String para as patterns: "Exemplo lua de pattern lua feito em lua" exemplos toscos, a gente se vê por aqui Pattern: (%a+) luaCapturaria: Exemplo lua de pattern lua feito em luaEle só retornará o primeiro caso que corresponder com a pattern. Agora, ao invés de usar o "%a" fosse usado o "." (que captura tudo), aconteceria isso: Pattern: (.+) luaCapturaria: Exemplo lua de pattern lua feito em luaComo "%a" captura apenas letras e não o "espaço", foi por isso que no primeiro exemplo só capturou a palavra "Exemplo" e no segundo exemplo, como foi usado o "." que captura tudo, capturou uma parte maior (ai que vêm a parte do modificador) por causa do modificador "+" que sempre vai buscar a maior cadeia possivel, agora veja um exemplo usando o "-": Pattern: (.-) luaCapturaria: Exemplo lua de pattern lua feito em luaO modificador "-", como dito anteriormente, captura a menor cadeia e por isso capturaria apenas o "Exemplo". Todos os modificadores são importantes. Um exemplo maior: Pattern: (%a+) lua (.-) lua (.+)Capturaria: Exemplo lua de pattern lua feito em lua Para quem não entendeu Explicação passo a passo: ( %d + ) Captura → O parenteses define que você quer que retorne essa captura. Conjunto → No caso é o de digitos. Modificador → No caso mostra que é para obter a maior cadeia possivel com 1 ou mais repetições do conjunto. Um exemplo mais avançado Agora usando de exemplo a pattern da função string.trim, que remove os espaços em branco do lado esquerdo e direito da string. Código: function string.trim(str) -- Function by Colandus return (string.gsub(str, "^%s*(.-)%s*$", "%1")) end string.gsub( str , " ^ %s* (.-) %s* $ ", " %1 ") str → Uma string qualquer; ^ → Força o começo da pattern ser encontrada no começo de str; %s* → Conjunto de espaços, podendo ter 0 ou mais repetições; (.-) → A captura principal, a que vai ser retornada, podendo ser digitos, letras, espaço, etc; $ → Força o final da pattern ser encontrada no fim de str; %1 → Retorna a 1ª captura da pattern e usa como parametro da função (Esse é um dos elementos especiais, %n);Dessa forma será removido os espaços apenas no começo e no fim da string ! Complemento Depois de dominar e entender como funciona as patterns, vamos aplica-las em funções, vou mostrar um exemplo de cada função (as que foram citadas no começo). string.find: Código: init, end, case1, case2 = string.find("minha string123", "(%a+) (.+)") init → Onde inicia a captura encontrada ( nesse caso, init = 1 ); end → Onde termina a captura encontrada ( end = 15 ); case1 → Primeira captura que equivale a pattern (%a+) ( case1 = minha ); case2 → Segunda captura que equivale a pattern (.+) ( case2 = string123 ); string.gfind: Código: for occ in string.gfind("a1a2a3a4a5", "(%a%d)") do print(occ) end occ → Terá um valor para cada instância da pattern (%a%d) encontrada, então irá printar a1, a2, a3, a4 e a5. string.match: Código: case1, case2 = string.match("Eu tenho 50 reais", "(%d+) (%a+)") case1 → Primeira captura que equivale a pattern (%d+) ( case1 = 50 ); case2 → Segunda captura que equivale a pattern (%a+) ( case2 = reais ); Referência http://www.lua.org/manual/5.1/pt/manual.html#5.4.1 http://lua-users.org/wiki/PatternsTutorial Então é isso, espero ter sido o mais claro possivel, Qualquer dúvida, erro ou sugestão, poste ! Creditos Lwkass
  50. cria um arquivo chamado tecnicas.luae adicione isso dentro function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "Spells for Level " .. spell.level .. "\n" prevLevel = spell.level end text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid,2175,text) return TRUE end vá em talkactions.xml e adicione essa tag <talkaction words="tecnicas" script="tecnicas.lua"/> mude onde ta escrito a primeira tecnicas xD
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo