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

Lua Anni

Zool

Banned User
Joined
Jun 9, 2009
Messages
742
Reaction score
5
Location
Poland/St Wola
i want to whos change this scripts to can make anni more time not 1 on day !
anni said:
local playerPosition =

{

{x = 1450, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE},

{x = 1449, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE},

{x = 1448, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE},

{x = 1447, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE}

}



local newPosition =

{

{x = 1475, y = 1575, z = 11},

{x = 1474, y = 1575, z = 11},

{x = 1473, y = 1575, z = 11},

{x = 1472, y = 1575, z = 11}

}



-- Do not modify the declaration lines below.

local player = {0, 0, 0, 0}

local failed = FALSE



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

if item.itemid == 1946 or item.itemid == 1945 then

for i = 1, 4 do

failed = TRUE

player = getThingfromPos(playerPosition)

if player.itemid > 0 then

if isPlayer(player.uid) == TRUE then

if getPlayerStorageValue(player.uid, 30000) == -1 then

if getPlayerLevel(player.uid) >= 100 then

failed = FALSE

end

end

end

end

if failed == TRUE then

doPlayerSendCancel(cid, "Sorry, not possible.")

return TRUE

end

end

for i = 1, 4 do

doSendMagicEffect(playerPosition, CONST_ME_POFF)

doTeleportThing(player.uid, newPosition, FALSE)

doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA)

end

doTransformItem(item.uid, item.itemid + 1)

elseif item.itemid == 1946 then

doPlayerSendCancel(cid, "Sorry, not possible.")

end

return TRUE

end
 
Code:
{

{x = 1450, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE},

{x = 1449, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE},

{x = 1448, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE},

{x = 1447, y = 1575, z = 11, stackpos = STACKPOS_TOP_CREATURE}

}



local newPosition =

{

{x = 1475, y = 1575, z = 11},

{x = 1474, y = 1575, z = 11},

{x = 1473, y = 1575, z = 11},

{x = 1472, y = 1575, z = 11}

}



-- Do not modify the declaration lines below.

local player = {0, 0, 0, 0}

local failed = FALSE



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

if item.itemid == 1946 or item.itemid == 1945 then

for i = 1, 4 do

failed = TRUE

player[i] = getThingfromPos(playerPosition[i])

if player[i].itemid > 0 then

if isPlayer(player[i].uid) == TRUE then

if getPlayerStorageValue(player[i].uid, 30000) == -1 then

if getPlayerLevel(player[i].uid) >= 100 then

failed = FALSE

end

end

end

end

if failed == TRUE then

doPlayerSendCancel(cid, "Sorry, not possible.")

return TRUE

end

end

for i = 1, 4 do

doSendMagicEffect(playerPosition[i], CONST_ME_POFF)

doTeleportThing(player[i].uid, newPosition[i], FALSE)

doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)

end

doTransformItem(item.uid, item.itemid + 1)

elseif item.itemid == 1946 then

doTransformItem(item.uid, item.itemid - 1)


end

return TRUE

end

try that one? :p
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

        -- Annihaltor by Maxi (Shawak) v1.0

        local room = {     -- room with demons
        fromX = 33219,
        fromY = 31659,
        fromZ = 13,
        toX = 33224,
        toY = 31659,
        toZ = 13
        }

        local monster_pos = {        
        [1] = {pos = {33219,31657,13}},
        [2] = {pos = {33221,31657,13}},
        [3] = {pos = {33220,31661,13}},
        [4] = {pos = {33222,31661,13}},
        [5] = {pos = {33223,31659,13}},
        [6] = {pos = {33224,31659,13}}
        }

        local players_pos = {
        {x = 33225,y = 31671,z = 13,stackpos = 253},
        {x = 33224,y = 31671,z = 13,stackpos = 253},
        {x = 33223,y = 31671,z = 13,stackpos = 253},
        {x = 33222,y = 31671,z = 13,stackpos = 253}
        }

        local new_player_pos = {
        {x = 33222, y = 31659, z = 13},
        {x = 33221, y = 31659, z = 13},
        {x = 33220, y = 31659, z = 13},
        {x = 33219, y = 31659, z = 13}
        }

        local monster = "Demon"
        local questLevel = 100


        -- don't touch ------------
        local player = {0, 0, 0, 0}
        local all_ready = 0
        ---------------------------

        local player1 = getThingfromPos(players_pos[1])
        local player2 = getThingfromPos(players_pos[2])
        local player3 = getThingfromPos(players_pos[3])
        local player4 = getThingfromPos(players_pos[4])

        if item.itemid == 1945 then
                if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
                        for i = 1, 4 do
                                player[i] = getThingfromPos(players_pos[i])
                                if player[i].itemid > 0 then
                                        all_ready = 1
                                end
                        end
                else    
                doPlayerSendTextMessage(cid,19,"You need 4 players to do this quest.")
                end
                if all_ready == 1 then
                        for _, area in pairs(monster_pos) do
                                doSummonCreature(monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]}) 
                        end
                        for i = 1, 4 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)
                                all_ready = 0
                        end
                        doTransformItem(item.uid,1946)
                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
                        player_room = 0
                        doTransformItem(item.uid,1945)
                end
        end
        return TRUE
end

This one works, REP ME! :)
 
Lua:
local playerPosition =
{
	{x = 33225, y = 31671, z = 13},
	{x = 33224, y = 31671, z = 13},
	{x = 33223, y = 31671, z = 13},
	{x = 33222, y = 31671, z = 13}
}
local newPosition =
{
	{x = 33222, y = 31659, z = 13},
	{x = 33221, y = 31659, z = 13},
	{x = 33220, y = 31659, z = 13},
	{x = 33219, y = 31659, z = 13}
}
local summonDemonPos =
{
	{x = 33223, y = 31659, z = 13},
	{x = 33224, y = 31659, z = 13},
	{x = 33219, y = 31657, z = 13},
	{x = 33221, y = 31657, z = 13},
	{x = 33220, y = 31661, z = 13},
	{x = 33222, y = 31661, z = 13}
}

local onlyOnce = FALSE
local questLevel = 100

--Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = FALSE

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		for i = 1, 4 do
			failed = TRUE
			player[i] = getTopCreature(playerPosition[i])
			if player[i].itemid > 0 then
				if isPlayer(player[i].uid) == TRUE then
					if getPlayerStorageValue(player[i].uid, 30015) == -1 or onlyOnce == FALSE then
						if getPlayerLevel(player[i].uid) >= questLevel then
							failed = FALSE
						end
					end
				end
			end
			if failed == TRUE then
				return FALSE
			end
		end
		for i = 1, 6 do
			doSummonCreature("Demon", summonDemonPos[i])
		end
		local getdoor = getTileItemById({x=33225, y=31659, z=13}, 1211)
		if getdoor.itemid ~= 0 then
			doTransformItem(getdoor.uid, 1209)
		end
		for i = 1, 4 do
			doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
			doTeleportThing(player[i].uid, newPosition[i], FALSE)
			doSendMagicEffect(newPosition[i], CONST_ME_TELEPORT)
		end
		doTransformItem(item.uid, item.itemid + 1)
		local function clearAnni()
		local spec_pos = {}
				spec_pos.x = 33226
				spec_pos.y = 31658
				spec_pos.z = 13
		local tp_pos = {}
				tp_pos.x = 33226
				tp_pos.y = 31671
				tp_pos.z = 13
		local list = getSpectators(spec_pos, 9, 5, false)
			if(list) then
				for i = 1, #list do
					if isPlayer(list[i]) == TRUE then
						tp_pos.x = tp_pos.x - 1
						doTeleportThing(list[i], tp_pos)
					else
						doRemoveCreature(list[i])
					end
				end
			end
		end
		local function resetLever()
			local posLever = {x = 33226, y = 31671, z = 13, stackpos = 1}
			local getLever = getThingfromPos(posLever)
			doTransformItem(getLever.uid, getLever.itemid - 1)
		end
		addEvent(clearAnni, 15 * 60 * 1000)
		addEvent(resetLever, 20 * 60 * 1000)
		return TRUE
	else
		return FALSE
	end
end
This one works, REP ME! :)
 
Take this one (weź mój) :
Code:
-- annihilator

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

   	if item.uid == 8000 and item.itemid == 1945 then
		player1pos = {x=1372, y=998, z=7, stackpos=253}
		player1 = getThingfromPos(player1pos)

		player2pos = {x=1371, y=998, z=7, stackpos=253}
		player2 = getThingfromPos(player2pos)

		player3pos = {x=1370, y=998, z=7, stackpos=253}
		player3 = getThingfromPos(player3pos)

		player4pos = {x=1369, y=998, z=7, stackpos=253}
		player4 = getThingfromPos(player4pos)


		if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
			queststatus1 = getPlayerStorageValue(player1.uid,7000)
			queststatus2 = getPlayerStorageValue(player2.uid,7000)
			queststatus3 = getPlayerStorageValue(player3.uid,7000)
			queststatus4 = getPlayerStorageValue(player4.uid,7000)

			if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
				demon1pos = {x=1388, y=996, z=7}  
                            demon2pos = {x=1386, y=996, z=7}  
                            demon3pos = {x=1387, y=1000, z=7}  
                            demon4pos = {x=1389, y=1000, z=7}  
                            demon5pos = {x=1390, y=998, z=7}  
                            demon6pos = {x=1391, y=998, z=7}  
                            doSummonCreature("Demon", demon1pos)
                            doSummonCreature("Demon", demon2pos)
                            doSummonCreature("Demon", demon3pos)
                            doSummonCreature("Demon", demon4pos)
                            doSummonCreature("Demon", demon5pos)
                            doSummonCreature("Orshabaal", demon6pos)
                            nplayer1pos = {x=1389, y=998, z=7}
				nplayer2pos = {x=1388, y=998, z=7}
				nplayer3pos = {x=1387, y=998, z=7}
				nplayer4pos = {x=1386, y=998, z=7}

				doSendMagicEffect(player1pos,2)
				doSendMagicEffect(player2pos,2)
				doSendMagicEffect(player3pos,2)
				doSendMagicEffect(player4pos,2)

				doTeleportThing(player1.uid,nplayer1pos)
				doTeleportThing(player2.uid,nplayer2pos)
				doTeleportThing(player3.uid,nplayer3pos)
				doTeleportThing(player4.uid,nplayer4pos)

				doSendMagicEffect(nplayer1pos,10)
				doSendMagicEffect(nplayer2pos,10)
				doSendMagicEffect(nplayer3pos,10)
				doSendMagicEffect(nplayer4pos,10)

				
       ddoTransformItem(item.uid,item.itemid+1)
			else
				doPlayerSendCancel(cid,"There is already a team in the quest room.")
			end
		else
			doPlayerSendCancel(cid,"You need 4 players to do this quest.")
		end

	elseif item.uid == 8000 and item.itemid == 1946 then
		if getPlayerAccess(cid) > 0 then
			doTransformItem(item.uid,item.itemid-1)
		else
			doPlayerSendCancel(cid,"Sorry, not possible.")
		end
	else
		return 0
	end

	return 1
end
Code:
-- annihilator chests

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

if item.uid == 9000 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Golden Boots.")
doPlayerAddItem(cid,2646,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,21,"It is empty.")
end
elseif item.uid == 9001 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Great Shield.")
doPlayerAddItem(cid,2522,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,21,"It is empty.")
end
elseif item.uid == 9002 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Magic Plate Armor.")
doPlayerAddItem(cid,2472,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,21,"It is empty.")
end
elseif item.uid == 9003 then
queststatus = getPlayerStorageValue(cid,5010)
if queststatus == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Annihilator Bear.")
doPlayerAddItem(cid,2326,1)
setPlayerStorageValue(cid,5010,1)
else
doPlayerSendTextMessage(cid,21,"It is empty.")
end
else
return 0
end

return 1
end

Pozmieniaj sobie tylko pozycje i nazwy itemów
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

        -- Annihaltor by Maxi (Shawak) v1.0

        local room = {     -- room with demons
        fromX = 33219,
        fromY = 31659,
        fromZ = 13,
        toX = 33224,
        toY = 31659,
        toZ = 13
        }

        local monster_pos = {        
        [1] = {pos = {33219,31657,13}},
        [2] = {pos = {33221,31657,13}},
        [3] = {pos = {33220,31661,13}},
        [4] = {pos = {33222,31661,13}},
        [5] = {pos = {33223,31659,13}},
        [6] = {pos = {33224,31659,13}}
        }

        local players_pos = {
        {x = 33225,y = 31671,z = 13,stackpos = 253},
        {x = 33224,y = 31671,z = 13,stackpos = 253},
        {x = 33223,y = 31671,z = 13,stackpos = 253},
        {x = 33222,y = 31671,z = 13,stackpos = 253}
        }

        local new_player_pos = {
        {x = 33222, y = 31659, z = 13},
        {x = 33221, y = 31659, z = 13},
        {x = 33220, y = 31659, z = 13},
        {x = 33219, y = 31659, z = 13}
        }

        local monster = "Demon"
        local questLevel = 100


        -- don't touch ------------
        local player = {0, 0, 0, 0}
        local all_ready = 0
        ---------------------------

        local player1 = getThingfromPos(players_pos[1])
        local player2 = getThingfromPos(players_pos[2])
        local player3 = getThingfromPos(players_pos[3])
        local player4 = getThingfromPos(players_pos[4])

        if item.itemid == 1945 then
                if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
                        for i = 1, 4 do
                                player[i] = getThingfromPos(players_pos[i])
                                if player[i].itemid > 0 then
                                        all_ready = 1
                                end
                        end
                else    
                doPlayerSendTextMessage(cid,19,"You need 4 players to do this quest.")
                end
                if all_ready == 1 then
                        for _, area in pairs(monster_pos) do
                                doSummonCreature(monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]}) 
                        end
                        for i = 1, 4 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)
                                all_ready = 0
                        end
                        doTransformItem(item.uid,1946)
                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
                        player_room = 0
                        doTransformItem(item.uid,1945)
                end
        end
        return TRUE
end

This one works, REP ME! :)

This one works, REP ME! :)

HM? Owner of script is current active in this thread ;).
 
Back
Top