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

Solved [LUA] Summon monsters

atyll

Member
Joined
Dec 30, 2008
Messages
380
Reaction score
16
Hello

Can anybody help me write a LUA script so that when somebody pulls a lever, it will summon monster on specific X, Y, Z location?

LUA:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 4242 and item.itemid == 1945 then
// ADD cid so that player cannot pull it again
// summon demon at x=100, y=100, z=7
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
  return 1
  end

I use Avesta 0.6.3
 
You want a player to only be able to summen it once, or should there be some kind of exhaustion on it or should the monster die first?
For the summen monster you can use
LUA:
doSummonCreature("Demon", {x = 100, y = 100, z = 7})
 
Back
Top