• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Working Demon Oak Quest

Yes!

Edit:

I've tested all scripts 2 minutes ago, all is full working without errors
 
Last edited:
Hi i need some help :( i got 3x fails.

Code:
[Warning - Actions::registerEvent] Duplicate registered item id: 8293
[11/12/2009 02:33:40] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/demonOakArea.lua)
[11/12/2009 02:33:40] cannot open data/movements/scripts/demonOakArea.lua: No such file or directory
[11/12/2009 02:33:40] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/demonOakLogout.lua)
[11/12/2009 02:33:40] cannot open data/creaturescripts/scripts/demonOakLogout.lua: No such file or directory
[11/12/2009 02:33:40] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/demonOakDeath.lua)
[11/12/2009 02:33:40] cannot open data/creaturescripts/scripts/demonOakDeath.lua: No such file or directory

Mine creaturescript.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
	<event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
	<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>
	<event type="kill" name="ArenaKill" event="script" value="arenakill.lua"/> 
	<event type="kill" name="onkill.lua" event="script" value="onkill.lua"/>  
	<event type="advance" name="PlayerAdvanceAddon" script="onAdvanceAddon.lua"/>
        <event type="logout" name="demonOakLogout" event="script" value="demonOakLogout.lua"/>
        <event type="death" name="demonOakDeath" event="script" value="demonOakDeath.lua"/> 
</creaturescripts>


Mine movementes.xml:
Code:
<!-- DemonOakQuest -->
 	<movement type="StepOut" uniqueid="32193" event="script" value="demonOakTree.lua" />
        <movement type="StepIn" itemid="8292" event="script" value="demonOakArea.lua"/>

Thx for help

Thats mine version :S
Code:
11/12/2009 02:33:37] NaxedOt, version 5.0 (Dyrolen)
[11/12/2009 02:33:37] Server Compiled By Xiti
[11/12/2009 02:33:37] Visit forum for updates and support : http://dinamic-alliance.com/.

[11/12/2009 02:33:37] >> Loading config (config.lua)
[11/12/2009 02:33:37] > Using plaintext passwords
[11/12/2009 02:33:37] >> Checking software version... outdated, please consider updating!
[11/12/2009 02:33:37] > Current version information - version: 5.0, patch: 0, build: 1856, timestamp: 1241027446.
[11/12/2009 02:33:37] > Latest version information - version: 5.5, patch: 0, build: 2581, timestamp: 1241028446.
[11/12/2009 02:33:37] >> Fetching blacklist
[11/12/2009 02:33:37] >> Loading RSA key
[11/12/2009 02:33:37] >> Starting SQL connection
 
i have problem i use tfs 0.3.5pl1 post all scripts and uniques and ids

mi problem is dont can use the hallowed axe with demon oak tree

thanks
 
friend, I am with the following problem, the person uses the hallowed ax, but says he has another in her or myself, and my other error is as follows using the ax in the hallowed part of the tree, not the monsters appear, please
 
tree dead dont work on ts 0.3.6

error is :

[14/12/2009 09:35:45] [Error - Action Interface]
[14/12/2009 09:35:45] data/actions/scripts/doq/demonOak.lua:eek:nUse
[14/12/2009 09:35:45] Description:
[14/12/2009 09:35:45] data/lib/032-position.lua:2: attempt to index global 'position' (a nil value)
[14/12/2009 09:35:45] stack traceback:
[14/12/2009 09:35:45] data/lib/032-position.lua:2: in function 'isInRange'
[14/12/2009 09:35:45] data/actions/scripts/doq/demonOak.lua:70: in function <data/actions/scripts/doq/demonOak.lua:1>
 
@chele242!

Look if the scripts are in the folder or has the same name that you wrote in creatureevents.xml.

@luckyman!

Some error in console?
The demon oak don't need any uid or aid, if there isn't any error in console, post your script.

@franckle!


Check the area positions, check if the dead tree is inside in the area positions.

@xitos!

I don't have tested the scripts in 0.3.6, i'll test all scripts at night.
 
When i use the hallowed axe on the tree parts, nothing happens.. It only poffs until the quest is done and i get teleported out of the area...

Why isnt the monsters spawning? I'm using 0.3.5 Crying damson.


My demonOak.lua:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local onePerQuest = "yes"
local level = 120
local positions =
{
        kick = { x = 32716, y = 32339, z = 7 },
        summon =
        {
                {x=32716, y=32347, z=7},
                {x=32711, y=32351, z=7},
                {x=32716, y=32354, z=7},
                {x=32720, y=32351, z=7}
        }
}

local summons =
{
        [1] = {"Demon", "Grim Reaper", "Elder Beholder", "Demon Skeleton"},
        [2] = {"Dark Torturer", "Banshee", "Betrayed Wraith", "Blightwalker"},
        [3] = {"Bonebeast", "Braindeath", "Diabolic Imp", "Giant Spider"},
        [4] = {"Hand of Cursed Fate", "Lich", "Undead Dragon", "Vampire"},
        [5] = {"braindeath", "Demon", "Bonebeast", "Diabolic Imp"},
        [6] = {"Demon Skeleton", "Banshee", "Elder Beholder", "Bonebeast"},
        [7] = {"Dark Torturer", "Undead Dragon", "Demon", "Demon"},
        [8] = {"Elder Beholder", "Betrayed Wraith", "Demon Skeleton", "Giant Spider"},
        [9] = {"Demon", "Banshee", "Blightwalker", "Demon Skeleton"},
        [10] = {"Grim Reaper", "Demon", "Diabolic Imp", "Braindeath"},
        [11] = {"Banshee", "Grim Reaper", "Hand of Cursed fate", "Demon"}
}

local areaPosition =
{
        {x=32706, y=32345, z=7, stackpos = 255},
        {x=32726, y=32357, z=7, stackpos = 255}
}

local demonOak = {8288, 8289, 8290, 8291}

local storages =
{
        done = 35700,
        cutTree = 36901
}

local blockingTree =
{
        [2709] = {32193, 3669}
}

        if blockingTree[itemEx.itemid] and itemEx.uid == blockingTree[itemEx.itemid][1] then

                if getPlayerLevel(cid) < level then
                        doPlayerSendCancel(cid, "You need level " .. level .. " or more to enter this quest.")
                        return true
                end

                if getPlayerStorageValue(cid, storages.done) > 0 then
                        doPlayerSendCancel(cid, "You already done this quest.")
                        return true
                end

                if getPlayerStorageValue(cid, storages.cutTree) > 0 then
                        return false
                end

                if onePerQuest == "yes" then
                local players = getPlayersOnline()
                        for _, pid in ipairs(players) do
                        if isInRange(getCreaturePosition(pid), areaPosition[1], areaPosition[2]) then
                                doPlayerSendCancel(cid, "Wait until " .. getCreatureName(pid) .. " finish the quest.")
                                return true
                        end
                        end
                end

                doTransformItem(itemEx.uid, blockingTree[itemEx.itemid][2])
                doSendMagicEffect(toPosition, CONST_ME_POFF)
                doMoveCreature(cid, SOUTH)
                doPlayerSetStorageValue(cid, storages.cutTree, 1)
                return true

        elseif isInArray(demonOak, itemEx.itemid) then

                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 0)
                end

                if(getPlayerStorageValue(cid, 8288) == 12 and getPlayerStorageValue(cid, 8289) == 12 and getPlayerStorageValue(cid, 8290) == 12 and getPlayerStorageValue(cid, 8291) == 12) then
                        doTeleportThing(cid, positions.kick)
                        doPlayerSetStorageValue(cid, storages.done, 1)
                        return true
                end

                if getPlayerStorageValue(cid, itemEx.itemid) > 11 then
                        doSendMagicEffect(toPosition, CONST_ME_POFF)
                        return true
                end

                if(math.random(100) <= 10) then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 12)
                        return true
                end


                if summons[get] then
                for i = 1, #summons[get] do
                        doCreateMonster(summons[get][i], positions.summon[i])
                end
                        doSendMagicEffect(toPosition, CONST_ME_DRAWBLOOD)
                        doPlayerSetStorageValue(cid, itemEx.itemid, get + 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
        return false
        end
end

No errors in console.
 
Last edited:
My demonOak.lua:

Code:
   function onUse(cid, item, fromPosition, itemEx, toPosition)

local onePerQuest = "yes"
local level = 120
local positions =
{
        kick = { x = 32786, y = 32412, z = 8 },
        summon =
        {
                {x=32713, y=32348, z=7},
                {x=32719, y=32349, z=7},
                {x=32719, y=32354, z=7},
                {x=32713, y=32353, z=7}
        }
}

local summons =
{
        [1] = {"Demon", "Grim Reaper", "Elder Beholder", "Demon Skeleton"},
        [2] = {"Dark Torturer", "Banshee", "Betrayed Wraith", "Blightwalker"},
        [3] = {"Bonebeast", "Braindeath", "Diabolic Imp", "Giant Spider"},
        [4] = {"Hand of Cursed Fate", "Lich", "Undead Dragon", "Vampire"},
        [5] = {"braindeath", "Demon", "Bonebeast", "Diabolic Imp"},
        [6] = {"Demon Skeleton", "Banshee", "Elder Beholder", "Bonebeast"},
        [7] = {"Dark Torturer", "Undead Dragon", "Demon", "Demon"},
        [8] = {"Elder Beholder", "Betrayed Wraith", "Demon Skeleton", "Giant Spider"},
        [9] = {"Demon", "Banshee", "Blightwalker", "Demon Skeleton"},
        [10] = {"Grim Reaper", "Demon", "Diabolic Imp", "Braindeath"},
        [11] = {"Banshee", "Grim Reaper", "Hand of Cursed fate", "Demon"}
}

local areaPosition =
{
        {x=32706, y=32342, z=7, stackpos = 255},
        {x=32729, y=32345, z=7, stackpos = 255}
}

local demonOak = {8288, 8289, 8290, 8291}

local storages =
{
        done = 35700,
        cutTree = 36901
}

local blockingTree =
{
        [2709] = {32193, 3669}
}

        if blockingTree[itemEx.itemid] and itemEx.uid == blockingTree[itemEx.itemid][1] then

                if getPlayerLevel(cid) < level then
                        doPlayerSendCancel(cid, "You need level " .. level .. " or more to enter this quest.")
                        return true
                end

                if getPlayerStorageValue(cid, storages.done) > 0 then
                        doPlayerSendCancel(cid, "You already done this quest.")
                        return true
                end

                if getPlayerStorageValue(cid, storages.cutTree) > 0 then
                        return false
                end

                if onePerQuest == "yes" then
                local players = getPlayersOnline()
                        for _, pid in ipairs(players) do
                        if isInRange(getCreaturePosition(pid), areaPosition[1], areaPosition[2]) then
                                doPlayerSendCancel(cid, "Wait until " .. getCreatureName(pid) .. " finish the quest.")
                                return true
                        end
                        end
                end

                doTransformItem(itemEx.uid, blockingTree[itemEx.itemid][2])
                doSendMagicEffect(toPosition, CONST_ME_POFF)
                doMoveCreature(cid, SOUTH)
                doPlayerSetStorageValue(cid, storages.cutTree, 1)
                return true

        elseif isInArray(demonOak, itemEx.itemid) then

                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 0)
                end

                if(getPlayerStorageValue(cid, 8288) == 12 and getPlayerStorageValue(cid, 8289) == 12 and getPlayerStorageValue(cid, 8290) == 12 and getPlayerStorageValue(cid, 8291) == 12) then
                        doTeleportThing(cid, positions.kick)
                        doPlayerSetStorageValue(cid, storages.done, 1)
                        return true
                end

                if getPlayerStorageValue(cid, itemEx.itemid) > 11 then
                        doSendMagicEffect(toPosition, CONST_ME_POFF)
                        return true
                end

                if(math.random(100) <= 100) then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 12)
                        return true
                end


                if summons[get] then
                for i = 1, #summons[get] do
                        doCreateMonster(summons[get][i], positions.summon[i])
                end
                        doSendMagicEffect(toPosition, CONST_ME_DRAWBLOOD)
                        doPlayerSetStorageValue(cid, itemEx.itemid, get + 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
        return false
        end
end


pleease help me!
 
Last edited:
Replace
Lua:
                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 0)
                end

With
Lua:
                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 1)
                end

And try again....

@0.3.6

If you've a error in console when you're trying to cut the dead tree with the function "isInRange", go to data/lib/position.lua and replace:
Lua:
function isInRange(pos, fromPosition, toPosition)
With this:
Lua:
function isInRange(position, fromPosition, toPosition)

That's a bug in the 0.3.6, report it to elf.
 
Last edited:
Replace
Lua:
                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 0)
                end

With
Lua:
                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        doPlayerSetStorageValue(cid, itemEx.itemid, 1)
                end

And try again....


That fixed my problem! thank you ! :)
 
Hello i got a few problems :​

1.Cant remove death tree by using hallowed axe. - Fixed
2.If u done the quest, use hallowed axe anywhere and tp you to kick pos. - Fixed
3.Cant buy from Oldrak h-axe - Fixed
4.See my name when try to cut death-tree(even if tree is not in area). - Fixed (but in 70%- Here can someone help me to fix it.)
5.You can take quest all the time. - Fixed


@topic author: this is correct setup to TFS 0.3.3/4 ? Ofc rep++ :)


Fixed to poblem with number 3.
find .../data/npc/scripts/oldrak.lua

edit from :
Code:
                if doPlayerRemoveMoney(cid, price) == true then

To :
Code:
                if doPlayerRemoveMoney(cid, price) == TRUE then

Fix to problem with number 5.
Make in data/actions/scripts/quests/doakprize.lua
And put :
Code:
-- Demon Oak.

-- 12901 = Demon Legs.
-- 12902 = Rainbow Shield.
-- 12903 = Royal Crosswbow.
-- 12904 = Spellbook of dark mysteries.

function onUse(cid, item, frompos, item2, topos)

    if item.uid == 12901 then
queststatus = getPlayerStorageValue(cid,12900)
if queststatus == -1 then
    doPlayerSendTextMessage(cid,22,"Znalazles Demon Legi.")
    doPlayerAddItem(cid,2495,1)
    setPlayerStorageValue(cid,12900,1)
else
    doPlayerSendTextMessage(cid,22,"The chest is empty.")
end

    elseif item.uid == 12902 then
queststatus = getPlayerStorageValue(cid,12900)
if queststatus == -1 then
    doPlayerSendTextMessage(cid,22,"Znalazles Rainbow Shield.")
    doPlayerAddItem(cid,8905,1)
    setPlayerStorageValue(cid,12900,1)
else
    doPlayerSendTextMessage(cid,22,"The chest is empty.")
end

   elseif item.uid == 12903 then
queststatus = getPlayerStorageValue(cid,12900)
if queststatus == -1 then
    doPlayerSendTextMessage(cid,22,"Znalazles Royal Crosswbow.")
    doPlayerAddItem(cid,8851,1)
    setPlayerStorageValue(cid,12900,1)
else
    doPlayerSendTextMessage(cid,22,"The chest is empty.")
end

   elseif item.uid == 12904 then
queststatus = getPlayerStorageValue(cid,12900)
if queststatus == -1 then
    doPlayerSendTextMessage(cid,22,"Znalazles Spellbook of dark mysteries.")
    doPlayerAddItem(cid,8918,1)
    setPlayerStorageValue(cid,12900,1)
else
    doPlayerSendTextMessage(cid,22,"The chest is empty.")
end

    end
return 1
end

To actions.xml

Code:
<action fromuid="12901" touid ="12904" event="script" value="quests/doakprize.lua"/>

Fix to problem with number 1.
Change all in lua from demonoak(WITHOUT demonOakGravestone.lua).
Code:
true
AND
Code:
false
TO
Code:
TRUE
and
Code:
FALSE

Fix to problem with number 4

Change in .../data/actions/scripts/demonOak.lua
Code:
                if onePerQuest == "yes" then

To :
Code:
                if onePerQuest == "no" then

Fix problem with number 2.

Find in demonOak.lua
Code:
doTeleportThing(cid, positions.kick)
And change it for :
Code:
                        doCreatureSay(cid, "You kill the Demon Oak, now you can go to Oldrak!", TALKTYPE_ORANGE_1)
 
Last edited:
I can keep clicking on the demon oak (so the monsters keep spawning). The quest basicly never finishes. Anyone know how to fix that?
 
If you've edited the script then you wrote something bad, i've tested the scriptin 0.3.5 and 0.3.6 and is fully working.
 
I didn't edit it, I'm just asking on how to make the chance higher that you complete the demon oak ;s
 
Back
Top