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

Simple Action lever script but not for me.... :/

breadmaker

New Member
Joined
Jul 16, 2010
Messages
160
Reaction score
3
Hello.
I've request you for make me an simple action script:

beztytuuky.png


If we place on coals:
RED - ID: 2345 item
BLUE - ID: 2350 item

and we switch the lever (ID: 1945),
we have 10% chances to spawn Bear,
also we got (random: 2-10) platinum coins after switch lever with items!

Anyone can make it for me ?
Rep++:thumbup:
 
LUA:
function onUse(cid, item, frompos, item2, topos)
local item1pos = {x=frompos.x+1, y=frompos.y, z=frompos.z, stackpos=255}
local item2pos = {x=frompos.x+2, y=frompos.y, z=frompos.z, stackpos=255}
local item1 = getThingFromPos(item1pos)
local item2 = getThingFromPos(item2pos)
	if item1.itemid == 2345 and item2.itemid == 2350 then
	doPlayerAddMoney(cid,math.random(2,10))
		if math.random(1,10) == 1 then -- = 10%
		doSummonMonster("Bear", getThingPos(item.uid))
		end
	else
	doPlayerSendCancel(cid, 'Put items on the coals.')
	end
end
 
Back
Top