• 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 [TFS 0.3b3] Working Demon Oak Quest

Szakal

Frank Jaeger
Joined
Apr 16, 2008
Messages
1,338
Reaction score
6
Location
Poland, Lubań.
Im see 2 demon oak's on forum but didnt work on beta 3 so im release a working :D :p

Its script from Narozia server released on forum.

Credits go to: Lostboy and Ryan.

actions:

DOQchests:

Code:
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 demon legs.")
   			doPlayerAddItem(cid,2495,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "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,MESSAGE_INFO_DESCR, "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 royal crossbow.")
   			doPlayerAddItem(cid,8851,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "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 Spellbook of Dark Mysteries.")
   			doPlayerAddItem(cid,8918,1)
   			setPlayerStorageValue(cid,50090,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
   		end
	end
   	return 1
end

DOQgravestone:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
newPosition  = [COLOR="Red"]{x=32718, y=32396, z=8}[/COLOR] --- pos to prize room
winner = getPlayerStorageValue(cid,8585)
	if item.itemid == 1406 and winner == 1 then
		doTeleportThing(cid, newPosition, TRUE)
		doSendMagicEffect(newPosition, 10)
		setPlayerStorageValue(cid,8585,-1)
		end
	return 1
end

demonoak.lua:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
treepos = [COLOR="Red"]{x=32720, y=32345, z=7[/COLOR], stackpos=1}
treepos2 = [COLOR="Red"]{x=32718, y=32351, z=7[/COLOR], stackpos=1} --- position of left arm
treepos3 = [COLOR="Red"]{x=32720, y=32349, z=7[/COLOR], stackpos=1} --- position of crow
treepos4 = [COLOR="Red"]{x=32720, y=32352, z=7[/COLOR], stackpos=1} --- position of mouth
monster1 = [COLOR="Red"]{x=32717, y=32347, z=7}[/COLOR]
monster2 = [COLOR="Red"]{x=32724, y=32348, z=7}[/COLOR]
monster3 = [COLOR="Red"]{x=32716, y=32353, z=7[/COLOR]}
monster4 = [COLOR="Red"]{x=32724, y=32353, z=7}[/COLOR]
tree = getThingfromPos(treepos).uid
tree2 = getThingfromPos(treepos2).uid
tree3 = getThingfromPos(treepos3).uid
tree4 = getThingfromPos(treepos4).uid
playerPos = getCreaturePosition(cid)
local randomizer = math.random(1,6)
queststatus = getPlayerStorageValue(cid,8181)
queststatus2 = getPlayerStorageValue(cid,8282)
queststatus3 = getPlayerStorageValue(cid,8383)
queststatus4 = getPlayerStorageValue(cid,8484)
Level = getPlayerLevel(cid)

	if itemEx.itemid == 2709 and itemEx.actionid == 7787 and Level >= 120 then
		doRemoveItem(tree)
		doTeleportThing(cid, toPosition, TRUE)
		setPlayerStorageValue(cid,8181,1)
	else
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		end
	if itemEx.itemid == 2709 and itemEx.actionid == 7788 then
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "A player is already doing this quest.")
	end
	if itemEx.itemid == 8289 and itemEx.actionid == 8181 and (randomizer == 1) and queststatus == 1 then
		doSummonCreature("Crypt Shambler", monster1)
		doSummonCreature("Crypt Shambler", monster2)
		doSummonCreature("Crypt Shambler", monster3)
		doSummonCreature("Crypt Shambler", monster4)
	elseif itemEx.itemid == 8289 and itemEx.actionid == 8181 and (randomizer == 2) and queststatus == 1 then
		doSummonCreature("Bone Beast", monster1)
		doSummonCreature("Bone Beast", monster2)
		doSummonCreature("Bone Beast", monster3)
		doSummonCreature("Bone Beast", monster4)
	elseif itemEx.itemid == 8289 and itemEx.actionid == 8181 and (randomizer == 3) and queststatus == 1 then
		doSummonCreature("Betrayed Wraith", monster1)
		doSummonCreature("Lost Soul", monster2)
		setPlayerStorageValue(cid,8181,-1)
		setPlayerStorageValue(cid,8282,1)
	elseif itemEx.itemid == 8289 and itemEx.actionid == 8181 and (randomizer >= 4) and queststatus == 1 then
		doSendMagicEffect(playerPos, 45)
		doCreatureAddHealth(cid, -300)
		doSendAnimatedText(playerPos, '300', TEXTCOLOR_LIGHTGREEN)
		end
	if itemEx.itemid == 8289 and itemEx.actionid == 8181 and queststatus == -1 then
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		end
	if itemEx.itemid == 8288 and itemEx.actionid == 8282 and (randomizer == 1) and queststatus2 == 1 then
		doSummonCreature("Crypt Shambler", monster1)
		doSummonCreature("Mummy", monster2)
		doSummonCreature("Mummy", monster3)
		doSummonCreature("Crypt Shambler", monster4)
	elseif itemEx.itemid == 8288 and itemEx.actionid == 8282 and (randomizer == 2) and queststatus2 == 1 then
		doSummonCreature("Giant Spider", monster1)
		doSummonCreature("Giant Spider", monster4)
	elseif itemEx.itemid == 8288 and itemEx.actionid == 8282 and (randomizer == 3) and queststatus2 == 1 then
		doSummonCreature("Blightwalker", monster1)
	      doSummonCreature("Lost Soul", monster2)
		setPlayerStorageValue(cid,8282,-1)
		setPlayerStorageValue(cid,8383,1)
	elseif itemEx.itemid == 8288 and itemEx.actionid == 8282 and (randomizer >= 4) and queststatus2 == 1 then
		doSendMagicEffect(playerPos, 45)
		doCreatureAddHealth(cid, -300)
		doSendAnimatedText(playerPos, '300', TEXTCOLOR_LIGHTGREEN)
		end
	if itemEx.itemid == 8288 and itemEx.actionid == 8282 and queststatus2 == -1 then
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		end
	if itemEx.itemid == 8290 and itemEx.actionid == 8383 and (randomizer == 1) and queststatus3 == 1 then
		doSummonCreature("Crypt Shambler", monster1)
		doSummonCreature("Crypt Shambler", monster2)
		doSummonCreature("Crypt Shambler", monster3)
		doSummonCreature("Crypt Shambler", monster4)
	elseif itemEx.itemid == 8290 and itemEx.actionid == 8383 and (randomizer == 2) and queststatus3 == 1 then
		doSummonCreature("Lich", monster1)
		doSummonCreature("Lich", monster2)
		doSummonCreature("Lich", monster3)
		doSummonCreature("Lich", monster4)
	elseif itemEx.itemid == 8290 and itemEx.actionid == 8383 and (randomizer == 3) and queststatus3 == 1 then
		doSummonCreature("Plaguesmith", monster1)
	      doSummonCreature("Plaguesmith", monster2)
		setPlayerStorageValue(cid,8383,-1)
		setPlayerStorageValue(cid,8484,1)
	elseif itemEx.itemid == 8290 and itemEx.actionid == 8383 and (randomizer >= 4) and queststatus3 == 1 then
		doSendMagicEffect(playerPos, 45)
		doCreatureAddHealth(cid, -300)
		doSendAnimatedText(playerPos, '300', TEXTCOLOR_LIGHTGREEN)
		end
	if itemEx.itemid == 8290 and itemEx.actionid == 8383 and queststatus3 == -1 then
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		end
	if itemEx.itemid == 8291 and itemEx.actionid == 8484 and (randomizer == 1) and queststatus4 == 1 then
		doSummonCreature("Nightmare", monster1)
		doSummonCreature("Mummy", monster2)
		doSummonCreature("Mummy", monster3)
		doSummonCreature("Nightmare", monster4)
	elseif itemEx.itemid == 8291 and itemEx.actionid == 8484 and (randomizer == 2) and queststatus4 == 1 then
		doSummonCreature("Giant spider", monster1)
		doSummonCreature("Undead Dragon", monster2)
		doSummonCreature("Giant Spider", monster2)
		doSummonCreature("Giant Spider", monster3)
	elseif itemEx.itemid == 8291 and itemEx.actionid == 8484 and (randomizer == 3) and queststatus4 == 1 then
		doSummonCreature("Demon", monster1)
		doSummonCreature("Juggernaut", monster2)
		setPlayerStorageValue(cid,8484,-1)
		setPlayerStorageValue(cid,8585,1)
	elseif itemEx.itemid == 8291 and itemEx.actionid == 8484 and (randomizer >= 4) and queststatus4 == 1 then
		doSendMagicEffect(playerPos, 45)
		doCreatureAddHealth(cid, -300)
		doSendAnimatedText(playerPos, '300', TEXTCOLOR_LIGHTGREEN)
		end
	if itemEx.itemid == 8291 and itemEx.actionid == 8484 and queststatus4 == -1 then
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		end
end

now time on movevents:
DemonOakThree.lua

Code:
function onStepIn(cid, item, position, fromPosition)
TreePos = [COLOR="Red"]{x=32720, y=32345, z=7}[/COLOR] --- coord of tree blocking path
Tree1 = doCreateItem(2709, 1, TreePos)
Tree2 = doCreateItem(2709, 1, TreePos)

	if item.itemid == 103 then
		doSetItemActionId(Tree1, 7788)		
		doSetItemActionId(Tree2, 7787)
	end
return TRUE
end

and last
removegreenhornstone.lua

Code:
function onStepIn(cid, item, pos)

-- Start tree removal set
StartTreePos = [COLOR="Red"]{x=32720, y=32345, z=7, stackpos=2}[/COLOR] --- coord of tree blocking path
StartTreeChk = getThingfromPos(StartTreePos)
-- end of check

	if isPlayer(cid) == TRUE then
		doRemoveItem(StartTreeChk.uid)		
		end
return TRUE
end

actions.xml:
Code:
<!-- Demon Oak Quest -->
    	<action uniqueid="12901" script="DOQChests.lua" />
	<action uniqueid="12902" script="DOQChests.lua" />
	<action uniqueid="12903" script="DOQChests.lua" />
	<action uniqueid="12904" script="DOQChests.lua" />
	<action uniqueid="55100" script="DOQgravestone.lua" />
	<action itemid="8293" script="demonoak.lua"/>

and movevnts:
Code:
<!-- Demon Oak Quest -->
        <movevent event="StepIn" actionid="7789" script="DemonOakTree.lua"/>
	<movevent event="StepIn" uniqueid="14449" script="removegreenhornstone.lua"/>

REMEMBER TO USE YOURS POSITIONS IN SCRIPT

Actions id to set on map:

demon oak three:
left arm:8181
face:8282
right arm:8383
raven:8484
blocking three:7789
gravestone:55100

if that script help you rep++ pls :D
 
Last edited:
<npc name="Oldrak" script="data/npc/scripts/default.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="57" head="20" body="30" legs="40" feet="50" corpse="6080"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="message_greet" value="Hello |PLAYERNAME|, greetings." />
<parameter key="shop_buyable" value="hallowed axe,8293,1000;" />
</parameters>
</npc>

so use that for me is better :p
 
Last edited:
I had to rewrite whole NPC, narozia scripters sux ballz. Lol ;/
 
you need to give a action id(7789) to a blocking three. And change in script your positions ;P

also you dont need to step in one time you need only to cut a blocking three.
 
This script suxors! I had to write own to make it work like RL tibia.
 
its work like rl tibia :p
you need to enter all actions and unique id's on map.
Demon Oak three need to have actions id:
Left arm:8181
Head:8282
Right Arm:8383
and that raven~ xD:8484

check edit add this :p
 
Noob, I have copied demon oak map raw from narozia. And it didn't worked as it is in real tibia. Everyone can enter quest, but in real tibia quest entrance is halfmade with simething like globalevents, so sixth tile is random placed on map (and I know how).

Other five tiles should add +1 to storage value "STORAGE" and to prevent stepping only on one tile five times it should have own storage value.
 
Noob?im wanna to help you but you again need to be a pr0 scripter and say something is sux.
Better to make a tutorial how to use uh -.-


kis maj es.
 
Heh, maybe you are right, anyways your script is not much rl :<
 
Where is Hallowed Axe?

Omg my items.xml don't have this item Hallowed Axe :S. 8292 > 8294, don't have a item id 8293.^_^

Help plxxx

TFS 0.3 Beta 3
 
you try to make that item on GM? im sure that a beta 3 have this you need only to add a name in items.xml
 
I got a good one;)
used for my rl map..
when entering the demon oak, a tree creates and banshee summons, when leaveing the tree opens, when logout it teleports the player out and tree open:)
 

Similar threads

Back
Top