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

Raid - Global Events

hm, for the current moment you would have to script everything yourself (placing monsters, etc)...
But, as I got impressed by great idea- I'll add to alpha 4 executeRaid(name) lua function = unlimited control of raids, usage in movements, actions, globalevents, etc. Plus, there will be an extra XML tag at raids.xml which will disable the raid from automatic execution system.
 
Its already there.
Create a raid in raid system as you just wish (with monsters, bosses, announcements, etc; script may be included, as far as I remember), then add enabled="no" in raids.xml for it.
Now, in globalevents, an example script:
Code:
function onThink(interval, lastExecution)
if(math.rand(0, 100) == 5) then
executeRaid("raid_name")
end
end
for example. You can also store in global_storage last time when raid was executed, such as check it with randomity.
 
Its already there.
Create a raid in raid system as you just wish (with monsters, bosses, announcements, etc; script may be included, as far as I remember), then add enabled="no" in raids.xml for it.
Now, in globalevents, an example script:
Code:
function onThink(interval, lastExecution)
if(math.rand(0, 100) == 5) then
executeRaid("raid_name")
end
end
for example. You can also store in global_storage last time when raid was executed, such as check it with randomity.
You should also think about addin these functions:
doSetPlayerMagicLevel(cid,ml)
doSetPlayerSkill(cid,skill_type,skillamount)
getPlayerExp(cid)
 
Code:
getPlayerExperience(cid)

Already in... O.O

oO, it weren't in my LUA functions :p
but the other 2 don't exist im sure

EDIT: getplayerexp dont work
Code:
[23/10/2008  16:04:02] data/talkactions/scripts/test1.lua:8: attempt to call global 'getPlayerExperience' (a nil value)
[23/10/2008  16:04:02] stack traceback:
[23/10/2008  16:04:02] 	data/talkactions/scripts/test1.lua:8: in function <data/talkactions/scripts/test1.lua:1>
 
it's really added..at least in alpha 3 ;] Maybe you forgot (cid)?
Im using TFS 0.2 xD

But i managed to work it out :p
I made the formula for it (its not 100% accurate) its like 98% accurate, just add this before a script:
Code:
local lol = getPlayerLevel(cid)
local lolsqr = (lol*lol)
local lolcub = (lolsqr*lol)
local lol2 = (850/3)
local bignumber = 16.666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
local eform = (bignumber * lolcub) - (100 * lolsqr) + (lol2 * lol) - 200
Yes i know the formula could have been done easier using lol^3 or lol^2 but I didn't know you could use it until I finished xD
 
Back
Top