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

Script doesn't work

UpAndDown

New Member
Joined
Mar 12, 2009
Messages
66
Reaction score
0
Hey, I got a script for the inquisition, but it doesn't work. I don't see any bugs in it, but I'm sure some of you will!

Code:
function onUse(cid, item, frompos, item2, topos)
 
	local switchUniqueID = 12612  -- uniqueID of switch
	local switchID = 1945
	local switch2ID = 1946
	local itemID = 5527
	local itempos = {x=33175, y=31726, z=11, stackpos=1} 
	local wallpos = {x=33173, y=31728, z=11, stackpos=1}

	local playername = getPlayerName(cid)
	local getitem = getThingfromPos(itempos)
	local wallchk = getThingfromPos(wallpos)
 
	if item.uid == switchUniqueID and item.itemid == switchID and getitem.itemid == itemID and wallchk.itemid == 1025 then
			doSendMagicEffect(itempos,10)
			doSendMagicEffect(wallchk,10)
			doRemoveItem(getitem.uid,1)
			doRemoveItem(wallchk.uid,1)
			doTransformItem(item.uid,item.itemid+1)
			addEvent(onTimer4, 2*60*1000)
	elseif item.uid == switchUniqueID and item.itemid == switch2ID then
			doTransformItem(item.uid,item.itemid-1)
	else
			doPlayerSendCancel(cid,"Place the corpse of the slain demon lord before you flip the switch.")
end
	return 1
end


function onTimer4()

wallnewpos = {x=33173, y=31728, z=11} 
		doCreateItem(1025,1,wallnewpos)
end

This is what happens, when I killed the demon lord, and I get his body on the tile, it gives the next message when trying to flip the switch;
"Place the corpse of the slain demon lord before you flip the switch"

It keeps giving it, and the switch won't move. Also, the ItemID of the demon dust is correct;

16:32 You see a demon dust (Vol:10).
ItemID: [5527].
Position: [X: 33175] [Y: 31726] [Z: 11].

Hope someone can help. :)

Thanks in advance,
UpAndDown!
 
Ah, I forgot to add, no it doesn't show any bugs, and I've checked the coördinates 5 times now and it's 100% correct. Also a strange thing is, that for the next boss monster, it does work. I've also compared those two, and all that's different are the coördinates, nothing else.

I've also seen that the seal with Latrivan and Golgordan doesn't work either. All others do. I will post one that works.

Code:
function onUse(cid, item, frompos, item2, topos)
 
	local switchUniqueID = 12613  -- uniqueID of switch
	local switchID = 1945
	local switch2ID = 1946
	local itemID = 5527
	local itempos = {x=33139, y=31691, z=11, stackpos=1} 
	local wallpos = {x=33137, y=31693, z=11, stackpos=1}
 
	local playername = getPlayerName(cid)
	local getitem = getThingfromPos(itempos)
	local wallchk = getThingfromPos(wallpos)
 
	if item.uid == switchUniqueID and item.itemid == switchID and getitem.itemid == itemID and wallchk.itemid == 1025 then
			doSendMagicEffect(itempos,10)
			doSendMagicEffect(wallchk,10)
			doRemoveItem(getitem.uid,1)
			doRemoveItem(wallchk.uid,1)
			doTransformItem(item.uid,item.itemid+1)
			addEvent(onTimer5, 2*60*1000)
	elseif item.uid == switchUniqueID and item.itemid == switch2ID then
			doTransformItem(item.uid,item.itemid-1)
	else
			doPlayerSendCancel(cid,"Place the corpse of the slain demon lord before you flip the switch.")
end
	return 1
end


function onTimer5()

wallnewpos = {x=33137, y=31693, z=11} 
		doCreateItem(1025,1,wallnewpos)
end
 
Back
Top