alisonjf 2 #1 Postado 4 Dezembro, 2008 Nome: Demon-Oak quest, demon legs quest Versão: 8.2+ Tipo de Script: Action Servidor Testado: Nenhum Créditos: Mazen ------------------------------------------------------------------------ Bom, vim trazer uma quest que muita gente me pediu, a Demon-Oak Quest, mais conhecida como a quest da sonhada Demon Legs. Vamos aos scripts: Na pasta data/actions/scripts crie uma pasta chamda tools e dentro dela crie um arquivo chamado hallowed_axe.lua e insira: function onUse(cid,item,frompos,item2,topos) number = math.random(1,100) chance = 95 minItem = 1 maxItem = 3 mind = 300 maxd = 500 if chance > 100 or chance == 0 then chance = 100 end ----------------------------------------------------------------------------------------- -- Variables leftspikedballpos11 = {x=topos.x-1, y=topos.y+2, z=topos.z} leftspikedballpos12 = {x=topos.x+2, y=topos.y+1, z=topos.z} leftspikedballpos13 = {x=topos.x-1, y=topos.y-2, z=topos.z} leftspikedballpos14 = {x=topos.x+2, y=topos.y-1, z=topos.z} leftspikedballpos21 = {x=topos.x-1, y=topos.y-2, z=topos.z} leftspikedballpos22 = {x=topos.x-2, y=topos.y-1, z=topos.z} leftspikedballpos31 = {x=topos.x-1, y=topos.y+2, z=topos.z} leftspikedballpos32 = {x=topos.x-2, y=topos.y+1, z=topos.z} birdpos11 = {x=topos.x+2, y=topos.y+1, z=topos.z} birdpos12 = {x=topos.x+1, y=topos.y+2, z=topos.z} birdpos13 = {x=topos.x+2, y=topos.y, z=topos.z} birdpos14 = {x=topos.x+1, y=topos.y, z=topos.z} birdpos21 = {x=topos.x+2, y=topos.y+1, z=topos.z} birdpos22 = {x=topos.x+1, y=topos.y+2, z=topos.z} birdpos31 = {x=topos.x-2, y=topos.y+1, z=topos.z} birdpos32 = {x=topos.x-1, y=topos.y, z=topos.z} rightspikedballpos11 = {x=topos.x+1, y=topos.y, z=topos.z} rightspikedballpos12 = {x=topos.x+2, y=topos.y-1, z=topos.z} rightspikedballpos13 = {x=topos.x+1, y=topos.y+2, z=topos.z} rightspikedballpos14 = {x=topos.x+2, y=topos.y+1, z=topos.z} rightspikedballpos21 = {x=topos.x+1, y=topos.y+2, z=topos.z} rightspikedballpos22 = {x=topos.x+2, y=topos.y+1, z=topos.z} rightspikedballpos31 = {x=topos.x-1, y=topos.y+2, z=topos.z} rightspikedballpos32 = {x=topos.x-2, y=topos.y+1, z=topos.z} faceoftreepos11 = {x=topos.x-2, y=topos.y-1, z=topos.z} faceoftreepos12 = {x=topos.x+1, y=topos.y-2, z=topos.z} faceoftreepos13 = {x=topos.x+2, y=topos.y-1, z=topos.z} faceoftreepos14 = {x=topos.x-1, y=topos.y-2, z=topos.z} faceoftreepos21 = {x=topos.x-2, y=topos.y-1, z=topos.z} faceoftreepos22 = {x=topos.x-1, y=topos.y-2, z=topos.z} faceoftreepos31 = {x=topos.x-2, y=topos.y+1, z=topos.z} faceoftreepos32 = {x=topos.x-1, y=topos.y+2, z=topos.z} ----------------------------------------------------------------------------------------- --------------------Demon oak(The left spiked ball)-------------------- if item2.itemid == 8289 then leftspikedball = getPlayerStorageValue(cid,20000) if leftspikedball == -1 or leftspikedball == 0 then if number <= chance then surp = math.random(minItem, maxItem) if surp == 1 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("bone beast",leftspikedballpos11) doSummonCreature("bone beast",leftspikedballpos12) doSummonCreature("bone beast",leftspikedballpos13) doSummonCreature("bone beast",leftspikedballpos14) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("lich",leftspikedballpos11) doSummonCreature("lich",leftspikedballpos12) doSummonCreature("lich",leftspikedballpos13) doSummonCreature("lich",leftspikedballpos14) end end if surp == 2 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("lich",leftspikedballpos21) doSummonCreature("giant spider",leftspikedballpos22) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("grim reaper",leftspikedballpos21) doSummonCreature("dark torturer",leftspikedballpos22) end end if surp == 3 then if number <= 50 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("undead dragon",leftspikedballpos31) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("grim reaper",leftspikedballpos31) doSummonCreature("dark torturer",leftspikedballpos32) end end else doSendMagicEffect(topos,2) setPlayerStorageValue(cid,20000,1) end else doSendMagicEffect(topos,2) end return 1 end --------------------Demon oak(The bird)-------------------- if item2.itemid == 8288 then bird = getPlayerStorageValue(cid,20001) if bird == -1 or bird == 0 then if number <= chance then surp = math.random(minItem, maxItem) if surp == 1 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("banshee",birdpos11) doSummonCreature("banshee",birdpos12) doSummonCreature("banshee",birdpos13) doSummonCreature("banshee",birdpos14) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("braindeath",birdpos11) doSummonCreature("braindeath",birdpos12) doSummonCreature("braindeath",birdpos13) doSummonCreature("braindeath",birdpos14) end end if surp == 2 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("demon",birdpos21) doSummonCreature("diabolic imp",birdpos22) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("blightwalker",birdpos21) doSummonCreature("betrayed wraith",birdpos22) end end if surp == 3 then if number <= 50 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("undead dragon",birdpos31) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("hand of cursed fate",birdpos31) doSummonCreature("dark torturer",birdpos32) end end else doSendMagicEffect(topos,2) setPlayerStorageValue(cid,20001,1) end else doSendMagicEffect(topos,2) end return 1 end --------------------Demon oak(The right spiked ball)-------------------- if item2.itemid == 8290 then rightspikedball = getPlayerStorageValue(cid,20002) if rightspikedball == -1 or rightspikedball == 0 then if number <= chance then surp = math.random(minItem, maxItem) if surp == 1 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("lich",rightspikedballpos11) doSummonCreature("lich",rightspikedballpos12) doSummonCreature("lich",rightspikedballpos13) doSummonCreature("lich",rightspikedballpos14) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("giant spider",rightspikedballpos11) doSummonCreature("giant spider",rightspikedballpos12) doSummonCreature("giant spider",rightspikedballpos13) doSummonCreature("giant spider",rightspikedballpos14) end end if surp == 2 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("dark torturer",rightspikedballpos21) doSummonCreature("demon",rightspikedballpos22) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("diabolic imp",rightspikedballpos21) doSummonCreature("diabolic imp",rightspikedballpos22) end end if surp == 3 then if number <= 50 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("hand of cursed fate",rightspikedballpos31) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("grim reaper",rightspikedballpos31) doSummonCreature("grim reaper",rightspikedballpos32) end end else doSendMagicEffect(topos,2) setPlayerStorageValue(cid,20002,1) end else doSendMagicEffect(topos,2) end return 1 end --------------------Demon oak(The face of the tree)-------------------- if item2.itemid == 8291 then faceoftree = getPlayerStorageValue(cid,20003) if faceoftree == -1 or faceoftree == 0 then if number <= chance then surp = math.random(minItem, maxItem) if surp == 1 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("vampire",faceoftreepos11) doSummonCreature("vampire",faceoftreepos12) doSummonCreature("vampire",faceoftreepos13) doSummonCreature("vampire",faceoftreepos14) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("diabolic imp",faceoftreepos11) doSummonCreature("diabolic imp",faceoftreepos12) doSummonCreature("diabolic imp",faceoftreepos13) doSummonCreature("diabolic imp",faceoftreepos14) end end if surp == 2 then if number <= 75 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("demon",faceoftreepos21) doSummonCreature("grim reaper",faceoftreepos22) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("hand of cursed fate",faceoftreepos21) doSummonCreature("hand of cursed fate",faceoftreepos22) end end if surp == 3 then if number <= 50 then doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("undead dragon",faceoftreepos31) doSummonCreature("hand of cursed fate",faceoftreepos32) else doSendMagicEffect(topos,0) doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -290, -510, CONST_ME_BIGPLANTS) doSummonCreature("grim reaper",faceoftreepos31) doSummonCreature("hand of cursed fate",faceoftreepos32) end end else doSendMagicEffect(topos,2) setPlayerStorageValue(cid,20003,1) end else doSendMagicEffect(topos,2) end return 1 end return 0 end[/php] \data\actions\scripts grave_room.LUA: [php] local roomPos = {x = 424, y = 493, z = 8} function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 30330 then if(getPlayerStorageValue(cid, 20000) == TRUE) and (getPlayerStorageValue(cid, 20001) == TRUE) and (getPlayerStorageValue(cid, 20002) == TRUE) and (getPlayerStorageValue(cid, 20003) == TRUE) then doTeleportThing(cid, roomPos, TRUE) doSendMagicEffect(roomPos, CONST_ME_TELEPORT) end end return TRUE end Agora crie um arquivo chamado lukangel.lua na pasta data/actions/scripts e insira: local vampireHouse = {x = 202, y = 360, z = 7} function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 30331 then doTeleportThing(cid, vampireHouse, TRUE) doSendMagicEffect(vampireHouse, CONST_ME_TELEPORT) end return TRUE end Crie outra pasta com o nome quests dentro da pasta data/actions/scripts, então crie um arquivo chamado DOQChests.lua e insira: function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 12901 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Demon Legs.") doPlayerAddItem(cid,2495,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, 22,"It is empty.") end elseif item.uid == 12902 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Rainbow Shield.") doPlayerAddItem(cid,8905,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, 22,"It is empty.") end elseif item.uid == 12903 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Spellbook of Dark Mysteries.") doPlayerAddItem(cid,8918,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, 22,"It is empty.") end elseif item.uid == 12904 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Royal Crossbow.") doPlayerAddItem(cid,8851,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, 22,"It is empty.") end end return 1 end Agora na pasta data/actions, abra o arquivo actions.xml e insira: <action uniqueid="12901" script="quests/DOQChests.lua" /> --- Demon Legs --- <action uniqueid="12902" script="quests/DOQChests.lua" /> --- Rainbow Shield --- <action uniqueid="12903" script="quests/DOQChests.lua" /> --- Spellbook of Dark Mysteries --- <action uniqueid="12904" script="quests/DOQChests.lua" /> --- Royal Crossbow --- <action itemid="8293" script="tools/hallowed_axe.lua"/> <action uniqueid="30330" script="grave_room.lua" /> <action uniqueid="30331" script="lukangel.lua" /> Agora crie um arquivo chamado demon-oak_hit.lua dentro da pasta data/movements/scripts e insira: local minDamage = 50 local maxDamage = 300 function onStepIn(cid, item, pos) if item.actionid == 65535 then if math.random(1, 6) == TRUE then doTargetCombatHealth(0, cid, COMBAT_POISONDAMAGE, -minDamage, -maxDamage, CONST_ME_BIGPLANTS) end end return TRUE end Novamente na pasta data/movements/scripts crie um arquivo chamado dotile.lua[/u] e insira: local tree = {x = 419, y = 442, z = 7, stackpos=1} local monsterPos1 = {x = 418, y = 444, z = 7} local monsterPos2 = {x = 420, y = 444, z = 7} function onStepIn(cid, item, pos) local monsterFlower = "Moonflower" if getPlayerLevel(cid) < 120 then doMoveCreature(cid, NORTH) doCreatureSay(cid, "You must be at least level 120 or higher.", TALKTYPE_ORANGE_1) elseif getPlayerLevel(cid) >= 120 then doMoveCreature(cid, SOUTH) doCreateItem(2717, tree) doSummonCreature(monsterFlower, monsterPos1) doSummonCreature(monsterFlower, monsterPos2) doSendMagicEffect(monsterPos1, CONST_ME_SMALLPLANTS) doSendMagicEffect(monsterPos2, CONST_ME_SMALLPLANTS) end return TRUE end EXTRA: Aqui está o npc de POH que faz parte da quest: <?xml version="1.0"?> <npc name="Cripchamblor" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="57" head="20" body="30" legs="40" feet="50" corpse="6080"/> <interaction range="3" idletime="0" defaultpublic="0"> <interact keywords="hi" focus="1"> <!--These are the alternative keywords--> <keywords>hello</keywords> <response text="Hello |NAME|."/> </interact> <interact keywords="bye" focus="0"> <keywords>farewell</keywords> <response text="Good job!"> <!-- <action name="script"> doRemoveCreature(getNpcCid()); </action> --> </response> </interact> <interact event="onPlayerLeave" focus="0"> <response text="It was a pleasure to help you |NAME|."/> </interact> <!--Example of using storage values, storageComp can be less/lessorequal/equal/greater/greaterorequal--> <!--In this example it checks if the storage value of 5500 is less than 0--> <!--Another way to write it would be storageValue="-1" storageComp="equal"--> <!--Basically we check if the storage id of 5500 is -1, ie. not having any value yet.--> <interact keywords="demon;oak" storageId="21545" storageValue="0" storageComp="less"> <response text="Did you defeat the demon oak?"> <interact keywords="yes"> <response text="Go defeat the demon oak."> <action name="storage" key="21545" value="1"/> </response> </interact> </response> </interact> <interact keywords="demon;oak" storageId="21545" storageValue="1" storageComp="equal"> <response text="You already know my secret, now leave me alone!"> <action name="idle" value="1"/> </response> </interact> <!-->End of example of using storage value--> <!-- Buy item(s) interaction, see merchant glut for a real seller/buyer npc--> <interact keywords="|AMOUNT|;hallowed;axe"> <keywords>hallowed;axe</keywords> <response text="Do you want to buy a Hallowed Axe from me?"> <action name="topic" value="3"/> <action name="item" value="8293"/> <action name="price" value="1000"/> <action name="amount" value="|AMOUNT|"/> </response> </interact> <interact keywords="yes" topic="3"> <response param="lowmoney" text="Please bring you enough with money."/> <response text="Here you are. You can now defeat the demon oak with this axe."> <action name="buy" value="|PRICE|"/> </response> </interact> <!-- End of buy item(s) interaction--> </interaction> </npc> As falas com ele são: -hi -demon oak -yes -demon oak -hallowed axe -yes -------------------------------------------------------------------------- Gostaram: Doem OT$ Reclamações/Dúvidas: Postem Compartilhar este post Link para o post
Nord 2 #2 Postado 8 Dezembro, 2008 Até já tinha visto um script disso mas o seu tem o NPC e umas coisas mudadas. Aprovado Compartilhar este post Link para o post
godzinho 0 #3 Postado 8 Dezembro, 2008 Vo testa e daqui a pouco eu ponho a minha opnião mais tenho certeza que esta bom afinal vc so traz coisas boas ao OtServ Compartilhar este post Link para o post
MotoBoy 0 #4 Postado 8 Dezembro, 2008 deve ter dado um trabalhão hein cara?? ^^ cara.. brigadão.! a minha atav improvisada, pq eu tava com preguiça de fazer thnxx!! flws~~ Compartilhar este post Link para o post
123123 1 #5 Postado 9 Dezembro, 2008 Alguem jah testou isso ai? Compartilhar este post Link para o post
Klenioyok 0 #6 Postado 9 Dezembro, 2008 Sim, testado e aprovado! Compartilhar este post Link para o post
lokodelloko 0 #7 Postado 10 Dezembro, 2008 Otima Scripter.. Parabens COntinue Assim !! Funfo Certinho Aqui Parabens Mesmo Compartilhar este post Link para o post
123123 1 #8 Postado 11 Dezembro, 2008 Oq é esse: local monsterPos1 = {x = 418, y = 444, z = 7}local monsterPos2 = {x = 420, y = 444, z = 7} Compartilhar este post Link para o post
tibianoforever 0 #9 Postado 11 Dezembro, 2008 Uma explicação não faria mal... Mesmo assim bom script =) Compartilhar este post Link para o post
Natanzera 0 #10 Postado 11 Dezembro, 2008 Por favor poste uma explicação de onde colocar etc... como intender este script e tals pq a gente fika sem saber oq fazer =/ Obrigado Compartilhar este post Link para o post
bomba 0 #11 Postado 13 Dezembro, 2008 (editado) Lol cara eu só não entendi porque tirou meus créditos, eu vou atraz disso... eu não postei na otnet porque não saberia como explicar a instalação, eu posso até dizer o forum que está postado estes mesmos scripts, posso falar quem me ajudou, e posso fala também que os scripts não foram nenhum pouco editados, você apenas retirou a parte dos créditos. Eu quero meus créditos ali, como deveria, se você não sabe criar scripts então porque tira o crédito de quem criou?? Esses scripts fui eu quem fez, menos o da axe e o npc. Editado 13 Dezembro, 2008 por bomba Compartilhar este post Link para o post
bomba 0 #12 Postado 13 Dezembro, 2008 Oq é esse: Isso ai é a posição dos 2 novos monstros que eu tinha criado para a quest ficar um pouco diferente do Tibia global, o nome deles eram Moonflower com a aparencia da moonflower. No meu serv era assim, você passava num piso e se fosse lvl 100+ esse 2 monstros iam aparecer impedindo vc passar, não teria como voltar pois nasce uma arvore atraz de você... então deveria matar esses 2 monstros para chegar na DemonOak. Esses scripts fui eu quem fez, menos o da axe e o npc. Compartilhar este post Link para o post
123123 1 #13 Postado 14 Dezembro, 2008 A valeu bomba... o outra duvida, oq eh esse vampirehouse? Compartilhar este post Link para o post
bomba 0 #14 Postado 14 Dezembro, 2008 Quando eu criei, eu fiz um lugar onde tinha uma casa de um vampiro, e uns caixões fora... daria para clikar neste caixão apos ter exterminado a arvore. Quando clika neste caixão é teleportado para a sala das quests. Compartilhar este post Link para o post