-
Content Count
3406 -
Joined
-
Last visited
-
Days Won
107
Reputation Activity
-
Vodkart got a reaction from bilet in [ Talkaction ]Comando !party
explicação:
Ao usar o comando,ele checkará os player que estão na party, mostrando o Nome e level deles.
party.lua
function onSay(cid, words, param, channel) local players = getPartyMembers(getPartyLeader(cid)) local str = "" if isInParty(cid) == true then str = str .. "" .. #players .. " Jogadores na Party:\n" for i, k in ipairs(players) do str = str .. "" .. getCreatureName(k) .. "[".. getPlayerLevel(k) .."]" if i ~= #players then str = str .. ", " end end str = str .. "." doShowTextDialog(cid, 6579, str) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa estar em Party.") end return TRUE end
talkactions.xml adicione a tag:
<talkaction words="!party" script="party.lua"/>
-
Vodkart got a reaction from GOD Vitor in Trade Logs
Explicação:
Vocês sabem que os comandos que o GOD usa ficam salvos em um arquivo.txt certo?
Esse sistema é parecido, só que quando o jogador for trocar items pelo trade vão ficar salvo os IDS dos items que foram trocados e os nomes dos players.
1° Versão é feita pelo Banco de dados:
2° Versão é salvo em um arquivo.txt em data/logs
-
-
Vodkart got a reaction from gutaxavier in Matar Monstro Abrir Tp, Remover Parede, Ganhar Storage
Creditos:
Vodkart
Kydrai
fala galerinha resolvi posta alguns script que acontece quando o player mata algum monstro ...
o primeiro é o script que acontece quando voce mata um Monstro abre o teleport.
o segundo é matar o monstro e sumir a parede por algum tempo.
Obs: o Nome do monstro deve ser colocado com Letra Maiuscula.
[ Matar monstro e abrir Teleport ]
creaturescript\script
[ Matar Monstro e parede sumir por determinado tempo ]
creaturescript\script
[ Matar Monstro e ser teleportado ]
[ Matar Monstro e Ganhar Storage ]
-
-
Vodkart got a reaction from 1579091 in Addon Doll Por First Addon! Ou Second Addon! Sistema Igual Underwar, Sem Addon Full
function onSay(cid, words, param) local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["noblewoman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336} } local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335}, ["wayfarer"]={366} } local msg = {"Command requires GOOD param!", "You dont have Addon Doll!", "Bad param!", "Full Addon Set sucesfully added!"} local x = string.explode(param, ",") if(getPlayerItemCount(cid, 8982) > 0) then if param ~= "" then if maleOutfits[x[1]:lower()] and femaleOutfits[x[1]:lower()] then if (x[2] == '1' or x[2] == '2') then doPlayerRemoveItem(cid, 8982, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, femaleOutfits[x[1]:lower()][1], x[2]) else doPlayerAddOutfit(cid, maleOutfits[x[1]:lower()][1], x[2]) end else doPlayerSendTextMessage(cid, 27, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[3]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end return true end
exemplo:
!addon knight, 1
Créditos: Bogart
-
Vodkart got a reaction from gabriel28 in Trade Logs
Explicação:
Vocês sabem que os comandos que o GOD usa ficam salvos em um arquivo.txt certo?
Esse sistema é parecido, só que quando o jogador for trocar items pelo trade vão ficar salvo os IDS dos items que foram trocados e os nomes dos players.
1° Versão é feita pelo Banco de dados:
2° Versão é salvo em um arquivo.txt em data/logs
-
Vodkart got a reaction from guilherme Silva in Npc Auction
Versões: Foi feito para servidores que não tem o market system, mas funciona desde o 8.54 até 9.6+
Suporta: servidores Sqlite e MySql
Sobre: O Npc basicamente funciona da seguinte maneira, você "deposita" alguns items neste npc e durante "X" dias ele vende para você, claro que o npc irá cobrar "Y" preço pelo serviço...
Para mais informações acessem o link que explica com imagens: http://www.xtibia.co...mo-auction-npc/
Basta fazer o download, executar a query que é pedida e depois disso colocar os arquivos em seus respectivas pastas.
Npc Auction.rar
-
Vodkart got a reaction from nazesaria in New Marriage System
script usa esse:
http://pastebin.com/C4f7d8GU
e em outfits.xml deixa as outfits de casamento assim:
<outfit id="23" quest="150420"> <list gender="0" lookType="329" name="Wife"/> <list gender="1" lookType="328" name="Husband"/> </outfit>
-
Vodkart got a reaction from AncientGhastlyD in Báu/alavanca/npc Que Troca Vip Coin Por Items
Alavancas e báus
Npc's
-
Vodkart got a reaction from Polguilo in [Creaturescripts] Function Ondeath
teleportmon.lua
function onDeath(cid, corpse, killer) local Ppos = {x = 340, y = 840, z = 15} -- posicao para onde ele vai ir local monstName = "Pythius The Rotten" -- nome do monstro if isMonster(cid) then if string.lower(getCreatureName(cid)) == string.lower(monstName) then doTeleportThing(killer[1], Ppos) end end return TRUE end
em creaturescript.xml adicione a tag:
<event type="death" name="TelePort" event="script" value="teleportmon.lua"/>
No arquivo Xml do seu monstro adicione
<script> <event name="TelePort"/> </script>
-
Vodkart got a reaction from fujaloco in Modal Dialog para TFS 1.0
se for pra postar coisa pela metade então não posta né seu filho da puta
fica querendo se aparecer aí
-
Vodkart got a reaction from JS Lotus in Comando de Rank Points por Storage
adc na sua lib
function getRankStorage(cid, value, max, RankName) -- by vodka local str ="" str = "--[".. (RankName == nil and "RANK STORAGE" or ""..RankName.."") .."]--\n\n" local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as INTEGER) DESC;") if (query:getID() ~= -1) then k = 1 repeat if k > max then break end str = str .. "\n " .. k .. ". "..getPlayerNameByGUID(query:getDataString("player_id")).." - [" .. query:getDataInt("value") .. "]" k = k + 1 until not query:next() end return doShowTextDialog(cid, 2529, str) end
dps só usar assim em uma talk: getRankStorage(cid, 543995, 10, "Rank Boss") -
Vodkart got a reaction from djteteh in TopLevel Effect
Refiz o código de outro jeito, as TAGS são as MESMAS.
Créditos ao Bruno: http://pastebin.com/raw.php?i=pr8G8DQH
-
Vodkart got a reaction from R e d in Marriage System [+Npc]
então cara, eu não sei programar em php, então sobre o gesior eu n vou consegui te ajudar :T
sobre o comando love até pode ser colocado no script, easy '-'
-
Vodkart got a reaction from CliffBurtton in Piso Q Teleporta Por Vocaçao
voctile.lua
function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Você não possui a vocação para passar.", msgWelcome = "Seja bem vindo." } if(isInArray({1, 2, 3, 4}, getPlayerVocation(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end
movements.xml
<movevent type="StepIn" uniqueid="14119" event="script" value="voctile.lua"/>
-
Vodkart reacted to RigBy in Passagem Secreta Diferente
Passagem Secreta
Gif de como funciona
Essa semana tava ajudando um cara chamado Farathor nesse topico, e foi uma ideia boa então decidi refazer e trazer pra cá
Ela funciona da seguinte maneira, vai ter 3 coal basin (Você pode configurar e coloca quantas você quiser), ai você vai ter que joga 3 itens diferente em cada coal basin (no meu caso eu usei os 3 fields) a estatua vai se move criando um teleport ou não (configurado), depois que você entrar no teleport ele ira fechar ou não (configurado).
Eu usei como exemplo os 3 field mas você pode alterar para algum item ou até adicionar ou remover mais locais onde tera que joga o item.
Testei na TFS 0.4 rev 3887
Então vamos instalar:
Crie um arquivo chamado Secret_Passage.lua na pasta movement/script e coloque isso dentro:
Agora adicione essa duas linha em movement.xml:
<movevent type="AddItem" tileitem="1" actionid="13501" event="script" value="Secret_Passage.lua.lua"/> <movevent type="StepIn" actionid="5555" event="script" value="Secret_Passage.lua.lua"/> Agora so basta você adicionar o actionid 13501 nos coal basin ou nos piso mesmo. Se você alterar o actionid "5555" você terar que alterar no Secret_Passage.lua também. Para adicionar mais locais so basta você adicionar outra linha com o id do item e o local onde terá que ruma o item e não esqueã de sempre coloca 1 a mais no inicio, exemplo: se tiver 3 ai você cria o outro um a mais ficando 4. [4] = {necessary_Item = 2160, tile = {x = 1062, y = 1027, z = 7, stackpos= 1}}, Isso ai, xau -
Vodkart got a reaction from Evasion in Global Server Save 2X Ao Dia
então usa assim
function onTimer() function doBroadSave(delay) if delay ~= 0 then doBroadcastMessage("[Global server save] O server será desligado em "..delay.." Minuto"..(delay > 1 and "s" or "")) addEvent(doBroadSave, 60000, delay -1) else doSaveServer() doShutdown() end end doBroadSave(5) return true end
<globalevent name="globalSave" time="17:00" event="script" value="globalSave.lua"/>
-
Vodkart got a reaction from otnice in Battlefield Event!
Mapa feito por AnneMotta:
Mapa Battlefield.rar
scan: https://www.virustot...sis/1346548669/
Imagens do mapa:
Descrição:
- O evento é automático e acontece em determinado dia e hora da semana
- Logo após é aberto um teleport então apenar um número limitado de players entra no evento
- São formados por dois times, os "Black Assassins" e os "Red Barbarians"
- Os times são balanceados automaticamente, quando o último jogador entra, esse teleport é fechado e depois de 5 minutos o evento começa, os 5 minutos são para os players ter tempo de planejar um ataque.
- O sistema tem por finalidade matar todos do time inimigo, e os players que sobreviverem recebem um prêmio.
Bônus:
- Durante o evento é mostrado na tela somente dos jogadores que estão no evento um placar de times.
- Até o último player entrar no evento, ficam mandando broadcast dizendo quanto players faltam para dar inicio ao jogo.
- Se o evento abrir e não atingir a meta de players colocada, o evento é finalizado e os players voltam para o templo.
Lembre-se:
- De colocar Pvp Tool na área
- De colocar área NoLogout
Imagens:
Instalação:
Data/Lib
Data/CreatureScript
Data/Globalevents
Data/Movements
Como configurar:
Configuração dos Times:
Configurar Datas do evento:
Configuração Paredes:
-
Vodkart got a reaction from PokemonBR in Marriage System [+Npc]
Explicação: É o sistema de casamento conhecido, porém foi reformulado para funcionar em versões mais recentes.
Descrição: O sistema conta com:
Item: Os jogadores que se casar receberão um Wedding ring com seus nomes e data do casamento.
Outfit: jogadores que se casam recebem outfit, caso se divorciem, perder as outfits.
Look: o look mostra com quem é casado
Combate: Os jogador não pode atacar seu patner
Comandos:
/marriage info -- mostra em uma janela o preço do casamento/divórcio e o level minimo para casar.
/marriage status -- mostra com quem é casado e a data do casamento
Outra coisa bem importante é que os dois jogadores NÃO precisam estar online para se divorciarem, exemplo:
JOÃO e casado com MARIA, JOÃO vai até o npc e paga um preço para de divorciar, só quem pede o divorcio que paga a taxa, logo MARIA não precisa pagar nada pois seu Ex-Patner JOÃO já pagou. O que ela precisa fazer é "assinar" com o npc o seu divorcio também.
Como casar?
Player1:
Player2:
Na sua db execute:
CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
Caso você ter a outfit Husband e Wife(de casamento) no seu servidor abra o spoiler:
Mods:
Npc:
Configuração:
-
Vodkart got a reaction from Rodbom in [Talkaction] Comando !guild
O comando checa:
- O total de membros que sua guild possui
- Quantos Players Tem online
- Mostra o nome e o Rank dos jogadores Online
Em lib/050-function adicione:
function CountGuildMembers(GuildName) -- function by vodkart local count = 0 local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. getGuildId(GuildName) .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() return count end end
Em talkactions/script
guildinformation.lua
function onSay(cid, words, param, channel) local players,str,GuildName = {},'',getPlayerGuildName(cid) if getPlayerGuildId(cid) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa estar em uma Guild.") return true end for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildName(cid) == GuildName then table.insert(players, cid) end end str = str .. "Membros total da guild: "..CountGuildMembers(GuildName).." Players.\n\nExiste "..#players.." Players online na sua guild:\n\n" for i = 1, #players do str = str.."\n["..getPlayerName(players[i]).."]["..getPlayerGuildRank(players[i]).."]" end return doShowTextDialog(cid, 2533, str) end
talkactions.xml
<talkaction words="!guild" event="script" value="guildinformation.lua"/>
Link úteis:
Comando !guild List: http://www.xtibia.co...ion-guild-list/
comando !party: http://www.xtibia.co...-comando-party/
-
Vodkart got a reaction from DinoMaster in [Pedido] Npc - Saffari Zone Pxg
fiz rapidinho, vê se é isso que vc quer:
Mods
Saffari.xml
<?xml version="1.0" encoding="UTF-8"?> <mod name="Saffari" version="1.0" author="Vodkart" contact="none.com" enabled="yes"> <config name="saffari_func"><![CDATA[ config = { Price = 2000, Premium = false, Level = 50, Saffari_Pos = {Enter = {x=189,y=53,z=7}, Exit = {x=195,y=53,z=7}}, Time = 30, AddPokeballs = {11445,30}, Blocked_pokeballs = {2146, 2147, 11437, 11441}, Storages = {874547,874548}, levelandskills = false, loot = false } ]]></config> <event type="login" name="SaffariRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "SaffariDeath") return true end]]></event> <talkaction words="/saffari;!saffari" event="buffer"><![CDATA[ domodlib('saffari_func') param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !saffari info") elseif(param == "info") then doShowTextDialog(cid,2160,"Saffari Info:\n\nLevel Minimum: "..config.Level.."\nSaffari Cost: "..config.Price.."\nTime Limit: "..config.Time.." minutes\n\nThe safari is home to rare creatures, some are dangerous and others not\n[*Warning*]\nis only allowed to enter with saffari balls.\n\nTo leave enter command:\n!saffari leave") elseif(param == "leave") then if getPlayerStorageValue(cid, config.Storages[1]) >= 1 then doTeleportThing(cid, config.Saffari_Pos.Exit) setPlayerStorageValue(cid, config.Storages[1], -1) setPlayerStorageValue(cid, config.Storages[2], -1) doPlayerSendTextMessage(cid,22,'you left the saffari zone.') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not in Saffari") end end return true ]]></talkaction> <globalevent name="SaffariCheck" interval="60" event="script"><![CDATA[ domodlib('saffari_func') function onThink(interval, lastExecution) local on = getPlayersOnline() if #on > 0 then for i = 1, #on do if getPlayerStorageValue(on[i], config.Storages[2]) <= os.time() and getPlayerStorageValue(on[i], config.Storages[1]) >= 1 then doTeleportThing(on[i], config.Saffari_Pos.Exit) setPlayerStorageValue(on[i], config.Storages[1], -1) setPlayerStorageValue(on[i], config.Storages[2], -1) doPlayerSendTextMessage(on[i],22,'you left the saffari zone.') end end end return true end ]]></globalevent> <event type="death" name="SaffariDeath" event="script"><![CDATA[ domodlib('saffari_func') function onDeath(cid, corpse, deathList) if isPlayer(cid) and getPlayerStorageValue(cid, config.Storages[1]) >= 1 then setPlayerStorageValue(cid, config.Storages[1], -1) setPlayerStorageValue(cid, config.Storages[2], -1) if config.loot == false then doCreatureSetDropLoot(cid, false) end if config.levelandskills == false then doPlayerSetLossSkill(cid, 0) end end return true end ]]></event> </mod>
Npc
domodlib('saffari_func') local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) if isInArray({"saffari","enter","entrar"}, msg) then npcHandler:say('you can stay in the Saffari zone by '..config.Time..' minutes, the price is '..config.Price..' gp(s), You want enter? {yes}', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then for i = 1, #config.Blocked_pokeballs do if getPlayerItemCount(cid, config.Blocked_pokeballs[i]) >= 1 then npcHandler:say('Keep your PokeBalls!', cid) return true end end if config.Premium == true and not isPremium(cid) then npcHandler:say('Sorry, you need to be premium!', cid) return true elseif getPlayerLevel(cid) < config.Level then npcHandler:say('Sorry, you must be at least level '..config.Level..' to enter the Saffari zone!', cid) return true elseif not doPlayerRemoveMoney(cid, config.Price) then npcHandler:say('Sorry, you do not have enough money!', cid) return true end doPlayerAddItem(cid, config.AddPokeballs[1], config.AddPokeballs[2]) selfSay("Thanks, you've been teleported to the Saffari zone and has "..config.Time.." minutes, if you want to leave enter {!saffari leave}.", cid) doTeleportThing(cid, config.Saffari_Pos.Enter) setPlayerStorageValue(cid, config.Storages[1], 1) setPlayerStorageValue(cid, config.Storages[2], os.time()+config.Time*60) elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("tudo bem então.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
configurações
config = {
Price = 2000, -- qnto vai custar
Premium = false, -- se precisa ser premium
Level = 50, -- level minimo para entrar
Saffari_Pos = {Enter = {x=189,y=53,z=7}, Exit = {x=195,y=53,z=7}}, -- pos da safari, e pos pra onde ele vai dps que acaba o tempo
Time = 30, -- tempo maximo q ele pode ficar no saffari in minutes
AddPokeballs = {11445,30}, -- id da saffari ball e quantidade
Blocked_pokeballs = {2146, 2147, 11437, 11441}, -- pokeballs q ele n pode estar na bag
Storages = {874547,874548}, -- n mexa
levelandskills = false, -- se vai perder skills e exp ao morrer
loot = false -- se vai perder loot ao morrer
}
comandos extra:
!saffari info -- mostra em uma janela sobre o preço, lvl e o tempo que pode ficar lá
!saffari leave -- faz com que o player saia da saffari zone
-
Vodkart got a reaction from gacjogos in [Talk] Deathlist [Fixed/no Crash]
Atualizado V1.0:
Mostra últimas mortes do servidor:
você pode usar o comando !deathlist NOME
ex: !deathlist Carlin:
in your db execute this query:
CREATE TABLE death_list ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, date INTEGER NOT NULL, level INTEGER NOT NULL, killer_name INTEGER NOT NULL, PRIMARY KEY ( id ) );
creaturescript
death_list.lua
function onDeath(cid, corpse, deathList) local str = "" for _, pid in ipairs(deathList) do if isCreature(pid) == true then str = str.."".. (str == "" and "" or ",") ..""..getCreatureName(pid) else str = str.."".. (str == "" and "" or ",") .." a field item" end end str = str.."." death = str .. " ".. (getPlayerBlessing(cid, 5) and "[Blessed]" or getPlayerSlotItem(cid, 2).itemid == 2173 and "[AOL]" or "") db.executeQuery("INSERT INTO `death_list` (`player_id`, `date`, `level`, `killer_name`) VALUES ('".. getPlayerGUID(cid).."', '".. os.time() .."', '".. getPlayerLevel(cid) .."', '".. death .."');") return true end
creaturescript.xml
<event type="death" name="DeathList" event="script" value="death_list.lua"/>
creaturescript/script/login.lua
registerCreatureEvent(cid, "DeathList")
talkactions
deathlist.lua
limit = 5 function onSay(cid, words, param, channel) str = "" if param == "" then local qry = db.getResult("SELECT `player_id`, `date`, `level`, `killer_name` FROM `death_list` ORDER BY `date` DESC LIMIT 0, " .. limit) if(qry:getID() ~= -1) then repeat str = str .."\n "..os.date("%d %B %Y %X ", qry:getDataInt("date")).." "..getPlayerNameByGUID(qry:getDataString("player_id")).." died at level "..qry:getDataInt("level").." by:\n"..qry:getDataString("killer_name") until not(qry:next()) qry:free() else str = "Não há mortes no servidor." end doPlayerPopupFYI(cid, "Last Deaths:\n\n" .. str) return true end local getGuid = getPlayerGUIDByName(param:lower()) if not getGuid then doPlayerSendCancel(cid, "Este Player não existe.") return true end local qry = db.getResult("SELECT `id`, `date`, `level`, `killer_name` FROM `death_list` WHERE `player_id` = " .. getGuid .." ORDER BY `date` DESC LIMIT 0, " .. limit) if(qry:getID() ~= -1) then repeat str = str .."\n "..os.date("%d %B %Y %X ", qry:getDataInt("date")).." died at level "..qry:getDataInt("level").." by:\n"..qry:getDataString("killer_name") until not(qry:next()) qry:free() else str = "Não há mortes." end doPlayerPopupFYI(cid, "Last Deaths of: " .. param .. ".\n\n" .. str) return true end
talkactions.xml
<talkaction words="!deathlist" script="deathlist.lua"/> -
Vodkart got a reaction from gacjogos in [Talk] Deathlist [Fixed/no Crash]
1° Abra o programa Sqlite
2° Selecione a database do seu server, o arquivo é esse ".s3db", por exemplo o "forgottenserver.s3db"
3° na parte superior do programa tem a aba "Tools",clica nela e seleciona "Open SQL query editor" ou (ALT + E) se preferir
4° Vai abrir uma janela branca,nela você coloca isso:
CREATE TABLE death_list ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, date INTEGER NOT NULL, level INTEGER NOT NULL, killer_name INTEGER NOT NULL, PRIMARY KEY ( id ) );
5° Depois clica no ícone do raio ali na parte de cima ou aperta o botão F9 que vai fazer com que a query seja executada.
-
-
Recently Browsing 0 members
No registered users viewing this page.
Administrador | Diretor | Coordenador | Moderador | Suporter | Estagiário | Herói