• 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!

Solved poi gravestone bug

carre

Advanced OT User
Joined
Apr 23, 2013
Messages
885
Solutions
1
Reaction score
161
Location
Sweden
When i use vial of blood on gravestone to enter the poi nothing happing
I'm use avesta 7.60 here the script Gravestone.lua

Code:
function onAddItem(moveitem, tileitem, pos, cid)

        if moveitem.itemid == 2025 and moveitem.type == 2 then
            local v = getTopCreature({x=32791,y=32334,z=9}).uid
            if not isPlayer(v) then
            end
            if isPlayer(v) then
                doSendMagicEffect(getThingPos(v), CONST_ME_DRAWBLOOD)
                doTeleportThing(v, {x=32791, y=32334, z=10})
                doSendMagicEffect({x=32791, y=32334, z=10}, 10)
                doCreatureSay(v, "Muahahahaha...", 1)
                return 0
            end
        end
        return 0
    end

Repp ++ is there way to fix it?

bump
 
Last edited by a moderator:
Any error in console? Tfs version? You can't expect people to help you when you don't give us more details.
 
I'm dont see any error of the console btw i use otserver 7.60

bump

bump
 
Last edited by a moderator:
Edit your post if you posted anything before 24h has passed.
Code:
function onAddItem(moveitem, tileitem, pos, cid)
    if moveitem.itemid == 2025 and moveitem.type == 2 then
        local pid = getTopCreature({x=32791,y=32334,z=9}).uid
        if not isPlayer(pid) then
            return false
        end
       
        doSendMagicEffect(getThingPos(pid), CONST_ME_DRAWBLOOD)
        doTeleportThing(pid, {x=32791, y=32334, z=10})
        doSendMagicEffect({x=32791, y=32334, z=10}, 10)
        doCreatureSay(pid, "Muahahahaha...", 1)
    end
    return false
end

Only return a boolean value, not a number value.
 
Code:
function onAddItem(moveitem, tileitem, pos, cid)
    print(moveitem.itemid, moveitem.type)
    if moveitem.itemid == 2025 and moveitem.type == 2 then
        local pid = getTopCreature({x=32791,y=32334,z=9}).uid
        if not isPlayer(pid) then
            return false
        end
       
        doSendMagicEffect(getThingPos(pid), CONST_ME_DRAWBLOOD)
        doTeleportThing(pid, {x=32791, y=32334, z=10})
        doSendMagicEffect({x=32791, y=32334, z=10}, 10)
        doCreatureSay(pid, "Muahahahaha...", 1)
    end
    return false
end

Take a screenshoot of what it prints out.
 
ok i will try

I'm did move the items and it wont print the line with 2 numbers
 
Last edited by a moderator:
Edit your post if you posted within 24h.
Then check your xml file if you are even loading the script as it should print out the moveItem's itemid and count.
 
here is my movements xml

Code:
 -- Poi
       <movevent event="StepIn" actionid="4650" script="pits of inferno/poi_entrance.lua"/>
       <movevent event="StepIn" actionid="4651" script="pits of inferno/poi_exit.lua"/>
    <!---<movevent event="AddItem" tileitem="1" uniqueid="4652" script="pits of inferno/gravestone.lua"/>-->
 
Code:
<movevent event="AddItem" tileitem="1" uniqueid="4652" script="pits of inferno/gravestone.lua"/>
 
I did add and still not work

Code:
-- Poi
<movevent event="StepIn" actionid="4650" script="pits of inferno/poi_entrance.lua"/>
<movevent event="StepIn" actionid="4651" script="pits of inferno/poi_exit.lua"/>
<movevent event="AddItem" tileitem="1" uniqueid="4652" script="pits of inferno/gravestone.lua"/>
 
Did you reload / restart the server?
Is the direction to the script correct?

Try adding the script where I wrote "print(..., ...)" and tell me what it prints out.
 
Code:
<movement event="StepIn" actionid="4650" script="pits of inferno/poi_entrance.lua"/>
<movement event="StepIn" actionid="4651" script="pits of inferno/poi_exit.lua"/>
<movement event="AddItem" tileitem="1" uniqueid="4652" script="pits of inferno/gravestone.lua"/>

Try this.
 
Code:
<movement event="StepIn" actionid="4650" script="pits of inferno/poi_entrance.lua"/>
<movement event="StepIn" actionid="4651" script="pits of inferno/poi_exit.lua"/>
<movement event="AddItem" tileitem="1" uniqueid="4652" script="pits of inferno/gravestone.lua"/>

Try this.
Nah still not work
 
Back
Top