Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
weapon speed calculating formula
Author Message
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #9
RE: weapon speed calculating formula
Hi, I made my swing speed calculation using this: http://uo.stratics.com/content/arms-armo....php#speed

If you want to show the weapon speed in the tooltips I recommend to use this:

Code:
[EVENTS E_PlayerTooltipEvent]
ON=@ITEMCLIENTTOOLTIP
IF <ACT.ISWEAPON>
ADDCLILOC 1061168,<ACT.DAM>
IF ( <EVAL <FVAL ((<ACT.SPEED>) - <EVAL (<ACT.SPEED>/10)*10>)>> == 2 ) || ( <EVAL <FVAL ((<ACT.SPEED>) - <EVAL (<ACT.SPEED>/10)*10>)>> == 7 )
  ADDCLILOC 1061167,<FVAL <ACT.SPEED>>5s
ELSE
  ADDCLILOC 1061167,<FVAL <ACT.SPEED>>s
ENDIF
ENDIF
Obs: you should use the weapon speed in weapon script like that
ex 1: Hammer pick REAL speed is 3.25s, then you should set the speed in 32
ex 2: Katana REAL speed is 2.5s, then you shoud set the speed in 25

I think the SCP scripts is already like this, but you can check.

So, the Swing Speed calculation I did this:
Code:
IF ( <EVAL <FVAL ((<UID.<WEAPON>.SPEED>) - <EVAL (<UID.<WEAPON>.SPEED>/10)*10>)>> == 2 ) || ( <EVAL <FVAL ((<UID.<WEAPON>.SPEED>) - <EVAL (<UID.<WEAPON>.SPEED>/10)*10>)>> == 7 )
FLOAT.SPEED <FLOATVAL <UID.<WEAPON>.SPEED>+0.5>
ELSE
FLOAT.SPEED <FLOATVAL <UID.<WEAPON>.SPEED>>
ENDIF
SMSG @044,,1 Weapon Speed <FLOATVAL <FLOAT.SPEED>/10>
SMSG @063,,1 Swing Speed <FLOATVAL <FLOAT.SPEED>/2.5> ticks of 0.25s

FLOAT.SPEED -= <FLOATVAL (<SRC.STAMINA>/30)*2.5>
SMSG @035,,1 Stamina Bonus <FLOATVAL (<SRC.STAMINA>/30)*2.5>
SMSG @063,,1 Swing Speed <FLOATVAL <FLOAT.SPEED>/2.5> ticks of 0.25s

FLOAT.SPEED <FLOATVAL <FLOAT.SPEED>*(100.0/(100+<SRC.dTAG.SWINGSPEEDINCREASE>)>
SMSG @055,,1 Swing Speed Bonus <FLOATVAL 100.0/(100+<SRC.dTAG.SWINGSPEEDINCREASE>)>
SMSG @063,,1 Swing Speed <FLOATVAL <FLOAT.SPEED>/2.5> ticks of 0.25s

FLOAT.SPEED <FLOATVAL <EVAL <FLOATVAL <FLOAT.SPEED>/2.5>/1000000>>

IF <FLOATVAL <FLOAT.SPEED>> < <FLOATVAL 5>
FLOAT.SPEED <FLOATVAL 5>
ENDIF
SMSG @0481,,1 Swing Speed <FLOATVAL <FLOAT.SPEED>*0.25>s
You just need comment the `debug` messages, its just to understand what its doing

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
06-04-2012 03:29 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
weapon speed calculating formula - WRWR - 05-12-2012, 09:43 AM
RE: weapon speed calculating formula - Extreme - 06-04-2012 03:29 AM

Forum Jump:


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