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

Sacrefice Key

Chaos ruler

New Member
Joined
Dec 1, 2008
Messages
73
Reaction score
0
Location
The Netherlands
Yo
I really hope someone can help me with this because it took me 3 days to script poi but .. :p one script doesnt work...
I made that you need 7 items from 7 seals in poi.. when you put the items on the 7 spots in the last room and switch the lever. ( the items will be sacreficed and you teleport to the Rewardroom.)
But does someone got a sacrafice script for me? :(
i really need help i putted so mutch presure on this.

Thx in advance
 
ok here it is:

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

local sacrificePos = {x=1718, y=1169, z=8, stackpos=2}
local sacrifice1Pos = {x=1719, y=1169, z=8, stackpos=2}
local sacrifice2Pos = {x=1720, y=1169, z=8, stackpos=2}
local sacrifice3Pos = {x=1721, y=1169, z=8, stackpos=2}
local sacrifice4Pos = {x=1722, y=1169, z=8, stackpos=2}
local sacrifice5Pos = {x=1723, y=1169, z=8, stackpos=2}
local sacrifice6Pos = {x=1724, y=1169, z=8, stackpos=2}
local sacrifice = getThingfromPos(sacrificePos)
local sacrifice1 = getThingfromPos(sacrifice1Pos)
local sacrifice2 = getThingfromPos(sacrifice2Pos)
local sacrifice3 = getThingfromPos(sacrifice3Pos)
local sacrifice4 = getThingfromPos(sacrifice4Pos)
local sacrifice5 = getThingfromPos(sacrifice5Pos)
local sacrifice6 = getThingfromPos(sacrifice6Pos)
local teleportTo = {x=1414, y=1022, z=7}

if item.itemid == 1945 then

if sacrifice.itemid == 6536 then
if sacrifice1.itemid == 6539 then
if sacrifice2.itemid == 6540 then
if sacrifice3.itemid == 6537 then
if sacrifice4.itemid == 6535 then
if sacrifice5.itemid == 6534 then
if sacrifice6.itemid == 6546 then

doSendMagicEffect(sacrificePos, CONST_ME_HITBYFIRE)
doTeleportThing(cid, teleportTo)
doSendMagicEffect(teleportTo, CONST_ME_ENERGYAREA)
doRemoveItem(sacrifice.uid, 1)
doRemoveItem(sacrifice1.uid, 1)
doRemoveItem(sacrifice2.uid, 1)
doRemoveItem(sacrifice3.uid, 1)
doRemoveItem(sacrifice4.uid, 1)
doRemoveItem(sacrifice5.uid, 1)
doRemoveItem(sacrifice6.uid, 1)

else

doPlayerSendCancel(cid, "Sorry, not Possible.")
return 1

end

end

end

end

end

end

end

end

end

This is my script it works fine i know it looks dumb :p But the 7 items disapeare.. thats the good part < --- but the problem is only 1 player gets tped. I want it like : ahni you pull lever and you NEED 4 players to get in the room. But i want to pull the lever and 7 items disapeare and 7 players get tped to the Reward room. I hope someone can edit my script ;) or make a new one but i think thats not needed.

thx

thnx
 
Last edited:
This one has to work ive test it and works fine:

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

local sacrificePos = {x=1718, y=1169, z=8, stackpos=2}
local sacrifice1Pos = {x=1719, y=1169, z=8, stackpos=2}
local sacrifice2Pos = {x=1720, y=1169, z=8, stackpos=2}
local sacrifice3Pos = {x=1721, y=1169, z=8, stackpos=2}
local sacrifice4Pos = {x=1722, y=1169, z=8, stackpos=2}
local sacrifice5Pos = {x=1723, y=1169, z=8, stackpos=2}
local sacrifice6Pos = {x=1724, y=1169, z=8, stackpos=2}
local sacrifice = getThingfromPos(sacrificePos)
local sacrifice1 = getThingfromPos(sacrifice1Pos)
local sacrifice2 = getThingfromPos(sacrifice2Pos)
local sacrifice3 = getThingfromPos(sacrifice3Pos)
local sacrifice4 = getThingfromPos(sacrifice4Pos)
local sacrifice5 = getThingfromPos(sacrifice5Pos)
local sacrifice6 = getThingfromPos(sacrifice6Pos)
local teleportTo = {x=1414, y=1022, z=7}
local fromPos = {x=123, y=123, z=7}
local toPos = {x=123, y=125, z=7}

	if item.itemid == 1945 then
		if sacrifice.itemid == 6536 then
			if sacrifice1.itemid == 6539 then
				if sacrifice2.itemid == 6540 then
					if sacrifice3.itemid == 6537 then
						if sacrifice4.itemid == 6535 then
							if sacrifice5.itemid == 6534 then
								if sacrifice6.itemid == 6546 then
--Area								
local players = getPlayersOnline()
	for i, pid in ipairs(players) do
		pos = getPlayerPosition(pid)
		if isInArea(pos, fromPos, toPos) == TRUE then
			doTeleportThing(pid, teleportTo)
		end
	end
--EndArea

										doSendMagicEffect(sacrificePos, CONST_ME_HITBYFIRE)
										doSendMagicEffect(teleportTo, CONST_ME_ENERGYAREA)
										doRemoveItem(sacrifice.uid, 1)
										doRemoveItem(sacrifice1.uid, 1)
										doRemoveItem(sacrifice2.uid, 1)
										doRemoveItem(sacrifice3.uid, 1)
										doRemoveItem(sacrifice4.uid, 1)
										doRemoveItem(sacrifice5.uid, 1)
										doRemoveItem(sacrifice6.uid, 1)

								else
									doPlayerSendCancel(cid, "Sorry, not Possible.")
								return 1
								end
							end
						end
					end
				end
			end
		end
	end
end

How to config the area?
Edit fromPos and toPos positions.

More Info from fromPos, toPos:

fromto.png


Ok so if the player is in that area(orange) he will be teleported to the reward room.

You can make the area as big as you whant :D
 
Back
Top