Lineage 2 Tower Forum

Full Version: Script oop noblesse buffing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Wtb a script which gives me the ability to buff chars in range with noblesse blessing according to a list of char names. Want to pay in adena on naia
I know you ask for a script but my opinion is that you better use a plugin.
It`s easy to do, i`ll share it for free.
What you need to do.. Put on the first line the name of the players. Close l2 and l2tower, copy this to your plugin folder
start tower and l2, and in-game press /nobl to activate it.
I did it fast, haven`t test it, but i guess it should work.
    LUA Programming
list = { }
noblskill = 1323;
noblstatus = false;
function OnCreate()
 this:RegisterCommand("nobl", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
function OnCommand_nobl(vCommandChatType, vNick, vCommandParam)
 if (noblstatus == false) then
 noblstatus = true;
 ShowToClient("Noblesse","Noblesse plugin has been Activated.");
 else
 noblstatus = false;
 ShowToClient("Noblesse","Noblesse plugin has been Deactivated."); 
 end;
end;
 
targetbuffed = false
usertime = 0;
timeset = 20;
lastusername = "a";
function OnLTick1s()
if noblstatus == true then
for player in GetPlayerList().list do
	for k,v in pairs(list) do
 if v == player:GetName() then
 
 if (GetMe():GetRangeTo(player) < 400) and lastusername ~= player:GetName() or (GetMe():GetRangeTo(player) < 400) and os.time()> usertime+timeset then
 usertime = os.time();
 Command("/target " ..tostring(player:GetName()));
 if GetTarget() ~= nil then
 UseSkillRaw(noblskill,false,false);
 lasusername = player:GetName()
 end;
 end;
 end;
	end;
end;
end;
end;

Reference URL's