
Tudo que Vodkart postou
-
(Resolvido)[AJUDA] Aceitar outra vocação
vc já fez alguma alteração no código?
-
(Resolvido)[TFS 1.3] [AJUDA] Sumonar NPC por tempo
function onUse(player, item, fromPosition, target, toPosition, isHotkey) local playerPos = player:getPosition() local position = Position(playerPos.x, playerPos.y + 1, playerPos.z) local npcName = "Mad" local function removeNpc(name) local var = Npc(name) if var and var:isNpc() then var:remove() end end if not Npc(npcName) then local create = Game.createNpc(npcName, position) if create then create:setMasterPos(position) position:sendMagicEffect(CONST_ME_POFF) player:say("can you help me?", TALKTYPE_MONSTER_SAY) addEvent(removeNpc, 1*60*1000, npcName) return true end else position:sendMagicEffect(CONST_ME_POFF) end end
-
[AJUDA] Bonus Exp
mudei a sua formula no onKill, testa assim: -- LIB config_weekend_exp = { dates = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}, -- Dias da semana que será ativo rates = { [{50, 100}] = 0.10, -- de 50 a 100 jogadores a exp vai ser 10% [{101, 299}] = 0.30, -- de 101 a 299 jogadores a exp vai ser 30% [{300, math.huge}] = 0.40 -- de 300 ou mais jogadores a exp vai ser 40% }, storage_bonus = 30305 } function get_bonus_weekend_exp() local players = #getPlayersOnline() for v , r in pairs(config_weekend_exp.rates) do if players >= v[1] and players <= v[2] then return {r, v[1]} end end return {0.00, 0} end function onServerExpMsg() local current = #getPlayersOnline() local new = get_bonus_weekend_exp()[1] local old = getGlobalStorageValue(config_weekend_exp.storage_bonus) <= 0 and 0.00 or getGlobalStorageValue(config_weekend_exp.storage_bonus) if old ~= new then if get_bonus_weekend_exp()[2] == 0 then doBroadcastMessage("[Bonus Exp Online] O bônus de exp foi desativado por falta de jogadores!") setGlobalStorageValue(config_weekend_exp.storage_bonus, 0.00) else doBroadcastMessage("[Bonus Exp Online] O servidor ".. (old < new and "regrediu para" or "alcançou") .." [".. current .."] jogadores online! O bônus de exp é agora "..(new*100).."% Aproveite!") setGlobalStorageValue(config_weekend_exp.storage_bonus, new) end end end -- onThink function onThink(cid, interval, lastExecution) onServerExpMsg() return true end -- onKill function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local percent = get_bonus_weekend_exp()[1] local players = get_bonus_weekend_exp()[2] if players > 0 then -- ativo local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Bonus Exp Online] Você está com ["..(percent*100).."]% de bônus experiencia devido a quantidade de alcançada [".. players .."]+ jogadores online. Aproveite!") end end return true end -- ACTION function onUse(cid, item, fromPosition, itemEx, toPosition) if get_bonus_weekend_exp()[2] == 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"O servidor não está com nenhum bonus ativo") return true end local rate = get_bonus_weekend_exp()[1] return doShowTextDialog(cid,8977, "---------[Bonus Exp Online]--------\n\n\nAtualmente o servidor está com a experiencia bonus de ["..(rate *100).."]%.") end
-
[AJUDA] Bonus Exp
usa então onThink com interval de uns 20 a 30 segundos! -- LIB config_weekend_exp = { dates = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}, -- Dias da semana que será ativo rates = { [{50, 100}] = 1.03, -- de 50 a 100 jogadores a exp vai ser 1.03 [{101, 299}] = 1.05, -- de 101 a 299 jogadores a exp vai ser 1.05 [{300, math.huge}] = 1.09 -- de 300 ou mais jogadores a exp vai ser 1.09 }, storage_bonus = 30303 } function get_bonus_weekend_exp() local players = #getPlayersOnline() for v , r in pairs(config_weekend_exp.rates) do if players >= v[1] and players <= v[2] then return {r, v[1]} end end return {1.00, 0} end function onServerExpMsg() local current = #getPlayersOnline() local new = get_bonus_weekend_exp()[1] local old = getGlobalStorageValue(config_weekend_exp.storage_bonus) <= 0 and 1.00 or getGlobalStorageValue(config_weekend_exp.storage_bonus) if old ~= new then if get_bonus_weekend_exp()[2] == 0 then doBroadcastMessage("[Bonus Exp Online] O bônus de exp foi desativado por falta de jogadores!") setGlobalStorageValue(config_weekend_exp.storage_bonus, 1.00) else doBroadcastMessage("[Bonus Exp Online] O servidor ".. (old < new and "regrediu para" or "alcançou") .." [".. current .."] jogadores online! O bônus de exp é agora "..((new - 1)*100).."% Aproveite!") setGlobalStorageValue(config_weekend_exp.storage_bonus, new) end end end -- onThink function onThink(cid, interval, lastExecution) onServerExpMsg() return true end -- onKill function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local rate_bonus = get_bonus_weekend_exp()[1] local players = get_bonus_weekend_exp()[2] if players > 0 then -- ativo local monster = getMonsterInfo(getCreatureName(target)) if getConfigValue("experienceStages") == true then doPlayerAddExp(cid, (monster.experience * getExperienceStage(getPlayerLevel(cid))) * rate_bonus) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Bonus Exp Online] Você está com ["..((rate_bonus - 1)*100).."]% de bônus experiencia devido a quantidade de alcançada [".. players .."]+ jogadores online. Aproveite!") end end end return true end -- ACTION function onUse(cid, item, fromPosition, itemEx, toPosition) if get_bonus_weekend_exp()[2] == 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"O servidor não está com nenhum bonus ativo") return true end local rate = get_bonus_weekend_exp()[1] return doShowTextDialog(cid,8977, "---------[Bonus Exp Online]--------\n\n\nAtualmente o servidor está com a experiencia bonus de ["..((rate - 1)*100).."]%.") end
-
(Resolvido)Top Effect Problema só top loga
local config = { effect = 30, -- Efeito que vai usar storage = 998899, -- Storage que o player precisa ter tempo = 30, -- Tempo em segundos 1200 - 20 minutos text = '--[[TOP #1]]--' } local PremiumEfect = CreatureEvent("PremiumEfect") function PremiumEfect.onLogin(player) player:registerEvent("PremiumEfect") local resultId = db.storeQuery("SELECT `id`, `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (resultId ~= false) then local pid = result.getDataString(resultId, "id") local name = result.getDataString(resultId, "name") local namereal = player:getName() if namereal == name then SendEffect(player:getId()) end result.free(resultId) end return true end function SendEffect(cid) local player = Player(cid) if not player then return end player:getPosition():sendMagicEffect(config.effect) player:say(config.text, TALKTYPE_MONSTER_SAY) addEvent(SendEffect, config.tempo*1000, player:getId()) return true end PremiumEfect:register()
-
[AJUDA] Bonus Exp
-- LIB config_weekend_exp = { dates = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}, -- Dias da semana que será ativo rates = { [{50, 100}] = 1.03, -- de 50 a 100 jogadores a exp vai ser 1.03 [{101, 299}] = 1.05, -- de 101 a 299 jogadores a exp vai ser 1.05 [{300, math.huge}] = 1.09 -- de 300 ou mais jogadores a exp vai ser 1.09 }, storage_bonus = 30303 } function get_bonus_weekend_exp() local players = #getPlayersOnline() for v , r in pairs(config_weekend_exp.rates) do if players >= v[1] and players <= v[2] then return {r, v[1]} end end return {1.00, 0} end -- onRecord function onRecord(current, old, cid) local new = get_bonus_weekend_exp()[1] local old = getGlobalStorageValue(config_weekend_exp.storage_bonus) <= 0 and 1.00 or getGlobalStorageValue(config_weekend_exp.storage_bonus) if old ~= new then if get_bonus_weekend_exp()[2] == 0 then doBroadcastMessage("[Bonus Exp Online] O bônus de exp foi desativado por falta de jogadores!") setGlobalStorageValue(config_weekend_exp.storage_bonus, 1.00) else doBroadcastMessage("[Bonus Exp Online] O servidor ".. (old < new and "regrediu para" or "alcançou") .." [".. current .."] jogadores online! O bônus de exp é agora "..((new - 1)*100).."% Aproveite!") setGlobalStorageValue(config_weekend_exp.storage_bonus, new) end end return true end -- onKill function onKill(cid, target) if isPlayer(cid) and isMonster(target) then local rate_bonus = get_bonus_weekend_exp()[1] local players = get_bonus_weekend_exp()[2] if players > 0 then -- ativo local monster = getMonsterInfo(getCreatureName(target)) if getConfigValue("experienceStages") == true then doPlayerAddExp(cid, (monster.experience * getExperienceStage(getPlayerLevel(cid))) * rate_bonus) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Bonus Exp Online] Você está com ["..((rate_bonus - 1)*100).."]% de bônus experiencia devido a quantidade de alcançada [".. players .."]+ jogadores online. Aproveite!") end end end return true end -- ACTION function onUse(cid, item, fromPosition, itemEx, toPosition) if get_bonus_weekend_exp()[2] == 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"O servidor não está com nenhum bonus ativo") return true end local rate = get_bonus_weekend_exp()[1] return doShowTextDialog(cid,8977, "---------[Bonus Exp Online]--------\n\n\nAtualmente o servidor está com a experiencia bonus de ["..((rate - 1)*100).."]%.") end
-
Ajuda com script de npc
me manda o arquivo todo do npc pelo discord que eu coloco para vc...
-
[8.6] TOP 5 LEVEL no BroadCast
usa assim: function onThink(interval) local max, query = 5, db.storeQuery("SELECT `name`, `level` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `level` DESC, `name` ASC;") local str = "TOP "..max.." Rank Level:\n\n" if query ~= false then k = 0 repeat k = k + 1 str = str .. "\n " .. k .. " - ".. result.getString(query, "name") .."[".. result.getNumber(query, "level") .."]" until not result.next(query) or k == max query:free() end broadcastMessage(str, MESSAGE_EVENT_ADVANCE) return true end
-
[8.6] Task System 4.0! (Task system + Daily Task System)
Sim, mas preciso ver os erros, qual distro é, etc... me manda seu discord
- Remoção das laterais do cliente 10x
-
Ajuda com script de npc
elseif msgcontains(msg, 'trade') then local shopWindow, t = {}, { [2195] = {price = 5}, -- [id do item] e em preço [2493] = {price = 25}, [2361] = {price = 30}, [8851] = {price = 20}, [8925] = {price = 30}, [2640] = {price = 50}, [2494] = {price = 100}, [9932] = {price = 50}, [2472] = {price = 70}, [8931] = {price = 100} } local onSell = function(cid, item, subType, amount, ignoreCap, inBackpacks) local priceTicks = t[item].price*amount doPlayerRemoveItem(cid, item, amount) doPlayerAddMoney(cid, priceTicks) npcHandler:say("You have sold " .. amount .. "x " .. getItemNameById(item) .. " for " .. priceTicks .. " gold(s).", cid) return true end for var, ret in pairs(t) do table.insert(shopWindow, {id = var, subType = 0, sell = ret.price, name = getItemNameById(var)}) end openShopWindow(cid, shopWindow, onBuy, onSell)
-
Alterar a descrição do item
Mas você criou esse item? Ou é um sistema de upgrade que "clona" o item?
-
Ajuda com script de npc
Na verdade no código do NPC nem tem a parte da conversa "TRADE"... Não tem o ids dos itens... Esses itens só serão vendidos? ou o npc só vai comprar itens do jogador? Ai não tem preço, nem nada...
-
PRECISO DE UM SISTEMA DE TASK SEM UM NPC
Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.
-
EFEITO VIP
nem tem a função no código para tal... local time = 5 local random = math.random(1, 255) local info = { [1] = {effect = 29, storage = 13712, message = "VIP", color = 130}, [2] = {effect = 30, storage = 13714, message = "DONATE", color = 50} } function effect(cid) if (isPlayer(cid)) then for i = 1, #info do if getPlayerStorageValue(cid, info[i].storage) >= 1 then doSendMagicEffect(getCreaturePosition(cid), info[i].effect) doSendAnimatedText(getCreaturePosition(cid), info[i].message, info[i].color) end end addEvent(effect, time * 1000, cid) end end function onLogin(cid) for i = 1, #info do if getPlayerStorageValue(cid, info[i].storage) >= 1 then doSendMagicEffect(getCreaturePosition(cid), info[i].effect) doSendAnimatedText(getCreaturePosition(cid), info[i].message, info[i].color) effect(cid) end end return true end
-
PRECISO DE UM SISTEMA DE TASK SEM UM NPC
Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.
-
v8.60 Script de lavanca que pega o item e item que tramsforma em outro item a cada 3seg tipo globalevents
Script simples, posso fazer... os sets e armas são gerado de forma aleatória na tabela ou é sequencial? Se alguém puder criar um vídeo mostrando seria melhor... @88684324 @Muvuka
-
Erro Autoloot System
é na parte da lib, info.Storages... como se não checasse a letra maiúscula, igual alguns linux... se quiser posso alterar toda lib e código e te mandar.
-
Erro Autoloot System
Já existe essa função no autoloot 2.0 OTX... deixa eu ver o erro que da no console, deve ser algo diferente...
-
Erro Autoloot System
me manda seu código
-
Spell bugando a distro - AJUDA
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTBLUE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 0) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -109.0, -1600, -110.0, -1800) arr1 = { {3} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) function onCastSpell(cid, var) local waittime = 1 -- Tempo de exhaustion local storage = 8224 if exhaustion.check(cid, storage) then doPlayerSendChannelMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde ".. exhaustion.get(cid, storage) .. " segundos para usar a tecnica novamente.", TALKTYPE_CHANNEL_O, CHANNEL_SPELL) return false end local target = getCreatureTarget(cid) if target then function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end local pos = getCreaturePosition(target) local poz = getCreaturePosition(cid) -- effeito no caster addEvent(onCastSpell1, 600, {cid = cid, var = var}) addEvent(doSendDistanceEffect, 300, {x = pos.x+4, y = pos.y, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x-4, y = pos.y, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x+4, y = pos.y-3, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x-4, y = pos.y-3, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x-2, y = pos.y-4, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x+2, y = pos.y-4, z = pos.z}, pos, 127) addEvent(doSendMagicEffect, 1, {x = poz.x+1, y = poz.y, z = poz.z}, 499) addEvent(doSendMagicEffect, 600, {x = pos.x+2, y = pos.y+2, z = pos.z}, 734) exhaustion.set(cid, storage, waittime) end return true end
-
Spell bugando a distro - AJUDA
local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTBLUE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 0) setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -109.0, -1600, -110.0, -1800) arr1 = { {3} } local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end function onCastSpell(cid, var) local waittime = 1 -- Tempo de exhaustion local storage = 8224 if exhaustion.check(cid, storage) then doPlayerSendChannelMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde ".. exhaustion.get(cid, storage) .. " segundos para usar a tecnica novamente.", TALKTYPE_CHANNEL_O, CHANNEL_SPELL) return false end local parameters = { cid = cid, var = var} local target = getCreatureTarget(cid) if target then local pos = getCreaturePosition(target) local poz = getCreaturePosition(cid) -- effeito no caster addEvent(onCastSpell1, 600, parameters) addEvent(doSendDistanceEffect, 300, {x = pos.x+4, y = pos.y, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x-4, y = pos.y, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x+4, y = pos.y-3, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x-4, y = pos.y-3, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x-2, y = pos.y-4, z = pos.z}, pos, 127) addEvent(doSendDistanceEffect, 300, {x = pos.x+2, y = pos.y-4, z = pos.z}, pos, 127) addEvent(doSendMagicEffect, 1, {x = poz.x+1, y = poz.y, z = poz.z}, 499) addEvent(doSendMagicEffect, 600, {x = pos.x+2, y = pos.y+2, z = pos.z}, 734) exhaustion.set(cid, storage, waittime) end return true end
-
Retornar os ids de itens no DP
é de determinado jogador? -- 101 - No town -- 102 - Town id 1 -- 103 - Town id 2 -- 104 - Town id 3 -- 105 - Town id 4 -- 106 - Town id 5 -- 107 - Town id 6 -- 108 - Town id 7 (ROOK) function onSay(player, words, param) local town, items = 101, {} -- no town local query = db.storeQuery('SELECT `itemtype` FROM `player_depotitems` WHERE `player_id` = '.. player:getGuid() ..' and `pid` = '.. town) if query ~= false then repeat items[#items+1] = result.getNumber(query, "itemtype") until not result.next(query) result.free(query) end -- colocar para printar items se tabela for maior que 0 ( #items > 0 ) end ou se for o depot e não do player, tenta assim: -- 101 - No town -- 102 - Town id 1 -- 103 - Town id 2 -- 104 - Town id 3 -- 105 - Town id 4 -- 106 - Town id 5 -- 107 - Town id 6 -- 108 - Town id 7 (ROOK) function onSay(player, words, param) local town, items = 101, {} -- no town local query = db.storeQuery('SELECT `itemtype` FROM `player_depotitems` WHERE `pid` = '.. town) if query ~= false then repeat items[#items+1] = result.getNumber(query, "itemtype") until not result.next(query) result.free(query) end -- colocar para printar items se tabela for maior que 0 ( #items > 0 ) end
-
[fechado]
Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.
-
Servidor próprio!
Este tópico foi arquivado para que possamos fazer a manutenção dos conteúdos na seção onde ele ficava. Ele ficará disponível para consulta à aqueles que precisarem, no entanto permanecerá fechado. Se você precisar comentar sobre ou tirar alguma dúvida busque a seção coerente com o assunto desde tópico ou a de suporte.