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

help in firestorm event

It's right there in the script:
<talkaction words="!startfire" access="5" event="script">

Can you describe how the script is currently working?
 
It's right there in the script:
<talkaction words="!startfire" access="5" event="script">

Can you describe how the script is currently working?

it work automatic on all day at 18,00,00 i want open it by myself
 
I'm looking through this script and I'm not getting much. It seems you can start the event manually in this order:
!event
!startfire

However, I can't help you to turn off the days and time, I don't understand this code:
Code:
local daysOpen = {}

for k, v in pairs(configFire.days) do
table.insert(daysOpen, k)
end

function onThink(cid, interval)
if isInArray(daysOpen, os.date('%A')) then
if isInArray(configFire.days[os.date('%A')], os.date('%X', os.time())) then
But this is where it's checking time and day..

Sorry, some expert can help him?
 
Remove this from your script and it will not auto start.
Code:
<globalevent name="LMS_Event" interval="1000" event="script">
<![CDATA[
domodlib("lms_config")

function onThink(interval, lastExecution)
if getStorage(configFire.eventStorage) == 1 then
local xTable, yTable, playerTable = {}, {}, {}

for x = arena.fromPos.x, arena.toPos.x do
for y = arena.fromPos.y, arena.toPos.y do
table.insert(xTable, x)
table.insert(yTable, y)

local n, i = getTileInfo({x=x, y=y, z=7}).creatures, 1
if n ~= 0 then
local v = getThingfromPos({x=x, y=y, z=7, stackpos=i}).uid
while v ~= 0 do
if isPlayer(v) then
table.insert(playerTable, v)
if n == #playerTable then
break
end
end
i = i + 1
v = getThingfromPos({x=x, y=y, z=7, stackpos=i}).uid
end
end
end
end

if #playerTable == 1 then
local prize = math.random(#configFire.rewardID)

doTeleportThing(playerTable[1], getTownTemplePosition(getPlayerTown(playerTable[1])), true)
doPlayerAddItem(playerTable[1], configFire.rewardID[prize], 1)
doPlayerSendTextMessage(playerTable[1], MESSAGE_EVENT_ADVANCE, 'You win. Your reward is ' .. getItemNameById(configFire.rewardID[prize]) .. '.')
doBroadcastMessage('Fire Storm Event have finished. The winner is ' .. getCreatureName(playerTable[1]) .. '. Congratulations.', MESSAGE_EVENT_ADVANCE)
doSetStorage(configFire.eventStorage, -1)

x, y = 1, 1
elseif #playerTable > 1 then
for a = 1, y do
local pos = {x=xTable[math.random(#xTable)], y=yTable[math.random(#yTable)], z=7}

for _, player in ipairs(playerTable) do
local pPos = getThingPos(player)
if pPos.x == pos.x and pPos.y == pos.y and pPos.z == pos.z then
doCreatureAddHealth(player, - getCreatureMaxHealth(player))
end
end
doSendDistanceShoot({x = pos.x - math.random(4, 6), y = pos.y - 5, z = pos.z}, pos, CONST_ANI_FIRE)

addEvent(doSendMagicEffect, 150, pos, CONST_ME_HITBYFIRE)
addEvent(doSendMagicEffect, 150, pos, CONST_ME_FIREAREA)
end
if x == 5 * y then
y = y + 1
end

x = x + 1
else
doBroadcastMessage('No one Won the Fire Storm Event.', MESSAGE_EVENT_ADVANCE)
doSetStorage(configFire.eventStorage, -1)
x, y = 1, 1
end
end 
return true
end
]]>
</globalevent>
 
Back
Top