
Tudo que Vodkart postou
-
Script Reflect
- Ajudar script simples
Este vídeo é privado.- (Resolvido)[Dúvida] O que tem de errado neste item no item.xml
é por causa da lamparina no lado esquerdo< e do madeirite do lado esquerdo(em cima da ponte)- (Resolvido)Ajustando Skull System
adc no MODS a função onPrepareDeath e coloca para não dropar nenhum item... function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then doCreatureSetDropLoot(cid, false) end return true end- (Resolvido)Alavanca que leva o player até a house
function onUse(cid, item, frompos, item2, topos) if not getHouseByPlayerGUID(getPlayerGUID(cid)) then doPlayerSendTextMessage(cid,22,"You still do not have a house, buy a talking '!buyhouse' front of her.") return true end doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid)))) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end- ajuda vip effects
function sendVipEffect(cid) if not isCreature(cid) or getPlayerStorageValue(cid, 13500) - os.time() <= 0 then return LUA_ERROR end doSendAnimatedText(getThingPos(cid), "GOLDENVIP", math.random(1, 255)) addEvent(sendVipEffect, 2000, cid) end function onLogin(cid) sendVipEffect(cid) return true end- Parede que some aos domingos
global events- [AJUDA] GlobalStorage
então coloca esse onLogin que te dei ali em cima que funciona msm- Magia vip
negócio mole? sai fora maluco kkkk bota a mana kkk- O Universo Vai mudar e....
espero que dão demore muito pra acontecer!- Magia vip
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatArea(combat, createCombatArea(AREA_SQUARE1X1)) function onGetFormulaValues(cid, level, skill, attack, factor) local levelTotal = level * 0.3 local skillTotal = skill * attack local min = levelTotal + (skillTotal * 0.03) + 13 local max = levelTotal + (skillTotal * 0.08) + 27 return -math.ceil(min), -math.ceil(max) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doPlayerSendCancel(cid, "Essa magia só pode ser usada por jogadores Vips!") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end return doCombat(cid, combat, var) end- (Resolvido)Pedido Stafftime
Se eu tiver tempo final de semana posso fazer, é um script simples- [AJUDA] GlobalStorage
qual seu tfs? distro? eu testei no 8.6 baiak e funcionou essa Query... sabe oque da pra fazer? um onLogin e adc a storage se item > 0 :D function onLogin(cid) local p, s = {x = 571, y = 1009, z = 7}, 10203 local item = getTileItemById(p, 1387).uid if item > 0 and getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, s, 1) end return true end- Magia vip
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatArea(combat, createCombatArea(AREA_SQUARE1X1)) function onGetFormulaValues(cid, level, skill, attack, factor) local levelTotal = level * 0.3 local skillTotal = skill * attack local min = levelTotal + (skillTotal * 0.03) + 13 local max = levelTotal + (skillTotal * 0.08) + 27 return -math.ceil(min), -math.ceil(max) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doPlayerSendCancel(cid, "Essa magia só pode ser usada por jogadores Vips!") return false end return doCombat(cid, combat, var) end- Zombie Event Erro
local config = { semana_mes = "semana", days = {1,2,3,4,5,6,7}, goblet = 5805, -- id of the gold goblet you'll get when finishing the event. rewards = {2195, 2152, 2160}, -- You will get this + a gold goblet with your name on. moneyReward = {2160, 10, 1}, -- second collumn(count) 0 if you don't want money to be used. or a stackable item you want more than 1 of. playerCount = 2001, -- Global storage for counting the players left/entered in the event zombieCount = 2002, -- Global storage for counting the zombies in the event teleportActionId = 2008, -- Action id of the teleport needed for the movement script teleportPosition = {x = 152, y = 51, z = 7, stackpos = 1}, -- Where the teleport will be created teleportToPosition = {x = 37, y = 272, z = 7}, -- Where the teleport will take you teleportId = 1387, -- Id of the teleport timeToStartEvent = 2, -- Minutes, after these minutes the teleport will be removed and the event will be declared started timeBetweenSpawns = 20, -- Seconds between each spawn of zombie zombieName = "event zombie", -- Name of the zombie that should be summoned playersNeededToStartEvent = 1, -- Players needed before the zombies can spawn. fromPosition = {x = 15, y = 273, z = 7}, -- top left cornor of the playground toPosition = {x = 68, y = 274, z = 7} -- bottom right cornor of the playground } function onTime() local time = os.date("*t") if (config.semana_mes == "semana" and isInArray(config.days,time.wday)) or (config.semana_mes == "mes" and isInArray(config.days,time.day)) or config.semana_mes == "" then local tp = doCreateTeleport(config.teleportId, config.teleportToPosition, config.teleportPosition) doItemSetAttribute(tp, "aid", config.teleportActionId) doBroadcastMessage("Zombie event starting in " .. config.timeToStartEvent .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) setGlobalStorageValue(config.playerCount, 0) setGlobalStorageValue(config.zombieCount, 0) addEvent(startEvent, config.timeToStartEvent * 1000 * 60) end return TRUE end function startEvent() local get = getThingfromPos(config.teleportPosition) if get.itemid == config.teleportId then doRemoveItem(get.uid, 1) end local fromp, top = config.fromPosition, config.toPosition if getGlobalStorageValue(config.playerCount) >= config.playersNeededToStartEvent then addEvent(spawnZombie, config.timeBetweenSpawns * 1000) doBroadcastMessage("Good luck in the zombie event people! The teleport has closed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doPlayerSendTextMessage(getPlayers.uid, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. config.timeBetweenSpawns .. " seconds! Good luck!") pvgaylord() end end end end else doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. config.playersNeededToStartEvent .. " players is needed!", MESSAGE_STATUS_WARNING) for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} getPlayers = getThingfromPos(areapos) if isPlayer(getPlayers.uid) then doTeleportThing(getPlayers.uid, getTownTemplePosition(getPlayerTown(getPlayers.uid)), false) doSendMagicEffect(getPlayerPosition(getPlayers.uid), CONST_ME_TELEPORT) end end end end end end function spawnZombie() if getGlobalStorageValue(config.playerCount) >= 1 then pos = {x = math.random(config.fromPosition.x, config.toPosition.x), y = math.random(config.fromPosition.y, config.toPosition.y), z = math.random(config.fromPosition.z, config.toPosition.z)} doSummonCreature(config.zombieName, pos) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(config.zombieCount, getGlobalStorageValue(config.zombieCount)+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(config.zombieCount) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, config.timeBetweenSpawns * 1000) else local fromp, top = config.fromPosition, config.toPosition for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do areapos = {x = x, y = y, z = z, stackpos = 253} cid = getThingfromPos(areapos).uid if isPlayer(cid) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doBroadcastMessage(getCreatureName(cid)..' has survived at zombie event!') for _,items in ipairs(config.rewards) do doPlayerAddItem(cid, items, 1) end if config.moneyReward[3] == 1 then doPlayerAddItem(cid, config.moneyReward[1], config.moneyReward[2]) end doBroadcastMessage(getPlayerName(cid) .. " won the Zombie event! Congratulations!", MESSAGE_STATUS_WARNING) local goblet = doPlayerAddItem(cid, config.goblet, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(cid) .. " for winning the Zombie event.") elseif isMonster(cid) then doRemoveCreature(cid) end end end end end end function pvgaylord() local fromp, top, p, m = config.fromPosition, config.toPosition, 0, 0 for x = fromp.x, top.x do for y = fromp.y, top.y do for z = fromp.z, top.z do local areapos = {x = x, y = y, z = z, stackpos = 253} local cid = getThingfromPos(areapos).uid if isPlayer(cid) then p = p+1 elseif isMonster(cid) then m = m+1 end end end end if p ~= getGlobalStorageValue(config.playerCount) then setGlobalStorageValue(config.playerCount, p) end if p < 2 then return true end addEvent(pvgaylord,100,nil) end ------------------------------ Explicação para esse erro: fromPosition = {x = 15, y = 274, z = 7} toPosition = {x = 68, y = 273, z = 7} math.random números de ordem > neste caso estava de 274 para 273... local a,b = 273,274 print(math.random(a,b)) retorna por exemplo: 274 agora ao contrário: local a,b = 273,274 print(math.random(b,a)) retorna: 'input:2: bad argument #1 to 'random' (interval is empty)'- [AJUDA] GlobalStorage
OK, mas ele deleta a storage de jogador offline?- [AJUDA] GlobalStorage
mas quando fecha, ele deleta a storage do jogador offline? quero saber que serve vc usa, se é SQL ou SQLite- Zombie Event Erro
em globalevents posta o zombievent.lua e tbm está dizendo que não possui nenhum monstro com o nome 'zombie event' no servidor- [AJUDA] GlobalStorage
estranho... TENTE assim: local configuration = { to_pos = {x = 477, y = 1363, z = 7}, --Para onde o teleport levará. pos = {x = 571, y = 1009, z = 7}, --Onde o teleport será criado. teleport_id = 1387, --ID do teleport. monstername = "Tower Event", -- nome do boss monsterpos = { x = 477, y = 1369, z = 7 }, -- posiçao do boss poss = {x = 578, y = 1014, z = 7}, time = 1, tempoTP = 1, teleport_id = 1387, storage = 10203, } function onSay(cid, words, param, channel, player) local item = getTileItemById(configuration.pos, configuration.teleport_id).uid if item > 0 then for _, player in ipairs(getPlayersOnline()) do setPlayerStorageValue(player, configuration.storage, 0) end db.executeQuery("DELETE FROM `player_storage` WHERE `key` = 10203;") doRemoveItem(item, 1) broadcastMessage("~> [TOWER] foi fechado.", 27) else for _, player in ipairs(getPlayersOnline()) do setPlayerStorageValue(player, configuration.storage, 1) end db.executeQuery("UPDATE `player_storage` SET `value` = 1 WHERE `key` = 10203;") broadcastMessage( "~> [TOWER] foi aberto no Templo.", 27) doCreateTeleport(configuration.teleport_id, configuration.to_pos, configuration.pos) doCreateMonster(configuration.monstername, configuration.monsterpos) end return true end- Evento de Record Players
Script interessante... Mas aconselho a colocar para jogadores que tenham se registrado, porque no caso algum mage bomb pode logar em vários ACC Manager para usufruir de maneira indevida do sistema...Além disso acho mais legal dar recompensas aleatórias para os jogadores, ou até mesmo dependendo dos leveis... Ex: level 1 á 25 level 25 á 50 level 51 á 80 level 81 á 100 ganharem itens exclusivos dependendo do level!- [AJUDA] GlobalStorage
ele não adiciona a storage? tem certeza? dá algum erro? ou na parte de deletar a storage funciona?- Problema com NPC
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 = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid, msg:lower() local outs, item, money = { ["thunder"] = 60, ["leaf"] = 61, ["water"] = 62, ["flame"] = 63, ["ghost"] = 64 },{14291, 1}, 1000000 if (msgcontains(msg, 'outfit') or msgcontains(msg, 'outfits')) then selfSay("Eu posso disponibilizar alguns outfits roboticos:{Thunder}, {Leaf}, {Water}, {Flame}, {Ghost}. Basta me trazer elemental orb e mais 1kk", cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if outs[msg] then var_out = outs[msg] selfSay("Tem certeza de que quer comprar a roupa "..msg.."? {yes}", cid) talkState[talkUser] = 3 else selfSay("digite o nome correto da sua roupa!", cid) end elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then if getPlayerStorageValue(cid, var_out) <= 0 then if isPremium(cid) then if getPlayerMoney(cid) >= money then if getPlayerItemCount(cid, item[1]) >= item[2] then doPlayerRemoveItem(cid, item[1], item[2]) doPlayerRemoveMoney(cid, money) setPlayerStorageValue(cid, var_out, 1) selfSay('aqui está sua '..msg..' roupa!', cid) talkState[talkUser] = 0 else talkState[talkUser] = 0 selfSay('Voce precisa de uma elemental orb!.', cid) end else selfSay("Voce nao tem 1kk!", cid) talkState[talkUser] = 0 end else selfSay("Need be premium to buy this Outfit.", cid) talkState[talkUser] = 0 end else selfSay("você já possui está roupa.", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, 'no') and talkState[talkUser] == 3 then selfSay("Por favor, escolha outra roupa..", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) sabe que ele só está entregando a storage né? não tem função de dar outfit, não botei porquei achei que vc configurou pelo oufits.xml 'doPlayerAddOutfit'- Problema com NPC
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 = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid, msg:lower() local outs, item, money = { ["thunder"] = 60, ["leaf"] = 61, ["water"] = 62, ["flame"] = 63, ["ghost"] = 64 },{14291, 1}, 1000000 if (msgcontains(msg, 'outfit') or msgcontains(msg, 'outfits')) then selfSay("Eu posso disponibilizar alguns outfits roboticos:{Thunder}, {Leaf}, {Water}, {Flame}, {Ghost}. Basta me trazer elemental orb e mais 1kk", cid) talkState[talkUser] = 2 elseif not outs[msg] and talkState[talkUser] == 2 then selfSay("digite o nome correto da sua roupa!", cid) elseif outs[msg] and talkState[talkUser] == 2 then var_out = outs[msg] selfSay("Tem certeza de que quer comprar essa roupa? {yes}", cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then if getPlayerStorageValue(cid, var_out) <= 0 then if isPremium(cid) then if getPlayerMoney(cid) >= money then if getPlayerItemCount(cid, item[1]) >= item[2] then doPlayerRemoveItem(cid, item[1], item[2]) doPlayerRemoveMoney(cid, money) setPlayerStorageValue(cid, var_out, 1) selfSay('aqui está sua '..msg..' roupa!', cid) talkState[talkUser] = 0 else talkState[talkUser] = 0 selfSay('Voce precisa de uma elemental orb!.', cid) end else selfSay("Voce nao tem 1kk!", cid) talkState[talkUser] = 0 end else selfSay("Need be premium to buy this Outfit.", cid) talkState[talkUser] = 0 end else selfSay("Precisa ser premium para comprar esta roupa.", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, 'no') and talkState[talkUser] == 3 then selfSay("Por favor, escolha outra roupa..", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())- [Ajuda] Erro Buffer:OnDeath
Este problema está dando em algum MODS instalado no seu ot- O Universo Vai mudar e....
oq vc usou pra entrar nessa noia? - Ajudar script simples
Informação Importante
Confirmação de Termo