xx Kami xx
Retired.
- Joined
- Dec 29, 2012
- Messages
- 509
- Reaction score
- 20
hello and i need help fixing a small script
What the script is suppose to do: Using the lever you spawn 1 ferumbras but cannot use lever again untill the ferumbras is dead.
Repp++ if anyone can fix it
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
doSummonCreature("Ferumbras", {x= 1007, y= 1025, z= 7})
local amount = 1
for x = fromPos.x, toPos.x do
for y = fromPos.y, toPos.y do
for z = fromPos.z, toPos.z do
local monster = getTopCreature({x=x,y=y,z=z}).uid
if(isCreature(monster) == TRUE) then
if getCreatureName(monster) == "Ferumbras" then
amount = amount+1
end
end
end
end
end
if amount >= 1 then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "You need to kill Ferumbras first before you can summen one again.")
return true
else
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have summened Ferumbras.")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
end
end
What the script is suppose to do: Using the lever you spawn 1 ferumbras but cannot use lever again untill the ferumbras is dead.
Repp++ if anyone can fix it
Last edited by a moderator: