• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Kill boss and get teleported

5mok3

Emporia
Joined
Jan 18, 2009
Messages
1,767
Reaction score
25
Location
California, US
I'm just bored..
When you kill "X" Boss you'll be teleported to "X" position

Tested in: 3.6pl1
Works? Hell yea!

Lua:
-- Credits to diviinoo --
function onKill(cid, target, lastHit)
	local pos = {x=1341, y=620, z=11} -- teleport player to?
		if (getCreatureName(target) == "Boss Monster") then
			doTeleportThing(cid, pos)
			doSendAnimatedText(playerpos, "Congratulations!", TEXTCOLOR_ORANGE)
        end
return true
end

This script can be used instead of the "create teleport when boss die" script..

This script will teleport the player that killed the monster.. won't work with more than one player.

Bye bye :peace:
 
<.< what about if a monster kills that monster
 
Lua:
function onKill(cid, target, lastHit)
        local pos = {x=1341, y=620, z=11} -- teleport player to?
                if (getCreatureName(target) == "Boss Monster") and (isPlayer(cid) == TRUE) then
                        doTeleportThing(cid, pos)
                        doSendAnimatedText(playerpos, "Congratulations!", TEXTCOLOR_ORANGE)
        end
return true
end
 
Doesn't work here :/
i've added file bluelegs.lua in data/creaturescripts/scripts
function onKill(cid, target, lastHit)
local pos = {x=33261, y=32446, z=12} -- teleport player to?
if (getCreatureName(target) == "koshei the deathless") then
doTeleportThing(cid, pos)
doSendAnimatedText(playerpos, "Congratulations!", TEXTCOLOR_ORANGE)
end
return true
end

and to data/creaturescripts/creaturescripts.xml :
<event type="kill" name="bluelegs" event="script" value="bluelegs.lua"/>
and it doesnt work. i killed koshei the deathless and teleport didn't appear
whats wrong?
 
Doesn't work here :/
i've added file bluelegs.lua in data/creaturescripts/scripts


and to data/creaturescripts/creaturescripts.xml :

and it doesnt work. i killed koshei the deathless and teleport didn't appear
whats wrong?

Code:
(getCreatureName(target) == "koshei the deathless")
=>
Code:
(getCreatureName(target):lower() == "koshei the deathless")
 
Code:
(getCreatureName(target) == "koshei the deathless")
=>
Code:
(getCreatureName(target):lower() == "koshei the deathless")


Well now i was teleported to reward room but i CAN NOT MOVE.
YouTube - bug.wmv


end errors in console:
bluelegs27.png
 
But why after tp i see "Congratul", not "Congratulations!"?
 
Last edited:
Lua:
function onKill(cid, target, lastHit)
local pos = {x=1341, y=620, z=11} -- teleport player to?
local mName = "Demon" -- monstername
local tpOneTime = "yes" -- yes or no, if can only kill monster 1 time and tp, with storage...
local storage = 15598
	if(isPlayer(cid) and getCreatureName(target) == mName and tpOneTime ~= "yes") then
		doTeleportThing(cid, pos)
		doCreatureSay(getCreaturePosition(cid), "Congratulations!", TALKTYPE_ORANGE_1)
		return true
	end
	if(isPlayer(cid) and getCreatureName(target) == mName and tpOneTime == "yes" and getPlayerStorageValue(cid, storage) < 1) then
		doTeleportThing(cid, pos)
		doCreatureSay(getCreaturePosition(cid), "Congratulations!", TALKTYPE_ORANGE_1)
		setPlayerStorageValue(cid, storage, 1)
	end
		return true
end
 
Back
Top