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
Help to cancel target
Author Message
budarox Offline
Expired VIP Member
**

Posts: 16
Joined: Nov 2012
Reputation: 0
Version: 1.4.2.142
Post: #1
Rainbow Help to cancel target

Hi guys, I've been having a problem with my Healer , it happens this way : I have a script healer , but it does not heal and I set up to heal the tool " CP , HP, MP RECOVERY " in own tower. After healing , the healer does not miss the target , could someone please get me a script to cancel the target after healing ? Or a functional script healer to heal without so many problems?
sorry for my bad english

I thank you for the attention
08-09-2015 17:39 PM
Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #2
RE: Help to cancel target

You can use Canceltarget an Cleartarget

    LUA Programming
----------------------------------------------------
function ClearAllTargets()
	ClearTargets(); -- Clears all saved targets
	CancelTarget(true); -- Cancels active target
	Sleep(500)
end
------------------------------------------------------

08-09-2015 19:53 PM
Find all posts by this user Quote this message in a reply
 Reputed by : budarox(+2)
budarox Offline
Expired VIP Member
**

Posts: 16
Joined: Nov 2012
Reputation: 0
Version: 1.4.2.142
Post: #3
RE: Help to cancel target

(08-09-2015 19:53 PM)rORUMI Wrote:  You can use Canceltarget an Cleartarget

    LUA Programming
----------------------------------------------------
function ClearAllTargets()
	ClearTargets(); -- Clears all saved targets
	CancelTarget(true); -- Cancels active target
	Sleep(500)
end
------------------------------------------------------


I'll test when server back

ty
08-10-2015 06:12 AM
Find all posts by this user Quote this message in a reply
budarox Offline
Expired VIP Member
**

Posts: 16
Joined: Nov 2012
Reputation: 0
Version: 1.4.2.142
Post: #4
RE: Help to cancel target

(08-09-2015 19:53 PM)rORUMI Wrote:  You can use Canceltarget an Cleartarget

    LUA Programming
----------------------------------------------------
function ClearAllTargets()
	ClearTargets(); -- Clears all saved targets
	CancelTarget(true); -- Cancels active target
	Sleep(500)
end
------------------------------------------------------


Man, this script just stop work, i guess he needs a command "repeat"
but I can't read this in lua configuration, and another question, 500 is 5 seconds ? ty

@rORUMI
08-10-2015 16:39 PM
Find all posts by this user Quote this message in a reply
ExoDo Offline
Restrainer of Glory
*

Posts: 171
Joined: Feb 2014
Reputation: 12
Version: 1.4.2.142
Post: #5
RE: Help to cancel target

    LUA Programming
Sleep(500)

is 0.5 sec, in helper say sleep is take a ms
08-10-2015 21:00 PM
Find all posts by this user Quote this message in a reply
 Reputed by : budarox(+2)
budarox Offline
Expired VIP Member
**

Posts: 16
Joined: Nov 2012
Reputation: 0
Version: 1.4.2.142
Post: #6
RE: Help to cancel target

(08-10-2015 21:00 PM)ExoDo Wrote:  
    LUA Programming
Sleep(500)

is 0.5 sec, in helper say sleep is take a ms

as I set to repeat forever?
08-10-2015 21:33 PM
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: #7
RE: Help to cancel target

Repeat for eva y. But need some conditions to use clear

Sent from my Galaxy S5 via TAPTALK

PUSH [Image: knUu53] IF HELPED
08-11-2015 04:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #8
RE: Help to cancel target

Budarox, ClearAllTargets() in a simple function... created by me and used inside a lib of functions.

I Make ans Small test to you. Please Copy and paste the next code like a new script. Run It and letme know if work.

In My test over my iss.

- If target me, a char, a npc, in some secons, my iss lost the target.
- If my iss is using buff, the code wait.. an then cancel the target.

    LUA Programming
-- L2TOWER: LUA - CancelMyTarget.lua | rORUMI |  <a href="http://www.l2tower.eu" target="_blank">http://www.l2tower.eu</a>
-- Test: Cancel target if pass nTime secons
ShowToClient("Script", "CancelMyTarget v0.1 ACTIVE" , 3);
------------------------------------------------------
nTime = (5*1000) -- 5 sec
myTime = GetTime() -- Global time
  ----------------------------------------------------
function CheckTime()
local getTime = GetTime();
local getTime = tonumber(getTime);
local checkTime = tonumber(myTime);
local checkTime = myTime + nTime;
 
	if getTime > checkTime then
		myTime = GetTime() -- Global time	
		return true
	end
return false
end --fn
----------------------------------------------------
function ClearAllTargets()
	ClearTargets(); -- Clears all saved targets
	CancelTarget(true); -- Cancels active target
	Sleep(1000)
end
------------------------------------------------------
 
repeat
 
	if not (GetMe():IsAlikeDeath()) and (CheckTime() == true) then
		if (GetTarget() ~= nil) and not (GetMe():IsUsingMagic()) then ClearAllTargets() end;
	Sleep(500)
	else
	Sleep(1000)
	end
 
until false

(This post was last modified: 08-11-2015 06:52 AM by rORUMI.)
08-11-2015 06:49 AM
Find all posts by this user Quote this message in a reply
 Reputed by : budarox(+2)
budarox Offline
Expired VIP Member
**

Posts: 16
Joined: Nov 2012
Reputation: 0
Version: 1.4.2.142
Post: #9
RE: Help to cancel target

(08-11-2015 06:49 AM)rORUMI Wrote:  Budarox, ClearAllTargets() in a simple function... created by me and used inside a lib of functions.

I Make ans Small test to you. Please Copy and paste the next code like a new script. Run It and letme know if work.

In My test over my iss.

- If target me, a char, a npc, in some secons, my iss lost the target.
- If my iss is using buff, the code wait.. an then cancel the target.

    LUA Programming
-- L2TOWER: LUA - CancelMyTarget.lua | rORUMI | <a href="http://www.l2tower.eu" target="_blank">http://www.l2tower.eu</a>
-- Test: Cancel target if pass nTime secons
ShowToClient("Script", "CancelMyTarget v0.1 ACTIVE" , 3);
------------------------------------------------------
nTime = (5*1000) -- 5 sec
myTime = GetTime() -- Global time
 ----------------------------------------------------
function CheckTime()
local getTime = GetTime();
local getTime = tonumber(getTime);
local checkTime = tonumber(myTime);
local checkTime = myTime + nTime;
 
	if getTime > checkTime then
 myTime = GetTime() -- Global time	
 return true
	end
return false
end --fn
----------------------------------------------------
function ClearAllTargets()
	ClearTargets(); -- Clears all saved targets
	CancelTarget(true); -- Cancels active target
	Sleep(1000)
end
------------------------------------------------------
 
repeat
 
	if not (GetMe():IsAlikeDeath()) and (CheckTime() == true) then
 if (GetTarget() ~= nil) and not (GetMe():IsUsingMagic()) then ClearAllTargets() end;
	Sleep(500)
	else
	Sleep(1000)
	end
 
until false




ty
08-14-2015 06:31 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  GetTarget() don't return monsters target ID Xerovator 3 129 11-16-2024 20:00 PM
Last Post: JennaDeh
  bot will target but not attack. elvis8925 3 3,795 04-09-2018 00:19 AM
Last Post: elvis8925
Star Remove Target canaldextiger 8 4,874 02-10-2018 22:19 PM
Last Post: canaldextiger
Information How to get 'PARTY MEMBER TARGET'? Caaioc 9 6,808 01-24-2016 09:57 AM
Last Post: TheQQmaster
  target for self buff manuel16007 1 3,266 01-22-2016 16:31 PM
Last Post: TheQQmaster
  Change title to user's target vaskouf 4 4,252 06-28-2015 09:25 AM
Last Post: Vinter
  Clear target after kill mobs astalavista 0 2,976 06-07-2015 18:46 PM
Last Post: astalavista
  Target fix MoonSeed 5 7,450 03-23-2015 09:51 AM
Last Post: Fox
  How to remove the hold target? supera 5 4,369 12-26-2014 21:13 PM
Last Post: supera
  Fix target Tornet 6 5,219 11-22-2014 00:55 AM
Last Post: soul2eat



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