
Tudo que Vodkart postou
-
Simple Task 0.4 não funciona
entendi, você apagou o parâmetro level do mods... vc quer remover o level é isso? @Nother removei o level então... usa desse jeito: domodlib('task_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,msg, str,rst = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, msg:lower(),"","" local task,daily, hours = getTaskMission(cid),getDailyTaskMission(cid), 24 if isInArray({"task","tasks","missao","mission"}, msg) then if task_sys[task] then if getPlayerStorageValue(cid, task_sys[task].start) <= 0 then setPlayerStorageValue(cid, task_sys[task].start, 1) npcHandler:say("[Task System] Parabéns, agora você está participando da Task do "..task_sys[task].name.." e deverá matar "..task_sys[task].count.." desta lista: "..getMonsterFromList(task_sys[task].monsters_list)..". "..(#task_sys[task].items > 0 and "Ah e por favor me traga "..getItemsFromList(task_sys[task].items).." para mim." or "").."" , cid) else npcHandler:say("Desculpe, Mas você atualmente está na task "..task_sys[task].name..". Você pode {entregar} caso já tenha terminado.", cid) end else npcHandler:say("Desculpe, Mas por enquanto não tenho mais nenhuma task para você!", cid) end elseif isInArray({"diaria","daili","daily","dayli","diario"}, msg) then if getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() > 0 then npcHandler:say("Desculpe, você deve esperar até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).." para iniciar uma nova task diaria!", cid) return true elseif daily_task[daily] and getPlayerStorageValue(cid, task_sys_storages[5]) >= daily_task[daily].count then npcHandler:say("Desculpe, você tem task para {entregar} !", cid) return true end local r = doRandomDailyTask(cid) if r == 0 then npcHandler:say("Desculpe, mas você não tem level para completar nenhuma Task diaria.", cid) return true end setPlayerStorageValue(cid, task_sys_storages[4], r) setPlayerStorageValue(cid, task_sys_storages[6], os.time()+hours*3600) setPlayerStorageValue(cid, task_sys_storages[7], 1) setPlayerStorageValue(cid, task_sys_storages[5], 0) local dtask = daily_task[r] npcHandler:say("[Daily Task System] Parabéns, agora você está participando da Task Diaria do "..dtask.name.." e deverá matar "..dtask.count.." monstros desta lista: "..getMonsterFromList(dtask.monsters_list).." até "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6]))..". Boa sorte!" , cid) elseif isInArray({"receber","reward","recompensa","report","reportar","entregar","entrega"}, msg) then local v, k = task_sys[task], daily_task[daily] if v then -- original task if getPlayerStorageValue(cid, v.start) > 0 then if getPlayerStorageValue(cid,task_sys_storages[3]) >= v.count then if #v.items > 0 and not doRemoveItemsFromList(cid, v.items) then npcHandler:say("Desculpe, Mas você também precisa entregar os itens desta lista: "..getItemsFromList(v.items), cid) return true end if v.exp > 0 then doPlayerAddExp(cid, v.exp) str = str.."".. (str == "" and "" or ", ") .." "..v.exp.." de exp" end if v.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+v.points)) str = str.."".. (str == "" and "" or ", ") .." + "..v.points.."task points" end if v.money > 0 then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ", ") ..""..v.money.." gps" end if table.maxn(v.reward) > 0 then GiveRewardsTask(cid, v.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(v.reward) end npcHandler:say("Obrigado pela sua ajuda Recompensas: "..(str == "" and "nenhuma" or ""..str.."").." por ter completado a task do "..v.name, cid) setPlayerStorageValue(cid, task_sys_storages[3], 0) setPlayerStorageValue(cid, task_sys_storages[1], (task+1)) else npcHandler:say("Desculpe, Mas você ainda não terminou a sua task do "..v.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and v.count or -(getPlayerStorageValue(cid,task_sys_storages[3])-v.count)).." Destes monstros terriveis!", cid) end end end if k then -- daily task if getPlayerStorageValue(cid, task_sys_storages[7]) > 0 then if getPlayerStorageValue(cid, task_sys_storages[5]) >= k.count then if k.exp > 0 then doPlayerAddExp(cid, k.exp) rst = rst.."".. (rst == "" and "" or ", ") .." "..k.exp.." de exp" end if k.points > 0 then setPlayerStorageValue(cid, task_sys_storages[2], (getTaskPoints(cid)+k.points)) rst = rst.."".. (rst == "" and "" or ", ") .." + "..k.points.."task points" end if k.money > 0 then doPlayerAddMoney(cid, k.money) rst = rst.."".. (rst == "" and "" or ", ") ..""..k.money.." gps" end if table.maxn(k.reward) > 0 then GiveRewardsTask(cid, k.reward) rst = rst.."".. (rst == "" and "" or ", ") ..""..getItemsFromList(k.reward) end npcHandler:say("Obrigado pela sua ajuda! Recompensas: "..(rst == "" and "nenhuma" or ""..rst.."").." por ter completado a task do "..k.name, cid) setPlayerStorageValue(cid, task_sys_storages[4], 0) setPlayerStorageValue(cid, task_sys_storages[5], 0) setPlayerStorageValue(cid, task_sys_storages[7], 0) else npcHandler:say("Desculpe, Mas você ainda não terminou a sua task diaria do "..k.name..". Preciso que mate mais "..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and k.count or -(getPlayerStorageValue(cid,task_sys_storages[5])-k.count)).." Destes monstros!", cid) end end end elseif msg == "no" 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())
-
Simple Task 0.4 não funciona
@Nother posta o mods que vc editou para eu dar uma olhadinha...
-
Level Minimo
testei aqui e funcionou o meu, inclusive com toda as skills... no TFS 1.3
-
Level Minimo
function onLogin(player) if player:getLevel() < 8 then local skillId = 8 -- level local curSkill = player:getSkillLevel(skillId) local curTries = player:getSkillTries(skillId) local voc = player:getVocation() local nextTries = voc:getRequiredSkillTries(skillId, curSkill + 1) player:addSkillTries(skillId, nextTries - curTries + curTries / nextTries * voc:getRequiredSkillTries(skillId, curSkill + 2)) end return true end
-
Movements ativar piso
é que ele faltou colocar o config.idpiso.. local config = { wall = {id = 6973, pos = {x = 228, y = 76, z = 7}}, idpiso = 406, transidpiso = 405, time = 1 } function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end local ret = getTileItemById(position, config.idpiso).uid if ret == 0 then return true end local var = getTileItemById(config.wall.pos, config.wall.id).uid if var > 0 then doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED) doRemoveItem(var) end doTransformItem(item.uid, config.transidpiso) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.") addEvent(function() local x = getTileItemById(config.wall.pos, config.wall.id).uid if x == 0 then doCreateItem(config.wall.id, 1, config.wall.pos) end doTransformItem(getTileItemById(position, config.transidpiso).uid, config.idpiso) end, config.time*60*1000) return true end
-
Horder Leader System (Definitivo)
verdade a storage global nesse caso é muito importante, caso contrário toda hora iria ficar summonando os monstros, o dele está a cada 10 segundos... quem não quiser usar a global storage pode fazer em forma de chance, por exemplo, 10% de chance de summonar os monstro, ai vai a criterio...
-
pvp enforced por creaturescript
@Sun Verdade, na minha possuiu, muito bem sua colocação sobre o parâmetro "lastHit" sendo assim, só usando onDeath mesmo
-
pvp enforced por creaturescript
nesse caso a verificação da storage tem que ser depois de verificar se o target é um player, se ele for atacar um summon ou monstro, vai tentar pegar a storage do mesmo e dar erro...
-
pvp enforced por creaturescript
pode deixar onKill e registrar no player pelo onlogin, ai vc usa o codigo assim: function onKill(cid, target, lastHit) if lastHit and isPlayer(target) then local calc = getPlayerLevel(cid) <= getPlayerLevel(target) and 500 or 5000 doSendAnimatedText(getPlayerPosition(cid), "5000000", 215) doPlayerAddExperience(cid, (getPlayerExperience(target) / calc)) end return true end
-
Ativar script depois de 5 segundos
é que no código já para a contagem quando alguém chega na área... não parou ai? if #getPlayersInArea(battleroyale.area) > 1 then setPlayerStorageValue(cid, tile_storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Battle Royale Teleport} O teletransporte foi desativado ainda existem pessoas na area.") return true end
-
Ativar script depois de 5 segundos
e o código ja faz isso, não é essa parte: if #getPlayersInArea(battleroyale.area) > 1 then setPlayerStorageValue(cid, tile_storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Battle Royale Teleport} O teletransporte foi desativado ainda existem pessoas na area.") return true end ou a area vc diz perto do player?
-
Ativar script depois de 5 segundos
tile_storage = 876448 function doTeleportWithDelay(cid, pos, delay) -- by vodkart if not isCreature(cid) then return LUA_ERROR end if delay > 0 then if #getPlayersInArea(battleroyale.area) > 1 then setPlayerStorageValue(cid, tile_storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Battle Royale Teleport} O teletransporte foi desativado ainda existem pessoas na area.") return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Battle Royale Teleport} "..delay.." segundos para se teletransportar.") addEvent(doTeleportWithDelay, 1000, cid, pos, delay-1) else doTeleportThing(cid, pos) doSendMagicEffect(getPlayerPosition(cid), 10) local battlewin = 1 local item = doPlayerAddItem(cid, 5805, 1) doItemSetAttribute(item, "description", getCreatureName(cid).." conquistou este trofeu apos vencer uma partida no Battle Royale.") doBroadcastMessage(""..getCreatureName(cid).." Venceu o evento Battle Royale") doPlayerAddItem(cid,12618,1) doPlayerAddItem(cid,2152,30) addTopbattle(cid, battlewin) setPlayerStorageValue(cid, tile_storage, -1) end end function onStepIn(cid, item, position, fromPosition) local pos = {x = 1037, y = 1034, z = 7} local time = 5 -- segundos if #getPlayersInArea(battleroyale.area) > 1 then return true end if getPlayerStorageValue(cid, tile_storage) <= 0 then doTeleportWithDelay(cid, pos, time) setPlayerStorageValue(cid, tile_storage, 1) end return true end
- Limite de players em guild in-game
-
Porque o TK morreu?
Para mim os anos dourados foram de 2012 até 2015!! De qualquer jeito é como você falou, os anos passam, a gente segue a vida, outros hábitos e rotinas, estudo e trabalho, as metas e sonhos mudam!! De qualquer jeito obrigado pelo reconhecimento, abraços...
-
Buff so pra premium acount
no arquivo xml da spells coloca: prem="1"
-
[Movements] Movimentar Player ate x Local
function onStepIn(cid, item, position, fromPosition) local config = { [18901] = {dir = WEST, sqm = 6}, -- esquerda [18902] = {dir = EAST, sqm = 5} } function irParaPos(cid, dir) doCreatureSetLookDirection(cid, dir) return doMoveCreature(cid, dir) end if not isPlayer(cid) then return true end local ret = config[item.actionid] if ret then doCreatureSetNoMove(cid, true) for i = 1, ret.sqm do addEvent(irParaPos, i*200, cid, ret.dir) addEvent(doCreatureSetNoMove, ret.sqm*200, cid, false) end end return true end Neste caso ele vai "andar" sqm por sqm e não vai poder se mexer, e vai olhar em direção a direção correta...
-
Event BOSS
ah ta, esse código é pra versão 0.X mano!!
-
Event BOSS
consegui ja está ali no topico, no caso se tiver players na area ele da mais um extra time... poderia me mandar o seu codigo para ver como ficou? ta dizendo que não tem uma função no seu ot... manda o código alterado ai.
-
Compactar script!
acho que é igual kkk nem vi
-
Compactar script!
kkk na hora de colocar isPlayer(cid) eu botei isPlayer)cid) kkk ta aqui arrumado: local positions = { [999] = { -- pvp, {x = 1020, y = 1200, z = 7}, {x = 1200, y = 929, z = 7}, {x = 1201, y = 1201, z = 7} }, [1000] = { -- food {x = 1000, y = 1000, z = 7}, {x = 1000, y = 999, z = 7}, {x = 1001, y = 1001, z = 7} }, [1001]= { -- ice {x = 1230, y = 1000, z = 7}, {x = 1230, y = 999, z = 7}, {x = 1001, y = 1001, z = 7} } } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if not isPlayer(cid) then return true end local ret = positions[item.actionid] if not ret then return true end doTeleportThing(cid, ret[math.random(1, #ret)]) return true end
-
Compactar script!
seria isso que vc queria né: local positions = { [999] = { -- pvp, {x = 1020, y = 1200, z = 7}, {x = 1200, y = 929, z = 7}, {x = 1201, y = 1201, z = 7} }, [1000] = { -- food {x = 1000, y = 1000, z = 7}, {x = 1000, y = 999, z = 7}, {x = 1001, y = 1001, z = 7} }, [1001]= { -- ice {x = 1230, y = 1000, z = 7}, {x = 1230, y = 999, z = 7}, {x = 1001, y = 1001, z = 7} } } function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if not isPlayer)cid) then return true end local ret = positions[item.actionid] if not ret then return true end doTeleportThing(cid, ret[math.random(1, #ret)]) return true end
-
[TFS 1.X] AntiBot
Muito bem feito o código!! Parabéns!! Uma dica, poderia colocar somente para quem está em uma hunt, quem estiver no trainer ou mesmo andando pela cidade, o antibot não faria a pergunta para esse jogador! valeu maninho.
-
[OTX] New Auto Loot Unlimited Edition 2.0
0.3.6 ~ 0.4
-
Quest diaria por IP
Query para executar CREATE TABLE `ip_storages` ( `ip` int NOT NULL default 0, `key` int NOT NULL default 0, `value` varchar(255) NOT NULL default 0 ) funções para adicionar function setIpStorageValue(ip, key, value) local func = db.executeQuery or db.query local query = db.getResult("SELECT `value` FROM `ip_storages` WHERE `key` = "..key.." AND `ip` = "..ip) if query:getID() == -1 then return func("INSERT INTO `ip_storages` (`ip`, `key`, `value`) VALUES ("..ip..", "..key..", "..value..")") end return func("UPDATE `ip_storages` SET `value` = "..value.." WHERE `key` = "..key.." AND `ip` = "..ip) end function getIpStorageValue(ip, key) local ret = db.getResult("SELECT `value` FROM `ip_storages` WHERE `ip` = "..ip.." AND `key` = "..key) if ret:getID() == -1 then return -1 end return ret:getDataInt("value") or ret:getDataString("value") end function timeString(timeDiff) local dateFormat = { {"day", timeDiff / 60 / 60 / 24}, {"hour", timeDiff / 60 / 60 % 24}, {"minute", timeDiff / 60 % 60}, {"second", timeDiff % 60} } local out = {} for k, t in ipairs(dateFormat) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #dateFormat and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find("second") then local a, b = ret:find(" and ") ret = ret:sub(b+1) end return ret end exemplo de báu: function onUse(cid, item, fromPosition, itemEx, toPosition) local storage, hours = 18000, 24 local ip = getPlayerIp(cid) local item = 2160 if getIpStorageValue(ip, storage) - os.time() <= 0 then doPlayerSendTextMessage(cid,22,"Tome seu prêmio.") setIpStorageValue(ip, storage, os.time()+hours*3600) doPlayerAddItem(cid, item, 100) return true end return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Espere " .. timeString(getIpStorageValue(ip, storage) - os.time()) .. " para pegar um novo item!") end
-
Equipar Item e Summonar Mob
ta mas se for um druid n pode sumonar os rotworm? vc só não quer que use 2 demon, não seria isso? ou realmente nenhum summon? testa ai: function onEquip(cid, item, slot) local name = "Demon" local ret = getCreatureSummons(cid) if #ret > 0 then for _, pid in pairs(ret) do if getCreatureName(pid) == name then doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerSendCancel(cid, "Voce so pode invocar um "..name) return false end end end local pos = getPlayerPosition(cid) local m = doConvinceCreature(cid, doCreateMonster(name, pos)) return true end