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

My Annihilator lever won't work

knighters god

Active Member
Joined
Feb 14, 2009
Messages
166
Solutions
1
Reaction score
40
So every time I use the lever nothing happens, and I use the id I get from the script but nothing happens.
Help would be appreciated
 
Post the errors you get in your console (if you don't get errors, post that you don't get errors), how you added it in actions.xml, the annihilator script you use, what happens when you use it (cancel message "You cannot use this object" for example) and which server you use.
 
Post the errors you get in your console (if you don't get errors, post that you don't get errors), how you added it in actions.xml, the annihilator script you use, what happens when you use it (cancel message "You cannot use this object" for example) and which server you use.
I use cryingdamson and I don't get any errors at all it's just that the lever isn't working, by that I mean when I try to use the lever it's just staying in one form and does nothing it's like right clicking on a wall. data/actions/scripts/Annihilator.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
	-- Annihaltor by Maxi (Shawak) v1.0
 
	local room = { -- room with demons
	fromX = 874,
	fromY = 951,
	fromZ = 9,
	toX = 892,
	toY = 959,
	toZ = 9
	}
 
	local monster_pos = {        
	[1] = {pos = {881,955,9}},
	[2] = {pos = {880,955,9}},
	[3] = {pos = {876,953,9}},
	[4] = {pos = {878,953,9}},
	[5] = {pos = {879,957,9}},
	[6] = {pos = {877,957,9}}
	}
 
	local players_pos = {
	{x = 857,y = 953,z = 8,stackpos = 253},
	{x = 858,y = 953,z = 8,stackpos = 253},
	{x = 859,y = 953,z = 8,stackpos = 253},
	{x = 860,y = 953,z = 8,stackpos = 253}
	}
 
	local new_player_pos = {
	{x = 879, y = 955, z = 9},
	{x = 878, y = 955, z = 9},
	{x = 877, y = 955, z = 9},
	{x = 876, y = 955, z = 9}
	}
 
	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
actions.xml
Code:
<action uniqueid="30015" event="script" value="annihilator.lua"/>
 
I keep getting this type of complaint all the time... Give me a second I'll edit this in a moment...

*EDIT*: Here it is, feel free to throw some reputation over my way :D.

And do change the positions.
LUA:
-- annihilator lever
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 7000 then
		if item.itemid == 1945 then
			player1pos = {x = 194, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player1 = getThingfromPos(player1pos)
 
   			player2pos = {x = 193, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player2 = getThingfromPos(player2pos)
 
   			player3pos = {x = 192, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player3 = getThingfromPos(player3pos)
 
   			player4pos = {x = 191, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player4 = getThingfromPos(player4pos)
 
   			if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
   				player1level = getPlayerLevel(player1.uid)
   				player2level = getPlayerLevel(player2.uid)
   				player3level = getPlayerLevel(player3.uid)
   				player4level = getPlayerLevel(player4.uid)
 
   				questlevel = 100
   				if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel 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 = 193, y = 118, z = 10}
   						nplayer2pos = {x = 192, y = 118, z = 10}
   						nplayer3pos = {x = 191, y = 118, z = 10}
   						nplayer4pos = {x = 190, y = 118, z = 10}
 
   						doSendMagicEffect(player1pos, CONST_ME_POFF)
   						doSendMagicEffect(player2pos, CONST_ME_POFF)
   						doSendMagicEffect(player3pos, CONST_ME_POFF)
   						doSendMagicEffect(player4pos, CONST_ME_POFF)
 
   						doTeleportThing(player1.uid, nplayer1pos, false)
   						doTeleportThing(player2.uid, nplayer2pos, false)
   						doTeleportThing(player3.uid, nplayer3pos, false)
   						doTeleportThing(player4.uid, nplayer4pos, false)
 
   						doSendMagicEffect(nplayer1pos, CONST_ME_TELEPORT)
   						doSendMagicEffect(nplayer2pos, CONST_ME_TELEPORT)
   						doSendMagicEffect(nplayer3pos, CONST_ME_TELEPORT)
   						doSendMagicEffect(nplayer4pos, CONST_ME_TELEPORT)
 
   						doTransformItem(item.uid, item.itemid + 1)
   					else
   						doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
   					end
   				else
   					doPlayerSendCancel(cid, "All players must have level 100 to make this quest.")
   				end
   			else
   				doPlayerSendCancel(cid, "You need 4 players in your team.")
   			end
   		elseif item.itemid == 1946 then
   			if getPlayerAccess(cid) > 0 then
   				doTransformItem(item.uid, item.itemid - 1)
   			else
   				doPlayerSendCancel(cid, "Sorry, not possible.")
   			end
   		end
   	end
	return true
end
 
I keep getting this type of complaint all the time... Give me a second I'll edit this in a moment...

*EDIT*: Here it is, feel free to throw some reputation over my way :D.

And do change the positions.
LUA:
-- annihilator lever
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 7000 then
		if item.itemid == 1945 then
			player1pos = {x = 194, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player1 = getThingfromPos(player1pos)
 
   			player2pos = {x = 193, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player2 = getThingfromPos(player2pos)
 
   			player3pos = {x = 192, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player3 = getThingfromPos(player3pos)
 
   			player4pos = {x = 191, y = 118, z = 9, stackpos = STACKPOS_TOP_CREATURE}
   			player4 = getThingfromPos(player4pos)
 
   			if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
   				player1level = getPlayerLevel(player1.uid)
   				player2level = getPlayerLevel(player2.uid)
   				player3level = getPlayerLevel(player3.uid)
   				player4level = getPlayerLevel(player4.uid)
 
   				questlevel = 100
   				if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel 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 = 193, y = 118, z = 10}
   						nplayer2pos = {x = 192, y = 118, z = 10}
   						nplayer3pos = {x = 191, y = 118, z = 10}
   						nplayer4pos = {x = 190, y = 118, z = 10}
 
   						doSendMagicEffect(player1pos, CONST_ME_POFF)
   						doSendMagicEffect(player2pos, CONST_ME_POFF)
   						doSendMagicEffect(player3pos, CONST_ME_POFF)
   						doSendMagicEffect(player4pos, CONST_ME_POFF)
 
   						doTeleportThing(player1.uid, nplayer1pos, false)
   						doTeleportThing(player2.uid, nplayer2pos, false)
   						doTeleportThing(player3.uid, nplayer3pos, false)
   						doTeleportThing(player4.uid, nplayer4pos, false)
 
   						doSendMagicEffect(nplayer1pos, CONST_ME_TELEPORT)
   						doSendMagicEffect(nplayer2pos, CONST_ME_TELEPORT)
   						doSendMagicEffect(nplayer3pos, CONST_ME_TELEPORT)
   						doSendMagicEffect(nplayer4pos, CONST_ME_TELEPORT)
 
   						doTransformItem(item.uid, item.itemid + 1)
   					else
   						doPlayerSendCancel(cid,"Somebody in your team has already done this quest.")
   					end
   				else
   					doPlayerSendCancel(cid, "All players must have level 100 to make this quest.")
   				end
   			else
   				doPlayerSendCancel(cid, "You need 4 players in your team.")
   			end
   		elseif item.itemid == 1946 then
   			if getPlayerAccess(cid) > 0 then
   				doTransformItem(item.uid, item.itemid - 1)
   			else
   				doPlayerSendCancel(cid, "Sorry, not possible.")
   			end
   		end
   	end
	return true
end
does this spawn the demons to?
 
here you go i edit for summon monster and works 100%
LUA:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 30015 then
 if item.itemid == 1946 then

 player1pos = {x=857, y=953, z=8, stackpos=253}
 player1 = getThingfromPos(player1pos)

 player2pos = {x=858, y=953, z=8, stackpos=253}
 player2 = getThingfromPos(player2pos)

 player3pos = {x=859, y=953, z=8, stackpos=253}
 player3 = getThingfromPos(player3pos)

 player4pos = {x=860, y=953, z=8, stackpos=253}
 player4 = getThingfromPos(player4pos)


	 if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then

  player1level = getPlayerLevel(player1.uid)
  player2level = getPlayerLevel(player2.uid)
  player3level = getPlayerLevel(player3.uid)
  player4level = getPlayerLevel(player4.uid)

  questlevel = 100

  if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then

	  queststatus1 = getPlayerStorageValue(player1.uid,5000)
	  queststatus2 = getPlayerStorageValue(player2.uid,5000)
	  queststatus3 = getPlayerStorageValue(player3.uid,5000)
	  queststatus4 = getPlayerStorageValue(player4.uid,5000)

	  if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then

	--if 1==1 then
	demon1pos = {x=881, y=955, z=9}
	demon2pos = {x=880, y=955, z=9}
	demon3pos = {x=876, y=953, z=9}
	demon4pos = {x=878, y=953, z=9}
	demon5pos = {x=879, y=957, z=9}
	demon6pos = {x=877, y=957, z=9}
	
 
   doSummonCreature("Demon", demon1pos)
   doSummonCreature("Demon", demon2pos)
   doSummonCreature("Demon", demon3pos)
   doSummonCreature("Demon", demon4pos)
   doSummonCreature("Demon", demon5pos)
   doSummonCreature("Demon", demon6pos)
  

	nplayer1pos = {x=879, y=955, z=9}
	nplayer2pos = {x=878, y=955, z=9}
	nplayer3pos = {x=877, y=955, z=9}
	nplayer4pos = {x=876, y=955, z=9}

   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)

	 doTransformItem(item.uid,1945)

	else
	 doPlayerSendCancel(cid,"Sorry, not possible.")
	end
   else
	doPlayerSendCancel(cid,"Sorry, not possible.")
   end
  else
  doPlayerSendCancel(cid,"Sorry, not possible.")
  end
  end
 if item.itemid == 1945 then
-- Here is the code start:
starting={x=874, y=951, z=9, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=892, y=959, z=9, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
 if creature.itemid > 0 then
 if getPlayerAccess(creature.uid) == 0 then
 players=players+1
 end
  if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
 totalmonsters=totalmonsters+1
  monster[totalmonsters]=creature.uid
   end
 end
checking.x=checking.x+1
  if checking.x>ending.x then
  checking.x=starting.x
  checking.y=checking.y+1
 end
until checking.y>ending.y
if players==0 then
trash= {x=33193, y=31689, z=15}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end
-- Here is the end of it

end
end
 return 1
end
 
here you go i edit for summon monster and works 100%
LUA:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 30015 then
 if item.itemid == 1946 then

 player1pos = {x=857, y=953, z=8, stackpos=253}
 player1 = getThingfromPos(player1pos)

 player2pos = {x=858, y=953, z=8, stackpos=253}
 player2 = getThingfromPos(player2pos)

 player3pos = {x=859, y=953, z=8, stackpos=253}
 player3 = getThingfromPos(player3pos)

 player4pos = {x=860, y=953, z=8, stackpos=253}
 player4 = getThingfromPos(player4pos)


	 if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then

  player1level = getPlayerLevel(player1.uid)
  player2level = getPlayerLevel(player2.uid)
  player3level = getPlayerLevel(player3.uid)
  player4level = getPlayerLevel(player4.uid)

  questlevel = 100

  if player1level >= questlevel and player2level >= questlevel and player3level >= questlevel and player4level >= questlevel then

	  queststatus1 = getPlayerStorageValue(player1.uid,5000)
	  queststatus2 = getPlayerStorageValue(player2.uid,5000)
	  queststatus3 = getPlayerStorageValue(player3.uid,5000)
	  queststatus4 = getPlayerStorageValue(player4.uid,5000)

	  if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then

	--if 1==1 then
	demon1pos = {x=881, y=955, z=9}
	demon2pos = {x=880, y=955, z=9}
	demon3pos = {x=876, y=953, z=9}
	demon4pos = {x=878, y=953, z=9}
	demon5pos = {x=879, y=957, z=9}
	demon6pos = {x=877, y=957, z=9}
	
 
   doSummonCreature("Demon", demon1pos)
   doSummonCreature("Demon", demon2pos)
   doSummonCreature("Demon", demon3pos)
   doSummonCreature("Demon", demon4pos)
   doSummonCreature("Demon", demon5pos)
   doSummonCreature("Demon", demon6pos)
  

	nplayer1pos = {x=879, y=955, z=9}
	nplayer2pos = {x=878, y=955, z=9}
	nplayer3pos = {x=877, y=955, z=9}
	nplayer4pos = {x=876, y=955, z=9}

   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)

	 doTransformItem(item.uid,1945)

	else
	 doPlayerSendCancel(cid,"Sorry, not possible.")
	end
   else
	doPlayerSendCancel(cid,"Sorry, not possible.")
   end
  else
  doPlayerSendCancel(cid,"Sorry, not possible.")
  end
  end
 if item.itemid == 1945 then
-- Here is the code start:
starting={x=874, y=951, z=9, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=892, y=959, z=9, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
 if creature.itemid > 0 then
 if getPlayerAccess(creature.uid) == 0 then
 players=players+1
 end
  if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
 totalmonsters=totalmonsters+1
  monster[totalmonsters]=creature.uid
   end
 end
checking.x=checking.x+1
  if checking.x>ending.x then
  checking.x=starting.x
  checking.y=checking.y+1
 end
until checking.y>ending.y
if players==0 then
trash= {x=33193, y=31689, z=15}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end
-- Here is the end of it

end
end
 return 1
end
I don't know what I am doing wrong but the lever is still stuck at the same position and nothing is happening, Am I supposed to do something in RME with the uid that is 30015 or what should I do?
 
Back
Top