Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Combat - swing timer
|
Author |
Message |
Indiaret 
Apprentice

Posts: 45
Likes Given: 3
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0
![]()
|
Combat - swing timer
Hi,
Trying to make swing delay between triggers hittry and hit, and cannot resolve it. Using sphere 56d.
I tried timerd, argn1 in @HitTry but nothing works for it. Still same fast attack no matter what is in this variables. In @SkillStart timerd works properly for swing delay.
Is there any error or how can i change it ? Tried also local.animDelay, but it dont work precisely.
I have this source code for combat:
Code:
[events e_combat_test]
on=@SkillStart
timerd=30 //Delay before hitcheck
on=@Attack
tag.lt=<src>
on=@HitCheck
if (<region.safe> || <src.region.safe>)
return -1
endif
if (<region.nopvp> || <src.region.nopvp>)
if (<src.isplayer>)
return -1
endif
endif
if ((<flags>&statf_dead) || (<flags>&statf_stone)|| (<flags>&statf_sleeping))
return -1
endif
if (<flags>&statf_freeze)
return 1
endif
if ((<src.flags>&statf_dead) || <src.hits><1)
return -1
endif
if !(<canSeeLos <src>>)
return 1
endif
if (<weapon>)
if (<IsSkillRanged <action>>) // Archery
if (<weapon.range> != 6)
weapon.range=6
endif
else
if (<argn1>==1) //Naprah
if !(<tag.hittryRangeSet>)
weapon.range=1
tag.hittryRangeSet=1
endif
elif (<argn1>==2) //Hit
if !(<tag.hitRangeSet>)
weapon.range=2
tag.hitRangeSet=1
endif
endif
endif
endif
return 0
on=@HitTry
timerd=6000
sysmessage argn1: <argn1>
argn1=6000
sysmessage argn1 after: <argn1>
return 0
on=@Hit
tag.hittryRangeSet=0
tag.hitRangeSet=0
on=@HitMiss
tag.hittryRangeSet=0
tag.hitRangeSet=0
Thanks.
|
|
03-02-2019 03:03 AM |
|
|
Indiaret 
Apprentice

Posts: 45
Likes Given: 3
Likes Received: 1 in 1 posts
Joined: Apr 2016
Reputation: 0
![]()
|
RE: Combat - swing timer
Thanks for answer ...
but that its problem. LOCAL.Animdelay works correctly like u wrote, but argn1 do not. Eg: I have now in script:
Local.animdelay=30 and argn1=100 in trigger @HitTry.
... So my character should deal damage after 3s according to LOCAL.AnimDelay and wait to trigger @Hit next 7s according to argn1, right ? It dont work if I understood well  .
Argn1 have not influence on this. Exactly after 3s it deal damage and combat repeats again.
|
|
03-02-2019 05:49 AM |
|
|
User(s) browsing this thread: 1 Guest(s)