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

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Simple OOP Cleanse Script
Author Message
schubbel2208 Offline
Expired VIP Member
**

Posts: 154
Joined: Jun 2012
Reputation: 35
Version: 1.4.3.143
Post: #1
WTB A Simple OOP Cleanse Script

As the topic say wtb a simple oop cleanse script for my healer too cleanse toons oop if i dont have debuff xy.

PM me with prices.

Payment paypal or adena on shilien
03-18-2014 01:38 AM
Find all posts by this user Quote this message in a reply
TheQQmaster Offline
Trolling the Trolls
*****

Posts: 1,532
Joined: Jun 2012
Reputation: 642
Version: 1.4.2.133
Post: #2
RE: A Simple OOP Cleanse Script

it can be done, but need to check all the time toons for get list of debuffs

PUSH [Image: knUu53] IF HELPED
03-18-2014 02:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
schubbel2208 Offline
Expired VIP Member
**

Posts: 154
Joined: Jun 2012
Reputation: 35
Version: 1.4.3.143
Post: #3
RE: A Simple OOP Cleanse Script

not all toons for example 5 healers nothing more, and lets say every minute
(This post was last modified: 03-18-2014 02:58 AM by schubbel2208.)
03-18-2014 02:58 AM
Find all posts by this user Quote this message in a reply
TheQQmaster Offline
Trolling the Trolls
*****

Posts: 1,532
Joined: Jun 2012
Reputation: 642
Version: 1.4.2.133
Post: #4
RE: A Simple OOP Cleanse Script

(03-18-2014 02:58 AM)schubbel2208 Wrote:  not all toons for example 5 healers nothing more, and lets say every minute

    LUA Programming
ShowToClient("PURGE","AERO PURGE ON");
 
cleanseskillid = 11763; -- put here the cleanse skill Id atm its Radiant Purge
DebuffList = {11259,11260,11261,11262,11777,11029,11273,11296,11276,11047,11050,11055,11052,1​0539,10516,14639,14638,11048,10011,10012,10258,10269,10267,10769,10780,10801,115​59,11539} ; -- put here the Debuff Skill Ids
 
function NeedCleanse(Tehuser) -- for long debuff list better this way so we wont ask GotBuff from l2 tower many times.
	local MyBuffs = {} ;
	for x=1,50 do
 local value = nil;
 value = Tehuser:GetBuffByIdx(x);
 if value ~= nil then
 MyBuffs[#MyBuffs+1] = value.skillId;
 end;
	end;
	for x=1,#DebuffList do
 for t=1,#MyBuffs do
 if (MyBuffs ~= nil) and (MyBuffs[t] == DebuffList[x]) then
 return true;
 end;
 end;
	end;
	return false;	
end;
 
 
repeat
	me = GetMe();
	if (me ~= nil) then
 if NeedCleanse(me) then
 if not me:IsAlikeDeath() then
 ClearTarget();
 TargetRaw(me:GetId());
 Sleep(500);
 UseSkillRaw(cleanseskillid,false,false);
 Sleep(500);
 ClearTarget();
 CancelTarget(false);
 Sleep(500);
 end;
 elseif not NeedCleanse(me) then
 
 myptlist = GetPartyList();
 for PMember in myptlist.list do
 if NeedCleanse(PMember) then
 if not PMember:IsAlikeDeath() and (PMember:GetDistance() < 1000) then
 if (me:GetTarget() ~= PMember:GetId()) then
 ClearTargets();
 Sleep(500);
 TargetRaw(PMember:GetId());
 Sleep(500);
 else
 UseSkillRaw(cleanseskillid,false,false);
 Sleep(500);
 ClearTargets();
 CancelTarget(false);
 Sleep(500);
 
 end;
 break;
 end;
 end;
 end;
 end;
	end;
	Sleep(500);
until false;



u can edit this, u just need replace party list to player list and add targeting function to update player debuffs Wink

btw i used smth like that for my overlord
    LUA Programming
WarriorHarmonyList = {"","",""};
WizardHarmonyList = {""};
 
WarriorFrenzyId = 11596;					
WarriorFrenzySkill = GetSkills():FindById(WarriorFrenzyId);	
WizardFrenzyId = 11597;					
WizardFrenzySkill = GetSkills():FindById(WizardFrenzyId);	
 
 
function Search(user,list)
	for x,b in pairs(list) do
		if (user == b) then
			return true;
		end;
	end;
end;
 
 
repeat
playerlist = GetPlayerList();
	for player in playerlist.list do
		if player:GetDistance() < 1000 then
			if player:GetClanName() == GetMe():GetClanName() then
				Target(player:GetId());
			--	ShowToClient("Debugger","Checked "..player:GetName());
				if (Search(player:GetName(),WarriorHarmonyList)) then
					if GetTarget() ~= nil and GetTarget():GotBuff(WarriorFrenzyId) == false then
						if (WarriorFrenzySkill ~= nil) and (WarriorFrenzySkill:CanBeUsed()) and (WarriorFrenzySkill:IsSkillAvailable()) then
							UseSkillRaw(WarriorFrenzyId,false,false);
							--ShowToClient("Debugger","WarriorFrenzy Buff casted ON "..player:GetName());
							ClearTargets();
							Sleep(1000);
						end;
					end;
				end;
				if (Search(player:GetName(),WizardHarmonyList)) then
					if GetTarget() ~= nil and GetTarget():GotBuff(WizardFrenzyId) == false then
						if (WizardFrenzySkill ~= nil) and (WizardFrenzySkill:CanBeUsed()) and (WizardFrenzySkill:IsSkillAvailable()) then
							UseSkillRaw(WizardFrenzyId,false,false);
							--ShowToClient("Debugger","WizardFrenzy Buff casted ON "..player:GetName());
							ClearTargets();
							Sleep(1000);
						end;
					end;
				end;
				Sleep(1000);
				ClearTargets();
			end;
		end;
	end;
Sleep(20*1000);
until false;


PUSH [Image: knUu53] IF HELPED
(This post was last modified: 03-18-2014 11:49 AM by TheQQmaster.)
03-18-2014 11:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
 Reputed by : schubbel2208(+2)
schubbel2208 Offline
Expired VIP Member
**

Posts: 154
Joined: Jun 2012
Reputation: 35
Version: 1.4.3.143
Post: #5
RE: A Simple OOP Cleanse Script

(03-18-2014 11:47 AM)TheQQmaster Wrote:  
(03-18-2014 02:58 AM)schubbel2208 Wrote:  not all toons for example 5 healers nothing more, and lets say every minute

    LUA Programming
ShowToClient("PURGE","AERO PURGE ON");
 
cleanseskillid = 11763; -- put here the cleanse skill Id atm its Radiant Purge
DebuffList = {11259,11260,11261,11262,11777,11029,11273,11296,11276,11047,11050,11055,11052,1&#8203;0539,10516,14639,14638,11048,10011,10012,10258,10269,10267,10769,10780,10801,115&#8203;59,11539} ; -- put here the Debuff Skill Ids
 
function NeedCleanse(Tehuser) -- for long debuff list better this way so we wont ask GotBuff from l2 tower many times.
	local MyBuffs = {} ;
	for x=1,50 do
 local value = nil;
 value = Tehuser:GetBuffByIdx(x);
 if value ~= nil then
 MyBuffs[#MyBuffs+1] = value.skillId;
 end;
	end;
	for x=1,#DebuffList do
 for t=1,#MyBuffs do
 if (MyBuffs ~= nil) and (MyBuffs[t] == DebuffList[x]) then
 return true;
 end;
 end;
	end;
	return false;	
end;
 
 
repeat
	me = GetMe();
	if (me ~= nil) then
 if NeedCleanse(me) then
 if not me:IsAlikeDeath() then
 ClearTarget();
 TargetRaw(me:GetId());
 Sleep(500);
 UseSkillRaw(cleanseskillid,false,false);
 Sleep(500);
 ClearTarget();
 CancelTarget(false);
 Sleep(500);
 end;
 elseif not NeedCleanse(me) then
 
 myptlist = GetPartyList();
 for PMember in myptlist.list do
 if NeedCleanse(PMember) then
 if not PMember:IsAlikeDeath() and (PMember:GetDistance() < 1000) then
 if (me:GetTarget() ~= PMember:GetId()) then
 ClearTargets();
 Sleep(500);
 TargetRaw(PMember:GetId());
 Sleep(500);
 else
 UseSkillRaw(cleanseskillid,false,false);
 Sleep(500);
 ClearTargets();
 CancelTarget(false);
 Sleep(500);
 
 end;
 break;
 end;
 end;
 end;
 end;
	end;
	Sleep(500);
until false;



u can edit this, u just need replace party list to player list and add targeting function to update player debuffs Wink

btw i used smth like that for my overlord
    LUA Programming
WarriorHarmonyList = {"","",""};
WizardHarmonyList = {""};
 
WarriorFrenzyId = 11596; 
WarriorFrenzySkill = GetSkills():FindById(WarriorFrenzyId);	
WizardFrenzyId = 11597; 
WizardFrenzySkill = GetSkills():FindById(WizardFrenzyId);	
 
 
function Search(user,list)
	for x,b in pairs(list) do
 if (user == b) then
 return true;
 end;
	end;
end;
 
 
repeat
playerlist = GetPlayerList();
	for player in playerlist.list do
 if player:GetDistance() < 1000 then
 if player:GetClanName() == GetMe():GetClanName() then
 Target(player:GetId());
 --	ShowToClient("Debugger","Checked "..player:GetName());
 if (Search(player:GetName(),WarriorHarmonyList)) then
 if GetTarget() ~= nil and GetTarget():GotBuff(WarriorFrenzyId) == false then
 if (WarriorFrenzySkill ~= nil) and (WarriorFrenzySkill:CanBeUsed()) and (WarriorFrenzySkill:IsSkillAvailable()) then
 UseSkillRaw(WarriorFrenzyId,false,false);
 --ShowToClient("Debugger","WarriorFrenzy Buff casted ON "..player:GetName());
 ClearTargets();
 Sleep(1000);
 end;
 end;
 end;
 if (Search(player:GetName(),WizardHarmonyList)) then
 if GetTarget() ~= nil and GetTarget():GotBuff(WizardFrenzyId) == false then
 if (WizardFrenzySkill ~= nil) and (WizardFrenzySkill:CanBeUsed()) and (WizardFrenzySkill:IsSkillAvailable()) then
 UseSkillRaw(WizardFrenzyId,false,false);
 --ShowToClient("Debugger","WizardFrenzy Buff casted ON "..player:GetName());
 ClearTargets();
 Sleep(1000);
 end;
 end;
 end;
 Sleep(1000);
 ClearTargets();
 end;
 end;
	end;
Sleep(20*1000);
until false;


Okay thx m8 i gonna work it out and give u a feedback then Smile
03-18-2014 14:32 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  WTB l2tower Simple Script -Sellers andFriends- eli22gd 5 3,656 07-01-2014 09:30 AM
Last Post: eli22gd



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