Lineage 2 Tower Forum

Full Version: LF Script for using SS when multiple mobs around
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As title says, I'm looking for a script or plugin that activates SS when there are lots of mobs around me, like training or somebody just running down to a dungeon pulling mobs accidentally.

(I already tried search, ty for those answers)

Thanks in advance!
i use this for cementery on my feoh

so it activate soulshots when the many small mobs spawn after killing some of them (sorry dont remember the mob's name)

use it as an example

    LUA Programming
bssractive = false;
repeat
	ActivateSoulShot(19442, bssractive);
	if GetTarget():GetNpcId() == 19455 then
		bssractive = true;
	else bssractive = false;
	end;
	Sleep(500);
until false;



i hope it helps you
(10-29-2014 15:53 PM)Tuxevil Wrote: [ -> ]i use this for cementery on my feoh

so it activate soulshots when the many small mobs spawn after killing some of them (sorry dont remember the mob's name)

use it as an example

    LUA Programming
bssractive = false;
repeat
	ActivateSoulShot(19442, bssractive);
	if GetTarget():GetNpcId() == 19455 then
 bssractive = true;
	else bssractive = false;
	end;
	Sleep(500);
until false;



i hope it helps you


Yes, its good for a start, but it only activates SS when a specific mob appears. I need a script which activates SS when regular mobs are around but in big numbers.

But thank you for your reply, +1 for you Smile
activates all shots
    LUA Programming
ShowToClient("Shots","ON");
 
 
function ActivateShots()
items = GetInventory();
for i in items.list do
	if string.match(i.Name, "Spiritshot") or string.match(i.Name, "Soulshot") then
 ActivateSoulShot(i.displayId,true)
	end;
end;
end;
 
ShotsActivatedPlayer = false;
 
---- MAIN ----
repeat	
me = GetMe();
if (me ~= nil) then
	if not (me:IsAlikeDeath()) then
 if not (ShotsActivatedPlayer) then
 ActivateShots()
 ShotsActivatedPlayer = true;
 end;
	elseif me:IsAlikeDeath() then
 Sleep(5*1000)
 repeat
 Sleep(1000);
 until (me:IsAlikeDeath() == false);
 ShotsActivatedPlayer = false;
	end; 
end;
 
Sleep(3*1000);
until false;




by name
    LUA Programming
--usage
if IsThereMobByName() then
--enable shots
elseif IsThereMobByName() == false then
--disable shots
end;
 
--function
function IsThereMobByName(mobname)
	local monsterlist = GetMonsterList();
	local count = 0;
	for mob in monsterlist.list do
 if (mob:GetName() == 'ur mob name') then -- edit here mob name
 return true;
 end;
	end;
 
	return false;
end;






function to make count u can use it for condition
    LUA Programming
if IsThereMobsAround() == 2 then
-- enable shots
end;
 
--or
if IsThereMobsAround() < 2 then
-- enable shots
end;
 
--or
if IsThereMobsAround() > 2 then
-- enable shots
end;


function to count mobs
    LUA Programming
function IsThereMobsAround()
	local monsterlist = GetMonsterList();
	local count = 0;
	for mob in monsterlist.list do
 if (mob:GetDistance() < 350) then
 count = count +1;
 end;
	end;
	if (count > 1) then
 return count;
	end;
	return 0;
end;




for disabling and enabling
    LUA Programming
ActivateSoulShot(shotid,true) -- enable shots
 ActivateSoulShot(shotid,false) -- disable shots



now u just need to compile all script Wink
Reference URL's