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

RevScripts BossEvent/globalevents

Gaber Zen

Well-Known Member
Joined
Apr 22, 2023
Messages
224
Reaction score
51
Location
Egypt
Hello, everyone
i have event boss Enter everyday, but boss enter after 3 miunts and close, if player get dead can`t enter becouse telport is off,
some one can help to upated code, like open 3 min and boss enter, after boss dead telport closed.
forgotten 0.4
Thanks for all
Lua:
function onTime(interval)
local config = {
pos = {x=1001, y=1010, z=7}, -- Posiçمo aonde sera criado o teleport
topos = {x=1005, y=1012, z=7}, -- Posiçمo pra onde o teleport ira levar o player
tpid = 1387, -- id do teleport
time = 3 -- tempo que o teleport ira sumir em minutos
}

function sendEffect()
    if (getGlobalStorageValue(16505) > 0) then
        doSendAnimatedText({x=1000, y=1011, z=6}, "BOSS", math.random(180))
        addEvent(sendEffect, 750)
    end
end

function DelTp()
local t = getTileItemById(config.pos, config.tpid)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(config.pos, CONST_ME_POFF)
end
end
doCreateTeleport(config.tpid, config.topos, config.pos)
doBroadcastMessage("O Event Boss foi aberto no templo e serل fechado em 3 minutos")
setGlobalStorageValue(16505, 1)
addEvent(doCreateMonster, config.time*60*1000, "The BOSS STRIKER", {x=999, y=1013, z=7})
addEvent(DelTp, config.time*60*1000)
addEvent(setGlobalStorageValue, config.time*60*1000, 16505, -1)
return true
end
 
creaturescripts

Lua:
local config = {
pos = {x=1001, y=1010, z=7}, -- Position teleport
tpid = 1387, -- id teleport
bosses = {
    ["[The BOSS STRIKER"] = {},
    }
}
 
function onKill(cid, target)
local position = getCreaturePosition(target)
for name, pos in pairs(config.bosses) do
if name == getCreatureName(target) and isMonster(target) then
doCreatureSay(cid, "Congratulations the The BOSS STRIKER is dead and teleport removed", TALKTYPE_ORANGE_1)

local t = getTileItemById(config.pos, config.tpid)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(config.pos, CONST_ME_POFF)
end

end
return true
end
end

<event type="kill" name="removetpboss" event="script" value="removetpboss.lua"/>

dont forget this .. registerCreatureEvent(cid, "removetpboss")

globalevents
Lua:
function onTime(interval)
local config = {
pos = {x=1001, y=1010, z=7}, -- Posiçمo aonde sera criado o teleport
topos = {x=1005, y=1012, z=7}, -- Posiçمo pra onde o teleport ira levar o player
tpid = 1387, -- id do teleport
time = 3 -- tempo que o teleport ira sumir em minutos
}

function sendEffect()
    if (getGlobalStorageValue(16505) > 0) then
        doSendAnimatedText({x=1000, y=1011, z=6}, "BOSS", math.random(180))
        addEvent(sendEffect, 750)
    end
end

doCreateTeleport(config.tpid, config.topos, config.pos)
doBroadcastMessage("O Event Boss foi aberto no templo e serل fechado em 3 minutos")
setGlobalStorageValue(16505, 1)
addEvent(doCreateMonster, config.time*60*1000, "The BOSS STRIKER", {x=999, y=1013, z=7})
addEvent(setGlobalStorageValue, config.time*60*1000, 16505, -1)
return true
end
 
local config = {
pos = {x=1001, y=1010, z=7}, -- Position teleport
tpid = 1387, -- id teleport
}

function onKill(cid, target)
local position = getCreaturePosition(target)
if getCreatureName(target) == "The BOSS STRIKER" and isMonster(target) then
doCreatureSay(cid, "Congratulations the The BOSS STRIKER is dead and teleport removed", TALKTYPE_ORANGE_1)

local t = getTileItemById(config.pos, config.tpid)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(config.pos, CONST_ME_POFF)
end

end
return true
end
good Script, no erro
 
Back
Top