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

Electric Chair

Aziltu

New Member
Joined
Sep 7, 2007
Messages
165
Reaction score
0
Location
Earth
Hello can someone make a Electric Chair for me.

Because this script isn't working

chair.lua
Code:
-- Krzeslo elektryczne zrobione przez Smoczek Leon --
-- Electric chair by Smoczek Leon --


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

	if item.uid == 7666 and item.itemid == 1945 then
		player1pos = {x=330, y=355, z=12, stackpos=253}  -- chair postion
		player1 = getThingfromPos(player1pos)

		if player1.itemid > 0 then
			player1heal = getPlayerHealth(player1.uid)
			player1mana = getPlayerMana(player1.uid)
			smierc = (player1mana) + (player1heal)
			skazany = getPlayerName(player1.uid)

			doPlayerAddHealth(player1.uid,-smierc)
			doSendMagicEffect(player1pos,11)
			doTransformItem(item.uid,item.itemid+1)
		else
			doPlayerSendCancel(cid,"Lack convicted :(")

		end


elseif item.uid == 7666 and item.itemid == 1946 then
	cialopos = {x=330, y=355, z=12, stackpos=2}  -- chair postion, no change stakpos!
	cialo = getThingfromPos(cialopos)
	cialo2pos = {x=330, y=355, z=12, stackpos=1}  -- chair postion, no change stakpos!
	cialo2 = getThingfromPos(cialo2pos)
	newpos = {x=332, y=355, z=12}  -- new postion corps
		doRemoveItem(cialo2.uid,1)
		doTeleportThing(cialo.uid,newpos) 
		doTransformItem(item.uid,item.itemid-1)

	else
		return 0
   	end

	return 1

end

Code:
<action uniqueid="7666" script="chair.lua" />
 
Back
Top