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
eustach3 Offline
VIP Member
***

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

    LUA Programming
repeat
if GetTarget() ~= nil then
 if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
 SetPause(true);
 Sleep(400); --- set sleep time
 SetPause(false);
 -- 0 is disabled, 1 is by range, 2 is by point , 3 is polygon.
 end;
end;
 Sleep(200);
until false;



Try this.. just crossed my mind, i forgot that targetmode spams your chat.
(This post was last modified: 05-01-2014 21:50 PM by eustach3.)
05-01-2014 20:02 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: #12
RE: Target Delay

Doesn't work. 2: attempt to index a nil value
05-01-2014 20:21 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: #13
RE: Target Delay

Post updated, try now
05-01-2014 21: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: #14
RE: Target Delay

Now it works. Finally Smile. Got to make it into a plugin tho.
(This post was last modified: 05-02-2014 00:59 AM by b4db0yx.)
05-02-2014 00:48 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: #15
RE: Target Delay

K, let me know if you need any help
05-02-2014 01:36 AM
Find all posts by this user Quote this message in a reply
nmerritt Offline
Expired VIP Member
**

Posts: 75
Joined: Mar 2013
Reputation: 1
Version: 1.4.2.132
Post: #16
RE: Target Delay

Would it be possible to include the spam f1-f2 script into this
So char would attack mob pause 3-5 seconds to allow spam of
f1-f2 target next mob rinse and repeat ?
05-02-2014 13:40 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: #17
RE: Target Delay

I dont know exactly what you mean.. You wanna say: instead of that 3-5 seconds pause, use f1-f2? If yes, then here you go:
    LUA Programming
repeat
if GetTarget() ~= nil then
 if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
 SetPause(true);
 Command("/useshortcut 1 1");
 Sleep(50);
 Command("/useshortcut 1 2");
 Sleep(50);
 Command("/useshortcut 1 1");
 Sleep(50);
 Command("/useshortcut 1 2");
 Sleep(50);
 Command("/useshortcut 1 1");
 Sleep(50);
 Command("/useshortcut 1 2");
 Sleep(100); --- set sleep time
 SetPause(false);
 -- 0 is disabled, 1 is by range, 2 is by point , 3 is polygon.
 end;
end;
 Sleep(200);
until false;



If this is not what you want, try to tell me what you need it for
05-02-2014 18:47 PM
Find all posts by this user Quote this message in a reply
nmerritt Offline
Expired VIP Member
**

Posts: 75
Joined: Mar 2013
Reputation: 1
Version: 1.4.2.132
Post: #18
RE: Target Delay

sorry for not explaining better.
i use a script on forum to spam f1 and f2 and i put in-game
pickup action button in f1 and f2 but what is happening is char
goes to attack another mob and tries to pickup items at same time
so it just runs back and forth.what i was hoping for was to combine both the f1-f2 script and the target delay script together.
so char will attack mob wait 3-5 seconds to be able to pickup items
using f1-f2 script then target next mob.
05-02-2014 20:43 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: #19
RE: Target Delay

Well it should work like this, have you tried it ?

Here i made a better version, it will check if there is any item near you and will pickup it, just change the range that will be checked for items near you on the first line 'itemrange'
    LUA Programming
itemrange = 500;
repeat
if GetTarget() ~= nil then
 if GetTarget():IsAlikeDeath() and GetTarget():IsMonster() and GetZoneType() ~= 12 then
 SetPause(true);
	itemList = GetItemManager();
	for item in itemList.list do
 itemloc = item:GetLocation();
 if GetRangeTo(itemloc) < itemrange then
 repeat
 Command("/useshortcut 1 1");
 Sleep(50);
 Command("/useshortcut 1 2");
 Sleep(50);
 Command("/useshortcut 1 1");
 Sleep(50);
 until GetRangeTo(itemloc) > itemrange
 end;
 Sleep(100); --- set sleep time
 SetPause(false);
	end;
 end;
end;
 Sleep(200);
until false;



PS : my tower script is messed up, it doesnt show me if something is wrong in my script so there could be some mistakes. Try it and give a feedback
05-02-2014 21:11 PM
Find all posts by this user Quote this message in a reply
nmerritt Offline
Expired VIP Member
**

Posts: 75
Joined: Mar 2013
Reputation: 1
Version: 1.4.2.132
Post: #20
RE: Target Delay

script error:lua error(script not valid)-[string"itemrange=500;..."]:7:
attempt to call a nil value
05-03-2014 01:10 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 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,017 08-14-2015 06:31 AM
Last Post: budarox
  Nuke delay after i alt+tab. vaskouf 3 4,513 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,978 06-07-2015 18:46 PM
Last Post: astalavista
  Nuke/skill delay lordbauer 6 5,685 04-15-2015 02:44 AM
Last Post: plixplox



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