• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lever when you click on res many monsters

melegy

Devils
Joined
Dec 5, 2012
Messages
178
Reaction score
2
Location
Egypt
Hiho, Otlander's
I'm Looking for script it's a lever when you click on it ,its res 3 monsters [ Demon, undead dragon, Dragon lord] I really want this script



Thanks !
 
Here you Are Friend

Explain in Script

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
 local pos1 = {x=1000, y=1000, z=6} ---------- For Demons--------
 local pos2 = {x=1000, y=998, z=6} ----------- for Undead Dragon-----------
 local pos3 = {x=1000, y=999, z=6} ------------for Dragon Lord ------------
 
	if item.itemid == 1945 then
	doTransformItem(item.uid, item.itemid + 1)
	doCreateMonster("demon", pos1)
	doCreateMonster("undead dragon", pos2)
	doCreateMonster("dragon lord", pos3)
	doPlayerSendTextMessage(cid, 21, "you Have Summoned Monsters")
	else
	if item.itemid == 1946 then
	doTransformItem(item.uid, item.itemid - 1)
	doCreateMonster("demon", pos1)
	doCreateMonster("undead dragon", pos2)
	doCreateMonster("dragon lord", pos3)
	doPlayerSendTextMessage(cid, 21, "you Have Summoned Monsters")
	end
	end
	end
Code:
<action actionid="1212" script="lever1.lua"/>
 
Thanks for you'r help Friend, But it's do not work
it's says

date/actions/scripts/onuse.lua:8: attempt to call global 'docreatemonster' <a nil value>
 
what TFS Version are you using??
it worked for me perfectly

- - - Updated - - -

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
 local pos1 = {x=1000, y=1000, z=6}
 local pos2 = {x=1000, y=998, z=6}
 local pos3 = {x=1000, y=999, z=6}
 
	if (item.itemid == 1945) then
	doCreateMonster("demon", pos1)
	doCreateMonster("undead dragon", pos2)
	doCreateMonster("dragon lord", pos3)
	doPlayerSendTextMessage(cid, 21, "you Have Summoned Monsters")
	doTransformItem(item.uid, item.itemid + 1)
	elseif item.itemid == 1946 then
	doTransformItem(item.uid, item.itemid-1)
	doCreateMonster("demon", pos1)
	doCreateMonster("undead dragon", pos2)
	doCreateMonster("dragon lord", pos3)
	doPlayerSendTextMessage(cid, 21, "you Have Summoned Monsters")
	end
	return TRUE
	end

Don't Forget To change the Position
 
you should make it like that you can only use the lever once in the 5 to 10 min now you can just spam the lever :P
 
Back
Top