Lineage 2 Tower Forum

Full Version: Summon recharge
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
any1 know how to make my Boxer the unicorn charge me....

    LUA Programming
function OnCreate()
	this:RegisterCommand("SpankMe", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
function GetMyKookaUser()
local petlistaround = GetPetList();
	for Apet in petlistaround.list do
		if (Apet:GetNpcId() == 1022) and (Apet:GetNickName() == GetMe():GetName()) then
			return Apet;
		end;
	end;
return nil;
end;
 
function OnCommand_SpankMe(vCommandChatType, vNick, vCommandParam)
GetMyKookaUser();
	if (GetMyKookaUser() ~= nil) then
	if (GetMyKookaUser():GotBuff(5771) == false) then
	Action(1070,false,false);
	end;
		if (GetMe():IsInCombat() == false) and (GetMe():GetMpPercent() < 60) then
			if (GetMyKookaUser():IsUsingMagic() == false) then
			ShowToClient("MyPet","Spank me if you want some love!");
			mypet = GetMyKookaUser():GetId();
			ClearTargets();			
			Attack(mypet,false);
			Attack(mypet,false);
			end;
		end;
	end;
end;
 
function OnAttack(user, target)
	if (user:IsMe()) and (target:GetId() == mypet) and (target ~= nil) then
	MoveToNoWait(GetMe():GetLocation());
	end;
end;







i just follow this scripts but not working
Aaamh.... Coz this script is for kookaburra and not for unicorn?
oh i see... so any1 can fix this for me?
    LUA Programming
function OnCreate()
	this:RegisterCommand("SpankMe", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
function OnCommand_SpankMe(vCommandChatType, vNick, vCommandParam)
	if (GetPet() ~= nil) then
		if (GetMe():GetMpPercent() < 60) then
			if (GetPet():IsUsingMagic() == false) then
			ShowToClient("MyPet","Spank me if you want some love!");
			ClearTargets();			
			Action(45, false, false);
			end;
		end;
	end;
end;

copied to my Pluin folder... still not working
anyway thank u
yes it wont work, because it require target.

try this plugin instead:
and type /rechargeme to get recharge.
    LUA Programming
CastSkillTimeStamp = false;
 
function OnCreate()
	this:RegisterCommand("RechargeMe", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
function OnCommand_RechargeMe(vCommandChatType, vNick, vCommandParam)
	ClearTargets();
	TargetRaw(GetMe():GetId());	
	CastSkillTimeStamp = true;
end;
 
function OnLTick1s()
	if (CastSkillTimeStamp ~= false) and (GetTarget() ~= nil) and (GetTarget():IsMe()) then
		Action(45, false, false);
		CastSkillTimeStamp = false;
	end;
end;

thank you for ur kindness

everytime do i hav to type (/rechargeme) if i needed?
Reference URL's