
Tudo que Vodkart postou
-
(Resolvido)ajuda com enchanting
e se o item estiver no chão? vai procurar o item nessa criatura ID (cid) e não vai encontrar, ai da esse erro no LOG no distro...
-
(Resolvido)ajuda com enchanting
function onUse(cid, item, frompos, item2, topos) local gems = {2146, 2147, 2149, 2150} local egems = {7759, 7760, 7761, 7762} local altars = {{7508, 7509, 7510, 7511}, {7504, 7505, 7506, 7507}, {7516, 7517, 7518, 7519}, {7512, 7513, 7514, 7515}} local weapons = {7406, 2454, 7415, 8905, 2342, 2138, 10221, 10218, 10220, 10219, 8908, 8906, 8907, 8909, 7766, 7747, 7857, 7872, 7772, 7753, 7863, 7878, 7775, 7756, 7866, 7881, 7364, 7839, 7840, 7850, 7838} local eweapons = {{7766, 7747, 7857, 7872}, {7772, 7753, 7863, 7878}, {7775, 7756, 7866, 7881}, {8907, 8906, 8909, 8908}, {2343, 2343, 2343, 2343}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {10220, 10218, 10219, 10221}, {8907, 8906, 8909, 8908}, {8907, 8906, 8909, 8908}, {8907, 8906, 8909, 8908}, {8907, 8906, 8909, 8908}, {7766, 7747, 7857, 7872}, {7766, 7747, 7857, 7872}, {7766, 7747, 7857, 7872}, {7766, 7747, 7857, 7872}, {7772, 7753, 7863, 7878}, {7772, 7753, 7863, 7878}, {7772, 7753, 7863, 7878}, {7772, 7753, 7863, 7878}, {7775, 7756, 7866, 7881}, {7775, 7756, 7866, 7881}, {7775, 7756, 7866, 7881}, {7775, 7756, 7866, 7881}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}, {7839, 7840, 7850, 7838}} local type = item.type if type == 0 then type = 1 end local mana = 3000 * type local soul = 40 * type if isInArray(gems, item.itemid) == TRUE then for aa=1, #gems do if item.itemid == gems[aa] then a=aa end end if isInArray(altars[a], item2.itemid)== TRUE then if getPlayerMana(cid) >= mana and getPlayerSoul(cid) >= soul then doTransformItem(item.uid, egems[a]) doPlayerAddMana(cid,-mana) doPlayerAddSoul(cid,-soul) doSendMagicEffect(frompos,39) else doPlayerSendCancel(cid,"You dont have mana or soul points.") end end elseif isInArray(egems, item.itemid)== TRUE then for bb=1, #egems do if item.itemid == egems[bb] then b=bb end end if isInArray(weapons, item2.itemid)== TRUE then for cc=1, #weapons do if item2.itemid == weapons[cc] then c=cc end end doRemoveItem(item.uid, 1) doRemoveItem(item2.uid) doPlayerAddItem(cid, eweapons[c][b], 1) doSendMagicEffect(frompos,39) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"You can't enchanted this.") end end return true end
-
Script Invasion Não Funciona
Exatamente, o certo era refazer esse código, não tive tempo de olhar muito ele, só por cima! Se eu tiver um tempo refaço esse código.
-
(Resolvido)comprar outfit por alavanca com points
local lever = { [5550] = {type = "items", amount = 5, id = 2379}, [5551] = {type = "items", amount = 5, id = 7901}, [5552] = {type = "items", amount = 5, id = 2492}, [5553] = {type = "items", amount = 5, id = 2469}, [5554] = {type = "items", amount = 5, id = 2510}, [5555] = {type = "items", amount = 5, id = 2514}, [5556] = {type = "items", amount = 5, id = 2003}, [5557] = {type = "items", amount = 5, id = 2480}, [5558] = {type = "items", amount = 5, id = 2387}, [5559] = {type = "outfit", amount = 5, name="Deadpool", sex = {[0] = 221, [1] = 221}, addon = 3, storage = 785481} } local storage,exausted = 98762,10 local stackable = {8303,8310} -- coloque o ID aqui dos que só vem 1 function onUse(cid,item,fromPosition,itemEx,toPosition) local ret = lever[item.actionid] if getPoints(cid) < ret.amount then doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Você precisa de "..ret.amount.." points.") return true elseif getPlayerStorageValue(cid, storage) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") return true end if ret.type == "items" then doPlayerAddItem(cid, ret.id, isItemStackable(ret.id) and isInArray(stackable, ret.id) and 1 or 100) doPlayerSendTextMessage(cid,22,"Você comprou um " .. getItemNameById(ret.id)) elseif ret.type == "outfit" then if getPlayerStorageValue(cid, ret.storage) > 0 then doPlayerSendCancel(cid, "voce ja comprou essa outfit.") return true end setPlayerStorageValue(cid, ret.storage, 1) doPlayerSendTextMessage(cid,22,"Você recebeu uma outfit: " .. ret.name) doPlayerAddOutfit(cid, ret.sex[getPlayerSex(cid)], ret.addon) end removePoints(cid, ret.amount) setPlayerStorageValue(cid, storage, os.time()+exausted) doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) return true end agora poderá outras outfits quando quiser.
-
(Resolvido)Ganhar o item do baú apenas se tiver X quantia, do Item X na Bag.
local items = {{2173,1},{2494,1},{2148,15}} local itemRequired, amountRequired = 2160, 30 -- ID do item necessário para pegar o baú e a quantidade. local storage, days = 897458, 30 function onUse(cid, item, frompos, item2, topos) if getPlayerItemCount(cid, itemRequired, amountRequired) <= 0 then doPlayerSendCancel(cid, "Você não possui "..amountRequired.."x "..getItemInfo(itemRequired).name.." volte mais tarde.") return true elseif getPlayerStorageValue(cid, storage) >= os.time() then doPlayerSendCancel(cid, "voce ja pegou seus itens dentro de 30 dias, aguarde.") return true end local bag = doPlayerAddItem(cid, 1988, 1) for i = 1, table.maxn(items) do local item_id, amount = items[i][1], items[i][2] if isItemStackable(item_id) or amount == 1 then doAddContainerItem(bag, item_id, amount) else for i = 1, amount do doAddContainerItem(bag, 1) end end end setPlayerStorageValue(cid, storage, os.time() + days * 24 * 60 * 60) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You have found a backpack.") return true end
-
Script Invasion Não Funciona
local configInv = { ["20:29"] = { nombre = "TEST", posiciones = { from = { x = 130, y = 190, z = 7 }, to = { x = 137, y = 195, z = 7 } }, monstruos = { "1 Ventinho", "1 Dragon" } } } local noPvpDelay = 5 local monsterRewardId = 0 local function executeInvasion(config) doBroadcastMessage(config.nombre .. " inicio.") for index, info in pairs(config.monstruos) do local nombreMonstruo = info:match("%s(.+)") local monstruoCantidad = tonumber(info:match("(%d+)")) local summon = doSummonCreature(nombreMonstruo, { x = math.random(config.posiciones.from.x, config.posiciones.to.x), y = math.random(config.posiciones.from.y, config.posiciones.to.y), z = math.random(config.posiciones.from.z, config.posiciones.to.z) }) if monsterRewardId == 0 and (math.random(100) >= 50 or index == #config.monstruos) then monsterRewardId = summon end end end function onThink(interval, lastExecution) local invasion = configInv[tostring(os.date("%X")):sub(1, 5)] if invasion then setWorldType(WORLD_TYPE_NO_PVP) doBroadcastMessage(invasion.nombre) addEvent(executeInvasion, 1000 * 10 * 1, invasion) addEvent(setWorldType, 1000 * 60 * noPvpDelay, WORLD_TYPE_PVP) end return true end
-
Script Invasion Não Funciona
é as positions, quando for pos e topos é sempre do MENOR para o MAIOR posiciones = { from = { x = 67, y = 198, z = 7 }, to = { x = 123, y = 155, z = 7 } }, para posiciones = { from = { x = 67, y = 155, z = 7 }, to = { x = 123, y = 198, z = 7 } },
-
npc que pode ser protegido de ser morto
NPC não podem perder vida... O que dá para fazer é igual no poketibia, que é criado um "monstro clonado" do npc e ai colocar esse monstro para andar em um caminho pré-determinado e fazendo com que os target dos mobs foquem nesse npc("monstro clonado")...
-
(Resolvido)Script Teleport Por Tempo
local quests = { ["vipquest"] = { min_level = 500, enter_pos = {x = 1285, y = 191, z = 7}, area = {fromPos = {x = 1263, y = 245, z = 7}, toPos = {x = 1525, y = 143, z = 7}}, time_to_finish = {15, "min"}, time_to_make_again = {15, "min"} -- }, -- ["dragon"] = { -- min_level = 10, -- enter_pos = {x = 1, y = 1, z = 1}, -- area = {fromPos = {x = 1, y = 1, z = 1}, toPos = {x = 1, y = 1, z = 1}}, -- time_to_finish = {10, "min"}, -- time_to_make_again = {1, "hour"} } } local time_storage = 87871 -- só modifique se necessário function onSay(cid, words, param, channel) local param, p, check = param:lower(), getPlayerPosition(cid), false local npos = {x = 200, y = 200, z = 7} if not param or param == "" then local str, n = '~~ [Available Quests] ~~\n\n', 1 for quest, info in pairs(quests) do str = str .. n .. " - " .. Fupper(quest) .. " (Level: "..info.min_level..")\n" n = n + 1 end doShowTextDialog(cid, 1955, str) return true end local t = quests[param] if p.x ~= npos.x or p.y ~= npos.y or p.z ~= npos.z then return doPlayerSendCancel(cid, "position errada: voce precisa estar dentro da quest para usar este comando.") end if not t then return doPlayerSendCancel(cid, "Quest not found.") end if getPlayerLevel(cid) < t.min_level then return doPlayerSendCancel(cid, "Only players level "..t.min_level.." or higher can go the "..param.." quest.") end if isInRange(p, t.area.fromPos, t.area.toPos) then return doPlayerSendCancel(cid, "You are already inside the "..param.." quest area.") end for quest, info in pairs(quests) do if isInRange(p, info.area.fromPos, info.area.toPos) then check = true end end if check then return doPlayerSendCancel(cid, "You cannot go to another quest inside a quest.") end local stor = getPlayerStorageValue(cid, time_storage) if stor > os.time() then return doPlayerSendCancel(cid, "Voce so podera entrar novamente na quest "..os.date("%d %B %Y %X", stor)..".") end doSendMagicEffect(p, CONST_ME_POFF) local destination = t.enter_pos doTeleportThing(cid, destination) doSendMagicEffect(destination, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Good luck in "..param.." quest! You have "..getStrTime(t.time_to_finish).." to finish or you will be kicked.") setPlayerStorageValue(cid, time_storage, mathtime(t.time_to_make_again) + os.time()) addEvent(function() if isPlayer(cid) then if isInRange(getPlayerPosition(cid), t.area.fromPos, t.area.toPos) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) local temple = getTownTemplePosition(getPlayerTown(cid)) doTeleportThing(cid, temple) doSendMagicEffect(temple, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Your time is over!") end end end, mathtime(t.time_to_finish) * 1000) return true end function mathtime(table) -- by dwarfer local unit = {"sec", "min", "hour", "day"} for i, v in pairs(unit) do if v == table[2] then return table[1]*(60^(v == unit[4] and 2 or i-1))*(v == unit[4] and 24 or 1) end end return error("Bad declaration in mathtime function.") end function getStrTime(table) -- by dwarfer local unit = {["sec"] = "second",["min"] = "minute",["hour"] = "hour",["day"] = "day"} return tostring(table[1].." "..unit[table[2]]..(table[1] > 1 and "s" or "")) end function Fupper(str) return (str:gsub("^%l", string.upper)) end
-
(Resolvido)Script Teleport Por Tempo
mas é somente em 1 position? ou pode ser dentro de uma área com from/to position?
-
ajuste check bless
mas ele está sem bless mesmo... o código de check bless ta certinho... no item altera essa parte: for a = 1, 5 do doPlayerAddBlessing(cid, i) end para for i = 1, 5 do doPlayerAddBlessing(cid, i) end
-
[8.6] Task System 4.0! (Task system + Daily Task System)
Já finalizei, porém falta testar e eu tive novas ideias em relação ao sistema de task que quero implementar, vai deixar de ser "simple task" e está bem completa, até com uma coluna na db própria.
-
(Resolvido)[RESOLVIDO]TAGS ERRO AO RELOGAR Efeito System Promotion Aura coloridas. text random {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}
local tab = { [9] = 35, -- [vocationID] = número da cor do texto animado [10] = 66, [11] = 180, [12] = 210 } function ariseText(cid) local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."}; if not isCreature(cid) or not tab[getPlayerVocation(cid)] then return LUA_ERROR end doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) addEvent(ariseText, 600, cid) end function onLogin(cid) if tab[getPlayerVocation(cid)] then ariseText(cid) end return true end
-
(Resolvido)Ajuda simples de sistema de PET
CREATURESCRIPT mortepet.lua function isPetMonster(cid) return getCreatureMaster(cid) == 0 and false or isPlayer(getCreatureMaster(cid)) end function onDeath(cid, corpse, deathList) if not isPetMonster(cid) then return true end local waittime = 60 -- Tempo de exhaustion em segundos local strtime = 6660666 -- Storage, nunca usar a mesma em outra Script do mesmo tipo. Ex: mesmo creaturescript, mesmo action e etc... local master = getCreatureMaster(cid) doPlayerSendTextMessage(master, MESSAGE_EVENT_ADVANCE, "Your pet is dead.") exhaustion.set(master, strtime, waittime) return true end TAG <event type="death" name="MortePet" event="script" value="mortepet.lua"/> No arquivo XML dos monstros que serão pets: <script> <event name="MortePet"/> </script>
-
(Resolvido)Ajuda simples de sistema de PET
tem que criar um evento de onDeath no pet, registrar no xml do monstro(pet) e ao morrer identificar de quem é o pet e ai sim dar o tempo de espera para o dono...
-
(Resolvido)barqueiro com destino aleatorio
Data/NPC Barqueiro John.xml <?xml version="1.0"?> <npc name="Barqueiro John" script="data/npc/scripts/johnb.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. You can {travel} with me!"/> </parameters> </npc> Data/Npc/script johnb.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 AddRandomTravel(cid, message, keywords, parameters, node) -- by vodka if(not npcHandler:isFocused(cid)) then return false end if (isPlayerPremiumCallback == nil or isPlayerPremiumCallback(cid) == true or parameters.premium == false) then if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then npcHandler:say('You must reach level ' .. parameters.level .. ' to travel.', cid) elseif not doPlayerRemoveMoney(cid, parameters.cost) then npcHandler:say('Sorry You need '..parameters.cost..' gps to travel!', cid) else local random = {x=1746, y=1218, z=6} local chance = 10 -- 10% de cair nessa ilha if chance <= math.random(1,100) then npcHandler:say('tchau, boa viagem!', cid) doTeleportThing(cid, parameters.destination) else npcHandler:say('parece que se perdemos por conta dos ventos, nao sei onde estamos!', cid) doTeleportThing(cid, random) end doSendMagicEffect(getPlayerPosition(cid), 10) npcHandler:resetNpc() end else npcHandler:say('I can only allow premium players to travel.', cid) end npcHandler:resetNpc() return true end local citys = { {"baiak city", cost = 10000, destination = {x=119, y=51, z=6}, level = 2, premium = true}, {"jugle sland", cost = 10000, destination = {x=143, y=170, z=6}, level = 2, premium = true}, {"frozen sland", cost = 10000, destination = {x=307, y=136, z=6}, level = 2, premium = true}, {"dwarven city", cost = 10000, destination = {x=235, y=512, z=6}, level = 2, premium = true}, {"aslan city", cost = 10000, destination = {x=994, y=1029, z=6}, level = 2, premium = true}, {"travel", text = "Eu posso te levar para {baiak city}, {jugle sland}, {frozen sland}, {dwarven city} e {aslan city} por um pequeno custo!"} } for i = 1, #citys do local get = citys[i] if get.cost ~= nil and get.cost > 0 then local node = keywordHandler:addKeyword({get[1]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Voce quer viajar para " .. get[1] .. " por "..get.cost.." gps?"}) node:addChildKeyword({"yes"}, AddRandomTravel, {cost = get.cost, destination = get.destination, level = get.level, premium = get.premium}) node:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Ok, then.", reset = true}) else keywordHandler:addKeyword({get[1]}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = get.text}) end end citys = nil npcHandler:addModule(FocusModule:new())
-
Alguem pode me da um suport e me dizer oque esta acontecendo pf
-- CONFIGURAÇÕES porcentagem = 1000 -- chance de curar em cada volta da Aura, em porcentagem quantheal = 20 -- porcentagem do hp máximo que cada cura irá curar. (No caso, irá curar 10% do hp máximo cada cura) tempo = 1180 -- tempo para dar uma volta no player (este tempo foi o que achei mais agradável visualmente, é recomendável não mudar) local tab = { [1] = 215 } function ariseText(cid) if not isCreature(cid) or not tab[getPlayerVocation(cid)] or getPlayerStorageValue(cid, aurastr) ~= 2 then return LUA_ERROR end local texts = {"´ . ,", ". ´ ,", "` . ,", ", ´ ."} doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], tab[getPlayerVocation(cid)]) addEvent(ariseText, 1000, cid) return true end -- Função que chama a Aura function efeitosAura(i,tm,cid) if not isCreature(cid) then return LUA_ERROR end local atual = getCreaturePosition(cid) local posAura = { {x=(atual.x)-1, y=(atual.y)-1, z=atual.z}, {x=atual.x, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=atual.y, z=atual.z}, {x=(atual.x)+1, y=(atual.y)+1, z=atual.z}, {x=atual.x, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=atual.y, z=atual.z}, } local chances = math.random(100) if(chances<=porcentagem/8 and getCreatureMana(cid)<getCreatureMaxMana(cid)) then doCreatureAddMana(cid, getCreatureMaxHealth(cid)/quantheal) end if(chances<=porcentagem/8 and getCreatureHealth(cid)<getCreatureMaxHealth(cid)) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)/quantheal) if(i<=8 and i>1) then end end if(i<=8) then i = i+1 tm = tempo/8 return addEvent(efeitosAura,tm,i,tm,cid) else return efeitosAura(1,0,cid) end end function onUse(cid, item, fromPosition, itemEx, toPosition) doRemoveItem(item.uid,1) if(getPlayerStorageValue(cid, aurastr)==2) then setPlayerStorageValue(cid, estr, os.time()+2) setPlayerStorageValue(cid, aurastr, -1) else setPlayerStorageValue(cid, aurastr, 2) efeitosAura(1,tempo/8,cid) ariseText(cid) end return true end
-
Alguem pode me da um suport e me dizer oque esta acontecendo pf
Coloca o código no tópico... Obrigado!
-
[8.6] Task System 4.0! (Task system + Daily Task System)
Versão 5.0 em progresso: Versão por uma coluna na db própria para a task; Kills em party(grupo) começam a contar se tiver perto do Leader! Função configurável: Task automática de entrar em task ao passar de level Função configurável: Pegar quantas task quiser Função configurável: Salvar a quantidade de monstro mortos task ao sair da task e ir para outra; E mais... Dê sua opinião para melhorar a task, ela é sempre bem vinda!
-
[OTX] New Auto Loot Unlimited Edition 2.0
então vou adicionar a versão por db no tópico e te aviso!
-
[OTX] New Auto Loot Unlimited Edition 2.0
@Bruno Rezende Esse erro diz que não está achando o diretório, você criou a pasta e tudo?
-
Problema Task System 4.0 - Vodkart
arquivo txt não pesa nada, não chega a 1kb por pessoa, se fosse assim o logs que fica salvo tudo nem daria para fazer... mas é bom ter mais que 2 versões, eu vou colocar a versão por db e a versão por txt...
-
[OTX] New Auto Loot Unlimited Edition 2.0
daria sim, inclusive já fiz um sistema test de autoloot por db... Mas qual é o erro esporádico?
-
[OTX] New Auto Loot Unlimited Edition 2.0
Mas pq? não está funcionando?
-
Alavanca Que Cria items.
KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK é que esse código eu já tinha no tk, só copiei e colei mas é vdd, melhor ensinar do que entregar pronto, pq quando ele precisar de algum código ele já se vira e até mesmo ajuda a comunidade, perdão, gostoso!