• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Script blood to enter in Poi

armyman

Member
Joined
Feb 15, 2014
Messages
318
Reaction score
14
What are wrong? don't work :/
i want use a vial of blood in gravestone sqm and be teleported


LUA:
function onStepIn(cid, item, position, fromPosition)
    blood = {x=32793, y=32333, z=9, stackpos=1}   
    getsangue = getThingfromPos(blood)
    if isPlayer(cid) and item.uid == 4652 and getblood.itemid == 2016 then
    doTeleportThing(cid, {x=32793, y=32334, z=10})
    else
        doPlayerSendCancel(cid,"Sorry, not possible.")
    end
end
 
I can't use the vial of blood under gravestone,


I put in gravestone with RME uniqueid 4652

in movements
<movevent event="StepIn" uniqueid="4652" script="poh/blood.lua" />

in script

LUA:
function onAddItem(moveitem, tileitem, pos, cid)
     if moveitem.itemid == 2016 and moveitem.type == 2 then
         local thing = getTopCreature({x = 32793, y = 32333, z = 7}).uid
         if not isPlayer(thing) then
             return false
         end
     
         doSendMagicEffect(getThingPos(thing), CONST_ME_DRAWBLOOD)
         doTeleportThing(thing, {x = 32793, y = 32334, z = 7})
         doSendMagicEffect({x = 1478, y = 1488, z = 7}, 10)
         doCreatureSay(thing, "Muahahahaha...", TALKTYPE_ORANGE_1)
     end
     return false
end
 
Last edited:
I can't use the vial of blood under gravestone,


I put in gravestone with RME uniqueid 4652

in movements
<movevent event="StepIn" uniqueid="4652" script="poh/blood.lua" />

in script

LUA:
function onAddItem(moveitem, tileitem, pos, cid)
     if moveitem.itemid == 2016 and moveitem.type == 2 then
         local thing = getTopCreature({x = 32793, y = 32333, z = 7}).uid
         if not isPlayer(thing) then
             return false
         end
   
         doSendMagicEffect(getThingPos(thing), CONST_ME_DRAWBLOOD)
         doTeleportThing(thing, {x = 32793, y = 32334, z = 7})
         doSendMagicEffect({x = 1478, y = 1488, z = 7}, 10)
         doCreatureSay(thing, "Muahahahaha...", TALKTYPE_ORANGE_1)
     end
     return false
end
Bro. lol

Your not using the movements line from my post, and you only changed 1/3 positions in the script.

Line 3, is where a character needs to stand to be teleported, when the blood is placed on the tile. (Like real tibia, whoever uses the blood on the tile does not matter. Only the person on X sqm will be teleported.)
Line 9, is where the character will be teleported to.
line 10, is where the character will be teleported to. (sends magic effect)

Use same gravestone as in gif. The other one's are 'physical objects' and don't allow the blood to be placed underneath.
You need to put the UniqueID (from movements.xml) on the tile underneath the gravestone.
wpn7YR.gif

Code:
<movevent event="AddItem" tileitem="1" uniqueid="45001" script="test43.lua"/>
Code:
function onAddItem(moveitem, tileitem, pos, cid)
     if moveitem.itemid == 2016 and moveitem.type == 2 then
         local thing = getTopCreature({x = 1478, y = 1484, z = 7}).uid
         if not isPlayer(thing) then
             return false
         end
   
         doSendMagicEffect(getThingPos(thing), CONST_ME_DRAWBLOOD)
         doTeleportThing(thing, {x = 1478, y = 1488, z = 7})
         doSendMagicEffect({x = 1478, y = 1488, z = 7}, 10)
         doCreatureSay(thing, "Muahahahaha...", TALKTYPE_ORANGE_1)
     end
     return false
end
 
Back
Top