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
user:IsAttacking() not working?
Author Message
tuxevil Offline
VIP Member
***

Posts: 161
Joined: Mar 2012
Reputation: 24
Version: 1.4.3.143
Post: #1
user:IsAttacking() not working?

HI all

im having problems with IsAttacking()

im testing

    LUA Programming
ShowToClient("Attacking",tostring(GetMe():IsAttacking()));



To see if it changes when im not attacking and when i am, and it always says "false"

this is not the correct use of it?
10-31-2014 21:22 PM
Find all posts by this user Quote this message in a reply
soul2eat Offline
Expired VIP Member
**

Posts: 110
Joined: Nov 2013
Reputation: 24
Version: 1.4.2.132
Post: #2
RE: user:IsAttacking() not working?

maybe it's for pvp not pve.
11-01-2014 05:21 AM
Find all posts by this user Quote this message in a reply
tuxevil Offline
VIP Member
***

Posts: 161
Joined: Mar 2012
Reputation: 24
Version: 1.4.3.143
Post: #3
RE: user:IsAttacking() not working?

im trying to use it in pvp not pve, anyway doesnt matters, if you are attacking a mob or a char you are attacking, its logical
11-01-2014 05:44 AM
Find all posts by this user Quote this message in a reply
tuxevil Offline
VIP Member
***

Posts: 161
Joined: Mar 2012
Reputation: 24
Version: 1.4.3.143
Post: #4
RE: user:IsAttacking() not working?

so nobody knows what is happening here?
11-04-2014 16:54 PM
Find all posts by this user Quote this message in a reply
blau Offline
Expired VIP Member
**

Posts: 35
Joined: Sep 2014
Reputation: 0
Version: 1.4.2.136
Post: #5
RE: user:IsAttacking() not working?

(11-04-2014 16:54 PM)Tuxevil Wrote:  so nobody knows what is happening here?

user:IsAttacking() returns a boolean true or false if user is attacking
11-04-2014 21:00 PM
Find all posts by this user Quote this message in a reply
tophersoccer Offline
Expired VIP Member
**

Posts: 422
Joined: Aug 2012
Reputation: 142
Version: 1.4.3.143
Post: #6
RE: user:IsAttacking() not working?

can you show us the script that you are using to test the function?
11-04-2014 22:14 PM
Find all posts by this user Quote this message in a reply
tuxevil Offline
VIP Member
***

Posts: 161
Joined: Mar 2012
Reputation: 24
Version: 1.4.3.143
Post: #7
RE: user:IsAttacking() not working?

It always return false when im attacking and when im not

It only works on npc/mobs?

    LUA Programming
mytarget = GetTarget();
if mytarget ~= nil and (mytarget:IsEnemy() or mytarget:IsClanWar2Side()) and mytarget:CanSeeMe() and GetMe():IsAttacking() then
	if GetSkills():FindById(1263):IsSkillAvailable() and not mytarget:GotBuff(1263) then
		UseSkillRaw(1263,mytarget:IsClanWar2Side(),false); -- Curse Gloom
	end;
end;

(This post was last modified: 11-04-2014 22:35 PM by tuxevil.)
11-04-2014 22:34 PM
Find all posts by this user Quote this message in a reply
tophersoccer Offline
Expired VIP Member
**

Posts: 422
Joined: Aug 2012
Reputation: 142
Version: 1.4.3.143
Post: #8
RE: user:IsAttacking() not working?

(11-04-2014 22:34 PM)Tuxevil Wrote:  It always return false when im attacking and when im not

It only works on npc/mobs?

    LUA Programming
mytarget = GetTarget();
if mytarget ~= nil and (mytarget:IsEnemy() or mytarget:IsClanWar2Side()) and mytarget:CanSeeMe() and GetMe():IsAttacking() then
	if GetSkills():FindById(1263):IsSkillAvailable() and not mytarget:GotBuff(1263) then
 UseSkillRaw(1263,mytarget:IsClanWar2Side(),false); -- Curse Gloom
	end;
end;


This doesn't look like a good script to test out IsAttacking(), you should write something that tests it out specifically so you know for sure whether or not it does work correctly.
11-04-2014 23:04 PM
Find all posts by this user Quote this message in a reply
tuxevil Offline
VIP Member
***

Posts: 161
Joined: Mar 2012
Reputation: 24
Version: 1.4.3.143
Post: #9
RE: user:IsAttacking() not working?

(11-04-2014 23:04 PM)tophersoccer Wrote:  This doesn't look like a good script to test out IsAttacking(), you should write something that tests it out specifically so you know for sure whether or not it does work correctly.

m8, i will make it easier

run this script and it will return false
    LUA Programming
ShowToClient("ImAttacking",tostring(GetMe():IsAttacking()));



then hit anything and run it again and the return value will still be false
11-05-2014 00:07 AM
Find all posts by this user Quote this message in a reply
Vinter Offline
Expired VIP Member
**

Posts: 299
Joined: Sep 2013
Reputation: 109
Version: 1.4.1.128
Post: #10
RE: user:IsAttacking() not working?

I think IsAttacking refers to autoattack, like with the action Attack, not if you are in combat mode.
11-05-2014 15:00 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  L2Tower isn't working on Lineage II Mafia Shico 0 2,452 02-28-2017 18:56 PM
Last Post: Shico
  L2 Dragon question about bot, working or not kaan22747 0 2,607 02-15-2017 21:10 PM
Last Post: kaan22747
  LF Interlude low/mid rate Server with working l2tower pwsriddick 1 3,055 04-22-2016 21:26 PM
Last Post: Higorkovic
  CP/Mana Stop Working Crnogorac 3 3,706 04-08-2016 10:36 AM
Last Post: TheQQmaster
  l2avellan bot not working can halp any1 ? d1mmka 0 1,884 10-25-2015 04:53 AM
Last Post: d1mmka
  New working version folder ministra 4 3,449 10-11-2015 19:11 PM
Last Post: kerberos464
  L2 stop working when press login laydown 0 1,962 08-19-2015 00:53 AM
Last Post: laydown
  Auto Accept Res Not working aywka 32 16,348 07-10-2015 08:16 AM
Last Post: TheQQmaster
  l2.exe has stopped working problem littlef00t 10 9,392 07-08-2015 13:35 PM
Last Post: littlef00t
  Change title to user's target vaskouf 4 3,942 06-28-2015 09:25 AM
Last Post: Vinter



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