• 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 Action move monster with statue (from roxor decide your own spawn) for 1.0

povedijah

Member
Joined
Jan 11, 2010
Messages
93
Reaction score
6
Hello, im working on a project of roxor, I tring to update it to 10.77 with tfs 1.0, but I need some help with that script.

The script works like when you touch an statue the monster of (creature1pos) go to (ncreature1pos).

There is no error in console, and the statue says to you the message "No Monsters To Teleport!!"

I think it needs to be updated to 1.0 functions.
The script is from Roxor 8.62 of Ghost.

Thank you in advance.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 1035 then
        creature1pos = {x=811, y=625, z=7, stackpos=253}
        creature1 = getThingfromPos(creature1pos)

            if creature1.itemid > 0 then

            ncreature1pos = {x=811, y=627, z=7}
              
                doSendMagicEffect(creature1pos,2)

                doTeleportThing(creature1.uid,ncreature1pos)

                doSendMagicEffect(ncreature1pos,10)
        doCreatureSay(cid, "Here you are!", TALKTYPE_ORANGE_1)

else

        doCreatureSay(cid, "No Monsters To Teleport!!", TALKTYPE_ORANGE_1)

end
end
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 1035 then
        creature1pos = {x=811, y=625, z=7, stackpos=255}
        creature1 = getThingfromPos(creature1pos)

            if creature1.uid > 0 then

            ncreature1pos = {x=811, y=627, z=7}
             
                doSendMagicEffect(creature1pos,2)

                doTeleportThing(creature1.uid,ncreature1pos)

                doSendMagicEffect(ncreature1pos,10)
        doCreatureSay(cid, "Here you are!", TALKTYPE_ORANGE_1)

else

        doCreatureSay(cid, "No Monsters To Teleport!!", TALKTYPE_ORANGE_1)

end
end
end
 
Yes the monster is here

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 1035 then
        creature1pos = {x=811, y=625, z=7, stackpos=255}
        creature1 = getThingfromPos(creature1pos)

            if creature1.uid > 0 then

            ncreature1pos = {x=811, y=627, z=7}
            
                doSendMagicEffect(creature1pos,2)

                doTeleportThing(creature1.uid,ncreature1pos)

                doSendMagicEffect(ncreature1pos,10)
        doCreatureSay(cid, "Here you are!", TALKTYPE_ORANGE_1)

else

        doCreatureSay(cid, "No Monsters To Teleport!!", TALKTYPE_ORANGE_1)

end
end
end

Same result it says No Monster to Teleport!

Thank you anyway
 
Last edited by a moderator:
Same result it says No Monster to Teleport!
ummm give me 1 minute i will test this in my server

have fun
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if  item.uid == 1035  then
        creature1pos = {x=811, y=625, z=7, stackpos=255}
        local u = getTopCreature(creature1pos)
        if u.type > 0 then
            ncreature1pos = {x=811, y=627, z=7}
            doSendMagicEffect(creature1pos,3)
            doTeleportThing(u.uid,ncreature1pos)
            doSendMagicEffect(ncreature1pos,11)
            doCreatureSay(cid, "Here you are!", TALKTYPE_ORANGE_1)
            else
            doCreatureSay(cid, "No Monsters To Teleport!!", TALKTYPE_ORANGE_1)
        end
    end
end
 
Last edited by a moderator:
Thank you nice work!! I give REP!

For various monster, Its well writen?
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if  item.uid == 1020  then
        creature1pos = {x=744, y=625, z=7, stackpos=255}
        creature2pos = {x=739, y=625, z=7, stackpos=255}
        local u = getTopCreature(creature1pos)
        local c = getTopCreature(creature2pos)
        if u.type > 0 and c.type > 0 then
            ncreature1pos = {x=739, y=627, z=7, stackpos=255}
            ncreature2pos = {x=744, y=627, z=7, stackpos=255}
            doSendMagicEffect(creature1pos,3)
            doSendMagicEffect(creature2pos,3)
            doTeleportThing(u.uid,ncreature1pos)
            doTeleportThing(c.uid,ncreature2pos)
            doSendMagicEffect(ncreature1pos,11)
            doSendMagicEffect(ncreature2pos,11)
            doCreatureSay(cid, "Here you are!", TALKTYPE_ORANGE_1)
            else
            doCreatureSay(cid, "No Monsters To Teleport!!", TALKTYPE_ORANGE_1)
        end
    end
end
 
Last edited by a moderator:
Back
Top