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

SUmmon monster

DestinationSer

@echo off
Joined
Mar 7, 2009
Messages
2,806
Solutions
1
Reaction score
676
Hey
I need a script that does so you can click on a switch and summon a monster ONLY if you have the two required items.
 
Ive have not tested it:


LUA:
local otswe = {
monster = "Orshabaal",
summon_pos = {x=1000, y=1000, z=7},
item1 = 2400,
item2 = 2160
}

function onUse(cid, item, frompos, item2, topos)
    if item.itemid == 1945 then
       if getPlayerItemCount(cid, otswe.item1) >= 1 and getPlayerItemCount(cid, otswe.item2) >= 1 then
        doCreatureSay(cid, "OH NO!")
        doSummonCreature(otswe.monster, otswe.summon_pos)
        doSendMagicEffect(otswe.summon_pos(cid), CONST_ME_EXPLOSION)
  		else
        doPlayerSendCancel(cid, 'Sorry but you dont have the require items to use this lever!.')
        end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
 
Back
Top