• 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 Teleport boss

titokere

Member
Joined
May 31, 2014
Messages
38
Reaction score
7
function onKill(cid, target)

local targetMonster = Monster(target)
if not targetMonster then
return true
end

if targetMonster:getName():lower() ~= "gaz'haragoth" then
return true
end


local player = Player(cid)
local tpPos = {x=33715, y=32377, z=6}

doTeleportThing(cid, tpPos)


return true
end

I need help with this script!
When you kill the "Boss" only the people who give the Last hit get teleported to the reward Room!
Someone can help me?
Need all people who Hit the boss get teleported to the reward room
 
Looks like a mixture of scripts, did you write this yourself?

What is your server version, not the client the server like 0.4, 1.1 etc
 
why you are stating local player if you don't use it?
Code:
local player = Player(cid)
you can try chance this line
Code:
doTeleportThing(cid, tpPos)
to:
Code:
player:teleportTo(tpPos)
Looks like a mixture of scripts, did you write this yourself?

What is your server version, not the client the server like 0.4, 1.1 etc
seems like 1.0
 
why you are stating local player if you don't use it?
Code:
local player = Player(cid)
you can try chance this line
Code:
doTeleportThing(cid, tpPos)
to:
Code:
player:teleportTo(tpPos)

seems like 1.0
Yes its Tfs 1.0, i put now player:teleportTo(tpPos) but still sending only the Last hit player to the reward room S:
 
Yes its Tfs 1.0, i put now player:teleportTo(tpPos) but still sending only the Last hit player to the reward room S:
ahhhhhhhhhh, sorry! I don't undestand first...
here something that can be used:
Code:
for pid, _ in pairs(targetMonster:getDamageMap()) do
        local attackerPlayer = Player(pid)
        if attackerPlayer then
             attackerPlayer:teleportTo(tpPos)
        end
end
 
ok i wanna use this with the boss Gaz'haragoth can explain? pleaseee
Code:
function onKill(cid, target)
    local targetMonster = Monster(target)
    if not targetMonster then
        return true
    end

    if targetMonster:getName():lower() ~= "gaz'haragoth" then
        return true
    end


    local player = Player(cid)
    local tpPos = {x=33715, y=32377, z=6}

    for pid, _ in pairs(targetMonster:getDamageMap()) do
        local attackerPlayer = Player(pid)
        if attackerPlayer then
             attackerPlayer:teleportTo(tpPos)
        end
    end
    return true
end
not tested.
 
Back
Top