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

Anhi

Quickshot

Member
Joined
Nov 8, 2008
Messages
595
Reaction score
8
hi can does anyone know how to make a anhi i need help i want an anhi on my server ty
 
grizzm0 said:
1. Open the map you want in a mapeditor.
2. Build your annihilator switch room and quest room.
3. Set uniqueid 5000 on the switch (use switch id 1945)
4. Set uniqueid 5001-5004 on the quest chests. (start from left)
5. Open actions.xml and add this.
Code:
<action uniqueid="5000" script="annihilator.lua" />
<action uniqueid="5001" script="annihilator.lua" />
<action uniqueid="5002" script="annihilator.lua" />
<action uniqueid="5003" script="annihilator.lua" />
<action uniqueid="5004" script="annihilator.lua" />
6. Create a new file in data/actions/scripts named annihilator.lua and add this.
Code:
-- annihilator script v2.1 by grizzm0.
--
-- variables used:
--
-- player?pos = the position of the players before teleport.
-- player? = get the thing from playerpos.
-- player?level = get the players levels.
-- questslevel = the level you have to be to do this quest.
-- questtatus? = get the quest status of the players.
-- demon?pos = the position of the demons.
-- nplayer?pos = the position where the players should be teleported too.
--
-- uniqueids used:
--
-- 5000 = the switch.
-- 5001 = demon armor chest.
-- 5002 = magic sword chest.
-- 5003 = stonecutter axe chest.
-- 5004 = present chest.
--

function onuse(cid, item, frompos, item2, topos)
	if item.uid == 5000 then
		if item.itemid == 1945 then

			player1pos = {x=224, y=207, z=7, stackpos=253}
			player1 = getthingfrompos(player1pos)

			player2pos = {x=223, y=207, z=7, stackpos=253}
			player2 = getthingfrompos(player2pos)

			player3pos = {x=222, y=207, z=7, stackpos=253}
			player3 = getthingfrompos(player3pos)

			player4pos = {x=221, y=207, z=7, 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
			
						demon1pos = {x=243, y=205, z=7}
						demon2pos = {x=245, y=205, z=7}
						demon3pos = {x=244, y=209, z=7}
						demon4pos = {x=246, y=209, z=7}
						demon5pos = {x=247, y=207, z=7}
						demon6pos = {x=248, y=207, z=7}
						 
						dosummoncreature("demon", demon1pos)
						dosummoncreature("demon", demon2pos)
						dosummoncreature("demon", demon3pos)
						dosummoncreature("demon", demon4pos)
						dosummoncreature("demon", demon5pos)
						dosummoncreature("demon", demon6pos)

						nplayer1pos = {x=246, y=207, z=7}
						nplayer2pos = {x=245, y=207, z=7}
						nplayer3pos = {x=244, y=207, z=7}
						nplayer4pos = {x=243, y=207, 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)

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

					else
						doplayersendcancel(cid,"sorry, not possible.")
					end
				else
					doplayersendcancel(cid,"sorry, not possible.")
				end
			else
				doplayersendcancel(cid,"sorry, not possible.")
			end
		elseif item.itemid == 1946 then
			if getplayeraccess(cid) == 3 then
				dotransformitem(item.uid,item.itemid-1)
			else
				doplayersendcancel(cid,"sorry, not possible.")
			end
		end
	elseif item.uid == 5001 then
	
		queststatus = getplayerstoragevalue(cid,5000)
		
		if queststatus == -1 then
			doplayersendtextmessage(cid,22,"you have found a demon armor.")
			doplayeradditem(cid,2494,1)
			setplayerstoragevalue(cid,5000,1)
		else
			doplayersendtextmessage(cid,22,"it is empty.")
		end
	elseif item.uid == 5002 then
	
		queststatus = getplayerstoragevalue(cid,5000)
		
		if queststatus == -1 then
			doplayersendtextmessage(cid,22,"you have found a magic sword.")
			doplayeradditem(cid,2400,1)
			setplayerstoragevalue(cid,5000,1)
		else
			doplayersendtextmessage(cid,22,"it is empty.")
		end
	elseif item.uid == 5003 then
	
		queststatus = getplayerstoragevalue(cid,5000)
		
		if queststatus == -1 then
			doplayersendtextmessage(cid,22,"you have found a stonecutter axe.")
			doplayeradditem(cid,2431,1)
			setplayerstoragevalue(cid,5000,1)
		else
			doplayersendtextmessage(cid,22,"it is empty.")
		end
	elseif item.uid == 5004 then
	
		queststatus = getplayerstoragevalue(cid,5000)
		
		if queststatus == -1 then
			doplayersendtextmessage(cid,22,"you have found a present.")
			doplayeradditem(cid,1990,1)
			setplayerstoragevalue(cid,5000,1)
		else
			doplayersendtextmessage(cid,22,"it is empty.")
		end
	end
	return 1
end
7. Open annihilator.lua and your map. Find your annihilator switch on the map.
8. Check what cordinates all the tiles got and change player1pos-player4pos with your new cordinates. (my cordinates are from right to left)
Code:
player1pos = {x=224, y=207, z=7, stackpos=253}
player1 = getthingfrompos(player1pos)

player2pos = {x=223, y=207, z=7, stackpos=253}
player2 = getthingfrompos(player2pos)

player3pos = {x=222, y=207, z=7, stackpos=253}
player3 = getthingfrompos(player3pos)

player4pos = {x=221, y=207, z=7, stackpos=253}
player4 = getthingfrompos(player4pos)
9. Go to the annihilator room at your map and check what cordinates the new positions got and change this. (my cordinates are from right to left)
Code:
nplayer1pos = {x=246, y=207, z=7}
nplayer2pos = {x=245, y=207, z=7}
nplayer3pos = {x=244, y=207, z=7}
nplayer4pos = {x=243, y=207, z=7}
10. Check the cordinates of your demon spots and change this.
Code:
demon1pos = {x=243, y=205, z=7}
demon2pos = {x=245, y=205, z=7}
demon3pos = {x=244, y=209, z=7}
demon4pos = {x=246, y=209, z=7}
demon5pos = {x=247, y=207, z=7}
demon6pos = {x=248, y=207, z=7}
(my demon positions looks like this)
demonpos: (1 to 6 = demons. X = nothing. L = lava. P = player.)
1X2X
LLLL
PPPP56
LLLL
X3X4


credits to grizzm0 from otfans
 
Back
Top