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

Zoriax_

Owner|Antarctica Ots
Joined
Feb 15, 2008
Messages
745
Reaction score
23
Location
Norway
PHP:
-- annihilator lever

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

monster = "Demon" ------ nome do monstro
pos = {x=980, y=1524, z=9} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos2 = {x=982, y=1524, z=9} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos3 = {x=981, y=1528, z=9} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos4 = {x=979, y=1528, z=9} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos5 = {x=984, y=1526, z=9} ---posicao em que o monstro ira aparecer
monster2 = "Demon" ------ nome do monstro
pos6 = {x=891, y=1526, z=9} ---posicao em que o monstro ira aparecer


   	if item.uid == 7000 and item.itemid == 1945 then
		player1pos = {x=979, y=1526, z=9, stackpos=253}
		player1 = getThingfromPos(player1pos)

		player2pos = {x=980, y=1526, z=9, stackpos=253}
		player2 = getThingfromPos(player2pos)

		player3pos = {x=981, y=1526, z=9, stackpos=253}
		player3 = getThingfromPos(player3pos)

		player4pos = {x=982, y=1526, z=9, stackpos=253}
		player4 = getThingfromPos(player4pos)
		dzwignia = os.clock()


		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
				nplayer1pos = {x=979, y=1526, z=9}
				nplayer2pos = {x=980, y=1526, z=9}
				nplayer3pos = {x=981, y=1526, z=9}
				nplayer4pos = {x=982, y=1526, z=9}

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

                                doSummonCreature(monster,pos)
                                doSummonCreature(monster2,pos2)
                                doSummonCreature(monster,pos3)
                                doSummonCreature(monster2,pos4)
                                doSummonCreature(monster,pos5)
                                doSummonCreature(monster2,pos6)

				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)

				doTransformItem(item.uid,item.itemid+1)
			else
				doPlayerSendCancel(cid,"Alguem no seu time jah fez a quest.")
			end
		else
			doPlayerSendCancel(cid,"You need 4 players to do Annihilator.")
		end

	elseif item.uid ==7000 and item.itemid == 1946 then
		if (dzwignia - os.clock()) > 60 then
		doTransformItem(item.uid,item.itemid-1)
		end
		if getPlayerAccess(cid) > 0 then
			doTransformItem(item.uid,item.itemid-1)
			end
		end
	return 1
end


Why it dont work Am using TFS Modified by Shynzo

My annihlever is action:0

undid: 7000
 
Code:
-- annihilator lever

local config = {
	monster = "Demon",
	positions = {
		{x=980, y=1524, z=9}, {x=982, y=1524, z=9}, {x=981, y=1528, z=9},
		{x=979, y=1528, z=9}, {x=984, y=1526, z=9}, {x=891, y=1526, z=9}
	}
}
function onUse(cid, item, frompos, item2, topos)
    local dzwignia = os.clock()
    if item.uid == 7000 and item.itemid == 1945 then
		local player1pos = {x=979, y=1526, z=9, stackpos=253}
		local player1 = getThingfromPos(player1pos)
		local player2pos = {x=980, y=1526, z=9, stackpos=253}
		local player2 = getThingfromPos(player2pos)
		local player3pos = {x=981, y=1526, z=9, stackpos=253}
		local player3 = getThingfromPos(player3pos)
		local player4pos = {x=982, y=1526, z=9, stackpos=253}
		local player4 = getThingfromPos(player4pos)
        if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
            local queststatus1 = getPlayerStorageValue(player1.uid,7000)
            local queststatus2 = getPlayerStorageValue(player2.uid,7000)
            local queststatus3 = getPlayerStorageValue(player3.uid,7000)
            local queststatus4 = getPlayerStorageValue(player4.uid,7000)
            if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then
                local nplayer1pos = {x=979, y=1526, z=9}
                local nplayer2pos = {x=980, y=1526, z=9}
                local nplayer3pos = {x=981, y=1526, z=9}
                local nplayer4pos = {x=982, y=1526, z=9}
                doSendMagicEffect(player1pos,2)
                doSendMagicEffect(player2pos,2)
                doSendMagicEffect(player3pos,2)
                doSendMagicEffect(player4pos,2)
				for i = 1, table.maxn(config.positions) do
					doSummonCreature(config.monster, config.positions[i])
				end
                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)
                doTransformItem(item.uid,item.itemid+1)
            else
                doPlayerSendCancel(cid,"Alguem no seu time jah fez a quest.")
            end
        else
            doPlayerSendCancel(cid,"You need 4 players to do Annihilator.")
        end

    elseif item.uid ==7000 and item.itemid == 1946 then
        if (dzwignia - os.clock()) > 60 then
			doTransformItem(item.uid,item.itemid-1)
        end
        if getPlayerAccess(cid) > 0 then
            doTransformItem(item.uid,item.itemid-1)
            end
        end
    return TRUE
end
 
Error in my console = (


[28/05/2009 18:39:16] Lua Script Error: [Action Interface]
[28/05/2009 18:39:16] data/actions/scripts/quests/annihilator4.lua:eek:nUse

[28/05/2009 18:39:16] luaDoCreateMonster(). Cannot create monster: Demon

[28/05/2009 18:39:17] Lua Script Error: [Action Interface]
[28/05/2009 18:39:17] data/actions/scripts/quests/annihilator4.lua:eek:nUse

[28/05/2009 18:39:17] luaDoCreateMonster(). Cannot create monster: Demon

[28/05/2009 18:39:17] Lua Script Error: [Action Interface]
[28/05/2009 18:39:17] data/actions/scripts/quests/annihilator4.lua:eek:nUse

[28/05/2009 18:39:17] luaDoCreateMonster(). Cannot create monster: Demon

[28/05/2009 18:39:17] Lua Script Error: [Action Interface]
[28/05/2009 18:39:17] data/actions/scripts/quests/annihilator4.lua:eek:nUse

[28/05/2009 18:39:17] luaDoCreateMonster(). Cannot create monster: Demon
[28/05/2009 18:39:20] Bamse has logged out.
[28/05/2009 18:39:21] Ricczor has logged out.

[28/05/2009 18:39:32] Lua Script Error: [CreatureScript Interface]
[28/05/2009 18:39:32] data/creaturescripts/scripts/playerdeath.lua:eek:nDeath

[28/05/2009 18:39:32] luaGetCreatureName(). Creature not found

[28/05/2009 18:39:32] Lua Script Error: [CreatureScript Interface]
[28/05/2009 18:39:32] data/creaturescripts/scripts/playerdeath.lua:eek:nDeath

[28/05/2009 18:39:32] luaGetCreatureName(). Creature not found

The wierd thing is there spawn demons anyway?
Whats wrong then?
 

Similar threads

Back
Top