Crixpx
New Member
- Joined
- Jan 11, 2015
- Messages
- 70
- Reaction score
- 3
I have this script works this way: when clicking would have to teleport a few monsters that are in a coordinate to other coordinates, the problem is: the script does not teleport nothing
i'm using tfs 1.3
Someone could give me an idea of what is going on
this is the script
i'm using tfs 1.3
Someone could give me an idea of what is going on
this is the script
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 1011 then
creature1pos = {x=774, y=625, z=7, stackpos=253}
creature1 = getThingfromPos(creature1pos)
creature2pos = {x=770, y=625, z=7, stackpos=253}
creature2 = getThingfromPos(creature2pos)
creature3pos = {x=766, y=625, z=7, stackpos=253}
creature3 = getThingfromPos(creature3pos)
if creature1.itemid > 0 and creature2.itemid > 0 and creature3.itemid > 0 then
ncreature1pos = {x=774, y=628, z=7}
ncreature2pos = {x=770, y=628, z=7}
ncreature3pos = {x=766, y=628, z=7}
doSendMagicEffect(creature1pos,2)
doSendMagicEffect(creature2pos,2)
doSendMagicEffect(creature3pos,2)
doTeleportThing(creature1.uid,ncreature1pos)
doTeleportThing(creature2.uid,ncreature2pos)
doTeleportThing(creature3.uid,ncreature3pos)
doSendMagicEffect(ncreature1pos,10)
doSendMagicEffect(ncreature2pos,10)
doSendMagicEffect(ncreature3pos,10)
doCreatureSay(cid, "Here you are!", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "No Monsters To Teleport!!", TALKTYPE_ORANGE_1)
end
end
end