Action Working Demon Oak Quest

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,798
Best answers
0
Reaction score
10
Location
Sweden 172
In tibia rl, you will be teleported to the reward room if you finish the quest and use a gravestone. (uniqueId for gravestone: 55100)

I don't have tested if a player can enter after other player died in the quest. I think he can enter because the script check for a player, if the script don't found a player then player can enter.

@The spam, with my demon Oak, you need to use the axe in the demon oak 11 times. I do it in this way because when i did the script i did'nt know how demon oak quest works.
when i try to go to the zone after died it just come "cont use that item or smth" when i try to puch down the dead three whit the axe
 
OP
Darkhaos
Joined
Apr 17, 2008
Messages
1,922
Best answers
0
Reaction score
181
Location
Venezuela
Look main post, i've edited some scripts, lines and added a new script (onDeath), follow the steps and report bugs here.
 

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,798
Best answers
0
Reaction score
10
Location
Sweden 172
Last edited:

Suxex

Member
Joined
Aug 13, 2007
Messages
391
Best answers
0
Reaction score
5
Location
Halland - Getinge
Still dont work. I use TFS 0.3.4.



Here is 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=32711, y=32347, z=7},
                {x=32711, y=32353, z=7},
                {x=32721, y=32348, z=7},
                {x=32721, y=32354, 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=32710, y=32344, z=7, stackpos = 255},
        {x=32722, y=32354, 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 FALSE
                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 isInArea(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)
                setPlayerStorageValue(cid, storages.cutTree, 1)
                return TRUE

        elseif isInArray(demonOak, itemEx.itemid) then

                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        get = 1
                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)
                        setPlayerStorageValue(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
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        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)
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
        return FALSE
        end
end

Thanks for all help.
 

Sync

Ø,ø
Joined
May 26, 2009
Messages
1,876
Best answers
0
Reaction score
19
Location
Canada
Still dont work. I use TFS 0.3.4.



Here is 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=32711, y=32347, z=7},
                {x=32711, y=32353, z=7},
                {x=32721, y=32348, z=7},
                {x=32721, y=32354, 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=32710, y=32344, z=7, stackpos = 255},
        {x=32722, y=32354, 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 FALSE
                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 isInArea(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)
                setPlayerStorageValue(cid, storages.cutTree, 1)
                return TRUE

        elseif isInArray(demonOak, itemEx.itemid) then

                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        get = 1
                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)
                        setPlayerStorageValue(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
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        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)
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
        return FALSE
        end
end

Thanks for all help.
Notice how it says 0.3.5 in the thread tite? It really does mean something =o
 

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,798
Best answers
0
Reaction score
10
Location
Sweden 172
Still dont work. I use TFS 0.3.4.



Here is 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=32711, y=32347, z=7},
                {x=32711, y=32353, z=7},
                {x=32721, y=32348, z=7},
                {x=32721, y=32354, 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=32710, y=32344, z=7, stackpos = 255},
        {x=32722, y=32354, 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 FALSE
                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 isInArea(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)
                setPlayerStorageValue(cid, storages.cutTree, 1)
                return TRUE

        elseif isInArray(demonOak, itemEx.itemid) then

                local get = getPlayerStorageValue(cid, itemEx.itemid)
                if get == -1 then
                        get = 1
                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)
                        setPlayerStorageValue(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
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        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)
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
        return FALSE
        end
end

Thanks for all help.
same
 
OP
Darkhaos
Joined
Apr 17, 2008
Messages
1,922
Best answers
0
Reaction score
181
Location
Venezuela
Suxex, find this:

Lua:
                if summons[get] then
                for i = 1, #summons[get] do
                        doCreateMonster(summons[get][i], positions.summon[i])
                end
                        doSendMagicEffect(toPosition, CONST_ME_DRAWBLOOD)
                        setPlayerStorageValue(cid, storages.cutTree, 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
And change for this:
Lua:
                if summons[get] then
                for i = 1, #summons[get] do
                        doCreateMonster(summons[get][i], positions.summon[i])
                end
                        doSendMagicEffect(toPosition, CONST_ME_DRAWBLOOD)
                        setPlayerStorageValue(cid, itemEx.itemid, get + 1)
                        if math.random(100) >= 50 then
                                doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -270, -310, CONST_ME_BIGPLANTS)
                        end
                end
 

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,798
Best answers
0
Reaction score
10
Location
Sweden 172
i can still spawn more then 4 mob's ?
like the user say :
+
if i use the axe on the three an go back to i most relogg before i can use the axe again
 

Suxex

Member
Joined
Aug 13, 2007
Messages
391
Best answers
0
Reaction score
5
Location
Halland - Getinge
I've got it working now except one thing!

The problem is the gravestone that will teleport me to the reward room.
The gravestone have UniqueId 55100


Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=32787, y=32411, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) > 1 then
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
        else
                return FALSE
        end
        return TRUE
end
Maybe that script only working with 0.3.5 and I have to change something so it works with 0.3.4?

Thanks for helping me!
 
OP
Darkhaos
Joined
Apr 17, 2008
Messages
1,922
Best answers
0
Reaction score
181
Location
Venezuela
I've got it working now except one thing!

The problem is the gravestone that will teleport me to the reward room.
The gravestone have UniqueId 55100


Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=32787, y=32411, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) > 1 then
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
        else
                return FALSE
        end
        return TRUE
end
Maybe that script only working with 0.3.5 and I have to change something so it works with 0.3.4?

Thanks for helping me!
Remember, after finish the quest (kicked from the demon oak area), you need a confirmation from Oldrak to enter to the gravestone. After finish the quest, go to Oldrak and...
Code:
Player: Hi
Oldrak: Hello, Player!
Player: Demon Oak
Oldrak: Did you defeat the demon oak?
Player: Yes
Oldrak: Good Job!
And now you can enter to the reward room.
 

Cezkraos

New Member
Joined
Aug 1, 2009
Messages
12
Best answers
0
Reaction score
0
My first problem:
Oldrak takes 1000 gold but the axe in your inventory stays plus you dont get a hallowed axe.

My second problem:
The hallowed axe Id 8293 doesnt work on the dead tree, although the uid 32193 is absolutely right.

My third problem:
I can't hit on the different parts of the demon oak with the hallowed axe.

Do you know how to solve those problems?



Ah and another problem:

[22/08/2009 22:39:20] Error: [MoveEvent::configureMoveEvent] No valid event name script
[22/08/2009 22:39:20] Warning: [BaseEvents::loadFromXml] Can not configure event
[22/08/2009 22:39:20] Error: [MoveEvent::configureMoveEvent] No valid event name script
[22/08/2009 22:39:20] Warning: [BaseEvents::loadFromXml] Can not configure event

comes up in the console when i start the server
 

Cezkraos

New Member
Joined
Aug 1, 2009
Messages
12
Best answers
0
Reaction score
0
Well actually I am using Chronic Elements. I dont have a clue which version I am using.
The protocol is 8.5

Ah and i fixed the console error now.
Well, when I use the axe on the dead tree it comes up "Wait until Morbid finish the quest" - the problem is that morbid is far away oO
I configured the checked area but still the server is like checking the whole map.


Problems left:
Oldrak isnt selling Hallowed Axe (just taking money)
You can't attack the demon oak (but you get regular dmg from him every few ticks)
Server is checking the whole map although the checked area is configured the right way
 
OP
Darkhaos
Joined
Apr 17, 2008
Messages
1,922
Best answers
0
Reaction score
181
Location
Venezuela
Well actually I am using Chronic Elements. I dont have a clue which version I am using.
The protocol is 8.5

Ah and i fixed the console error now.
Well, when I use the axe on the dead tree it comes up "Wait until Morbid finish the quest" - the problem is that morbid is far away oO
I configured the checked area but still the server is like checking the whole map.


Problems left:
Oldrak isnt selling Hallowed Axe (just taking money)
You can't attack the demon oak (but you get regular dmg from him every few ticks)
Server is checking the whole map although the checked area is configured the right way
Well... i tested in in TFS 0.3.5pl1 and is working... i don't know if it works in the distro that you're using... maybe the distro is the problem. Try with TFS 0.3.5PL1
 

Cezkraos

New Member
Joined
Aug 1, 2009
Messages
12
Best answers
0
Reaction score
0
Okay got it now.
Chronic Elements is based on TFS 0.2.4.
Of course I get errors then ...^^
 

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,798
Best answers
0
Reaction score
10
Location
Sweden 172
Remember, after finish the quest (kicked from the demon oak area), you need a confirmation from Oldrak to enter to the gravestone. After finish the quest, go to Oldrak and...
Code:
Player: Hi
Oldrak: Hello, Player!
Player: Demon Oak
Oldrak: Did you defeat the demon oak?
Player: Yes
Oldrak: Good Job!
And now you can enter to the reward room.
and how do i enter the reward room ? :O
 
Top