Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. essa sessão é destinada para scripts em LUA e não PHP, vou reportar para que movam para seção correta obrigado outra coisa esse link pode te ajudar http://www.xtibia.com/forum/topic/162517-lottery-page-mais-elaborada-com-resultados/
  2. qual distro você está usando? possivelmente o bug é do distro e não do script. Já tentou usar em outros distros para ver se o bug persiste?
  3. hsuishiushiSUHIuhisUHSIUHSIUHSUIS olha a cara da menina lá de trás da direita PQP Gean vc pinta unha? lol
  4. coloca em [.code] [/code] para ficar mais visível, além disso na parte da mensagem troque "<" por "--" que não tem problema
  5. mas calma! Vamos agradecer, obrigado pela contribuição, espero que esteja sempre a disposição para trazer novos conteúdo pois a comunidade está precisando de pessoas como vc meu amigo! REP+ pelo seu trabalho
  6. esse script ai é da época que a minha vó jogava tibia já tem versões melhorada dessa actions
  7. é só ir adicionando o id na tabela esses ai são os que eu botei blockids = {1496, 1492, 1497,1499, 1497, 1498, 1499, 1505, 1506, 1507, 1508, 7465, 7466, 7467, 7468, 7469, 7470, 7471, 7472, 7473} dá para adicionar +
  8. <?xml version="1.0" encoding="UTF-8"?> <mod name="Guild Frag System" version="1.0" author="Vodkart" contact="none" enabled="yes"> <config name="guild_func"><![CDATA[ frag_guild = { start_frags = 120155, FragsToWinAcess = 100, FragsPerKill = 1, AcessTimeDays = 2, MoreExpToGuild = false, Exp_Rate = 1.1, -- 10% Honor_Storage = 215548, Honor_Point = 5 } function getFragsByGuild(GuildName) local check = db.getResult("SELECT `frags` FROM `guilds` WHERE `id` = " ..getGuildId(GuildName)) return check:getDataInt("frags") <= 0 and 0 or check:getDataInt("frags") end function addFragsByGuild(GuildName,amount) db.executeQuery("UPDATE `guilds` SET `frags` = "..getFragsByGuild(GuildName).."+"..amount.." WHERE `guilds`.`id` = "..getGuildId(GuildName)) end function removeFragsByGuild(GuildName,amount) db.executeQuery("UPDATE `guilds` SET `frags` = "..getFragsByGuild(GuildName).."-"..amount.." WHERE `guilds`.`id` = "..getGuildId(GuildName)) end function setFragsByGuild(GuildName,value) db.executeQuery("UPDATE `guilds` SET `frags` = "..value.." WHERE `guilds`.`id` = "..getGuildId(GuildName)) end function cleanGuildFrags() db.executeQuery("UPDATE guilds SET frags = 0;") end function removeAcessGuildServer() return db.executeQuery("UPDATE guilds SET acesstime = 0;") end function getAcessTime(GuildName) local query = db.getResult("SELECT `acesstime` FROM `guilds` WHERE `id` = " ..getGuildId(GuildName)) if query:getID() ~= -1 then return query:getDataInt("acesstime") end end function HaveGuild(cid) return getPlayerGuildId(cid) > 0 and TRUE or FALSE end function doBroadCastGuild(GuildName,type,msg) local players = {} for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildName(cid) == GuildName then table.insert(players, cid) end end for i = 1, #players do doPlayerSendTextMessage(players[i],type,msg) end return true end function setAcessTime(GuildName, time) return db.executeQuery("UPDATE `guilds` SET `acesstime` = "..time.." WHERE `guilds`.`id` = "..getGuildId(GuildName)) end function getDaysAcess(GuildName) local acess = math.ceil((getAcessTime(GuildName) - os.time())/(86400)) return acess <= 0 and 0 or acess end function HaveAcess(GuildName) return getDaysAcess(GuildName) > 0 and TRUE or FALSE end function getGuildWinnerName() local guildname = '' local query = db.getResult("SELECT `name` FROM `guilds`;") if(query:getID() ~= -1) then repeat if HaveAcess(query:getDataString("name")) then guildname = query:getDataString("name") end until not query:next() query:free() end return guildname end function addAcess(GuildName, days) if days > 0 then local add = days*86400 local time = getDaysAcess(GuildName) == 0 and (os.time() + add) or (getAcessTime(GuildName) + add) return setAcessTime(GuildName, time) end return nil end function doRemoveAcess(GuildName, days) if days > 0 then local remove = days*86400 local time = getAcessTime(GuildName) - remove return setAcessTime(GuildName, (time <= 0 and 1 or time)) end return nil end function getAcessDate(GuildName) if HaveAcess(GuildName) then return os.date("%d/%m/%y %X", getAcessTime(GuildName)) end return FALSE end function getHonorPoints(cid) local Honor = getPlayerStorageValue(cid, frag_guild.Honor_Storage) return Honor < 0 and 0 or Honor end function addHonorPoints(GuildName, amount) local PlayersGuild = db.getResult("SELECT `name` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. getGuildId(GuildName) .. ");") if (PlayersGuild:getID() ~= -1) then repeat local pid,Guid = getPlayerByNameWildcard(PlayersGuild:getDataString("name")),getPlayerGUIDByName(PlayersGuild:getDataString("name")) if(not pid or isPlayerGhost(pid)) then local getHonor = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = ".. Guid .." AND `key` = ".. frag_guild.Honor_Storage) if (getHonor:getID() ~= -1) then repeat db.executeQuery("UPDATE `player_storage` SET `value` = ".. (getHonor:getDataInt("value")+amount) .." WHERE `player_id` = ".. Guid .." AND `key` = ".. frag_guild.Honor_Storage) until not(getHonor:next()) getHonor:free() end else setPlayerStorageValue(getPlayerByName(PlayersGuild:getDataString("name")), frag_guild.Honor_Storage, getHonorPoints(getPlayerByName(PlayersGuild:getDataString("name")))+amount) end until not PlayersGuild:next() PlayersGuild:free() end return true end ]]></config> <talkaction words="!guildfrags;/guildfrags;!myhonor;/myhonor" event="buffer"><![CDATA[ domodlib('guild_func') if words == "!myhonor" or words == "/myhonor" then return doPlayerPopupFYI(cid,"Honor Points can be exchanged for special items in npc\nAnd each domain, every guild players receive "..frag_guild.Honor_Point.." Honor Points!\n\n\nMy Honor Points: "..getHonorPoints(cid)) elseif words == "!guildfrags" or words == "/guildfrags" then if param == "rank" then local max_guild,str = 10,"" str = "--[ Rank Guild Frags ]--\n\n" query = db.getResult("SELECT `name`, `frags` FROM `guilds` WHERE `frags` ORDER BY `frags` DESC, `name` ASC;") if (query:getID() ~= -1) then k = 1 while true do str = str .. "\n " .. k .. ". " .. query:getDataString("name") .. " - [" .. query:getDataInt("frags") .. "]" k = k + 1 if not(query:next()) or k > max_guild then break end end query:free()end if str ~= "" then doPlayerPopupFYI(cid, str) end return true end doPlayerPopupFYI(cid,"".. (getGuildWinnerName() == "" and "The server does not have any dominant guild\n\nTo show the rank of frags enter !guildfrags rank" or "Currently guild dominant is ["..getGuildWinnerName().."]\n\nYour domain ends in "..getAcessDate(getGuildWinnerName()).."") .."") end return true ]]></talkaction> <event type="login" name="FragsGuildLogin" event="script"><![CDATA[ domodlib('guild_func') function onLogin(cid) registerCreatureEvent(cid, "FragsGuildLogin") registerCreatureEvent(cid, "FragsGuildKill") if getPlayerStorageValue(cid,frag_guild.Honor_Storage) == -1 then setPlayerStorageValue(cid, frag_guild.Honor_Storage, 0) end local MyGuild,StorCheck = getPlayerGuildName(cid),17595 if HaveGuild(cid) then if HaveAcess(MyGuild) then setPlayerStorageValue(cid, StorCheck, 1) if frag_guild.MoreExpToGuild == true then doPlayerSetExperienceRate(cid, frag_guild.Exp_Rate) end elseif getPlayerStorageValue(cid, StorCheck) == 1 and not HaveAcess(MyGuild) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid, "[Guild Frag System]\nThe domain of your guild is over and you've been teleported to the temple.") setPlayerStorageValue(cid, StorCheck, -1) end end return TRUE end ]]></event> <action actionid="84005" event="script"><![CDATA[ domodlib('guild_func') function onUse(cid, item, frompos, item2, topos) local MyGuild = getPlayerGuildName(cid) if not HaveGuild(cid) then return doPlayerSendTextMessage(cid,22,"Sorry, you're not in a guild.") elseif not HaveAcess(MyGuild) then return doPlayerSendTextMessage(cid,22,"Your guild no has access to this area.") end doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, topos, TRUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Welcome,The access of your guild in this area ends in "..getAcessDate(getGuildWinnerName())) return true end]]></action> <event type="kill" name="FragsGuildKill" event="script"><![CDATA[ domodlib('guild_func') function onKill(cid, target, lastHit) config = { MaxDifLevel = 50, MyGuild = getPlayerGuildName(cid) } if isPlayer(cid) and isPlayer(target) and HaveGuild(cid) and HaveGuild(target) and getPlayerGuildId(cid) ~= getPlayerGuildId(target) and getPlayerIp(target) ~= getPlayerIp(cid) and math.abs(getPlayerLevel(cid) - getPlayerLevel(target)) <= config.MaxDifLevel then addFragsByGuild(config.MyGuild,frag_guild.FragsPerKill) doBroadCastGuild(config.MyGuild,20,'[Guild Frag System] Your guild received '..frag_guild.FragsPerKill..' frag because have killed a player another guild, now your guild have '..getFragsByGuild(config.MyGuild)..' frags') if getFragsByGuild(config.MyGuild) >= frag_guild.FragsToWinAcess and getGuildWinnerName() == "" then addAcess(config.MyGuild, frag_guild.AcessTimeDays) addHonorPoints(config.MyGuild, frag_guild.Honor_Point) doBroadcastMessage("[Guild Frag System]\nThe guild ["..config.MyGuild.."] is dominant for having achieved "..frag_guild.FragsToWinAcess.." Frags!\nYour domain ends in "..getAcessDate(config.MyGuild)) setGlobalStorageValue(frag_guild.start_frags, 1) if frag_guild.MoreExpToGuild == true then local players = {} for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildName(cid) == config.MyGuild then table.insert(players, cid) end end for i = 1, #players do doPlayerSetExperienceRate(players[i], frag_guild.Exp_Rate) end end end end return TRUE end]]></event> <globalevent name="GuildFrags" interval="1800" event="script"><![CDATA[ domodlib('guild_func') function onThink(interval, lastExecution) return doBroadcastMessage("".. (getGuildWinnerName() == "" and "[Guild Frag System]\nThe first guild to reach "..frag_guild.FragsToWinAcess.." frags will gain "..frag_guild.AcessTimeDays.." days of access to exclusive areas, for more information enter !guildfrags" or "[Guild Frag System]\nCurrently guild dominant is ["..getGuildWinnerName().."] and your domain ends in "..getAcessDate(getGuildWinnerName()).."") .."", 22) end]]></globalevent> <globalevent name="RemoveFrag" time="18:38" event="script"><![CDATA[ function onTimer() days = {"Wednesday","Saturday"} if isInArray(days, os.date("%A")) then doBroadcastMessage("[Guild Frag System] Clean frags!") cleanGuildFrags() end return true end]]></globalevent> </mod> nessa parte veja bem <globalevent name="RemoveFrag" time="18:38" event="script"><![CDATA[ function onTimer() days = {"Wednesday","Saturday"} if isInArray(days, os.date("%A")) then doBroadcastMessage("[Guild Frag System] Clean frags!") cleanGuildFrags() end return true end]]></globalevent> na tag : time="18:38" -- é a hr que vai executar na tabela ali do script tem days = {"Wednesday","Saturday"} são os dias que vão executar o script
  9. IUSHiushiuHSIUSHiuSIUHsiusHIUshui velho em nem sei onde é as mensagens do status quase nunca olho aquilo lá '-' reportado para moverem
  10. nofirefield.lua function onAddItem(moveitem, tileitem, position, cid) blockids = {1496, 1492, 1497,1499, 1497, 1498, 1499, 1505, 1506, 1507, 1508, 7465, 7466, 7467, 7468, 7469, 7470, 7471, 7472, 7473} if(isInArray(blockids, moveitem.itemid)) then doRemoveItem(moveitem.uid,1) end return TRUE end movements.xml <movevent type="AddItem" tileitem="1" actionid="26400" event="script" value="nofirefield.lua"/>
  11. hmm certamente, acho que você poderia colocar algum script com que faça que não seja possível colocar nenhum "fire field" ou "magic wall" em cima desses tiles '-'
  12. function getItemsInPos(items, pos) -- function by vodka for i = 1,#items do local stack = getTileItemById(pos, items[i][1]) if stack.uid > 0 and math.max(1, stack.type) >= items[i][2] then if i == #items then check = true end else check = false end end return check end function doRemoveItensInPos(items, pos) -- function by vodka local items = type(items) == "table" and items or {items} for i = 1, table.maxn(items) do doRemoveItem(getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=1}).uid) end return nil end local t = { {items = {{5904,10}} , pos = {x=1718, y=989, z=7}}, {items = {{2195,1}} , pos = {x=1720, y=989, z=7}} } topos = {x=160, y=54, z=7} function onUse(cid, item, fromPosition, itemEx, toPosition) for _, k in ipairs(t) do if not getItemsInPos(k.items, k.pos) then doPlayerSendCancel(cid, 'Está faltando items na mesa.') return true end end for _, v in ipairs(t) do doRemoveItensInPos(v.items, v.pos) end doTeleportThing(cid, topos) doSendMagicEffect(topos, CONST_ME_TELEPORT) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end sobre não teleportar é pq vc esqueceu de mudar a pos para onde o jogador vai muda aqui: topos = {x=160, y=54, z=7}
  13. deixa eu ver como ficou o seu script se puder posta uma imagem do lugar tbm vlw
  14. saiu nova versão confere ai http://otland.net/f83/grizzly-adams-killing-name-quest-all-tasks-more-real-tibia-159150/#post1531704
  15. não não, tranquilo então bro, chegando em casa eu altero o sistema pra vc e te mando sem problema, vou editar nesse msm post! vlw
  16. 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.
  17. function getItemsInPos(items, pos) -- function by vodka local items = type(items) == "table" and items or {items} local check = true local t = {} for i = 1,#items do t[i] = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=i}).itemid if not table.find(items, t[i]) then check = false break end end if check then return true end return nil end function doRemoveItensInPos(items, pos) -- function by vodka local items = type(items) == "table" and items or {items} for i = 1, table.maxn(items) do doRemoveItem(getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=1}).uid) end return nil end local t = { {items = {2175, 2376} , pos = {x=185, y=57, z=7}}, {items = {5919} , pos = {x=188, y=57, z=7}} } topos = {x=160, y=54, z=7} function onUse(cid, item, fromPosition, itemEx, toPosition) for _, k in ipairs(t) do if not getItemsInPos(k.items, k.pos) then doPlayerSendCancel(cid, 'Está faltando items na mesa.') return true end end for _, v in ipairs(t) do doRemoveItensInPos(v.items, v.pos) end doTeleportThing(cid, topos) doSendMagicEffect(topos, CONST_ME_TELEPORT) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
  18. sem problema reportado para mover
  19. é para dar continuidade ao script, bloco = "o que vai acontecer se ele tiver a cap necessária"
  20. Vodkart

    Editando Runas

    se eu não me engano é em vocations.xml que aumenta o atackspeed
  21. O seu está bom também, eu só adicionei o meu porque eu já tinha feito um pedido igual a esse... vlw
  22. function onLogin(cid) -- voc e outfit local x = { [1] = 50, -- sorc [2] = 60, -- druid [3] = 70, -- paladin [4] = 80, -- kina [5] = 90, -- master sorc [6] = 100, -- elder druid [7] = 200, -- royal paladin [8] = 195 -- elite kina } if (not x[getPlayerVocation(cid)]) then return true end doSetCreatureOutfit(cid, {lookType = x[getPlayerVocation(cid)]}, -1) return TRUE end
  23. Vodkart

    Script De Vocação

    usa a função "doRemoveCreature(cid)" vai fazer com que kick o player @edited nem vi que ja tinham respondido desculpem
  24. faz a conta meu chapa local form = getItemWeightById(index) * n if getPlayerFreeCap(cid) >= form then bloco end
  25. os sonhos n determinam o lugar onde vc vai chegar, só a força necessária para tirar do lugar onde está
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...