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

Post Reply 
 
Thread Rating:
  • 4 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Скрипт на офф пати баф
Author Message
Gooood Offline
Amber Basilisk
*

Posts: 34
Joined: Aug 2012
Reputation: 1
Version: 1.4.2.133
Post: #1
Скрипт на офф пати баф

Народ, помогите плиз, переделайте скрипт чтобы баффер инвайтил 3 перса.
    LUA Programming
LeavePartyAfterBuffs = true; -- true if you want buffer to leaveparty after buffs.
DDName = "DDName" -- the player name of whom need to get buffed.
 
 
function RequestBuff(Buff,TargetName,IsNeedParty,IsNeedTarget)
	local targetc = GetUserByName(TargetName);
	if (GetMe() ~= nil) and (targetc ~= nil) and (targetc:GetRangeTo(GetMe()) < 2000) then
 if (IsNeedParty) and (targetc:IsMyPartyMember() == false) then
 repeat
 if ((GetMyPtMembersCount() == 0) or (GetPartyMaster():GetName() == GetMe():GetName())) then
 Command('/invite ' .. TargetName);
 else
 ShowToClient("Warc Buffer Script","Im Unable to Invite the player, Im already in party and not the party leader!");
 Sleep(10000);
 end;
 Sleep(1000);
 until targetc:IsMyPartyMember();
 end;
 if (IsNeedTarget) and ((GetTarget() == nil) or ((GetTarget() ~= nil) and (GetTarget():GetName() ~= TargetName))) then
 Command('/target ' .. TargetName);
 Sleep(1000);
 end;	
 if (tonumber(Buff) ~= nil) then
 UseSkillRaw(tonumber(Buff),false,false);
 else
 Command("/useskill " .. Buff);	
 end;
 Sleep(1000);
	end;
end;
 
function IsBuffRequireReCast(target,debuffid,timeallowed)
	if (target ~= nil) and (target:GotBuff(debuffid) == true) then
	local thebuff = target:GetBuff(debuffid);
 if (thebuff.endTime > GetTime() + timeallowed) then
 return false;
 end;
	end;
	return true;
end;
 
function GetMyPtMembersCount()
	local myptlist = GetPartyList():GetCount();
	local count = 0;
	if (tonumber(myptlist) ~= nil) then
 count = myptlist;
	end;
	return count;
end;
 
repeat
 
 
	if IsBuffRequireReCast(GetMe(),1002,30*1000) then 
 RequestBuff("Flame Chant",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1562,30*1000) then 
 RequestBuff("Chant of Berserker",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1251,30*1000) then 
 RequestBuff("Chant of Fury",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1309,30*1000) then 
 RequestBuff("Chant of Eagle",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1310,30*1000) then 
 RequestBuff("Chant of Vampire",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1390,30*1000) then 
 RequestBuff("War Chant",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1006,30*1000) then 
 RequestBuff("Chant of Fire",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1461,30*1000) then 
 RequestBuff("Chant of Protection",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1284,30*1000) then 
 RequestBuff("Chant of Revenge",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1535,30*1000) then 
 RequestBuff("Chant of Movement",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1517,30*1000) then 
 RequestBuff("Chant of Combat",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1518,30*1000) then 
 RequestBuff("Chant of Critical Attack",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if IsBuffRequireReCast(GetMe(),1363,30*1000) then 
 RequestBuff("Chant of Victory",DDName,true,false); -- (skillId or SkillName, playername that need buff, Does Skill Require Party?, Does the skill require target?)
	end;
 
	if (LeavePartyAfterBuffs) and (GetMyPtMembersCount() ~= 0) then
 Command("/leave");
	end;
 
	Sleep(1000);
until false;

05-20-2013 14:36 PM
Find all posts by this user Quote this message in a reply
Gooood Offline
Amber Basilisk
*

Posts: 34
Joined: Aug 2012
Reputation: 1
Version: 1.4.2.133
Post: #2
RE: Скрипт на офф пати баф

up
05-23-2013 20:56 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Скрипт на квест A Special Order DeSilvia 0 4,707 01-13-2017 22:31 PM
Last Post: DeSilvia
  Помогите составить скрипт AloneMODE 2 5,475 12-16-2015 22:01 PM
Last Post: TheQQmaster
  Скрипт на заточку. CreonMaltese 18 24,364 08-02-2015 21:17 PM
Last Post: TheQQmaster
  Проблема со скриптом. Останавливается скрипт после скила. immortal89 0 2,068 06-25-2015 03:13 AM
Last Post: immortal89
  Скрипт на ТТ set899ful 8 16,478 06-22-2015 20:04 PM
Last Post: adterorist1
  помогите найти скрипт или разобраться adterorist1 0 3,398 06-12-2015 00:41 AM
Last Post: adterorist1
  Скрипт для Хилера. Yoxo 0 2,451 04-19-2015 18:20 PM
Last Post: Yoxo
  Объясните плз как работает этот скрипт. Yoxo 1 4,526 03-14-2015 12:21 PM
Last Post: TheQQmaster
  скрипт на аргументацию atazoid 3 7,069 01-29-2015 09:26 AM
Last Post: aezez
  Скрипт на Energy Stone Satellizer2000 0 3,142 01-17-2015 13:54 PM
Last Post: Satellizer2000



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