data\creaturescripts\scripts add this to a Lua script and change Monster1/Monster2 to bosses name.function onKill(cid, target, damage, flags)
local Monster = {"Monster1", "Monster2"}
if(bit.band(flags, 1) == 1 and isMonster(target)) then
if isInArray(Monster, getCreatureName(target)) then
setPlayerStorageValue(cid,57684, 1)
end
end
return true
end
data\creaturescripts\scripts\login.lua add thisregisterCreatureEvent(cid, "BossKill")
data\creaturescripts\creaturescripts.xml add this<event type="kill" name="BossKill" event="script" value="BossKill.lua"/>
\data\movements\scripts and create a Lua script and paste this to it and change this to the destination you want your portal to lead to {x=xxxx, y=xxxx, z=7}function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, 57684) >= 1 then
local place = {x=xxxx, y=xxxx, z=7}
doTeleportThing(cid, place)
doSendMagicEffect(getCreaturePosition(cid),10)
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid, 'You don\'t have enough energy to enter this portal', TALKTYPE_ORANGE_1)
end
return true
end
data\movements\movements.xml add this<movevent type="StepIn" actionid="youractionid" event="script" value="bossteleport.lua"/>
youractionid to any action id you want and set it to the teleport with map editor then it should work.The above script works like this.Hmm i do all things and i can go teleport without kill boss ;/ but when i enter i see
You don\'t have enough energy to enter this portal