• 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 [Release] Annihilator v2.1

skykiller00

Banned User
Joined
Jun 9, 2009
Messages
34
Best answers
0
Reaction score
0
when i press switch, it show me this error:

[31/10/2009 21:18:46] Lua Script Error: [Action Interface]
[31/10/2009 21:18:46] data/actions/scripts/quests/annihilator.lua:eek:nUse

[31/10/2009 21:18:46] luaGetThingFromPos(). Tile not found
 

JDB

OtLand Veteran
Joined
Jun 1, 2009
Messages
4,145
Best answers
2
Reaction score
111
Change:
Lua:
getThingfromPos
To:
Lua:
getTileItemById
 

skykiller00

Banned User
Joined
Jun 9, 2009
Messages
34
Best answers
0
Reaction score
0
i changed but stil got error, i put on mapeditor on switch(id 1945) uniqueID 30015

[01/11/2009 13:26:29] Lua Script Error: [Action Interface] [01/11/2009 13:26:29] data/actions/scripts/quests/annihilator.lua:eek:nUse [01/11/2009 13:26:29] luaGetThingFromPos(). Tile not found
 
Last edited:
OP
Shawak

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,979
Best answers
2
Reaction score
105
Location
Germany
You have to change the positions..
 

frankfarmer

who'r ninja now
Joined
Aug 5, 2008
Messages
1,478
Best answers
0
Reaction score
35
Very good script here Shawak. As always. Just because it's you, i'll use it.
 

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,798
Best answers
0
Reaction score
10
Location
Sweden 172
In this script can u do the anni more then 1 time ?
 

Jordon123

New Member
Joined
Apr 16, 2009
Messages
19
Best answers
0
Reaction score
0
It's not working for me and all my positions are right..
 
OP
Shawak

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,979
Best answers
2
Reaction score
105
Location
Germany
Jordon123, which tfs version are you using?
 

Tofflarn

New Member
Joined
Mar 22, 2008
Messages
360
Best answers
0
Reaction score
1
Location
Sweden
I have tried this script, its awesome but got one problem.. When you say "- fixed clean area" Do you mean that the demons will disappear if a team finished or didn't make it, if so it won't work on my server.

Explain? :)
 

exiT

Member
Joined
May 28, 2009
Messages
248
Best answers
0
Reaction score
19
Here my but dont work:s
This is for 8 players annih but i dont know why dont work:s
all characters just get a poff.

Lua:
        -- CONFIG --

        local room = {     -- room with demons
        fromX = 174,
        fromY = 1694,
        fromZ = 8,
        --------------
        toX = 185,
        toY = 1702,
        toZ = 8
        }

        local monster_pos = {
        [1] = {pos = {175, 1695, 8}, monster = "Demon"},
		[2] = {pos = {176, 1695, 8}, monster = "Demon"},
		[3] = {pos = {177, 1695, 8}, monster = "Demon"},
		[4] = {pos = {178, 1695, 8}, monster = "Demon"},
		[5] = {pos = {179, 1695, 8}, monster = "Demon"},
		[6] = {pos = {180, 1695, 8}, monster = "Demon"},
		[7] = {pos = {181, 1695, 8}, monster = "Demon"},
		[8] = {pos = {182, 1695, 8}, monster = "Demon"},
		[9] = {pos = {175, 1699, 8}, monster = "Demon"},
		[10] = {pos = {176, 1699, 8}, monster = "Demon"},
		[11] = {pos = {177, 1699, 8}, monster = "Demon"},
		[12] = {pos = {178, 1699, 8}, monster = "Demon"},
		[13] = {pos = {179, 1699, 8}, monster = "Demon"},
		[14] = {pos = {180, 1699, 8}, monster = "Demon"},
		[15] = {pos = {181, 1699, 8}, monster = "Demon"},
		[16] = {pos = {182, 1699, 8}, monster = "Demon"}
		
		
		
										

        }

        local players_pos = {
 	{x = 184, y = 1721, z = 8},
	{x = 176, y = 1721, z = 8},
	{x = 181, y = 1725, z = 8},
	{x = 183, y = 1725, z = 8},
	{x = 185, y = 1725, z = 8},
	{x = 181, y = 1717, z = 8},
	{x = 183, y = 1717, z = 8},
	{x = 185, y = 1717, z = 8}
}

        local new_player_pos = {
	{x = 182, y = 1697, z = 8},
	{x = 181, y = 1697, z = 8},
	{x = 180, y = 1697, z = 8},
	{x = 179, y = 1697, z = 8},
	{x = 178, y = 1697, z = 8},
	{x = 177, y = 1697, z = 8},
	{x = 176, y = 1697, z = 8},
	{x = 175, y = 1697, z = 8}
	
}

        local playersOnly = "yes"
        local questLevel = 400

        ------------------------------------------------------
        --- CONFIG END ---------------------------------------
        ------------------------------------------------------

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local all_ready, monsters, player, level = 0, 0, {}, 0
        if item.itemid == 1945 then
                for i = 1, #players_pos do
                        table.insert(player, 0)
                end
                for i = 1, #players_pos do
                        player[i] = getThingfromPos(players_pos[i])
                        if player[i].itemid > 0 then
                                if string.lower(playersOnly) == "yes" then
                                        if isPlayer(player[i].uid) == TRUE then
                                                all_ready = all_ready+1
                                        else
                                                monsters = monsters+1
                                        end
                                else
                                        all_ready = all_ready+1
                                end
                        end
                end
                if all_ready == #players_pos then
                        for i = 1, #players_pos do
                                player[i] = getThingfromPos(players_pos[i])
                                if isPlayer(player[i].uid) == TRUE then
                                        if getPlayerLevel(player[i].uid) >= questLevel then
                                                level = level+1
                                        end
                                else
                                        level = level+1
                                end
                        end
                        if level == #players_pos then
                                if string.lower(playersOnly) == "yes" and monsters == 0 or string.lower(playersOnly) == "no" then
                                        for _, area in pairs(monster_pos) do
                                                        doSummonCreature(area.monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]})
                                        end
                                        for i = 1, #players_pos do
                                                doSendMagicEffect(players_pos[i], CONST_ME_POFF)
                                                doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
                                                doSendMagicEffect(new_player_pos[i], CONST_ME_ENERGYAREA)
                                                doTransformItem(item.uid,1946)
                                        end
                                else
                                        doPlayerSendTextMessage(cid,19,"Only players can do this quest.")
                                end
                        else
                                doPlayerSendTextMessage(cid,19,"All Players have to be level "..questLevel.." to do this quest.")
                        end
                else
                        doPlayerSendTextMessage(cid,19,"You need "..table.getn(players_pos).." players to do this quest.")
                end
        elseif item.itemid == 1946 then
                local player_room = 0
                for x = room.fromX, room.toX do
                        for y = room.fromY, room.toY do
                                for z = room.fromZ, room.toZ do
                                        local pos = {x=x, y=y, z=z,stackpos = 253}
                                        local thing = getThingfromPos(pos)
                                        if thing.itemid > 0 then
                                                if isPlayer(thing.uid) == TRUE then
                                                        player_room = player_room+1
                                                end
                                        end
                                end
                        end
                end
                if player_room >= 1 then
                        doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.")          
                elseif player_room == 0 then
                        for x = room.fromX, room.toX do
                                for y = room.fromY, room.toY do
                                        for z = room.fromZ, room.toZ do
                                                local pos = {x=x, y=y, z=z,stackpos = 253}
                                                local thing = getThingfromPos(pos)
                                                if thing.itemid > 0 then
                                                        doRemoveCreature(thing.uid)
                                                end
                                        end
                                end
                        end
                        doTransformItem(item.uid,1945)
                end
        end
        return TRUE
end
 

calum69

New Member
Joined
Aug 12, 2007
Messages
346
Best answers
0
Reaction score
3
Location
Great Britain
Here my but dont work:s
This is for 8 players annih but i dont know why dont work:s
all characters just get a poff.

yeah i get the same problem
Lua:
-- Annihilator by Shawak v2.1

        -- CONFIG --

        local room = {     -- room with demons
        fromX = 80,
        fromY = 122,
        fromZ = 7,
        --------------
        toX = 83,
        toY = 126,
        toZ = 7
        }

        local monster_pos = {
        [1] = {pos = {80, 122, 7}, monster = "Demon"},
        [2] = {pos = {82, 122, 7}, monster = "Demon"},
        [3] = {pos = {81, 126, 7}, monster = "Demon"},
        [4] = {pos = {83, 126, 7}, monster = "Demon"},
        [5] = {pos = {84, 124, 7}, monster = "Demon"},
        [6] = {pos = {85, 124, 7}, monster = "Demon"}
        }

        local players_pos = {
		{x = 83, y = 136, z = 7},
		{x = 84, y = 136, z = 7},
		{x = 85, y = 136, z = 7},
		{x = 86, y = 136, z = 7}
        }

        local new_player_pos = {
		{x = 80, y = 124, z = 7},
		{x = 81, y = 124, z = 7},
		{x = 82, y = 124, z = 7},
		{x = 83, y = 124, z = 7}
        }

        local playersOnly = "no"
        local questLevel = 79

        ------------------------------------------------------
        --- CONFIG END ---------------------------------------
        ------------------------------------------------------

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local all_ready, monsters, player, level = 0, 0, {}, 0
        if item.itemid == 1945 then
                for i = 1, #players_pos do
                        table.insert(player, 0)
                end
                for i = 1, #players_pos do
                        player[i] = getThingfromPos(players_pos[i])
                        if player[i].itemid > 0 then
                                if string.lower(playersOnly) == "yes" then
                                        if isPlayer(player[i].uid) == TRUE then
                                                all_ready = all_ready+1
                                        else
                                                monsters = monsters+1
                                        end
                                else
                                        all_ready = all_ready+1
                                end
                        end
                end
                if all_ready == #players_pos then
                        for i = 1, #players_pos do
                                player[i] = getThingfromPos(players_pos[i])
                                if isPlayer(player[i].uid) == TRUE then
                                        if getPlayerLevel(player[i].uid) >= questLevel then
                                                level = level+1
                                        end
                                else
                                        level = level+1
                                end
                        end
                        if level == #players_pos then
                                if string.lower(playersOnly) == "yes" and monsters == 0 or string.lower(playersOnly) == "no" then
                                        for _, area in pairs(monster_pos) do
                                                        doSummonCreature(area.monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]})
                                        end
                                        for i = 1, #players_pos do
                                                doSendMagicEffect(players_pos[i], CONST_ME_POFF)
                                                doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
                                                doSendMagicEffect(new_player_pos[i], CONST_ME_ENERGYAREA)
                                                doTransformItem(item.uid,1946)
                                        end
                                else
                                        doPlayerSendTextMessage(cid,19,"Only players can do this quest.")
                                end
                        else
                                doPlayerSendTextMessage(cid,19,"All Players have to be level "..questLevel.." to do this quest.")
                        end
                else
                        doPlayerSendTextMessage(cid,19,"You need "..table.getn(players_pos).." players to do this quest.")
                end
        elseif item.itemid == 1946 then
                local player_room = 0
                for x = room.fromX, room.toX do
                        for y = room.fromY, room.toY do
                                for z = room.fromZ, room.toZ do
                                        local pos = {x=x, y=y, z=z,stackpos = 253}
                                        local thing = getThingfromPos(pos)
                                        if thing.itemid > 0 then
                                                if isPlayer(thing.uid) == TRUE then
                                                        player_room = player_room+1
                                                end
                                        end
                                end
                        end
                end
                if player_room >= 1 then
                        doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.")          
                elseif player_room == 0 then
                        for x = room.fromX, room.toX do
                                for y = room.fromY, room.toY do
                                        for z = room.fromZ, room.toZ do
                                                local pos = {x=x, y=y, z=z,stackpos = 253}
                                                local thing = getThingfromPos(pos)
                                                if thing.itemid > 0 then
                                                        doRemoveCreature(thing.uid)
                                                end
                                        end
                                end
                        end
                        doTransformItem(item.uid,1945)
                end
        end
        return TRUE
end
 

slayzer

Klaffen
Joined
Dec 28, 2008
Messages
260
Best answers
0
Reaction score
11
local room = { -- room with demons
fromX = 80,
fromY = 122,
fromZ = 7,
--------------
toX = 83,
toY = 126,
toZ = 7
}
what to change here for it to work on My server?
 
Top