-
Total de itens
3406 -
Registro em
-
Última visita
-
Dias Ganhos
111
Histórico de Reputação
-
Vodkart deu reputação a RigBy em 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 recebeu reputação de Evasion em 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 recebeu reputação de otnice em 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 recebeu reputação de PokemonBR em 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 recebeu reputação de Rodbom em [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 recebeu reputação de DinoMaster em [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 recebeu reputação de gacjogos em [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 recebeu reputação de gacjogos em [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.
-
-
Vodkart recebeu reputação de UntFrc em [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 recebeu reputação de DarkAngelBR em Mostrar a quantidade que morreu e que matou ao dar look no player
obrigado por postar o conteúdo, acho que ele ainda não existia aqui...
-
Vodkart recebeu reputação de M i s s em 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 deu reputação a Administrador em Biohazard
- Sobre :
- O Servidor é uma mistura de jogos, series e filmes com o tema apocalipse zumbi, como The Walking Dead, Left4Dead, Infestation, Dayz, e outros. Sua principal base é Resident Evil pois usei muito de seu conteúdo criando o jogo (monstros, classes, cenario, etc), o objetivo do jogo seria sobreviver, cumprir missões, e matar rivais da organização inimiga (No caso seria Umbrela vs Governo"Spec Ops"). Existem algumas classes no jogo que são baseadas no resident evil operation racoon city, e algumas poucas tasks apenas para passar o tempo, já que no inicio o jogo está bem sem objetivo.
-O servidor está bem complexo de se configurar e você irá perder um bom tempo tentando entender os sistemas, e também existem muitos erros no console do servidor, uma coisa que seria bom ser ajeitada.
-Sistemas :
-Sistema de Armas (Use With)
-Sistema de Carros
-Sistema de Carona(ainda bugando)
-Sistema de explodir barris
-Rest System (Sentar para recuperar vida / stamina)
-Habilidades únicas para cada classe
-Lie Down System (Um sistema onde seu personagem deita para dar cobertura, seus tiros dão 15% a mais de dano porem você não pode se mover enquanto estiver deitado)
-Sistema de Aviões (não concluído)
-Jato com misseis (não concluído)
-Jet Ski (apenas sprite)
-Gun Mix System (Um sistema baseado em Dead Rising onde você mistura duas armas para criar uma mais forte)
-Npc Guard system (inicialmente a ideia era não existir Prontecion Zone, e estes guardas fariam a segurança destes locais.
-Troca de outfit ao equipar a arma (Simples, você equipa a arma e seu personagem troca de outfit para uma que aparece a arma na mão)
Fotos :
LINKS:
Spr e Dat (8.6)
http://www.4shared.c...HSoba/860.html?
Scan:
https://www.virustot...sis/1422229733/
Servidor
http://www.4shared.c...Biohazard.html?
Scan:
https://www.virustot...sis/1422229622/
OTClient
http://www.4shared.c...ba/Client.html?
Scan -
https://www.virustot...sis/1422362802/
Pra usar o SPR e o DAT com o RME, só vc baixar o object builder e mudar a versão do arquivo pra uma q o rme suporte (caso dê algum erro ao abrir o original, claro)
Alguns Videos:
https://www.facebook...rdOnline/videos
-
Vodkart recebeu reputação de gutaxavier em 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 deu reputação a Administrador em Eventos em funcionamento
Estão lançados os desafios!, os eventos já estão em funcionamento. Confiram os eventos em andamento e os prêmios.
Membro do Mês (Saiba Mais!)
Membro do Mês
xTibia Achievement 2015 (Saiba Mais!)
Bronze
Silver
Gold
Diamond
SPOTS
Um Mistério? (...)
CONCURSOS GERAIS
]
1º lugar (reformulada)
2º lugar (reformulada)
3º lugar (reformulada)
-
Vodkart recebeu reputação de RigBy em function getLastSaturday
Uma função inútil que retorna o último sábado do mês...
function getLastSaturday(mes, ano) local date ={day=31, month= mes, year=ano} local saturday =os.date("*t",os.time(date)).wday return 31-(saturday%7) end
exemplo de uso:
-
Vodkart deu reputação a Lumus em function getLastSaturday
Da para fazer um evento que aconteça todo último sábado do mês.
-
Vodkart recebeu reputação de Lumus em function getLastSaturday
Uma função inútil que retorna o último sábado do mês...
function getLastSaturday(mes, ano) local date ={day=31, month= mes, year=ano} local saturday =os.date("*t",os.time(date)).wday return 31-(saturday%7) end
exemplo de uso:
-
Vodkart recebeu reputação de SkyLigh em Number Separator
Serve só para colocar pontos em números grandes. function getMilharNumber(number) local vod, kar, t = string.match(number,'^([^%d]*%d)(%d*)(.-)$') return vod..(kar:reverse():gsub('(%d%d%d)', '%1.'):reverse())..t end
-
Vodkart recebeu reputação de tiagoduuarte em BattleField TFS 1.1+
isso é simples, você adiciona no MAPA EDITOR as parades, configura no script o ID delas e POS, quando começar o evento a função vai checar se tem realmente as paredes naquele lugar q vc configurou, caso não tiver, vai cria-las.
vou fazer isso então, só vou adc uma storage igual eu fiz no map changer.
qndo eu atualizar aviso
-
Vodkart recebeu reputação de Lumus em [System] Invite Friends! (Low Rate Serve)
@DeCarvalho
É bem simples de adc, vc já tem a função que adc vip? só precisa de umas 3 linhas no máximo...
@Fawz
Por isso o sistema é TOTALMENTE editável.
Você pode editar os level que recebeção premios e quantos pontos precisa para receber premiações.
A dificuldade é sua.
Eu posso colocar por exemplo:
A primeira premiação só receba com 100 pontos
e como conseguir 100 pontos?
eu edito na lib dizendo que quando o jogador atingir level 50(exemplo) só receba 5 pontos, nossa, até eu atingir 100 pontos terei que chamar muito jogador...
ficando díficil.
ai o jogador atingi level 100, ai eu recebo mais 6 pontos, e então vai acumulando, por isso fiz uma tabela para colocar varios pontos como premiação:
rewards = {
[10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}},
[25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}},
[50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}},
[100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}},
[200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}},
[250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}},
[500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}
}
e digo isso porque esse sistema é para servidor LOW RATES, que a dificuldade de pegar level é demorada.
imagina eu ter que conseguir 200 pontos? ou até os 500?
por isso devo chamar mais jogadores, para que isso fique mais fácil.
e para não bular, eu só recebo pontos se esses mesmo jogadores UPAREM no servidor.
se não seria muito fácil criar contas, usar o comando e ganhar pontos...
-
Vodkart recebeu reputação de DeCarvalho em [System] Invite Friends! (Low Rate Serve)
Resumo: Para quem já jogou league of legends, o sistema é "parecido" com o Invite Friends, e para quem não jogou irei dar uma breve descrição sobre o sistema.
Descrição: O sistema oferece algumas premiações como: Itens, Premium Days, Montarias, Premium Points(para site) e Outfits. Claro que isso tudo é configurável.
A ideia principal do sistema foi que essas premiações fossem exclusivas do sistema, digamos, que os jogadores só fossem recompensados e tivessem certas montarias/outfits se ele atingisse num número "X" de pontos por ter ajudado seu servidor a crescer!
Como todo mundo almeja algo exclusivo e difícil de ser obtido, iria instigar os jogadores a usar o sistema e convidar seus amigos para o servidor!
Como Funciona o Sistema?
O sistema foi planejado para que jogadores "espertinhos" não burlassem o sistema e acontece da seguinte maneira:
Temos o jogador João e a jogadora Maria:
Maria necessita ser level 30 ou menor que 30(Configurável) para utilizar uma talkactions e dizer por quem foi invitada para o servidor, vamos supor que João a convidou Maria para jogar, João por sua vez necessita também ter um level avançado, digamos 50 ou superior(Configurável). Feito com sucesso o uso do sistema, ele funciona da seguinte maneira:
OBS: Você pode dizer o nome do jogador mesmo que ele esteja OFFLINE!
OBS2: Um ou mais Players podem ser invitador pelo MESMO JOGADOR! ENTÃO QUANTO MAIS PLAYER VOCÊ CHAMAR, MAIS FÁCIL DE RECEBER PONTOS E PREMIAÇÕES
O jogador invitado, no caso o João, teria que atingir um número "X" de pontos para receber premiações, por exemplo:
* Com 10 Pontos jogão recebe: Itens
* Com 25 Pontos jogão recebe: Itens e Premium Points
* Com 50 Pontos jogão recebe: Itens e Montaria
* Com 100 Pontos jogão recebe: Itens, Premium Points, Premium Days e Outifit
(Claro que isso é tudo configurável em uma Tabela)
E como recebo Recebo esses Pontos VODKART SEU FILHO DA PUTA!
Se lembra que João Convidou Maria para Jogar? Então... Maria tem que atingir certos leveis para que João receba esses pontos! Por exemplo a tabela do sistema:
levels_win = { [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, Se Maria atingir level 50, João recebe 5 pontos Se Maria atingir level 80, João recebe 6 pontos Etc... Claro que isso tudo é acumulativo! E sabe o que mais? João recebe Pontos mesmo se estiver ONLINE ou OFFLINE! Sem mais delongas, Vamos instalar o sistema! Instalando o Sistema: data\creaturescripts\scripts InviteFriends.lua function onLogin(player) player:registerEvent("FriendsPoints") if player:getStorageValue(_invite_friends.storages[1]) < 0 then player:setStorageValue(_invite_friends.storages[1], 0) player:setStorageValue(_invite_friends.storages[4], 0) end if getInvitePoints(player) > 0 then local acc = player:getAccountId() local FriendPoints, CheckPoints = getInvitePoints(player), player:getStorageValue(_invite_friends.storages[4]) for vod, ka in pairs(_invite_friends.rewards) do local str = "" if FriendPoints >= vod and CheckPoints < vod then str = str.."--> Invite Players System <--\n\nVocê acaba de receber algumas recompensas:\n\nItems: \n"..getItemsFromList(ka.items)..".\n\n" if ka.p_days > 0 then player:addPremiumDays(ka.p_days) str = str.."Premium Days:\n"..ka.p_days.." Premium Days." end if ka.p_points > 0 then db.executeQuery('UPDATE accounts SET premium_points=premium_points+' .. p_points ..' WHERE id=' .. acc) str = str.."Premium Points:\n"..ka.p_points.." Premium Points." end if ka.out[1] > 0 then player:addOutfitAddon(player:getSex() == PLAYERSEX_FEMALE and ka.out[1] or ka.out[2], 3) str = str.."[New Outfit]\nRecebeu uma Nova Outfit." end if ka.mount_id > 0 then player:addMount(ka.mount_id) str = str.."[New Outfit]\nRecebeu uma Nova Montaria." end player:setStorageValue(_invite_friends.storages[4], FriendPoints) local town_id = player:getTown():getId() if #ka.items > 0 then local parcel = player:getDepotChest(town_id, true):addItem(2595) for _, i_i in ipairs(ka.items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then parcel:addItem(item, amount) else for i = 1, amount do parcel:addItem(item, 1) end end end end local townid = player:getTown():getId() local letter = player:getDepotChest(town_id, true):addItem(2598, 1, true, 1) letter:setAttribute(ITEM_ATTRIBUTE_WRITER, "[+] Invite Players System [+]") letter:setAttribute(ITEM_ATTRIBUTE_TEXT, str) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE,"[Invite Players System] Você Recebeu algumas premiações por estar convidando jogadores para o servidor, Por favor conferir os itens no Depot.") end end end return true end function onAdvance(player, skill, oldlevel, newlevel) if (skill == SKILL__LEVEL) then if hasInviteFriend(player) and player:getStorageValue(_invite_friends.storages[3]) < newLevel and _invite_friends.levels_win[newLevel] then local f_name, points = getNameFriend(player), _invite_friends.levels_win[newLevel] player:setStorageValue(_invite_friends.storages[3], newLevel) addInvitePoints(f_name, points) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "[Invite Friends] você atingiu o level "..newLevel.." e o seu amigou "..f_name.." recebeu "..points.." Friend Points. Obrigado!") end end return true end creaturescripts.xml <event type="advance" name="FriendsPoints" script="InviteFriends.lua"/> <event type="login" name="FriendsLogin" script="InviteFriends.lua"/> data\lib\core invitefriends.lua _invite_friends = { storages = {202301, 202302, 202303, 202304}, -- points, jogador, recompensa lvl, recompensa items level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}} } } function getInvitePoints(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerStorageValue(cid, _invite_friends.storages[1]) < 0 and 0 or getPlayerStorageValue(cid, _invite_friends.storages[1]) end function hasInviteFriend(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerStorageValue(cid, _invite_friends.storages[2]) > 0 and true or false end function getNameFriend(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerNameByGUID(getPlayerStorageValue(cid, _invite_friends.storages[2])) end function addInvitePoints(name, amount) local pid, Guid = getPlayerByName(name), getPlayerGUIDByName(name) if not pid then local getFriendPoints = db.storeQuery("SELECT `value` FROM `player_storage` WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) if getFriendPoints ~= false then db.asyncQuery("UPDATE `player_storage` SET `value` = ".. (result.getDataInt(getFriendPoints, "value")+amount) .." WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) end else setPlayerStorageValue(getPlayerByName(name), _invite_friends.storages[1], getInvitePoints(getPlayerByName(name))+amount) end return true end function getItemsFromList(items) -- by vodka local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. ItemType(items[i][1]):getName() if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function getPlayerNameByGUID(guid) local a = db.storeQuery('SELECT `name` FROM `players` WHERE `id` = ' .. guid .. ' LIMIT 1') if a then return result.getDataString(a, "name") end return nil end function PlayerExist(name) -- by vodka local a = db.storeQuery('SELECT `id` FROM `players` WHERE `name` = ' .. db.escapeString(name)) if a ~= false then return true end return false end
Na mesma pasta procure por data\lib\core.lua e adc essa linha: dofile('data/lib/core/invitefriends.lua') data\talkactions\scripts InviteFriends.lua function onSay(player, words, param) local param = param:lower() if param == "" or not param then player:sendCancelMessage("Você precisa digitar o nome de um jogador.") return false elseif param == "points" then player:popupFYI("[+] Invite Friend System [+]\n\nvocê tem ["..getInvitePoints(player).."] Friends Points.") return false elseif hasInviteFriend(player) then player:sendCancelMessage("Você já agradeceu o jogador ["..getNameFriend(player).."] por te convidar a jogar neste servidor.") return false elseif not getPlayerGUIDByName(param) then player:sendCancelMessage("Desculpe, mas o jogador [" .. param .. "] não existe.") return false elseif player:getLevel() > _invite_friends.level_max or result.getDataInt(db.storeQuery("SELECT `level` FROM `players` WHERE `id` = "..getPlayerGUIDByName(param)), "level") < _invite_friends.level_need then player:sendCancelMessage((player:getLevel() > _invite_friends.level_max and "Desculpe, mas você precisa ter no maximo level ".._invite_friends.level_max.." para usar este comando." or "Desculpe, mas o jogador ["..param.."] precisa ter no minimo level ".._invite_friends.level_need.." para ser escolhido.")) return false elseif player:getName():lower() == param then player:sendCancelMessage("Desculpe, mas você não pode se auto invitar.") return false end player:setStorageValue(_invite_friends.storages[2], getPlayerGUIDByName(param)) player:sendTextMessage(25, "Você indicou o jogador "..param..", este sistema é uma forma de agradecer a vocês por trazerem seus amigos para jogar.") player:getPosition():sendMagicEffect(math.random(28,30)) return false end talkactions.xml <talkaction words="!invited" separator=" " script="InviteFriends.lua"/> Exemplo de uso do comando: Vodkart me chamou para jogador? uso o comando: !invited vodkart Configurando o Sistema: *Vá na LIB do sistema que você adicionou* level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { -- [LEVEL QUE PRECISA ATINGIR] = QUANTIDADE DE PONTOS QUE O OUTRO JOGADOR VAI RECEBER [50] = 5, [80] = 6, [100] = 8, [150] = 10 } rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}} } rewards = { [PONTOS NECESSÁRIO PARA OBTER A PREMIAÇÃO] = exemplo: [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, com 10 pontos ele irá rceber aquele itens acima /\ items = {} -- Poderá adicionar itens em uma tabela dizendo {id do item, quantidade} p_days = 0 -- se o jogador vai receber Premium Days? 0 ou Quantidade que vc deseja dar mount_id = 0 -- Se o jogador vai receber montaria? Colocar o Mount ID(que fica em mounts.xml) Ou deixar 0 para nenhuma p_points = 0 -- se o jogador vai receber Premium Points? 0 ou Quantidade que vc deseja dar out = {0,0} -- se vai recever outfit? {FEMALE, MALE} OU {0 , 0} para nenhuma
-
Vodkart recebeu reputação de RigBy em [System] Invite Friends! (Low Rate Serve)
Resumo: Para quem já jogou league of legends, o sistema é "parecido" com o Invite Friends, e para quem não jogou irei dar uma breve descrição sobre o sistema.
Descrição: O sistema oferece algumas premiações como: Itens, Premium Days, Montarias, Premium Points(para site) e Outfits. Claro que isso tudo é configurável.
A ideia principal do sistema foi que essas premiações fossem exclusivas do sistema, digamos, que os jogadores só fossem recompensados e tivessem certas montarias/outfits se ele atingisse num número "X" de pontos por ter ajudado seu servidor a crescer!
Como todo mundo almeja algo exclusivo e difícil de ser obtido, iria instigar os jogadores a usar o sistema e convidar seus amigos para o servidor!
Como Funciona o Sistema?
O sistema foi planejado para que jogadores "espertinhos" não burlassem o sistema e acontece da seguinte maneira:
Temos o jogador João e a jogadora Maria:
Maria necessita ser level 30 ou menor que 30(Configurável) para utilizar uma talkactions e dizer por quem foi invitada para o servidor, vamos supor que João a convidou Maria para jogar, João por sua vez necessita também ter um level avançado, digamos 50 ou superior(Configurável). Feito com sucesso o uso do sistema, ele funciona da seguinte maneira:
OBS: Você pode dizer o nome do jogador mesmo que ele esteja OFFLINE!
OBS2: Um ou mais Players podem ser invitador pelo MESMO JOGADOR! ENTÃO QUANTO MAIS PLAYER VOCÊ CHAMAR, MAIS FÁCIL DE RECEBER PONTOS E PREMIAÇÕES
O jogador invitado, no caso o João, teria que atingir um número "X" de pontos para receber premiações, por exemplo:
* Com 10 Pontos jogão recebe: Itens
* Com 25 Pontos jogão recebe: Itens e Premium Points
* Com 50 Pontos jogão recebe: Itens e Montaria
* Com 100 Pontos jogão recebe: Itens, Premium Points, Premium Days e Outifit
(Claro que isso é tudo configurável em uma Tabela)
E como recebo Recebo esses Pontos VODKART SEU FILHO DA PUTA!
Se lembra que João Convidou Maria para Jogar? Então... Maria tem que atingir certos leveis para que João receba esses pontos! Por exemplo a tabela do sistema:
levels_win = { [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, Se Maria atingir level 50, João recebe 5 pontos Se Maria atingir level 80, João recebe 6 pontos Etc... Claro que isso tudo é acumulativo! E sabe o que mais? João recebe Pontos mesmo se estiver ONLINE ou OFFLINE! Sem mais delongas, Vamos instalar o sistema! Instalando o Sistema: data\creaturescripts\scripts InviteFriends.lua function onLogin(player) player:registerEvent("FriendsPoints") if player:getStorageValue(_invite_friends.storages[1]) < 0 then player:setStorageValue(_invite_friends.storages[1], 0) player:setStorageValue(_invite_friends.storages[4], 0) end if getInvitePoints(player) > 0 then local acc = player:getAccountId() local FriendPoints, CheckPoints = getInvitePoints(player), player:getStorageValue(_invite_friends.storages[4]) for vod, ka in pairs(_invite_friends.rewards) do local str = "" if FriendPoints >= vod and CheckPoints < vod then str = str.."--> Invite Players System <--\n\nVocê acaba de receber algumas recompensas:\n\nItems: \n"..getItemsFromList(ka.items)..".\n\n" if ka.p_days > 0 then player:addPremiumDays(ka.p_days) str = str.."Premium Days:\n"..ka.p_days.." Premium Days." end if ka.p_points > 0 then db.executeQuery('UPDATE accounts SET premium_points=premium_points+' .. p_points ..' WHERE id=' .. acc) str = str.."Premium Points:\n"..ka.p_points.." Premium Points." end if ka.out[1] > 0 then player:addOutfitAddon(player:getSex() == PLAYERSEX_FEMALE and ka.out[1] or ka.out[2], 3) str = str.."[New Outfit]\nRecebeu uma Nova Outfit." end if ka.mount_id > 0 then player:addMount(ka.mount_id) str = str.."[New Outfit]\nRecebeu uma Nova Montaria." end player:setStorageValue(_invite_friends.storages[4], FriendPoints) local town_id = player:getTown():getId() if #ka.items > 0 then local parcel = player:getDepotChest(town_id, true):addItem(2595) for _, i_i in ipairs(ka.items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then parcel:addItem(item, amount) else for i = 1, amount do parcel:addItem(item, 1) end end end end local townid = player:getTown():getId() local letter = player:getDepotChest(town_id, true):addItem(2598, 1, true, 1) letter:setAttribute(ITEM_ATTRIBUTE_WRITER, "[+] Invite Players System [+]") letter:setAttribute(ITEM_ATTRIBUTE_TEXT, str) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE,"[Invite Players System] Você Recebeu algumas premiações por estar convidando jogadores para o servidor, Por favor conferir os itens no Depot.") end end end return true end function onAdvance(player, skill, oldlevel, newlevel) if (skill == SKILL__LEVEL) then if hasInviteFriend(player) and player:getStorageValue(_invite_friends.storages[3]) < newLevel and _invite_friends.levels_win[newLevel] then local f_name, points = getNameFriend(player), _invite_friends.levels_win[newLevel] player:setStorageValue(_invite_friends.storages[3], newLevel) addInvitePoints(f_name, points) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "[Invite Friends] você atingiu o level "..newLevel.." e o seu amigou "..f_name.." recebeu "..points.." Friend Points. Obrigado!") end end return true end creaturescripts.xml <event type="advance" name="FriendsPoints" script="InviteFriends.lua"/> <event type="login" name="FriendsLogin" script="InviteFriends.lua"/> data\lib\core invitefriends.lua _invite_friends = { storages = {202301, 202302, 202303, 202304}, -- points, jogador, recompensa lvl, recompensa items level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}} } } function getInvitePoints(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerStorageValue(cid, _invite_friends.storages[1]) < 0 and 0 or getPlayerStorageValue(cid, _invite_friends.storages[1]) end function hasInviteFriend(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerStorageValue(cid, _invite_friends.storages[2]) > 0 and true or false end function getNameFriend(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerNameByGUID(getPlayerStorageValue(cid, _invite_friends.storages[2])) end function addInvitePoints(name, amount) local pid, Guid = getPlayerByName(name), getPlayerGUIDByName(name) if not pid then local getFriendPoints = db.storeQuery("SELECT `value` FROM `player_storage` WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) if getFriendPoints ~= false then db.asyncQuery("UPDATE `player_storage` SET `value` = ".. (result.getDataInt(getFriendPoints, "value")+amount) .." WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) end else setPlayerStorageValue(getPlayerByName(name), _invite_friends.storages[1], getInvitePoints(getPlayerByName(name))+amount) end return true end function getItemsFromList(items) -- by vodka local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. ItemType(items[i][1]):getName() if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function getPlayerNameByGUID(guid) local a = db.storeQuery('SELECT `name` FROM `players` WHERE `id` = ' .. guid .. ' LIMIT 1') if a then return result.getDataString(a, "name") end return nil end function PlayerExist(name) -- by vodka local a = db.storeQuery('SELECT `id` FROM `players` WHERE `name` = ' .. db.escapeString(name)) if a ~= false then return true end return false end
Na mesma pasta procure por data\lib\core.lua e adc essa linha: dofile('data/lib/core/invitefriends.lua') data\talkactions\scripts InviteFriends.lua function onSay(player, words, param) local param = param:lower() if param == "" or not param then player:sendCancelMessage("Você precisa digitar o nome de um jogador.") return false elseif param == "points" then player:popupFYI("[+] Invite Friend System [+]\n\nvocê tem ["..getInvitePoints(player).."] Friends Points.") return false elseif hasInviteFriend(player) then player:sendCancelMessage("Você já agradeceu o jogador ["..getNameFriend(player).."] por te convidar a jogar neste servidor.") return false elseif not getPlayerGUIDByName(param) then player:sendCancelMessage("Desculpe, mas o jogador [" .. param .. "] não existe.") return false elseif player:getLevel() > _invite_friends.level_max or result.getDataInt(db.storeQuery("SELECT `level` FROM `players` WHERE `id` = "..getPlayerGUIDByName(param)), "level") < _invite_friends.level_need then player:sendCancelMessage((player:getLevel() > _invite_friends.level_max and "Desculpe, mas você precisa ter no maximo level ".._invite_friends.level_max.." para usar este comando." or "Desculpe, mas o jogador ["..param.."] precisa ter no minimo level ".._invite_friends.level_need.." para ser escolhido.")) return false elseif player:getName():lower() == param then player:sendCancelMessage("Desculpe, mas você não pode se auto invitar.") return false end player:setStorageValue(_invite_friends.storages[2], getPlayerGUIDByName(param)) player:sendTextMessage(25, "Você indicou o jogador "..param..", este sistema é uma forma de agradecer a vocês por trazerem seus amigos para jogar.") player:getPosition():sendMagicEffect(math.random(28,30)) return false end talkactions.xml <talkaction words="!invited" separator=" " script="InviteFriends.lua"/> Exemplo de uso do comando: Vodkart me chamou para jogador? uso o comando: !invited vodkart Configurando o Sistema: *Vá na LIB do sistema que você adicionou* level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { -- [LEVEL QUE PRECISA ATINGIR] = QUANTIDADE DE PONTOS QUE O OUTRO JOGADOR VAI RECEBER [50] = 5, [80] = 6, [100] = 8, [150] = 10 } rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}} } rewards = { [PONTOS NECESSÁRIO PARA OBTER A PREMIAÇÃO] = exemplo: [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, com 10 pontos ele irá rceber aquele itens acima /\ items = {} -- Poderá adicionar itens em uma tabela dizendo {id do item, quantidade} p_days = 0 -- se o jogador vai receber Premium Days? 0 ou Quantidade que vc deseja dar mount_id = 0 -- Se o jogador vai receber montaria? Colocar o Mount ID(que fica em mounts.xml) Ou deixar 0 para nenhuma p_points = 0 -- se o jogador vai receber Premium Points? 0 ou Quantidade que vc deseja dar out = {0,0} -- se vai recever outfit? {FEMALE, MALE} OU {0 , 0} para nenhuma
-
Vodkart recebeu reputação de valakas em [System] Invite Friends! (Low Rate Serve)
Resumo: Para quem já jogou league of legends, o sistema é "parecido" com o Invite Friends, e para quem não jogou irei dar uma breve descrição sobre o sistema.
Descrição: O sistema oferece algumas premiações como: Itens, Premium Days, Montarias, Premium Points(para site) e Outfits. Claro que isso tudo é configurável.
A ideia principal do sistema foi que essas premiações fossem exclusivas do sistema, digamos, que os jogadores só fossem recompensados e tivessem certas montarias/outfits se ele atingisse num número "X" de pontos por ter ajudado seu servidor a crescer!
Como todo mundo almeja algo exclusivo e difícil de ser obtido, iria instigar os jogadores a usar o sistema e convidar seus amigos para o servidor!
Como Funciona o Sistema?
O sistema foi planejado para que jogadores "espertinhos" não burlassem o sistema e acontece da seguinte maneira:
Temos o jogador João e a jogadora Maria:
Maria necessita ser level 30 ou menor que 30(Configurável) para utilizar uma talkactions e dizer por quem foi invitada para o servidor, vamos supor que João a convidou Maria para jogar, João por sua vez necessita também ter um level avançado, digamos 50 ou superior(Configurável). Feito com sucesso o uso do sistema, ele funciona da seguinte maneira:
OBS: Você pode dizer o nome do jogador mesmo que ele esteja OFFLINE!
OBS2: Um ou mais Players podem ser invitador pelo MESMO JOGADOR! ENTÃO QUANTO MAIS PLAYER VOCÊ CHAMAR, MAIS FÁCIL DE RECEBER PONTOS E PREMIAÇÕES
O jogador invitado, no caso o João, teria que atingir um número "X" de pontos para receber premiações, por exemplo:
* Com 10 Pontos jogão recebe: Itens
* Com 25 Pontos jogão recebe: Itens e Premium Points
* Com 50 Pontos jogão recebe: Itens e Montaria
* Com 100 Pontos jogão recebe: Itens, Premium Points, Premium Days e Outifit
(Claro que isso é tudo configurável em uma Tabela)
E como recebo Recebo esses Pontos VODKART SEU FILHO DA PUTA!
Se lembra que João Convidou Maria para Jogar? Então... Maria tem que atingir certos leveis para que João receba esses pontos! Por exemplo a tabela do sistema:
levels_win = { [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, Se Maria atingir level 50, João recebe 5 pontos Se Maria atingir level 80, João recebe 6 pontos Etc... Claro que isso tudo é acumulativo! E sabe o que mais? João recebe Pontos mesmo se estiver ONLINE ou OFFLINE! Sem mais delongas, Vamos instalar o sistema! Instalando o Sistema: data\creaturescripts\scripts InviteFriends.lua function onLogin(player) player:registerEvent("FriendsPoints") if player:getStorageValue(_invite_friends.storages[1]) < 0 then player:setStorageValue(_invite_friends.storages[1], 0) player:setStorageValue(_invite_friends.storages[4], 0) end if getInvitePoints(player) > 0 then local acc = player:getAccountId() local FriendPoints, CheckPoints = getInvitePoints(player), player:getStorageValue(_invite_friends.storages[4]) for vod, ka in pairs(_invite_friends.rewards) do local str = "" if FriendPoints >= vod and CheckPoints < vod then str = str.."--> Invite Players System <--\n\nVocê acaba de receber algumas recompensas:\n\nItems: \n"..getItemsFromList(ka.items)..".\n\n" if ka.p_days > 0 then player:addPremiumDays(ka.p_days) str = str.."Premium Days:\n"..ka.p_days.." Premium Days." end if ka.p_points > 0 then db.executeQuery('UPDATE accounts SET premium_points=premium_points+' .. p_points ..' WHERE id=' .. acc) str = str.."Premium Points:\n"..ka.p_points.." Premium Points." end if ka.out[1] > 0 then player:addOutfitAddon(player:getSex() == PLAYERSEX_FEMALE and ka.out[1] or ka.out[2], 3) str = str.."[New Outfit]\nRecebeu uma Nova Outfit." end if ka.mount_id > 0 then player:addMount(ka.mount_id) str = str.."[New Outfit]\nRecebeu uma Nova Montaria." end player:setStorageValue(_invite_friends.storages[4], FriendPoints) local town_id = player:getTown():getId() if #ka.items > 0 then local parcel = player:getDepotChest(town_id, true):addItem(2595) for _, i_i in ipairs(ka.items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then parcel:addItem(item, amount) else for i = 1, amount do parcel:addItem(item, 1) end end end end local townid = player:getTown():getId() local letter = player:getDepotChest(town_id, true):addItem(2598, 1, true, 1) letter:setAttribute(ITEM_ATTRIBUTE_WRITER, "[+] Invite Players System [+]") letter:setAttribute(ITEM_ATTRIBUTE_TEXT, str) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE,"[Invite Players System] Você Recebeu algumas premiações por estar convidando jogadores para o servidor, Por favor conferir os itens no Depot.") end end end return true end function onAdvance(player, skill, oldlevel, newlevel) if (skill == SKILL__LEVEL) then if hasInviteFriend(player) and player:getStorageValue(_invite_friends.storages[3]) < newLevel and _invite_friends.levels_win[newLevel] then local f_name, points = getNameFriend(player), _invite_friends.levels_win[newLevel] player:setStorageValue(_invite_friends.storages[3], newLevel) addInvitePoints(f_name, points) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "[Invite Friends] você atingiu o level "..newLevel.." e o seu amigou "..f_name.." recebeu "..points.." Friend Points. Obrigado!") end end return true end creaturescripts.xml <event type="advance" name="FriendsPoints" script="InviteFriends.lua"/> <event type="login" name="FriendsLogin" script="InviteFriends.lua"/> data\lib\core invitefriends.lua _invite_friends = { storages = {202301, 202302, 202303, 202304}, -- points, jogador, recompensa lvl, recompensa items level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}} } } function getInvitePoints(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerStorageValue(cid, _invite_friends.storages[1]) < 0 and 0 or getPlayerStorageValue(cid, _invite_friends.storages[1]) end function hasInviteFriend(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerStorageValue(cid, _invite_friends.storages[2]) > 0 and true or false end function getNameFriend(cid) local cid = Player(cid) if cid == nil then return false end return getPlayerNameByGUID(getPlayerStorageValue(cid, _invite_friends.storages[2])) end function addInvitePoints(name, amount) local pid, Guid = getPlayerByName(name), getPlayerGUIDByName(name) if not pid then local getFriendPoints = db.storeQuery("SELECT `value` FROM `player_storage` WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) if getFriendPoints ~= false then db.asyncQuery("UPDATE `player_storage` SET `value` = ".. (result.getDataInt(getFriendPoints, "value")+amount) .." WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) end else setPlayerStorageValue(getPlayerByName(name), _invite_friends.storages[1], getInvitePoints(getPlayerByName(name))+amount) end return true end function getItemsFromList(items) -- by vodka local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. ItemType(items[i][1]):getName() if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function getPlayerNameByGUID(guid) local a = db.storeQuery('SELECT `name` FROM `players` WHERE `id` = ' .. guid .. ' LIMIT 1') if a then return result.getDataString(a, "name") end return nil end function PlayerExist(name) -- by vodka local a = db.storeQuery('SELECT `id` FROM `players` WHERE `name` = ' .. db.escapeString(name)) if a ~= false then return true end return false end
Na mesma pasta procure por data\lib\core.lua e adc essa linha: dofile('data/lib/core/invitefriends.lua') data\talkactions\scripts InviteFriends.lua function onSay(player, words, param) local param = param:lower() if param == "" or not param then player:sendCancelMessage("Você precisa digitar o nome de um jogador.") return false elseif param == "points" then player:popupFYI("[+] Invite Friend System [+]\n\nvocê tem ["..getInvitePoints(player).."] Friends Points.") return false elseif hasInviteFriend(player) then player:sendCancelMessage("Você já agradeceu o jogador ["..getNameFriend(player).."] por te convidar a jogar neste servidor.") return false elseif not getPlayerGUIDByName(param) then player:sendCancelMessage("Desculpe, mas o jogador [" .. param .. "] não existe.") return false elseif player:getLevel() > _invite_friends.level_max or result.getDataInt(db.storeQuery("SELECT `level` FROM `players` WHERE `id` = "..getPlayerGUIDByName(param)), "level") < _invite_friends.level_need then player:sendCancelMessage((player:getLevel() > _invite_friends.level_max and "Desculpe, mas você precisa ter no maximo level ".._invite_friends.level_max.." para usar este comando." or "Desculpe, mas o jogador ["..param.."] precisa ter no minimo level ".._invite_friends.level_need.." para ser escolhido.")) return false elseif player:getName():lower() == param then player:sendCancelMessage("Desculpe, mas você não pode se auto invitar.") return false end player:setStorageValue(_invite_friends.storages[2], getPlayerGUIDByName(param)) player:sendTextMessage(25, "Você indicou o jogador "..param..", este sistema é uma forma de agradecer a vocês por trazerem seus amigos para jogar.") player:getPosition():sendMagicEffect(math.random(28,30)) return false end talkactions.xml <talkaction words="!invited" separator=" " script="InviteFriends.lua"/> Exemplo de uso do comando: Vodkart me chamou para jogador? uso o comando: !invited vodkart Configurando o Sistema: *Vá na LIB do sistema que você adicionou* level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { -- [LEVEL QUE PRECISA ATINGIR] = QUANTIDADE DE PONTOS QUE O OUTRO JOGADOR VAI RECEBER [50] = 5, [80] = 6, [100] = 8, [150] = 10 } rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {698, 699}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}} } rewards = { [PONTOS NECESSÁRIO PARA OBTER A PREMIAÇÃO] = exemplo: [10] = {items = {{2160,1},{2173,1}}, p_days = 0, mount_id = 0, p_points = 0 , out = {0,0}}, com 10 pontos ele irá rceber aquele itens acima /\ items = {} -- Poderá adicionar itens em uma tabela dizendo {id do item, quantidade} p_days = 0 -- se o jogador vai receber Premium Days? 0 ou Quantidade que vc deseja dar mount_id = 0 -- Se o jogador vai receber montaria? Colocar o Mount ID(que fica em mounts.xml) Ou deixar 0 para nenhuma p_points = 0 -- se o jogador vai receber Premium Points? 0 ou Quantidade que vc deseja dar out = {0,0} -- se vai recever outfit? {FEMALE, MALE} OU {0 , 0} para nenhuma
-
Vodkart recebeu reputação de brendoonh em 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:
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.