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
Target Delay
Author Message
b4db0yx Offline
Amber Basilisk
*

Posts: 34
Joined: Dec 2011
Reputation: 0
Version: 1.4.3.143
Post: #1
Target Delay

Any time I'm using tower, the GM seems to know that I am. I suspect it is because of the almost instant target after you kill 1 mob. Any idea on how could I make a delayed target?
04-30-2014 13:47 PM
Find all posts by this user Quote this message in a reply
eustach3 Offline
VIP Member
***

Posts: 324
Joined: Sep 2011
Reputation: 133
Version: 1.4.3.143
Post: #2
RE: Target Delay

Maybe there are other solutions but this one crossed my mind now. Didn`t test it but cant see why it wont work
    LUA Programming
delay = 0; --- This is how much delay you want, i guess 200-300 would be fine
targetmode = 0; ---- Set here your target mode: 0 is disabled, 1 is by range, 2 is by point , 3 is polygon. 
--Your other settings like range and stuff will be saved if you configure them once
 
repeat
 if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
 ProcessCommand("/targetMobMode_0")
 Sleep(delay);
 ProcessCommand("/targetMobMode_" ..tostring(targetmode));
 end;
until false;

(This post was last modified: 04-30-2014 19:11 PM by eustach3.)
04-30-2014 19:10 PM
Find all posts by this user Quote this message in a reply
 Reputed by : redbullking(+2)
Fox Away
Fraka-kaka-kaka-kaka-kow!
******

Posts: 5,632
Joined: Oct 2011
Reputation: -6666548
Version: 1.4.2.142
Post: #3
RE: Target Delay

tell him you use macro for ex

/target Mob_name
/useShortcut 1 1

tell him to test it and gtfo Big Grin

Heart
05-01-2014 01:11 AM
Visit this user's website Find all posts by this user Quote this message in a reply
eustach3 Offline
VIP Member
***

Posts: 324
Joined: Sep 2011
Reputation: 133
Version: 1.4.3.143
Post: #4
RE: Target Delay

You got 2 solutions now Smile)
05-01-2014 01:15 AM
Find all posts by this user Quote this message in a reply
b4db0yx Offline
Amber Basilisk
*

Posts: 34
Joined: Dec 2011
Reputation: 0
Version: 1.4.3.143
Post: #5
RE: Target Delay

If you use macro or just simply make one it waits until the corpse disappears and then targets the next. Simply because /target X mob, targets the same mob which has been killed
05-01-2014 07:59 AM
Find all posts by this user Quote this message in a reply
eustach3 Offline
VIP Member
***

Posts: 324
Joined: Sep 2011
Reputation: 133
Version: 1.4.3.143
Post: #6
RE: Target Delay

Have you tried the on from my first post.. u didnt say anything
05-01-2014 13:50 PM
Find all posts by this user Quote this message in a reply
b4db0yx Offline
Amber Basilisk
*

Posts: 34
Joined: Dec 2011
Reputation: 0
Version: 1.4.3.143
Post: #7
RE: Target Delay

(05-01-2014 13:50 PM)eustach3 Wrote:  Have you tried the on from my first post.. u didnt say anything

I have just tried it and it doesn't seem to do anything Undecided

I added a command to show some text and yes, it does enter the if condition after some mob dies.
(This post was last modified: 05-01-2014 16:58 PM by b4db0yx.)
05-01-2014 16:54 PM
Find all posts by this user Quote this message in a reply
xxmonti Offline
Expired VIP Member
**

Posts: 83
Joined: Jun 2013
Reputation: 5
Version: 1.4.2.142
Post: #8
RE: Target Delay

i tested, and my CPU usage increase to 30% ... even with client minimized
05-01-2014 17:18 PM
Find all posts by this user Quote this message in a reply
eustach3 Offline
VIP Member
***

Posts: 324
Joined: Sep 2011
Reputation: 133
Version: 1.4.3.143
Post: #9
RE: Target Delay

So for you it is working? I know it uses a lot of cpu it`s a script and it is using repeat.. you can try to edit this part like this:
    LUA Programming
repeat
 if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
 ProcessCommand("/targetMobMode_0")
 Sleep(delay);
 ProcessCommand("/targetMobMode_" ..tostring(targetmode));
 end;
Sleep(600);
until false;



If it doesnt work probably you set smth wrong.. but lets do it like this, i set it manually for easy debugging.. Just set up on line 4 and 5(sleep time and target mode);
    LUA Programming
repeat
 if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
 ProcessCommand("/targetMobMode_0")
 Sleep(400); --- set sleep time
 ProcessCommand("/targetMobMode_2")
 ProcessCommand("/setMobTargetPoint")
 -- 0 is disabled, 1 is by range, 2 is by point , 3 is polygon.
 end;
 Sleep(200);
until false;



P.S. It can be done as a plugin also.. it will use little CPU .. we need to mess with os.time, if you think it worth i`ll do it.
05-01-2014 17:57 PM
Find all posts by this user Quote this message in a reply
b4db0yx Offline
Amber Basilisk
*

Posts: 34
Joined: Dec 2011
Reputation: 0
Version: 1.4.3.143
Post: #10
RE: Target Delay

Found the culprit. Apparently ProcessCommand doesn't work for /targetMobMode. It works if I use Command tho but it spams the hell out of my chat..
(This post was last modified: 05-01-2014 19:38 PM by b4db0yx.)
05-01-2014 19:38 PM
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 141 11-16-2024 20:00 PM
Last Post: JennaDeh
  bot will target but not attack. elvis8925 3 3,800 04-09-2018 00:19 AM
Last Post: elvis8925
Star Remove Target canaldextiger 8 4,885 02-10-2018 22:19 PM
Last Post: canaldextiger
Information How to get 'PARTY MEMBER TARGET'? Caaioc 9 6,818 01-24-2016 09:57 AM
Last Post: TheQQmaster
  target for self buff manuel16007 1 3,270 01-22-2016 16:31 PM
Last Post: TheQQmaster
Rainbow Help to cancel target budarox 8 6,014 08-14-2015 06:31 AM
Last Post: budarox
  Nuke delay after i alt+tab. vaskouf 3 4,509 07-10-2015 07:36 AM
Last Post: blackrebel
  Change title to user's target vaskouf 4 4,259 06-28-2015 09:25 AM
Last Post: Vinter
  Clear target after kill mobs astalavista 0 2,977 06-07-2015 18:46 PM
Last Post: astalavista
  Nuke/skill delay lordbauer 6 5,678 04-15-2015 02:44 AM
Last Post: plixplox



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