Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) function getDamage(cid, level, magic) return -(level * 5 + magic * 12), -(level * 5 + magic * 12 + 55) end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getDamage") function onCastSpell(cid, var) local target = getCreatureTarget(cid) if target <= 1 then doPlayerSendCancel(cid, "You need a target.") return false end if not isSightClear(getThingPos(cid), getThingPos(target), false) then doPlayerSendCancel(cid, "You can't reach that place.") return false end local targetPos = getThingPos(target) local directions = {0, 1, 2, 3, 4, 5, 6, 7} local teleportPos = {} for _ = 1, #directions do local random = math.random(#directions) local dir = directions[random] table.remove(directions, random) local newPos = getPosByDir(targetPos, dir) if doTileQueryAdd(cid, newPos, 0, false) == 1 then teleportPos = newPos break end end if teleportPos.x and doTileQueryAdd(cid, teleportPos, 0, false) == 1 then doCombat(cid, combat, var) doSendMagicEffect(targetPos, x) -- effect doSendMagicEffect(targetPos, xx) -- effect doTeleportThing(cid, teleportPos, false) return true end doPlayerSendCancel(cid, "You cannot teleport there.") return false end
  2. function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doRemoveConditions(cid, false) return false end return true end
  3. Vodkart postou uma resposta no tópico em iBot
    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.
  4. Vodkart postou uma resposta no tópico em WindBot
    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.
  5. DELETE FROM player_items WHERE itemtype NOT IN ('2494', '2495', '2646'); ali vc coloca o id dos itens
  6. DISCORD: vodkart#6090
  7. https://tibiaking.com/forums/topic/2231-action-alavanca-de-pontes-que-desaparecem/
  8. a minha versão n removia o jogador kk enfim sobre o outro topico eu prefiro auxiliar por discord, tens?
  9. só vai servir pra dar item? ao "capturar" vai remover o monstro(target) e se capturar ele vai te dar tal item e a rede sumir?
  10. os dois são as mesmas coisas...
  11. troca local from, to = {x = 1068, y = 916, z = 7}, {x = 1062, y = 924, z = 7} por local from, to = {x = 1062, y = 916, z = 7}, {x = 1068, y = 924, z = 7} começa do MENOR pro MAIOR
  12. o scan do one drive já é válido e o vital é um membro conhecido desde o xtibia, grande amigo. se quiser aprovar @Sttorm pode aprovar
  13. blz, mas quando faz a quest certo, ele ganha a storage e muda outfit... troca a voc tbm? se nao vms usar uma terceira storage p/ todas as sagas ficar na descrição ?
  14. local money = 2160 local quantmoney = 100 local sto = 13456 local time = 10 local pos = {x= 32632, y= 32476, z= 7} function onUse(player, item, fromPosition, target, toPosition, isHotkey, param, cid) if player:getStorageValue(sto) > os.time() then player:sendCancelMessage("You need to wait "..player:getStorageValue(sto) - os.time().." seconds to use this lever again.") player:getPosition():sendMagicEffect(3) return true elseif player:getItemCount(money) < quantmoney then player:sendCancelMessage("You dont have "..quantmoney.." pieces of "..getItemName(money)..".") player:getPosition():sendMagicEffect(3) return true end local var = Tile(pos):getItems() if not var then player:sendCancelMessage("You need take the item in correct position.") player:getPosition():sendMagicEffect(3) return true end item:transform(item.itemid == 1945 and 1946 or 1945) var:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "Este item pertence ao jogador "..player:getName()) player:removeItem(money, quantmoney) player:getPosition():sendMagicEffect(30) player:setStorageValue(sto, os.time()+time) return true end
  15. é porque todos tem a storage ?? ou quando troca de saga vc seta a storage pra 0?
  16. ok vou fazer um desse jeito só com uma aba(trade normal)... mas qual é a outra ideia pra mim saber? kk gosto de ideias novas
  17. por isso que te falei que tem um número maximos de digitos no tibia kkk fecha o servidor e executa esse comando com seu god function onSay(cid, param, word) doRemoveCreature(cid) return db.executeQuery("UPDATE `shop_npc` SET `date` = 0, `price` = 0;") end
  18. tem sim, mas no caso do npc ele tbm pode vender moeda vip, acho que vai em others... no seu caso eu posso criar uma "nova aba" de donaters pra vender itens específicos... ou fazer do jeito que vc quer msm e falando nisso, que jeito vc queria?
  19. n tem problema nao, só colocar amigo!!
  20. function onUse(cid, item, frompos, item2, topos) local sagastor = 578744 -- usa essa stor pq ja ta no saga system msm local voc = 60 -- id da vocation que ele vai ser promovido local outfit = 364 doPlayerSetVocation(cid, voc) doCreatureChangeOutfit(cid, {lookType = outfit}) setPlayerStorageValue(cid, sagastor, ":"..outfit..",:"..getPlayerVocation(cid)) doRemoveItem(item.uid) doPlayerSendTextMessage(cid, 22, "Parabens voce virou um Chojuro.") return true end
  21. não vai salvar pq? só setar a storage pra 0... tem script do pergaminho ai
  22. https://pastebin.com/raw/9g3qg6h1
  23. exp potion.xml <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Exp Potion" version="1.0" author="none" contact="none.com" enabled="yes"> <config name="exppotion"><![CDATA[ exp_info = {rate = 1, storage = {354870,354871,354872}, minutes = 2} -- rate 1 eh 50% function convertTime(a) if(type(tonumber(a)) == "number" and a > 0) then if (a <= 3599) then local minute = math.floor(a/60) local second = a - (60 * minute) if(second == 0) then return ((minute)..((minute > 1) and " minutos" or " minuto")) else return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo")) end else local hour = math.floor(a/3600) local minute = math.floor((a - (hour * 3600))/60) local second = (a - (3600 * hour) - (minute * 60)) if (minute == 0 and second > 0) then return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo")) elseif (second == 0 and minute > 0) then return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto")) elseif (second == 0 and minute == 0) then return (hour..((hour > 1) and " horas" or " hora")) end return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo")) end end end ]]></config> <event type="login" name="ExpPotionLogin" event="script"><![CDATA[ domodlib('exppotion') function onLogin(cid) if getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() > 0 then registerCreatureEvent(cid, "ExpPotionThink") local rates = getPlayerRates(cid) doCreatureSay(cid, "voce ainda tem "..convertTime(getPlayerStorageValue(cid, exp_info.storage[1]) - os.time()).." de exp potion", TALKTYPE_ORANGE_1, true, cid) doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]+exp_info.rate) setPlayerStorageValue(cid, exp_info.storage[3], 1) -- registro end return true end]]></event> <event type="think" name="ExpPotionThink" event="script"><![CDATA[ domodlib('exppotion') function onThink(cid, interval) if getPlayerStorageValue(cid, exp_info.storage[3]) > 0 and getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() <= 0 then doCreatureSay(cid, "Sua EXP Potion acabou!", TALKTYPE_ORANGE_1, true, cid) doPlayerSetExperienceRate(cid, getPlayerStorageValue(cid, exp_info.storage[2])) setPlayerStorageValue(cid, exp_info.storage[3], 0) -- registro end return true end]]></event> <talkaction words="!exppotion;/exppotion" event="buffer"><![CDATA[ domodlib('exppotion') return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() <= 0 and "Nenhuma Exp Potion ativa" or "voce tem "..convertTime(getPlayerStorageValue(cid, exp_info.storage[1]) - os.time()).." de exp potion")]]></talkaction> <action itemid="7703" event="script"><![CDATA[ domodlib('exppotion') function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() > 0 then doCreatureSay(cid, "voce ainda tem "..convertTime(getPlayerStorageValue(cid, exp_info.storage[1]) - os.time()).." de exp potion", TALKTYPE_ORANGE_1, true, cid) return true end local rates = getPlayerRates(cid) setPlayerStorageValue(cid, exp_info.storage[2], rates[SKILL__LEVEL]) doCreatureSay(cid, "Exp potion de ["..exp_info.minutes.." min] foi ativado!", TALKTYPE_ORANGE_1, true, cid) setPlayerStorageValue(cid, exp_info.storage[1], os.time()+exp_info.minutes*60) setPlayerStorageValue(cid, exp_info.storage[3], 1) -- registro doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]+exp_info.rate) registerCreatureEvent(cid, "ExpPotionThink") doRemoveItem(item.uid,1) return true end]]></action> </mod> !exppotion ou /exppotion e pode mudar o itemid itemid="7703" vou colocar no pastebin pq o code do forum ta bugando os script: https://pastebin.com/raw/Xnhp2fCB vc quer que a exp acabe qndo morra ou desloge?
  24. esqueci pra setar storage pra 0 local storage, storage1 = 8910,158787 -- storage local position = {x=1541, y=1157, z=7} local voc, effect = 8, 2 function onSay(cid, param, word) if getPlayerVocation(cid) ~= voc then return true end if getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) local pos = getCreaturePosition(cid) setPlayerStorageValue(cid, storage1, ":"..pos.x..",:"..pos.y..",:"..pos.z) doTeleportThing(cid, position) doSendMagicEffect(getCreaturePosition(cid), effect) else local w = tostring(getPlayerStorageValue(cid, storage1)):gsub(':', ''):explode(',') doTeleportThing(cid, {x = w[1], y = w[2], z = w[3]}) doSendMagicEffect(getCreaturePosition(cid), effect) setPlayerStorageValue(cid, storage, 0) end return true end
  25. mas vc esta testando com um char de vocation 8?

Informação Importante

Confirmação de Termo