buymonster.lua
movements.xml
Code:
local t = {
monster = {"MONSTER", {x=xxxx, y=yyyy, z=z}},
msg = "Oh no! something strange has come to kill you!"
}
function onStepIn(cid, item, position, fromPosition)
if doPlayerRemoveMoney(cid, 10000) then
doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
doSummonCreature(t.monster[1], t.monster[2])
else
doPlayerSendCancel(cid, "Sorry but you need to have 10 crystal coins to enter.")
return TRUE
end
end
movements.xml
Code:
<movevent type="StepIn" uniqueid="xxxx" event="script" value="buymonster.lua"/>
Last edited: