Log in

View Full Version : Special Areas FUNCTION?



DamooN
05-28-2016, 09:50 AM
Hello dear Masters

Is it possible to the special areas will be dependend of some others conditions?

Now I can make special areas depndent of running walker or targeting or looter but...?

Can I do the script which will be activating special areas when x monsters on screen and off when x monsters on screen?

THX 4 ALL MASTERS of SCRIPTING

martintokio
05-28-2016, 10:31 AM
local MonsterList = {"CREATURE NAME", "CREATURE NAME 2", "CREATURE NAME 3"} -- Name of creatures to be checked.
local MonsterCount = 2 -- Amount of monster to load special areas.
local MonsterRange = 2 -- SQM distance to load special areas.

Module.New("SpecialAreasLoader", function(module)
local mob = Self.GetTargets(MonsterRange)
local mobCount = 0
for i = 1, #mob do
if table.contains(MonsterList, mob[i]:Name()) then
mobCount = mobCount + 1
end
end
if (mobCount >= MonsterCount) then
loadSettings("XB FILE NAME", "Special Areas")
elseif (mobCount < MonsterCount) then
loadSettings("XB FILE NAME 2", "Special Areas")
end
module:Delay(1000, 1100)
end)

Enjoy :]

Edit: I didn't explained how this works:

XB FILE NAME = This is the one with ur WORKING special areas (The main script I asume)
XB FILE NAME 2= This is a XB Script without ANY special areas on it -clean script-