
Tudo que Vodkart postou
-
(Resolvido)Dota System By Vodkart
Quem conseguir converter o mapa para 8.6 eu agradeço, porque vou atualizar no sistema e criar um tópico também!
-
Guild Points
você já tem a função que adiciona os points na guild? ou pelo menos tem a query que faz isso? se não tiver a função, me mostra a coluna na database que tem essa points de guilds. você usa esse sistema: https://www.xtibia.com/forum/topic/169713-sistema-guild-points/ ?
-
(Resolvido)Drop Random com porcentagem
local monsters = { ["Orc"] = {2494, 2173}, ["Minotaur"] = {2494, 2173} } function onDeath(cid, corpse, deathList) if isMonster(cid) and monsters[getCreatureName(cid)] then local t, r = monsters[getCreatureName(cid)], math.random(1,100) if r >= 1 and r <= 5 then for _, ret in pairs(t) do local item = doCreateItemEx(ret) doAddContainerItemEx(corpse.uid, item) doSendAnimatedText(getThingPos(cid), 'DROP+', math.random(255)) end elseif r > 5 and r <= 50 then local item = doCreateItemEx(t[math.random(#t)]) doAddContainerItemEx(corpse.uid, item) doSendAnimatedText(getThingPos(cid), 'DROP', math.random(255)) end end return true end TAG <event type="death" name="DropItem" event="script" value="nome do seu script.lua"/> o xml do monstro adc: <script> <event name="DropItem"/> </script>
-
(Resolvido)Drop Random com porcentagem
Ta bom, fiquei em dúvida; Se o math.random(1,100) cair de 6 a 50% por exemplo, ou dropa uma axe ou uma sword? isso tbm é randomico? se cair entre 1 e 5 %, vai ganhar a axe e a sword juntas ?
-
Por favor me ajudem a resolver esse erro de Tile.
Diz que não está achando a lib/função! Tente reinstalar o sistema...
-
[8.6] Task System 4.0! (Task system + Daily Task System)
sim
-
(Resolvido)Pedra que aparece ao passar por cima de piso
Está falando sério? porque ela aparece na hora que pisa e desaparece depois de "X" segundos sozinha!
-
(Resolvido)Pedra que aparece ao passar por cima de piso
aqui funcionou, tem que colocar actionID no tile em que vc vai pisar
-
(Resolvido)Pedra que aparece ao passar por cima de piso
editou a pos? e o id da pedra? lembrando que só ativa o script se a pedra não tiver no lugar.
-
(Resolvido)Pedra que aparece ao passar por cima de piso
local gate = {1355, {x = 2825, y = 2332, z = 7, stackpos = 1}} local seconds = 30 function onStepIn(cid, item, frompos, item2, topos) if getTileItemById(gate[2], gate[1]).uid > 0 then return true end doCreateItem(gate[1], 1, gate[2]) addEvent(function() doRemoveItem(getThingfromPos(gate[2]).uid,1) doSendMagicEffect(gate[2], CONST_ME_POFF) end, seconds*1000) return true end
-
[PEDIDO] Weapon Awakening - Arma Despertada
então pode ser feita pelo onStats sim amigo! Script simples de fazer! ?
-
[PEDIDO] Weapon Awakening - Arma Despertada
o que seria 100% o dano base da arma? como que vais calcular o dano base de uma arma que seja wand/rod? no caso se eu hito por exemplo: Solar axe - Hit 100 agora com awakening Solar axe Awakeking - HIT 200 seria isso? se for o caso, daria para fazer pelo onStats.
-
Resolver Bug de POINTS
Para fazer essas alterações teria que refazer todo o sistema, mexer nas querys, no banco de dados, funções etc... sobre bugar a quantidade de points, usa a função assim: function getPoints(cid) local res = db.getResult('select `p_points` from accounts where name = \''..getPlayerAccount(cid)..'\'') return res:getDataInt("p_points") <= 0 and 0 or res:getDataInt("p_points") end
-
(Resolvido)qual a query pra substituir item no sqlite?
tenta executar esse comando function onSay(cid, words, param) if db.executeQuery("UPDATE `player_items` SET `itemtype`= 2522, `count` = 5 WHERE `itemtype` = 11192") then doPlayerSendTextMessage(cid, 27, "Itens trocado com sucesso") end return true end
-
8 anos de Tibia King e muitos updates!
Parabéns a todos!! Deram outra cara ao fórum, ficou muito foda!! Adorei essa novo design e melhorias, continuem assim!!!
-
Como saber se e null
Mas você está tentando retornar um valor no banco de dados de determinada coluna? se sim, poste o script que você tem que eu dou uma olhada, não esqueça de me falar o que você quer!
- [Projeto] Mapping Art - Nature
-
(Resolvido)[Creaturescript] Morrer em uma area e ser teleportado pra um local x (sem perder lvl)
@poko360 function onPrepareDeath(cid, killers) local ret, areas = 0,{ {{x=180,y=50,z=6}, {x=189,y=59,z=6}} -- pos começo e final da area } local frompos = {x= 184, y= 50, z= 6} for _, var in ipairs(areas) do if isInRange(getPlayerPosition(cid), var[1], var[2]) then ret = ret + 1 end end if ret == 0 then return true end doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doRemoveConditions(cid, false) doTeleportThing(cid, frompos) doCreatureSay(cid, "Voce morreu", TALKTYPE_ORANGE_1) return false end
-
(Resolvido)[Creaturescript] Morrer em uma area e ser teleportado pra um local x (sem perder lvl)
Posso ver como está seu script? Manda ele pra eu ver as configurações
-
mathtime, getStrTime
Parabéns por disponibilizar essa funções, são realmente uteis, até acho que vou usar!
-
Remover Battle ao entrar em PZ
Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP. não esqueça de dizer na TAG que "1000" é 1 segundo no servidor que é milesegundos, em outros servidores o correto seria colocar "1"
-
alguem sabe deixar esse creaturescript em tempo real?
Deleta o seu script de LOOK e usa somente o script do creaturescript guildremove.lua function onLogin(cid) registerCreatureEvent(cid, "GuildRemoveThink") return true end function CountGuildMembers(id) -- 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` = " .. id .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() end return count end function onThink(cid, interval) local playerGuild = getPlayerGuildId(cid) if playerGuild > 0 and getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) doPlayerSave(cid) local amount = 0 local total = CountGuildMembers(playerGuild) for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == playerGuild then amount = amount+1 end end doPlayerSetSpecialDescription(cid,"\nThe guild has "..total.." total members, "..amount.." of them online") elseif not playerGuild or playerGuild == 0 and getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) doPlayerSave(cid) doPlayerSetSpecialDescription(cid,"") end return true end Você já tem a TAG ne? testei aqui e funcionou!!
-
alguem sabe deixar esse creaturescript em tempo real?
use os scripts assim: creaturescript guildremove.lua function onLogin(cid) registerCreatureEvent(cid, "GuildRemoveThink") return true end function onThink(cid, interval) local storage = 5752485 if getPlayerGuildId(cid) > 0 and getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) doPlayerSave(cid) elseif getPlayerGuildId(cid) == 0 and getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) doPlayerSave(cid) end return true end TAG <event type="think" name="GuildRemoveThink" event="script" value="guildremove.lua"/> <event type="login" name="GuildRemoveLogin" event="script" value="guildremove.lua"/> E O SCRIPT DO LOOK deixa assim: function CountGuildMembers(id) -- 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` = " .. id .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() end return count end function onLook(cid, thing, position, lookDistance) local storage = 5752485 if isPlayer(thing.uid) then doPlayerSave(thing.uid) if getPlayerStorageValue(thing.uid, storage) > 0 then local guildID,amount = getPlayerGuildId(thing.uid),0 local total = CountGuildMembers(guildID) for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == guildID then amount = amount+1 end end doPlayerSetSpecialDescription(thing.uid,"\nThe guild has "..total.." total members, "..amount.." of them online") end end return true end
-
Help Me
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 0) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -35.1, 1, -23.6, 1) local function onCastSpell1(cid, var) local target = getCreatureTarget(cid) local pos = getCreaturePosition(target) local position = {x= pos.x+3, y= pos.y+0, z= pos.z} --aqui muda as posições do target if isCreature(target) or isMonster(target) then doSendMagicEffect(position, 486) --Aqui é o efeito da spell, tibia normal de 1 a 69 return doCombat(cid, combat1, var) end end function onCastSpell(cid, var) for k = 1, 6 do -- Aqui quantas vezes vai hitar (6) addEvent(function() if isCreature(cid) then addEvent(onCastSpell1, 1, cid, var) end end, 1 + ((k-1) * 200)) end return true end
-
alguem sabe deixar esse creaturescript em tempo real?
function CountGuildMembers(id) -- 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` = " .. id .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() end return count end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then doPlayerSave(thing.uid) if getPlayerGuildId(thing.uid) ~= 0 then local guildID,amount = getPlayerGuildId(thing.uid),0 local total = CountGuildMembers(guildID) for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == guildID then amount = amount+1 end end doPlayerSetSpecialDescription(thing.uid,"\nThe guild has "..total.." total members, "..amount.." of them online") end end return true end