• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action Demon Oak-Quest

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
Demon Oak-Quest
\data\actions\scripts\tools
hallowed_axe.LUA:
Code:
--script on hallowed axe--
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]------Made by BomBa
 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

\data\actions\scripts
lukangel.LUA:
Code:
------Made by BomBa
 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

\data\actions\scripts\quests
DOQChests.LUA:
Code:
--- Made by Mazen ---
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

\data\actions
actions.XML:
Code:
	<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" />

\data\movements\scripts
demon-oak_hit.LUA:
Code:
------Made by BomBa
 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

\data\movements\scripts
dotile.LUA:
Code:
------Made by BomBa
 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

NPC Script: http://otland.net/f83/cripchamblor-12281/#post126091

I will post a video.
 
Last edited:
I scripted this!. You didn't write any credits!

You just edited it...
 
Last edited by a moderator:
You made quests man...
I made: Lukangel, Demon-Oak hit, Dotile(new).
 
aff in moviments.xml i put what?
who i install?
need aply action id??
aff ¬¬!
 
would be rlly rlly helpful if you could give us a small map area with the tree and grave and then we can just copy it into a place on our map
 
Yea hes right, I understand nothing as to how to map this quest from what youve given me :(
 
kan någon komma till min server needar scripters och mappers


ip:legend.hopto.org
port:7171
version:8.21
 
can i know what dotile exacly do ? xd for what is that?
edit: how to do that one person can only be in demon oak room ? on rl i think it can be 1 person...
 
Last edited:
Hello!
I need script when you StepIn to teleport/tile remove tree id"2717"
from pos that I choose...
?? ;D

PS. I use TFS 0.2 (8.31)
Thanks A Lot
 
Error in lua(hallowed axe,grave_room,

lua 291 : unexpecte symbol near '[' please one solution.



ty my ot tfs.
 
i need a solution how to do demon oak one player per demon oak arena ...
 
What does this mean? ;s

Code:
 local monsterPos1 = {x = 418, y = 444, z = 7}
 local monsterPos2 = {x = 420, y = 444, z = 7}
 
PLEASE post a picture/movie of the places the scripts should be set because I don't understand a thing.
 
Back
Top