• 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 spawn (summons)

smurf

New Member
Joined
Aug 6, 2009
Messages
2
Reaction score
0
can anyone give me a script for a lever spawn?
so you have to use coins and when you use the lever it summons a monster and takes 1 coin away

thxs
 
LUA:
function onUse(cid, item, frompos, item2, topos)

local cost = 50000
local monster = "Demon"
local checkpos = {x=737, y=965, z=7, stackpos=253} 
local monsterpos = {x=737, y=965, z=7} 
check = getThingfromPos(checkpos)

	if check.itemid == 0 then 
		if doPlayerRemoveMoney(cid, cost) == TRUE then
			doSummonCreature(monster, monsterpos)
		else
			doPlayerSendTextMessage(cid,22, "You need "..cost.." gold for a Summon.")
		end
	else
		doPlayerSendTextMessage(cid,22, "You already have a Summon or you don't stand on the right Field.")
	end
	return TRUE
end

I hope it work ;).

Regards,
Shawak
 
Back
Top