• 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!

Yalahari 10 mission. Actions, Movements, Creaturescripts,Monsters&NPC. Many Scripts.

it based on setGlobalStorageValue.

In newer versions of tfs this function is depreaced and replaced by getStorage, setStorage.
 
I didn't understand well, can I make it work? because I didn't find nothing about setGlobalStorageValue to replace by getStorage.

function Glllobe()
item1 = getTileItemById(glo,9767)
doItemSetAttribute(item.uid, "type", 58261)

end



if item.actionid == 58261 then
doItemSetAttribute(item.uid, "type", 58263)
local monsters = getMonstersfromArea(topLeft, buttomRight)
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

if getTileItemById(tp,1387).itemid == 1387 then
doRemoveItem(getTileItemById(tp,1387).uid)
end

addEvent(FirstWave, 0)
addEvent(SecondWave, 10000)
addEvent(ThirdWave, 20000)
addEvent(ThirdWave1, 24000)
addEvent(FourthWave, 38000)
addEvent(Glllobe, 900000)


elseif item.actionid == 58263 then
doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1)
end

what I need to replace here?
 
then i based on actions.
ur mistake: doItemSetAttribute(item.uid, "type", 58261)

to

doItemSetAttribute(item.uid, "aid", 58261)
 
using Gui >.< and dont see any errors but tp doesnt appear:p after Azerus die :D, 1 more think where's tp 9738, as i mean after Azerus, this tp will be creat but i dont see any code creat it except StepIn - movements:).

Look i dont really understand :)

Code:
local config = {
    message = "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!",
    teleportId = 1387,
    bosses = { -- Monster Name, Teleport To Position, Teleport Position
        ["Azerus"] = { { x = 2881, y = 2179, z = 9 }, { x = 2881, y = 2175, z = 10 }},
            }
}

function onDeath(cid, corpse, killer)
    local position = getCreaturePosition(cid)
    for name, pos in pairs(config.bosses) do
        if name == getCreatureName(cid) then

        doCreateTeleport(config.teleportId, pos[1], pos[2])
        doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
        end
    end
    return TRUE
end
 
kira178, your script not remove teleport.

PHP:
local config = {
    message = "Azerus ran into teleporter! It will disappear in 2 minutes. Enter It!",
    teleportId = 1387,
	timer = 10,
    bosses = { -- Monster Name, Teleport To Position, Teleport Position
        ["Azerus"] = {
			to = { x = 2881, y = 2179, z = 9 },
			tp = { x = 2881, y = 2175, z = 10 }
		},
	}
}
-- Escape through the teleport quickly before it closes!
function onDeath(cid, corpse, deathList)
	
	local function deleteTeleport(tp)
		local teleport = getTileItemById(tp, 1387).uid
		if(teleport > 0) then
			doRemoveItem(teleport)
			doSendMagicEffect(tp, CONST_ME_POFF)
		end
		return true
	end
	
	local position = getCreaturePosition(cid)
    for name, pos in pairs(config.bosses) do
        if name == getCreatureName(cid) then
			doCreateTeleport(config.teleportId, pos.to, pos.tp)
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(deleteTeleport, config.timer, pos.tp)
        end
    end
    return TRUE
end
 
thanks, i will try it, btw its not mine, it's scripts from page 1:p

~ also i still dont understand where will creat tp with ID 9738 as in config >.<
 
Last edited:
Hello dudes! I got everything done this far, now the only thing that dont works is when the TP appears, you can't enter it, you can walk over it but you cant enter it whats wrong?

data/actions/scripts/questes/azerus

Code:
 -- Yalahar 10th mission By QuaS~~

-- Config #1 -- 
local BlindField = {x=579, y=557, z=10, stackpos=1}
-- end -- 

function mapArea(fromPos, toPos, stack)
        -- Area iterator by Colandus.
        local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z}
        return function()
                if (pos.y < toPos.y) then
                        pos.y = pos.y+1
                elseif (pos.x <= toPos.x) then
                        pos.y = fromPos.y
                        pos.x = pos.x+1
                else
                        pos.x = fromPos.x
                        pos.y = fromPos.y
                        pos.z = pos.z+1
                end
                if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then
                        if (stack == nil) then
                                return pos
                        else
                                pos.stackpos = stack
                                --return pos, getTileThingByPos(pos)
                                return pos, getThingfromPos(pos)
                        end
                end
        end
end


function getMonstersfromArea(fromPos, toPos)
        local monsters = {}    
        for _, thing in mapArea(fromPos, toPos, 253) do
                if isMonster(thing.uid) == TRUE then
                        table.insert(monsters, thing.uid)
            end

        end
          local bfm = getThingfromPos(BlindField)
            if isMonster(bfm.uid) == TRUE then
            table.insert(monsters, bfm.uid)
            end
        return monsters
end


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

-- CONFIG #2!!!! --


-- Map checking --

local topLeft = {x=574, y=559, z=10}
local buttomRight = {x=589, y=577, z=10}

-- Immortality of Azerus
local monsters = getMonstersfromArea(topLeft, buttomRight)
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

-- Position Of TP --
local tp = {x=581, y=575, z=10}

-- Position of Gllobus
local glo = {x=581, y=566, z=10}

-- END OF CONFIG! --



function FirstWave()
    doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z})

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z})

    doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z})
end

function SecondWave()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z})

    doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z})

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z})
end
function ThirdWave()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z})

    doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z})
end

function ThirdWave1() --  with 2s delay

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z})

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z})
end

function FourthWave()
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

    for _, monster in pairs(monsters1) do
    if getCreatureName(monster) == "Azerus" then
    doRemoveCreature(monster)
    end
    end
    doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z})

    doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z})

    doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z})

    doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z})

    doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z})

end

function Glllobe()
item1 = getTileItemById(glo,9767)
doSetItemActionId(item1.uid, 58261)
end



if item.actionid == 58261 then
doItemSetAttribute(item.uid, "type", value)
local monsters = getMonstersfromArea(topLeft, buttomRight)
local monsters1 = getMonstersfromArea(topLeft, buttomRight)

if getTileItemById(tp,1387).itemid == 1387 then
doRemoveItem(getTileItemById(tp,1387).uid)
end

addEvent(FirstWave, 0)
addEvent(SecondWave, 10000)
addEvent(ThirdWave, 20000)
addEvent(ThirdWave1, 24000)
addEvent(FourthWave, 38000)
addEvent(Glllobe, 900000)


elseif item.actionid == 58263 then
doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1)
end


return TRUE
end

error in my console:

Code:
 [Error - Action Interface]
data/actions/scripts/quests/azerus.lia:onUse
Description:
(LuaDoItemSetAttribute) Invalid data type
 
then i based on actions.
ur mistake: doItemSetAttribute(item.uid, "type", 58261)

to

doItemSetAttribute(item.uid, "aid", 58261)

Here. (if u're using older version of TFS (<0.3.6) then use doSetItemActionId)
 
Here. (if u're using older version of TFS (<0.3.6) then use doSetItemActionId)


I did like you told me, now I don't get any errors after Azerus is dead but I can still not enter the teleporter that comes from his body in that position he dyies!

I've been mixtring and tricking all the time, but I can't find out how to make it possible to go thorw the teleporter!
 
I got it added haven't miss anything what I know.

Code:
     <!-- Yalahar 10th -->
    <movevent type="StepIn" itemid="9738" event="script" value="azerusdeath.lua"/>
    <movevent type="StepIn" actionid="58262" event="script" value="azerusarmy.lua"/>

But can the ID on the TP be wrong? Maybe that ID don't works? shall i try with antoher ID? then I have to go to Item.xml and change the ID to the teleport there right? and change it on movments.xml I give it a try!
 
it dident work, so I changed all back to 9738

Really, someone has to know the problem with the teleporter!?

The teleporter appers when he die, BUT you can't walk throuw it. You can walk over it, but you don't get to another location.
 
Last edited:
Please help me...!

am getting this error:

[15/08/2010 05:43:05] [Error - Action Interface]
[15/08/2010 05:43:05] In a timer event called from:
[15/08/2010 05:43:05] data/actions/scripts/quests/azerus.lua:eek:nUse
[15/08/2010 05:43:05] Description:
[15/08/2010 05:43:05] (luaGetThingFromPos) Tile not found

Whats wrong?! i did exactly as the followings.. but stil dont work?!
 
Back
Top