04-17-2012, 02:12 AM
any1 know how to make my Boxer the unicorn charge me....
i just follow this scripts but not working
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