Postado Abril 21, 2013 12 anos Informações: 4 jogadores ficam em 4 tiles Puxa a alavanca Eles são teletransportados para uma sala Após 30 segundos a bomba vai ativar A cada minuto 3 monstros irão aparecer na sala Depois de 15 minutos a explosão do quarto e todos morrem A missão no quarto é para destruir uma parede com um monte de health para sobreviver (se eles destruirem o muro, eles poderam entrar em um teleporte para obter sua recompensa). Testado em: The Forgotten Server v0.2.14 (Mystic Spirit)Screen 1 - Screen 2 - Vá em data/actions/scripts, crie um arquivo .lua e renomeie para bombSquad, adicione isto - function monsterSpawns() local monsters = {"Rat", "Rotworm", "Orc Leader", "Bog Raider", "Giant Spider", "Diabolic Imp", "Destroyer", "Dark Torturer", "Behemoth", "Hellspawn", "War Golem", "Serpent Spawn", "Hellhound", "Plaguesmith", "Demon", "Undead Dragon"} -- list of monster which should spawn (do not add extra monster / only change the names) local monstersPos = {x=308, y=274, z=7} -- Where the monsters should be spawned local northWestX = 304 -- North West X of the room with the bomb local northEastX = 319 -- North East X of the room with the bomb local northWestY = 270 -- North West Y of the room with the bomb local southWestY = 279 -- South West Y of the room with the bomb local roomFloor = 7 -- Floor / Z of the room with the bomb if getGlobalStorageValue(17000) == 1 then if getGlobalStorageValue(17001) <= 15 then setGlobalStorageValue(17001, getGlobalStorageValue(17001)+1) addEvent(monsterSpawns, 60*1000) for i = 1, 3 do -- summons 3 monsters doSummonCreature(monsters[getGlobalStorageValue(17001)], monstersPos) end else setGlobalStorageValue(17000, 0) setGlobalStorageValue(17001, 0) for x = northWestX, northEastX do for y = northWestY, southWestY do local explosionArea = {x=x, y=y, z=roomFloor, stackPos=253} local getCreatures = getTopCreature(explosionArea).uid doSendMagicEffect(explosionArea, CONST_ME_FIREATTACK) if(isCreature(getCreatures) == TRUE) then doCreatureAddHealth(getCreatures, -getCreatureHealth(getCreatures)) end end end end end return true end local playerPosition = { {x=293, y=275, z=7, stackpos=STACKPOS_TOP_CREATURE}, -- The tiles they should stand on when pulling the switch {x=294, y=275, z=7, stackpos=STACKPOS_TOP_CREATURE}, {x=295, y=275, z=7, stackpos=STACKPOS_TOP_CREATURE}, {x=296, y=275, z=7, stackpos=STACKPOS_TOP_CREATURE} } local newPosition = { {x=305, y=273, z=7}, -- Where they get teleported in the room with the bomb {x=305, y=274, z=7}, {x=305, y=275, z=7}, {x=305, y=276, z=7} } local wallName = "Brick Wall" -- Name of the "Wall monster" local wallPos = {x=319, y=275, z=7} -- Where the wall should be -- do not edit below here!-- setGlobalStorageValue(17000,0) setGlobalStorageValue(17002,0) function onUse(cid, item, fromPosition, itemEx, toPosition) local player = {} if item.itemid == 1945 then setGlobalStorageValue(17002,0) if getGlobalStorageValue(17000) == 0 then for i = 1, 4 do player[i] = getThingfromPos(playerPosition[i]) if player[i].itemid > 0 then if isPlayer(player[i].uid) == true then if getPlayerLevel(player[i].uid) <= 99 then doPlayerSendCancel(cid, "All players need to be level 100 or higher.") else setGlobalStorageValue(17002, getGlobalStorageValue(17002)+1) if getGlobalStorageValue(17002) == 4 then for i = 1, 4 do doSendMagicEffect(playerPosition[i], CONST_ME_POFF) doTeleportThing(player[i].uid, newPosition[i], FALSE) doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA) end addEvent(monsterSpawns, 30*1000) doSummonCreature(wallName, wallPos) doTransformItem(item.uid, item.itemid + 1) setGlobalStorageValue(17001, 0) setGlobalStorageValue(17000, 1) else doPlayerSendCancel(cid, "You need 4 people to start this quest.") end end end end end elseif getGlobalStorageValue(17000) == 1 then doPlayerSendCancel(cid, "There is allready a team inside, please be patient.") end elseif item.itemid == 1946 then doTransformItem(item.uid, item.itemid - 1) doPlayerSendCancel(cid, "Sorry, not possible.") end return true end Em actions.xml, adicione a seguinte tag - <action actionid="17000" event="script" value="bombQuest/bombSquad.lua"/> Vá em data/movements/scripts, crie um arquivo .lua e renomeie para bombSquad, adicione isto -function onStepIn(cid, item, position, fromPosition) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doSendMagicEffect(fromPosition, CONST_ME_POFF) return true end Em movements.xml, adicione a seguinte tag -<movevent type="StepIn" actionid="17001" event="script" value="bombSquad.lua"/> Vá em monsters/misc (caso não tiver a pasta misc, crie ela), copie um arquivo .xml e renomeie para Brick Wall, adicione isto - <?xml version="1.0" encoding="UTF-8"?> <monster name="Brick Wall" nameDescription="a brick wall" race="blood" experience="500000" speed="0" manacost="200"> <health now="540000" max="540000"/> <look typeex="1025"/> <targetchange interval="2000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="0" attack="0"> </attack> </attacks> <defenses armor="1" defense="5"/> <loot> </loot> </monster> Em monsters.xml, adicione a tag - <monster name="Brick Wall" file="Misc/Brick Wall.xml"/> Créditos - sanderman (Edição), Third Aid (Script Original)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.