
Tudo que Vodkart postou
-
(Resolvido)Sistema de loot por baús / chest loot system
local chest_areas = { [8001] = {name = 'Hunt Spider', time = 60, monster = {'Demon', 100}, storage = 178740, container = 1988, items = {{100,2160,1},{50,2173,1},{5,2494,1},{30,2466,1},{80,2495,1},{100,2148,15}}}, [8002] = {name = 'Hunt Spider', time = 60, monster = {'Demon', 100},storage = 178741, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}}, [8003] = {name = 'Hunt Dragon', time = 60, monster = {'Demon', 100},storage = 178742, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}} } function onUse(cid, item, frompos, item2, topos) local v = chest_areas[item.actionid] if not v then return true end if getPlayerStorageValue(cid, v.storage) >= os.time() then doPlayerSendTextMessage(cid,22,'você só pode pegar outro premio em '..os.date("%d %B %Y %X", getPlayerStorageValue(cid, v.storage))..'.') return true end local items, quest_container, str = v.items, doPlayerAddItem(cid, v.container, 1), 'BackPack from '..v.name..', Your Rewards:\n' for i = 1, table.maxn(items) do local chance, item_id, amount = items[i][1], items[i][2], items[i][3] if chance >= math.random(1, 100) then str = str .. amount .. ' ' .. getItemNameById(item_id) .. ' '..(i ~= table.maxn(items) and ', ' or '.') if isItemStackable(item_id) or amount == 1 then doAddContainerItem(quest_container, item_id, amount) else for i = 1, amount do doAddContainerItem(quest_container, 1) end end end end if v.monster[2] >= math.random(1, 100) then doSummonCreature(v.monster[1], getPlayerPosition(cid)) doCreatureSay(cid, "você não roubará meu tesouro!!", TALKTYPE_ORANGE_1) end doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) setPlayerStorageValue(cid, v.storage, os.time()+v.time*60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '..str) return true end
-
Sistema !autoloot com Item Remove
eu fiz um autoloot por item também... depois da um confere:
-
(Resolvido)Sistema de loot por baús / chest loot system
para deixar só a hr faz assim: doPlayerSendTextMessage(cid,22,'você só pode pegar outro premio as '..os.date("%X", getPlayerStorageValue(cid, v.storage))..'.') return true Outra coisa, seria dificil colocar para ter uma chance de "spawnar" uma criatura ? no caso seria um globalevents? ou quando matar a criatura? acho que não... mto fácil na vdd, vai ser 1 criature só na area? digamos que criou a criatura as 9:30 se for 10 hrs e a criatura ainda está la, vai ser summonada ficando 2? ou só uma por area ?
-
MATO O BIXO MAS NÃO CONTA PARA A TASK
WARNING - Error:: Killing in the name of::Tasks config e a lib está certa?
-
MATO O BIXO MAS NÃO CONTA PARA A TASK
então ele não está nem lendo o código do onKill... na tag em creaturescript.xml apaga essa linha: <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/> e no seu login apaga: registerCreatureEvent(cid, "KillingInTheNameOf") agora coloca o script assim: function onLogin(cid) registerCreatureEvent(cid, "TaskKIlling") return true end function onKill(cid, target) local questCreatures ={ ["Rotworm"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15000, killsRequired = 20, raceName = "Rotworms"}, ["Carrion Worm"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15001, killsRequired = 20, raceName = "Rotworms"}, ["Dwarf"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15004, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Soldier"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15005, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Guard"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15006, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Geomancer"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15007, killsRequired = 20, raceName = "Dwarfs"}, ["Kongra"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15011, killsRequired = 50, raceName = "Apes-Macacos"}, ["Sibang"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15008, killsRequired = 50, raceName = "Apes-Macacos"}, ["Merlkin"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15009, killsRequired = 50, raceName = "Apes-Macacos"}, ["Bog Raider"] = {questStarted = 1513, questStorage = 65004, creatureStorage = 15016, killsRequired = 50, raceName = "Bog Raiders"}, ["Blood Beast"] = {questStarted = 1513, questStorage = 65004, creatureStorage = 15042, killsRequired = 50, raceName = "Bog Raiders"}, ["Dragon"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15013, killsRequired = 50, raceName = "Dragons"}, ["Dragon Hatchling"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15014, killsRequired = 50, raceName = "Dragons"}, ["Dragon Lord"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15010, killsRequired = 50, raceName = "Dragons"}, ["Dragon Lord Hatchling"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15055, killsRequired = 50, raceName = "Dragons"}, ["Hydra"] = {questStarted = 1515, questStorage = 65005, creatureStorage = 15017, killsRequired = 100, raceName = "Hydras"}, ["Frost Dragon"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15018, killsRequired = 100, raceName = "Frost Dragons"}, ["Frost Dragon Hatchling"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15002, killsRequired = 100, raceName = "Frost Dragons"}, ["Sea Serpent"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15019, killsRequired = 100, raceName = "Sea Serpents"}, ["Young Sea Serpent"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15040, killsRequired = 100, raceName = "Sea Serpents"}, ["Serpent Spawn"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15020, killsRequired = 100, raceName = "Serpent Spawns"}, ["Serpent Spawns"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15041, killsRequired = 100, raceName = "Serpent Spawns"}, ["Medusa"] = {questStarted = 1519, questStorage = 65009, creatureStorage = 15021, killsRequired = 100, raceName = "Medusas"}, ["Lizard Templar"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15022, killsRequired = 100, raceName = "Lizards"}, ["Lizard Lord"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15023, killsRequired = 100, raceName = "Lizards"}, ["Lizard High Guard"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15024, killsRequired = 100, raceName = "Lizards"}, ["Lizard Zaogun"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15025, killsRequired = 100, raceName = "Lizards"}, ["Lizard Legionnaire"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15026, killsRequired = 100, raceName = "Lizards"}, ["Lizard Chosen"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15031, killsRequired = 100, raceName = "Lizards"}, ["Lizard Dragon Priest"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15030, killsRequired = 100, raceName = "Lizards"}, ["Draken Warmaster"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15027, killsRequired = 100, raceName = "Drakens"}, ["Draken Spellweaver"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15003, killsRequired = 100, raceName = "Drakens"}, ["Draken Elite"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15028, killsRequired = 100, raceName = "Drakens"}, ["Draken Abomination"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15029, killsRequired = 100, raceName = "Drakens"}, ["Warlock"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15032, killsRequired = 100, raceName = "Warlocks"}, ["Infernalist"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15036, killsRequired = 100, raceName = "Infernalists"}, ["Behemoth"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15043, killsRequired = 100, raceName = "Behemoths"}, ["Worker Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15044, killsRequired = 100, raceName = "Golems"}, ["War Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15045, killsRequired = 100, raceName = "Golems"}, ["Moria Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15046, killsRequired = 100, raceName = "Golems"}, ["Manwe"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15047, killsRequired = 100, raceName = "Golems"}, ["Caribian Pirate"] = {questStarted = 1526, questStorage = 65016, creatureStorage = 15048, killsRequired = 100, raceName = "Pirates"}, ["Ghastly Dragon"] = {questStarted = 1527, questStorage = 65017, creatureStorage = 15049, killsRequired = 100, raceName = "Ghastly Dragons"}, ["Necrolord"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15050, killsRequired = 100, raceName = "Necrolords"}, ["Blood Necrolord"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15051, killsRequired = 100, raceName = "Necrolords"}, ["Demon"] = {questStarted = 1529, questStorage = 65019, creatureStorage = 15052, killsRequired = 50, raceName = "Demons"} } if not isMonster(target) then return true end local creature = questCreatures[getCreatureName(target)] if creature then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"matando "..getCreatureName(target).." teste 1.") if getPlayerStorageValue(cid, creature.questStarted) > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"started storage"..getPlayerStorageValue(cid, creature.questStarted).." teste 2.") if getPlayerStorageValue(cid, creature.questStorage) < creature.killsRequired then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"creature Storage "..getPlayerStorageValue(cid, creature.questStorage).." teste 3.") setPlayerStorageValue(cid, creature.questStorage, getPlayerStorageValue(cid, creature.questStorage) < 0 and 1 or getPlayerStorageValue(cid, creature.questStorage) + 1) setPlayerStorageValue(cid, creature.creatureStorage, getPlayerStorageValue(cid, creature.creatureStorage) < 0 and 1 or getPlayerStorageValue(cid, creature.creatureStorage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerStorageValue(cid, creature.creatureStorage) .. " " .. getCreatureName(target) .. " defeated. Total [" .. getPlayerStorageValue(cid, creature.questStorage) .. "/" .. creature.killsRequired .. "] " .. creature.raceName .. ".") end end end return true end e a tag em creaturescript.xml deixa: <event type="login" name="KillingLogin" script="Killinginthenameof.lua"/> <event type="kill" name="TaskKIlling" script="Killinginthenameof.lua"/>
-
MATO O BIXO MAS NÃO CONTA PARA A TASK
então vamos testar para vê se ganhou a storage, usa ele assim e ve se retorna alguma mensagem: function onKill(cid, target) local questCreatures ={ ["Rotworm"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15000, killsRequired = 20, raceName = "Rotworms"}, ["Carrion Worm"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15001, killsRequired = 20, raceName = "Rotworms"}, ["Dwarf"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15004, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Soldier"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15005, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Guard"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15006, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Geomancer"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15007, killsRequired = 20, raceName = "Dwarfs"}, ["Kongra"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15011, killsRequired = 50, raceName = "Apes-Macacos"}, ["Sibang"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15008, killsRequired = 50, raceName = "Apes-Macacos"}, ["Merlkin"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15009, killsRequired = 50, raceName = "Apes-Macacos"}, ["Bog Raider"] = {questStarted = 1513, questStorage = 65004, creatureStorage = 15016, killsRequired = 50, raceName = "Bog Raiders"}, ["Blood Beast"] = {questStarted = 1513, questStorage = 65004, creatureStorage = 15042, killsRequired = 50, raceName = "Bog Raiders"}, ["Dragon"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15013, killsRequired = 50, raceName = "Dragons"}, ["Dragon Hatchling"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15014, killsRequired = 50, raceName = "Dragons"}, ["Dragon Lord"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15010, killsRequired = 50, raceName = "Dragons"}, ["Dragon Lord Hatchling"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15055, killsRequired = 50, raceName = "Dragons"}, ["Hydra"] = {questStarted = 1515, questStorage = 65005, creatureStorage = 15017, killsRequired = 100, raceName = "Hydras"}, ["Frost Dragon"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15018, killsRequired = 100, raceName = "Frost Dragons"}, ["Frost Dragon Hatchling"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15002, killsRequired = 100, raceName = "Frost Dragons"}, ["Sea Serpent"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15019, killsRequired = 100, raceName = "Sea Serpents"}, ["Young Sea Serpent"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15040, killsRequired = 100, raceName = "Sea Serpents"}, ["Serpent Spawn"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15020, killsRequired = 100, raceName = "Serpent Spawns"}, ["Serpent Spawns"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15041, killsRequired = 100, raceName = "Serpent Spawns"}, ["Medusa"] = {questStarted = 1519, questStorage = 65009, creatureStorage = 15021, killsRequired = 100, raceName = "Medusas"}, ["Lizard Templar"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15022, killsRequired = 100, raceName = "Lizards"}, ["Lizard Lord"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15023, killsRequired = 100, raceName = "Lizards"}, ["Lizard High Guard"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15024, killsRequired = 100, raceName = "Lizards"}, ["Lizard Zaogun"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15025, killsRequired = 100, raceName = "Lizards"}, ["Lizard Legionnaire"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15026, killsRequired = 100, raceName = "Lizards"}, ["Lizard Chosen"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15031, killsRequired = 100, raceName = "Lizards"}, ["Lizard Dragon Priest"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15030, killsRequired = 100, raceName = "Lizards"}, ["Draken Warmaster"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15027, killsRequired = 100, raceName = "Drakens"}, ["Draken Spellweaver"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15003, killsRequired = 100, raceName = "Drakens"}, ["Draken Elite"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15028, killsRequired = 100, raceName = "Drakens"}, ["Draken Abomination"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15029, killsRequired = 100, raceName = "Drakens"}, ["Warlock"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15032, killsRequired = 100, raceName = "Warlocks"}, ["Infernalist"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15036, killsRequired = 100, raceName = "Infernalists"}, ["Behemoth"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15043, killsRequired = 100, raceName = "Behemoths"}, ["Worker Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15044, killsRequired = 100, raceName = "Golems"}, ["War Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15045, killsRequired = 100, raceName = "Golems"}, ["Moria Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15046, killsRequired = 100, raceName = "Golems"}, ["Manwe"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15047, killsRequired = 100, raceName = "Golems"}, ["Caribian Pirate"] = {questStarted = 1526, questStorage = 65016, creatureStorage = 15048, killsRequired = 100, raceName = "Pirates"}, ["Ghastly Dragon"] = {questStarted = 1527, questStorage = 65017, creatureStorage = 15049, killsRequired = 100, raceName = "Ghastly Dragons"}, ["Necrolord"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15050, killsRequired = 100, raceName = "Necrolords"}, ["Blood Necrolord"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15051, killsRequired = 100, raceName = "Necrolords"}, ["Demon"] = {questStarted = 1529, questStorage = 65019, creatureStorage = 15052, killsRequired = 50, raceName = "Demons"} } if not isMonster(target) then return true end local creature = questCreatures[getCreatureName(target)] if creature then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"matando "..getCreatureName(target).." teste 1.") if getPlayerStorageValue(cid, creature.questStarted) > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"started storage"..getPlayerStorageValue(cid, creature.questStarted).." teste 2.") if getPlayerStorageValue(cid, creature.questStorage) < creature.killsRequired then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"creature Storage "..getPlayerStorageValue(cid, creature.questStorage).." teste 3.") setPlayerStorageValue(cid, creature.questStorage, getPlayerStorageValue(cid, creature.questStorage) < 0 and 1 or getPlayerStorageValue(cid, creature.questStorage) + 1) setPlayerStorageValue(cid, creature.creatureStorage, getPlayerStorageValue(cid, creature.creatureStorage) < 0 and 1 or getPlayerStorageValue(cid, creature.creatureStorage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerStorageValue(cid, creature.creatureStorage) .. " " .. getCreatureName(target) .. " defeated. Total [" .. getPlayerStorageValue(cid, creature.questStorage) .. "/" .. creature.killsRequired .. "] " .. creature.raceName .. ".") end end end return true end
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
seu serve é em milesegundos?
-
MATO O BIXO MAS NÃO CONTA PARA A TASK
pelo que percebi o código não tem erro, o npc entrega a task? function onKill(cid, target) local questCreatures ={ ["Rotworm"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15000, killsRequired = 20, raceName = "Rotworms"}, ["Carrion Worm"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15001, killsRequired = 20, raceName = "Rotworms"}, ["Dwarf"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15004, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Soldier"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15005, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Guard"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15006, killsRequired = 20, raceName = "Dwarfs"}, ["Dwarf Geomancer"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15007, killsRequired = 20, raceName = "Dwarfs"}, ["Kongra"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15011, killsRequired = 50, raceName = "Apes-Macacos"}, ["Sibang"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15008, killsRequired = 50, raceName = "Apes-Macacos"}, ["Merlkin"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15009, killsRequired = 50, raceName = "Apes-Macacos"}, ["Bog Raider"] = {questStarted = 1513, questStorage = 65004, creatureStorage = 15016, killsRequired = 50, raceName = "Bog Raiders"}, ["Blood Beast"] = {questStarted = 1513, questStorage = 65004, creatureStorage = 15042, killsRequired = 50, raceName = "Bog Raiders"}, ["Dragon"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15013, killsRequired = 50, raceName = "Dragons"}, ["Dragon Hatchling"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15014, killsRequired = 50, raceName = "Dragons"}, ["Dragon Lord"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15010, killsRequired = 50, raceName = "Dragons"}, ["Dragon Lord Hatchling"] = {questStarted = 1514, questStorage = 65003, creatureStorage = 15055, killsRequired = 50, raceName = "Dragons"}, ["Hydra"] = {questStarted = 1515, questStorage = 65005, creatureStorage = 15017, killsRequired = 100, raceName = "Hydras"}, ["Frost Dragon"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15018, killsRequired = 100, raceName = "Frost Dragons"}, ["Frost Dragon Hatchling"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15002, killsRequired = 100, raceName = "Frost Dragons"}, ["Sea Serpent"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15019, killsRequired = 100, raceName = "Sea Serpents"}, ["Young Sea Serpent"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15040, killsRequired = 100, raceName = "Sea Serpents"}, ["Serpent Spawn"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15020, killsRequired = 100, raceName = "Serpent Spawns"}, ["Serpent Spawns"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15041, killsRequired = 100, raceName = "Serpent Spawns"}, ["Medusa"] = {questStarted = 1519, questStorage = 65009, creatureStorage = 15021, killsRequired = 100, raceName = "Medusas"}, ["Lizard Templar"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15022, killsRequired = 100, raceName = "Lizards"}, ["Lizard Lord"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15023, killsRequired = 100, raceName = "Lizards"}, ["Lizard High Guard"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15024, killsRequired = 100, raceName = "Lizards"}, ["Lizard Zaogun"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15025, killsRequired = 100, raceName = "Lizards"}, ["Lizard Legionnaire"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15026, killsRequired = 100, raceName = "Lizards"}, ["Lizard Chosen"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15031, killsRequired = 100, raceName = "Lizards"}, ["Lizard Dragon Priest"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15030, killsRequired = 100, raceName = "Lizards"}, ["Draken Warmaster"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15027, killsRequired = 100, raceName = "Drakens"}, ["Draken Spellweaver"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15003, killsRequired = 100, raceName = "Drakens"}, ["Draken Elite"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15028, killsRequired = 100, raceName = "Drakens"}, ["Draken Abomination"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15029, killsRequired = 100, raceName = "Drakens"}, ["Warlock"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15032, killsRequired = 100, raceName = "Warlocks"}, ["Infernalist"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15036, killsRequired = 100, raceName = "Infernalists"}, ["Behemoth"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15043, killsRequired = 100, raceName = "Behemoths"}, ["Worker Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15044, killsRequired = 100, raceName = "Golems"}, ["War Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15045, killsRequired = 100, raceName = "Golems"}, ["Moria Golem"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15046, killsRequired = 100, raceName = "Golems"}, ["Manwe"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15047, killsRequired = 100, raceName = "Golems"}, ["Caribian Pirate"] = {questStarted = 1526, questStorage = 65016, creatureStorage = 15048, killsRequired = 100, raceName = "Pirates"}, ["Ghastly Dragon"] = {questStarted = 1527, questStorage = 65017, creatureStorage = 15049, killsRequired = 100, raceName = "Ghastly Dragons"}, ["Necrolord"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15050, killsRequired = 100, raceName = "Necrolords"}, ["Blood Necrolord"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15051, killsRequired = 100, raceName = "Necrolords"}, ["Demon"] = {questStarted = 1529, questStorage = 65019, creatureStorage = 15052, killsRequired = 50, raceName = "Demons"} } if not isMonster(target) then return true end local creature = questCreatures[getCreatureName(target)] if creature then if getPlayerStorageValue(cid, creature.questStarted) > 0 then if getPlayerStorageValue(cid, creature.questStorage) < creature.killsRequired then setPlayerStorageValue(cid, creature.questStorage, getPlayerStorageValue(cid, creature.questStorage) < 0 and 1 or getPlayerStorageValue(cid, creature.questStorage) + 1) setPlayerStorageValue(cid, creature.creatureStorage, getPlayerStorageValue(cid, creature.creatureStorage) < 0 and 1 or getPlayerStorageValue(cid, creature.creatureStorage) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerStorageValue(cid, creature.creatureStorage) .. " " .. getCreatureName(target) .. " defeated. Total [" .. getPlayerStorageValue(cid, creature.questStorage) .. "/" .. creature.killsRequired .. "] " .. creature.raceName .. ".") end end end return true end
-
Erro Zombie Event :/
hmm, estranho, confere as posições do começo e final da área. depois tenta assim: 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 = 147, y = 60, z = 7, stackpos = 1}, -- Where the teleport will be created teleportToPosition = {x = 126, y = 310, z = 6}, -- 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 = 2, -- Players needed before the zombies can spawn. -- Should be the same as in the creaturescript! -- The zombies will spawn randomly inside this area fromPosition = {x = 125, y = 305, z = 7}, -- top left cornor of the playground toPosition = {x = 117, y = 311, 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) >= 2 then local pos = {x=math.random(config.fromPosition.x, config.toPosition.x), y=math.random(config.fromPosition.y, config.toPosition.y), z= config.fromPosition.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 Também postei um zombie hoje:
- OT 10.00 Windows?
-
(Resolvido)Sistema de loot por baús / chest loot system
local chest_areas = { [8001] = {name = 'Hunt Spider', time = 60, storage = 178740, container = 1988, items = {{100,2160,1},{50,2173,1},{5,2494,1},{30,2466,1},{80,2495,1},{100,2148,15}}}, [8002] = {name = 'Hunt Spider', time = 60, storage = 178741, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}}, [8003] = {name = 'Hunt Dragon', time = 60, storage = 178742, container = 1988, items = {{100,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1},{5,2160,1}}} } function onUse(cid, item, frompos, item2, topos) local v = chest_areas[item.actionid] if not v then return true end if getPlayerStorageValue(cid, v.storage) >= os.time() then doPlayerSendTextMessage(cid,22,'você só pode pegar outro premio em '..os.date("%d %B %Y %X", getPlayerStorageValue(cid, v.storage))..'.') return true end local items, quest_container, str = v.items, doPlayerAddItem(cid, v.container, 1), 'BackPack from '..v.name..', Your Rewards:\n' for i = 1, table.maxn(items) do local chance, item_id, amount = items[i][1], items[i][2], items[i][3] if chance >= math.random(1, 100) then str = str .. amount .. ' ' .. getItemNameById(item_id) .. ' '..(i ~= table.maxn(items) and ', ' or '.') if isItemStackable(item_id) or amount == 1 then doAddContainerItem(quest_container, item_id, amount) else for i = 1, amount do doAddContainerItem(quest_container, 1) end end end end doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) setPlayerStorageValue(cid, v.storage, os.time()+v.time*60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You have found a '..str) return true end a tag eu uso assim: <action actionid="8001;8002;8003" event="script" value="nome do seu script.lua"/> configuração tentei deixar pratica p/ você! [8001] = {name = 'Hunt Spider', time = 60, storage = 178740, container = 1988, items = {{100,2160,1},{50,2173,1},{5,2494,1},{30,2466,1},{80,2495,1},{100,2148,15}}}, [ACTION ID DO BAU] = { name -- é o nome da hunt que ele ta pegando o bau time -- tempo para voltar a abrir a chest, em minutos storage -- escolhe uma mas n repita container -- eu coloquei para dar dentro de uma bag ou bp, achei melhor agora o items é assim: items = {{chance, item id, quantidade}} exemplo: items = {{100,2160,10},{50,2173,1},{20,2494,1}}
- Highscore monstrando outfit
-
BUG HACK GM
Esta é uma mensagem automática! Este tópico foi movido para a área correta. Pedimos que você leia as regras do fórum.
-
SISTEMA !AUTOLOOT
qual versão do seu distro? porque dai tem que passar para arquivos.lua
-
[Pergunta] OT PvP Enforced
Esta é uma mensagem automática! Este tópico foi movido para a área correta. Pedimos que você leia as regras do fórum. O tibiaking é contra o comércio de servidores, códigos, sites, etc... Então evite mensagens/tópico deste interesse. Obrigado!
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
não não, vc não pode atacar os zombie, só correr deles, se o zombie te pegar você "morre", o último a sobreviver ganha o evento.
-
(Resolvido)Sistema de loot por baús / chest loot system
mas no caso eu posso abrir os 4 bau da hunt? claro que cada um teria sua horapara voltar a abrir a chest... ou eu escolho um dos 4 bau? que no caso vai ser a mesma configuração(mesmo loot)
-
[MODS] - [8.6] Perfect Zombie System [Automático] [V1.0]
Qual dúvida ou erro poste no tópico que estarei respondendo. Obs: Antes que me falem besteiras, coloquei para os GM'S, CM'S E GOD'S não contarem no evento, então testem apenas com jogadores. Zombie.xml <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Perfect Zombie System" version="8.6" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="zombie_config"><![CDATA[ zombie_config = { storages = {172100, 172101, 172102}, -- n edite players = {min = 2, max = 30}, -- min, max players no evento rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, timeToStartEvent = 30, -- segundos para começar o evento CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=147, y=55, z=7}, {x=125 , y=304, z=7}}, -- position do tp onde aparece, position para onde o jogador vai ao entrar no tp arena = {{x=110,y=297,z=7},{x=145,y=321,z=7}}, -- area positions monster_name = "Zombie Event", timeBetweenSpawns = 20, min_Level = 20 } zombie_days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","22:50","22:00"}, ["Wednesday"] = {"21:57","18:00","20:00","23:17"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","21:45","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"} } function removeZombieTp() local t = getTileItemById(zombie_config.teleport[1], 1387).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(zombie_config.teleport[1], CONST_ME_POFF) end function ZerarStoragesZombie() for _, stor in pairs(zombie_config.storages) do setGlobalStorageValue(stor, 0) end end function getPlayersInZombieEvent() local t = {} for _, pid in pairs(getPlayersOnline()) do if isInRange(getPlayerPosition(pid), zombie_config.arena[1], zombie_config.arena[2]) and getPlayerAccess(pid) < 3 then t[#t+1] = pid end end return t end function getZombieRewards(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function isWalkable(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function HaveCreatureZombie(area, remove) for x = area[1].x - 1, area[2].x + 1 do for y = area[1].y - 1, area[2].y + 1 do local pos = {x=x, y=y, z=area[1].z} local m = getTopCreature(pos).uid if remove ~= false and m ~= 0 and isMonster(m) then doRemoveCreature(m) end end end end function spawnZombie() if #getPlayersInZombieEvent() > 1 then local pos = {x=math.random(zombie_config.arena[1].x, zombie_config.arena[2].x), y=math.random(zombie_config.arena[1].y,zombie_config.arena[2].y), z=zombie_config.arena[1].z} if not isWalkable(pos, false, false, false) then spawnZombie() else doSummonCreature(zombie_config.monster_name, pos) doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE) addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA) doSendMagicEffect(pos, CONST_ME_MORTAREA) setGlobalStorageValue(zombie_config.storages[2], getGlobalStorageValue(zombie_config.storages[2]) <= 0 and 1 or getGlobalStorageValue(zombie_config.storages[2])+1) doBroadcastMessage("A zombie has spawned! There is currently " .. getGlobalStorageValue(zombie_config.storages[2]) .. " zombies in the zombie event!", MESSAGE_STATUS_CONSOLE_RED) addEvent(spawnZombie, zombie_config.timeBetweenSpawns *1000) end end end function CheckZombieEvent(delay) if getGlobalStorageValue(zombie_config.storages[1]) ~= (zombie_config.players.max+1) then if delay > 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.max then doBroadcastMessage("Zombie event starting in " .. delay .. " minutes! The teleport will be closed when the event start!", MESSAGE_STATUS_WARNING) elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) < zombie_config.players.min then for _, cid in pairs(getPlayersInZombieEvent()) do doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end removeZombieTp() doBroadcastMessage("The Zombie event could not start because of to few players participating.\n At least " .. zombie_config.players.min .. " players is needed!", MESSAGE_STATUS_WARNING) ZerarStoragesZombie() elseif delay == 0 and getGlobalStorageValue(zombie_config.storages[1]) >= zombie_config.players.min then removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1]) .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end addEvent(CheckZombieEvent, 60000, delay-1) end end]]></config> <event type="statschange" name="ZombieStats" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isMonster(attacker) and getCreatureName(attacker) == zombie_config.monster_name then if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then if #getPlayersInZombieEvent() > 1 then doBroadcastMessage(getPlayerName(cid) .. " have been eated by Zombies!", MESSAGE_STATUS_CONSOLE_RED) local corpse = doCreateItem(getPlayerSex(cid) == 1 and 3058 or 6081, 1, getPlayerPosition(cid)) doItemSetAttribute(corpse, "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by "..(isMonster(attacker) and "a "..string.lower(getCreatureName(attacker)) or isCreature(attacker) and getCreatureName(attacker) or "a field item")..".") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) if #getPlayersInZombieEvent() == 1 then local winner = getPlayersInZombieEvent()[1] doBroadcastMessage(getCreatureName(winner)..' has survived at zombie event!') local goblet = doPlayerAddItem(winner, zombie_config.rewards.trophy, 1) doItemSetAttribute(goblet, "description", "Awarded to " .. getPlayerName(winner) .. " for winning the Zombie event.") getZombieRewards(winner, zombie_config.rewards.items) doTeleportThing(winner, getTownTemplePosition(getPlayerTown(winner)), false) doSendMagicEffect(getPlayerPosition(winner), CONST_ME_TELEPORT) doBroadcastMessage(getPlayerName(winner).." won the Zombie event! Congratulations!") HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end else doBroadcastMessage("No one survived in the Zombie Event.", MESSAGE_EVENT_ADVANCE) HaveCreatureZombie(zombie_config.arena, true) ZerarStoragesZombie() end return false end end return true]]></event> <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[ domodlib('zombie_config') function onThink(interval, lastExecution) if zombie_days[os.date("%A")] then local hrs = tostring(os.date("%X")):sub(1, 5) if isInArray(zombie_days[os.date("%A")], hrs) and getGlobalStorageValue(zombie_config.storages[3]) <= 0 then local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(zombie_config.CheckTime) setGlobalStorageValue(zombie_config.storages[1], 0) setGlobalStorageValue(zombie_config.storages[2], 0) HaveCreatureZombie(zombie_config.arena, true) end end return true end]]></globalevent> <event type="login" name="Zombie_Login" event="script"><![CDATA[ domodlib('zombie_config') function onLogin(cid) registerCreatureEvent(cid, "ZombieBattle") registerCreatureEvent(cid, "ZombieStats") if isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end return true end]]></event> <event type="combat" name="ZombieBattle" event="script"><![CDATA[ domodlib('zombie_config') if isPlayer(cid) and isPlayer(target) and isInRange(getPlayerPosition(cid), zombie_config.arena[1], zombie_config.arena[2]) then doPlayerSendCancel(cid, "You may not attack this player.") return false end return true ]]></event> <movevent type="StepIn" actionid ="45110" event="script"><![CDATA[ domodlib('zombie_config') function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerAccess(cid) > 3 then return doTeleportThing(cid, zombie_config.teleport[2]) end if getPlayerLevel(cid) < zombie_config.min_Level then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, "You need to be at least level " .. zombie_config.min_Level .. ".") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end if getGlobalStorageValue(zombie_config.storages[1]) <= zombie_config.players.max then doTeleportThing(cid, zombie_config.teleport[2]) setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) doBroadcastMessage(getPlayerName(cid) .. " entered the Zombie event! Currently " .. getGlobalStorageValue(zombie_config.storages[1]) .. " players have joined!", MESSAGE_STATUS_CONSOLE_RED) if getGlobalStorageValue(zombie_config.storages[1]) == zombie_config.players.max then setGlobalStorageValue(zombie_config.storages[1], getGlobalStorageValue(zombie_config.storages[1])+1) removeZombieTp() doBroadcastMessage("The Zombie event is now full [" .. getGlobalStorageValue(zombie_config.storages[1])-1 .. " players]! The event will soon start.") for _, var in pairs(getPlayersInZombieEvent()) do doPlayerSendTextMessage(var, MESSAGE_EVENT_ADVANCE, "The first zombie will spawn in " .. zombie_config.timeToStartEvent .. " seconds! Good luck!") end addEvent(spawnZombie, zombie_config.timeToStartEvent*1000) end end return true end]]></movevent> <talkaction words="/zombiestart;!zombiestart" access="5" event="buffer"><![CDATA[ domodlib('zombie_config') if getGlobalStorageValue(zombie_config.storages[3]) > 0 then doPlayerSendCancel(cid, "The event is already starting.") return true elseif not param or not tonumber(param) then doPlayerSendCancel(cid, "Use only numbers.") return true end local param = tonumber(param) <= 0 and 1 or tonumber(param) local tp = doCreateItem(1387, 1, zombie_config.teleport[1]) doItemSetAttribute(tp, "aid", 45110) CheckZombieEvent(tonumber(param)) ZerarStoragesZombie() setGlobalStorageValue(zombie_config.storages[3], 1) HaveCreatureZombie(zombie_config.arena, true) ]]></talkaction> <globalevent name="ZombieDebug-Start" type="start" event="buffer"><![CDATA[ domodlib('zombie_config') ZerarStoragesZombie() return true]]></globalevent> </mod> OBS: Quem serve em milesegundos, mude essa parte: <globalevent name="Zombie_Start" interval="60" event="script"><![CDATA[ para <globalevent name="Zombie_Start" interval="60000" event="script"><![CDATA[ ----------------------------------------------------- // -------------------------------------------------- o monstro você instala em data/monsters zombie event.xml <?xml version="1.0" encoding="UTF-8"?> <monster name="Zombie Event" nameDescription="an zombie event" race="undead" experience="280" speed="100" manacost="0"> <health now="500" max="500"/> <look type="311" corpse="9875"/> <targetchange interval="5000" chance="50"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="0"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" min="-35000" max="-35000"/> </attacks> <defenses armor="15" defense="10"/> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You wont last long!"/> <voice sentence="Mmmmh.. braains!"/> </voices> <loot> <item id="2148" countmax="1" chance="100000"/><!-- gold coin --> </loot> </monster> e a tag em monsters.xml <monster name="Zombie Event" file="zombie event.xml"/> Configuração Sistema zombie_config = { storages = {172100, 172101}, -- não edite players = {min = 2, max = 30}, -- número minimo e máximo para jogadores no evento rewards = {items ={{2160,10},{2494,1}}, trophy = 5805}, -- premiações do jogador timeToStartEvent = 30, -- segundos para começar o evento após dar start CheckTime = 5, -- tempo que o TP fica aberto para os jogadores adrentarem o evento teleport = {{x=145, y=50, z=7}, {x=176 , y=54, z=5}}, -- posiçãodo tp onde aparece, posição para onde o jogador vai ao entrar no tp arena = {{x=173,y=52,z=5},{x=179,y=56,z=6}}, -- posição começo e final da area do evento monster_name = "Zombie Event", -- nome do monstro que será sumonado timeBetweenSpawns = 20, -- a cada quantos segundos é dado o respaw time do zombie no evento min_Level = 20 -- level minimo para participar do evento } Dia e Horário zombie_days = { ["Monday"] = {"13:00","18:00","20:00","22:00"}, ["Tuesday"] = {"13:00","18:00","20:00","22:00"}, ["Wednesday"] = {"13:00","18:00","20:00","22:00"}, ["Thursday"] = {"13:00","18:00","20:00","22:00"}, ["Friday"] = {"13:00","18:00","20:00","22:00"}, ["Saturday"] = {"13:00","18:00","20:00","22:00"}, ["Sunday"] = {"13:00","18:00","20:00","22:00"} } ["Dia em inglês"] = {"horário do evento"} Configurando a área: zombie lua.rar
-
(Resolvido)Sistema de loot por baús / chest loot system
são 4 baús na msm hunt? não entendi direito essa parte... ou é 4 bau dividida em 4 hunt tbm?
-
NPC - SCRIPT - REPAIR
Testei o script aqui e funcionou, pode ser algum problema na função, tente alterar as mensagens do 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 coin, amount = 25379, 15 -- id do token e quanto sera removido local old, new = 26442, 26438 if isInArray({"reparar","repair","repara"}, msg) then npcHandler:say('Voce deseja reparar seu item por 15 coins?', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerItemCount(cid, old) >= 1 then if doPlayerRemoveItem(cid, coin, amount) then doPlayerRemoveItem(cid, old, 1) doPlayerAddItem(cid, new) npcHandler:say('Aqui esta o seu item!', cid) else npcHandler:say('Desculpe, mas voce precisa de 15 coins.', cid) end else npcHandler:say('Desculpe, mas voce nao possui um item para reparar.', cid) end talkState[talkUser] = 0 elseif msg == "no" and talkState[talkUser] >= 1 then npcHandler:say("then ok.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Qual o nome do slot da flecha ?
sim, se eu não me engano é o AMMO CONST_SLOT_FIRST = 1 CONST_SLOT_HEAD = CONST_SLOT_FIRST CONST_SLOT_NECKLACE = 2 CONST_SLOT_BACKPACK = 3 CONST_SLOT_ARMOR = 4 CONST_SLOT_RIGHT = 5 CONST_SLOT_LEFT = 6 CONST_SLOT_LEGS = 7 CONST_SLOT_FEET = 8 CONST_SLOT_RING = 9 CONST_SLOT_AMMO = 10 CONST_SLOT_LAST = CONST_SLOT_AMMO
-
Meu domínio não acessa com www.
Esta é uma mensagem automática! Este tópico foi movido para a área correta. Pedimos que você leia as regras do fórum.
-
Efeito De Cima
não testei, mas testa assim: local positions = { ["Baiak Sky"] = {{x = 160, y = 54, z = 7}, CONST_ANI_FIRE, CONST_ME_FIREAREA}, ["Zumbie"] = {{x = 165, y = 50, z = 7}, CONST_ANI_ENERGY, CONST_ME_ENERGYAREA}, ["ArenaPVP"] = {{x = 157, y = 53, z = 7}, CONST_ANI_ICE, CONST_ME_ICEAREA} } function onThink(cid, interval, lastExecution) for text, v in pairs(positions) do local pos = v[1] doSendAnimatedText(pos, text, math.random(1, 255)) doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, v[3]) addEvent(doSendMagicEffect, 150, pos, v[2]) end return true end
-
(Resolvido)Suporte nesse script
function onSay(cid, words, param) --[Vocation] = ( Nova Vocation, New Outfit ) local config = { -- Goku [473] = {499, 560}, -- Vegeta [474] = {500, 567}, -- Piccolo [44] = {501, 553}, -- C17 [56] = {531, 559}, -- Gohan [70] = {502, 559}, -- Trunks [490] = {503, 565}, -- Cell [94] = {504, 575}, -- Freeza [110] = {505, 551}, -- Majin Boo [475] = {528, 581}, -- Broly [980] = {506, 558}, -- C18 [151] = {507, 554}, -- Uub [163] = {529, 582}, -- Goten [177] = {508, 561}, -- Chibi Trunks [191] = {509, 561}, -- Cooler [205] = {510, 573}, -- Dende [217] = {511, 552}, -- Tsuful [229] = {512, 569}, -- Bardock [243] = {513, 552}, -- Kuririn [255] = {514, 542}, -- Pan [267] = {515, 543}, -- Kaio [279] = {516, 583}, -- Videl [291] = {530, 605}, -- Janemba [491] = {517, 576}, -- Tenshinhan [315] = {518, 580}, -- Jenk [327] = {519, 562}, -- Raditz [981] = {520, 564}, -- C16 [351] = {521, 555}, -- Turles [382] = {522, 566}, -- Bulma [375] = {523, 578}, -- Shenron [376] = {524, 577}, -- Vegetto [399] = {525, 568}, -- Tapion [476] = {498, 596}, -- Kame [424] = {526, 536}, -- King Vegeta [984] = {497, 563}, -- Kagome [448] = {496, 571}, -- Zaiko [477] = {495, 572}, -- Chilled [492] = {494, 574}, -- C8 [489] = {527, 579}, --Goku Black [540] = {541, 656}, --Golden Freeza [550] = {551, 586}, --Bills [560] = {561, 584}, --Zamasu [854] = {563, 614}, --Goku Black Evo [639] = {640, 655} } local voc = config[getPlayerVocation(cid)] if not voc then return true end local outfit,newvoc = {lookType = voc[2]},voc[1] if getPlayerStorageValue(cid,99023) == 4 then if getPlayerStorageValue(cid, 1240) < os.time() then doCreatureChangeOutfit(cid, outfit) doPlayerSetVocation(cid, newvoc) setPlayerStorageValue(cid,1240,os.time()+5) doPlayerSendTextMessage(cid, 27, "Voce virou GOD") end else return doPlayerSendTextMessage(cid, 27, "Você nao é um GOD...") end return true end
-
Retirar parte do script
achei que vc estava editando ela pra alguma coisa rsrsrs pode remover ela e essa linha tbm: doSendMagicEffect(position127, 109)