Lineage 2 Tower Forum

Full Version: check ss
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
anyone have a script check ss pet cuz it's bug and not reactive Huh
(08-16-2014 03:43 AM)atrivido1 Wrote: [ -> ]anyone have a script check ss pet cuz it's bug and not reactive Huh

This might help:

    LUA Programming
function hasItem(name)
	local invList = GetInventory();
		for item in invList.list do
			if (item.Name == name) then
				return true;
			end;
		end;
	return false;
end;
--6645	Beast Soulshot
--6646	Beast Spiritshot
if not hasItem("Beast Soulshot") then
-- do something
end



Use L2TowerHelp.exe. There are two ways:

    LUA Programming
function hasItemByName(name)
	local invList = GetInventory();
		for item in invList.list do
			if (item.Name == name) then
				return true;
			end;
		end;
	return false;
end;
 
function hasItemById(id)
	local invList = GetInventory();
		for item in invList.list do
			if (item.displayId == id) then
				return true;
			end;
		end;
	return false;
end;
--6645	Beast Soulshot
--6646	Beast Spiritshot
 
if hasItemById(6645) then
ShowToClient("GOD","has by id",3)
end
Sleep(1000)
if hasItemByName("Beast Soulshot") then
ShowToClient("GOD","has by name",3)
end

did not work Sad
(08-16-2014 03:43 AM)atrivido1 Wrote: [ -> ]anyone have a script check ss pet cuz it's bug and not reactive Huh

try this:

+2 rep me if it helped you...!

    LUA Programming
name = "Beast Soulshot";
repeat
i=0;
invList = GetInventory();
for item in invList.list do
	if (item.Name==name) then
		i=item.ItemNum;
		if (i < 100) and (GetMe():GetTarget() ~= nil) then
			if (GetZoneType() == 15) then
				UseItem(736); --SoE
			end;
			if (GetZoneType() == 12) then
				Sleep(15000);
			    ShowToClient("Script", "Bye.");
				LogOut();
			end;
		end;
	end;
end;
until false;
 
function CountMonstersInRange(range)
	local me = GetMe();
	local l = GetMonsterList();
	local c = 0;
 
	for user in l.list do 
		if ((user:IsAlikeDeath() == false) and (user:GetRangeTo(me)<range)) then
			c = c + 1;
		end;		
	end;
	return c;
end;
 
Sleep(1000);

(08-16-2014 21:45 PM)capucine Wrote: [ -> ]
(08-16-2014 03:43 AM)atrivido1 Wrote: [ -> ]anyone have a script check ss pet cuz it's bug and not reactive Huh

try this:

+2 rep me if it helped you...!

    LUA Programming
name = "Beast Soulshot";
repeat
i=0;
invList = GetInventory();
for item in invList.list do
	if (item.Name==name) then
 i=item.ItemNum;
 if (i < 100) and (GetMe():GetTarget() ~= nil) then
 if (GetZoneType() == 15) then
 UseItem(736); --SoE
 end;
 if (GetZoneType() == 12) then
 Sleep(15000);
 ShowToClient("Script", "Bye.");
 LogOut();
 end;
 end;
	end;
end;
until false;
 
function CountMonstersInRange(range)
	local me = GetMe();
	local l = GetMonsterList();
	local c = 0;
 
	for user in l.list do 
 if ((user:IsAlikeDeath() == false) and (user:GetRangeTo(me)<range)) then
 c = c + 1;
 end; 
	end;
	return c;
end;
 
Sleep(1000);


still not working
LOL everything posted works. Stop trolling or go cry somewhere else. Don't just reply with "not working", add some more detail and shit or no one is going to help you
Reference URL's