L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Thread Closed 
 
Thread Rating:
  • 19 Vote(s) - 2.63 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Summon recharge
Author Message
munsk0210 Offline
Expired VIP Member
**

Posts: 15
Joined: Mar 2012
Reputation: 0
Version: 1.4.1.81
Post: #1
Summon recharge

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
(This post was last modified: 04-17-2012 06:59 AM by Hebdzik.)
04-17-2012 02:12 AM
Find all posts by this user
TheBl4ckPhoenix Offline
(^.^)
****

Posts: 1,871
Joined: Mar 2012
Reputation: 601
Version: 1.4.3.143
Post: #2
RE: pet buff

Aaamh.... Coz this script is for kookaburra and not for unicorn?
04-17-2012 02:18 AM
Find all posts by this user
munsk0210 Offline
Expired VIP Member
**

Posts: 15
Joined: Mar 2012
Reputation: 0
Version: 1.4.1.81
Post: #3
RE: pet buff

oh i see... so any1 can fix this for me?
04-17-2012 02:21 AM
Find all posts by this user
Hebdzik Offline
Tester

Posts: 1,235
Joined: Aug 2011
Reputation: 265
Version: 1.4.3.143
Post: #4
RE: pet buff

    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;

(This post was last modified: 04-18-2012 13:34 PM by Hebdzik.)
04-17-2012 06:52 AM
Find all posts by this user
munsk0210 Offline
Expired VIP Member
**

Posts: 15
Joined: Mar 2012
Reputation: 0
Version: 1.4.1.81
Post: #5
RE: Summon recharge

copied to my Pluin folder... still not working
anyway thank u
04-18-2012 02:47 AM
Find all posts by this user
amiroooo Offline
Beta Tester

Posts: 1,270
Joined: Sep 2011
Reputation: 412
Version: 1.4.2.142
Post: #6
RE: Summon recharge

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;

(This post was last modified: 04-18-2012 07:05 AM by amiroooo.)
04-18-2012 07:04 AM
Find all posts by this user
munsk0210 Offline
Expired VIP Member
**

Posts: 15
Joined: Mar 2012
Reputation: 0
Version: 1.4.1.81
Post: #7
RE: Summon recharge

thank you for ur kindness

everytime do i hav to type (/rechargeme) if i needed?
04-18-2012 18:44 PM
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  mana recharge while cafting without stand up sysleo78 2 2,722 01-05-2017 18:58 PM
Last Post: sysleo78
  Help to Summon Reanimated Man (Feoh Soultaker) versutia4 9 6,221 08-16-2015 17:17 PM
Last Post: TheQQmaster
  Summon buff nolanriot193 0 2,541 07-22-2015 16:15 PM
Last Post: nolanriot193
  select member of party to summon bistabil 6 4,427 12-10-2014 22:49 PM
Last Post: bistabil
  Recharge mana without pt Skiinsiss 4 3,900 08-08-2014 08:17 AM
Last Post: michal9077
Sad Help me Summon Shinning Arrow When Is't empy drak0nic 0 1,689 12-11-2013 18:35 PM
Last Post: drak0nic
  How do can auto attack range red name summon pet? L2PVP01 1 2,991 12-04-2013 07:55 AM
Last Post: L2PVP01
  Auto Target Summon's Albrecht 0 2,242 10-06-2013 21:05 PM
Last Post: Albrecht
  Summon H5 hellenpwnz 1 2,378 07-22-2013 18:34 PM
Last Post: hellenpwnz
  Pet Recharge Combat, Q dev0 1 2,301 04-03-2013 08:15 AM
Last Post: Hebdzik



User(s) browsing this thread: 1 Guest(s)