Post Reply 
 
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



Post: #1
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
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Combat - swing timer - Indiaret - 03-02-2019 03:03 AM
RE: Combat - swing timer - Coruja - 03-02-2019, 04:33 AM
RE: Combat - swing timer - Indiaret - 03-02-2019, 05:49 AM
RE: Combat - swing timer - Coruja - 03-02-2019, 08:29 AM
RE: Combat - swing timer - Indiaret - 03-02-2019, 10:21 PM
RE: Combat - swing timer - Coruja - 03-10-2019, 08:17 AM

Forum Jump:


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