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

Firestorm event

Mr Osama

Glorious-Ot
Joined
Mar 27, 2015
Messages
538
Reaction score
44
guys i need firestorm event script with it's map i searched but i couldn't find anything
can you post me a link or upload yours! thanks!
 
I won't search for the map, but I found the script within 5 seconds of entering 'firestorm' in search.
http://wklej.org/id/893585/txt/

Put some effort into it and you'll find it or create a new map.
thanks for your help i'll test it and i'll make the map by my self!!

I won't search for the map, but I found the script within 5 seconds of entering 'firestorm' in search.
http://wklej.org/id/893585/txt/

Put some effort into it and you'll find it or create a new map.
it's working i tested it and i made the map it works thank you!



Edit : sorry for double post
 
Last edited by a moderator:
I have tfs 0.3.6This whole thing made all of my teleport talkactions mess up but its fixed now I had to delete the firestorm event mod and reload talkactions
Is this scripted correctly? I only changed the reward and teleport positions /timing of the event
Code:
http://pastebin.com/NxNZ40kq
 
I have tfs 0.3.6This whole thing made all of my teleport talkactions mess up but its fixed now I had to delete the firestorm event mod and reload talkactions
Is this scripted correctly? I only changed the reward and teleport positions /timing of the event
Code:
http://pastebin.com/NxNZ40kq
it's an old thread i got it thanks :D :D
 
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <mod name="Fire Storm Event" enabled="yes">
- <config name="fireStorm_conf">
- <![CDATA[ fireStormRewards = {
points = true,
rew = {2157,5}
}
fireStormShootInterval = 6 --in seconds
fireStormNewFireShoots = 15
fireStormBaseFireShoots = 40
fireStormMaxPlayers = 50
fireStormMinPlayers = 2
fireStormAccesToIgnore = 4
timeOnJoinToEvent = 5 --in minutes

fireStormJoinType = 'talkaction' --movement, talkaction or booth
enableMessage = true

-- POSITIONS
fireStormKickPosition = {x = 32369, y = 32241, z = 7}
fireStormEnterPosition = {x = 32186, y = 32255, z = 7}

fireStormCenterRoomPosition = {x = 32186, y = 32255, z = 7}
fireStormRangeX_RangeY = {24,24}
-- STORAGES
fireStormStorageStatus = 31000 -- =< 0 - off, 1 - waiting for players, 2 - is running

local _f = doTeleportThing
function doTeleportThing(cid, newpos, ignoreBlocking)
return (ignoreBlocking or isWalkable(newpos, true, true, false) or false) and _f(cid, newpos, true, true)
end

function kickPlayerFromFireStormArea(cid)
doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, fireStormKickPosition, true)
doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
return doCreatureSetStorage(cid, fireStormStorageStatus, 0) and doCreatureSetNoMove(cid, false)
end

function getFireStormEventPlayers()
local players = {}
for _, cid in pairs(getPlayersOnline()) do
if getCreatureStorage(cid, fireStormStorageStatus) == 1 then
table.insert(players, cid)
end
end
return players
end

function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return false
end
end
end
return true
end

function loseOnFireStorm(cid)
local players, msg = getFireStormEventPlayers(), ''
kickPlayerFromFireStormArea(cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You are dead.')
if(#getFireStormEventPlayers() <= 1) then
local winner = getFireStormEventPlayers()[1] or players[1]
if winner then
if fireStormRewards.points then
db.executeQuery('UPDATE accounts SET premium_points=premium_points + 200 WHERE id=' .. getPlayerAccountId(winner))
else
for i = 1, #fireStormRewards.rew/2 do
doPlayerAddItem(winner, fireStormRewards.rew[i*2-1], fireStormRewards.rew[i*2], true)
end
end
doPlayerSendTextMessage(winner, MESSAGE_INFO_DESCR, 'You won Fire Storm Event.')
msg = getCreatureName(winner) .. ' won Fire Storm Event.'
kickPlayerFromFireStormArea(winner)
if getSpectators(fireStormCenterRoomPosition, fireStormRangeX_RangeY[1], fireStormRangeX_RangeY[2]) then
for _, v in ipairs(getSpectators(fireStormCenterRoomPosition, fireStormRangeX_RangeY[1], fireStormRangeX_RangeY[2])) do
if isMonster(v) then
doRemoveThing(v)
elseif isPlayer(v) then
kickPlayerFromFireStormArea(v)
end
end
end
else
msg = 'Fire Storm Event finished! No one win!'
end
doSetStorage(fireStormStorageStatus, 0)
end
return (msg ~= '' and doBroadcastMessage(msg) or true)
end

function spawnNewFire(count, reserved)
for i = 1, count do
if getStorage(fireStormStorageStatus) <= 1 then
return true
end
local pos = {x = fireStormCenterRoomPosition.x + math.random(-fireStormRangeX_RangeY[1],fireStormRangeX_RangeY[1]), y = fireStormCenterRoomPosition.y + math.random(-fireStormRangeX_RangeY[2],fireStormRangeX_RangeY[2]), z = fireStormCenterRoomPosition.z}
if i == count then
return addEvent(spawnNewFire, fireStormShootInterval*1000, fireStormNewFireShoots + reserved, fireStormNewFireShoots + reserved)
end
if isWalkable(pos, false, true, true) then
addEvent(function()
if #getFireStormEventPlayers() < 1 then
return true
end
local xx = math.abs(pos.x - fireStormCenterRoomPosition.x) + fireStormRangeX_RangeY[1]
local yy = math.abs(pos.y - fireStormCenterRoomPosition.y) + fireStormRangeX_RangeY[2]
doSendDistanceShoot({x=pos.x-xx,y=pos.y-yy,z=pos.z}, pos, CONST_ANI_FIRE)
addEvent(doSendMagicEffect, math.max(xx,yy)*15, pos, CONST_ME_HITBYFIRE)
local player = getThingFromPos({x=pos.x,y=pos.y,z=pos.z,stackpos=STACKPOS_TOP_CREATURE}).uid
if isPlayer(player) and getPlayerAccess(player) < fireStormAccesToIgnore then
addEvent(loseOnFireStorm, 500, player)
end return true end,
math.random(500, fireStormShootInterval*1000),
pos)
else
return spawnNewFire(count-(i-1), math.max(reserved, count))
end
end
return true
end

function addPlayerToFireStormArea(cid, block)
doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, fireStormEnterPosition, true)
doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
return doCreatureSetStorage(cid, fireStormStorageStatus, 1) and doCreatureSetNoMove(cid, block)
end

function startFireStormEvent()
if getStorage(fireStormStorageStatus) > 0 then
return false
end
doSetStorage(fireStormStorageStatus, 1)
return enableMessage and doBroadcastMessage('Fire Storm Event is active. We are waiting for ' .. fireStormMaxPlayers - #getFireStormEventPlayers() .. ' players or, if not found, '..timeOnJoinToEvent..' minutes to start. If you want joined to event just use command "!fire join", but if you would leave fire storm arena just say "!fire leave". Have fun!(Reward is 200 premium points.') or true
end

]]>
</config>
- <talkaction words="!fire" event="script">
- <![CDATA[ domodlib('fireStorm_conf')
function onSay(cid, words, param, channel)
if fireStormJoinType == 'movement' then
return false end
local msg = ''
if isInArray({'join','add','go','joined'}, param:lower()) then
if getCreatureCondition(cid, CONDITION_INFIGHT) and getPlayerAccess(cid) <= fireStormAccesToIgnore then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a PZ! You have to get rid of it. Somehow.')
end
if getPlayerAccess(cid) >= fireStormAccesToIgnore then
startFireStormEvent()
return doTeleportThing(cid, fireStormEnterPosition, true)
elseif #getFireStormEventPlayers() < fireStormMaxPlayers and getStorage(fireStormStorageStatus) == 1 then
addPlayerToFireStormArea(cid, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You are player of number '..#getFireStormEventPlayers()..', which join to event.')
if #getFireStormEventPlayers() == fireStormMaxPlayers then
doSetStorage(fireStormStorageStatus, 2)
addEvent(spawnNewFire, fireStormShootInterval * 1000, fireStormBaseFireShoots, fireStormBaseFireShoots)
for _, v in pairs(getFireStormEventPlayers()) do
addPlayerToFireStormArea(v, false)
end
msg = 'Fire Storm Event is started. We have ' .. fireStormMaxPlayers .. ' players, which joined to event. Have fun!'
else
msg = getCreatureName(cid) .. ' has entered a Fire Storm Arena. We have ' .. fireStormMaxPlayers - #getFireStormEventPlayers() .. ' free place.'
end
return (msg ~= '' and doBroadcastMessage(msg) or true)
else
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Arena is full.')
end
elseif isInArray({'leave','abort','delete'}, param:lower()) then
if getStorage(fireStormStorageStatus) < 2 then
doCreatureSetNoMove(cid, false)
doCreatureSetStorage(cid, fireStormStorageStatus, 0)
return doTeleportThing(cid, getCreatureLastPosition(cid), true)
end
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can\'t leave from arena if event is already running.')
end
return true
end

]]>
</talkaction>
- <globalevent name="fireStormTime" time="11:37">
- <![CDATA[ domodlib("fireStorm_conf")
function onTime()
startFireStormEvent()
addEvent(function()
if getStorage(fireStormStorageStatus) == 2 then return true end
if getStorage(fireStormStorageStatus) == 1 and #getFireStormEventPlayers() >= fireStormMinPlayers then
doSetStorage(fireStormStorageStatus, 2)
addEvent(spawnNewFire, fireStormShootInterval * 1000, fireStormBaseFireShoots, fireStormBaseFireShoots)
for _, v in ipairs(getFireStormEventPlayers()) do
addPlayerToFireStormArea(v, false)
end
return enableMessage and doBroadcastMessage('Fire Storm Event is started. We have '..#getFireStormEventPlayers()..' players on area') or true
end
for _, v in ipairs(getFireStormEventPlayers()) do
kickPlayerFromFireStormArea(v)
end
return enableMessage and doBroadcastMessage('Fire Storm Event is stopped. We could not find enough players.') or true
end,
timeOnJoinToEvent * 1000 * 60)
end

]]>
</globalevent>
</mod>
 
Back
Top