Caduceus
Unknown Member
- Joined
- May 10, 2010
- Messages
- 321
- Solutions
- 2
- Reaction score
- 24
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 31299 then
if item.itemid == 1946 then
local storage = 31300
playerpos = getPlayerPosition(cid)
player = getThingfromPos(playerpos)
nplayerpos = {x=1169, y=1007, z=10}
if player.itemid > 0 then
playerlevel = getPlayerLevel(player.uid)
questlevel = 60
if playerlevel >= questlevel then
if getPlayerStorageValue(cid, storage) < 1 then
doSendMagicEffect(playerpos,2)
doTeleportThing(player.uid,nplayerpos)
doSendMagicEffect(nplayerpos,10)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Hope to see you on the other side!")
demon1pos = {x=1173, y=993, z=10}
doSummonCreature("Stormblast", demon1pos)
doTransformItem(item.uid,1945)
else
doPlayerSendCancel(cid,"You Have Already Completed The Catacombs Quest.")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You Have Already Completed The Catacombs Quest.")
if item.itemid == 1945 then
starting={x=1160, y=988, z=10, stackpos=253}
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}
ending={x=1181, y=1011, z=10, stackpos=253}
players=0
totalmonsters=0
monster = {}
repeat
creature= getThingfromPos(checking)
if creature.itemid > 0 then
if getPlayerAccess(creature.uid) == 0 then
players=players+1
end
if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 1 then
totalmonsters=totalmonsters+1
monster[totalmonsters]=creature.uid
end
end
checking.x=checking.x+1
if checking.x>ending.x then
checking.x=starting.x
checking.y=checking.y+1
end
until checking.y>ending.y
if players==0 then
trash= {x=1187, y=1013, z=10}
current=0
repeat
current=current+1
doTeleportThing(monster[current],trash)
until current>=totalmonsters
doTransformItem(item.uid,1946)
end
end
end
end
end
end
end
end
Last edited: