The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






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

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #1
weapon speed calculating formula
How is weapon speed calculating in core?
05-12-2012 09:43 AM
Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #2
RE: weapon speed calculating formula
I scripted it some time ago for SCP, it is:
Code:
return <eval (<serv.SpeedScaleFactor> * 10) / ((<dex> + 100) * <feval <floatval 150 / <fval <local.speed>>>>)>
05-12-2012 02:31 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #3
RE: weapon speed calculating formula
SpeedscaleFactor from spehre.ini
local.speed is speed from weapon script?
right?
05-12-2012 05:49 PM
Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #4
RE: weapon speed calculating formula
Exactly.
If you have no weapon, local.speed = 20
05-13-2012 01:31 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #5
RE: weapon speed calculating formula
Thanks
05-13-2012 03:36 AM
Find all posts by this user Like Post Quote this message in a reply
WRWR
Journeyman
*

Posts: 212
Likes Given: 30
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 1



Post: #6
RE: weapon speed calculating formula
How about ARGN in @HITTRY?
05-16-2012 11:36 PM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #7
RE: weapon speed calculating formula
(05-12-2012 02:31 PM)ShiryuX Wrote:  I scripted it some time ago for SCP, it is:
Code:
return <eval (<serv.SpeedScaleFactor> * 10) / ((<dex> + 100) * <feval <floatval 150 / <fval <local.speed>>>>)>

how you put this in the script?
(This post was last modified: 05-16-2012 11:51 PM by admin phoenix.)
05-16-2012 11:46 PM
Find all posts by this user Like Post Quote this message in a reply
ShiryuX
Journeyman
*

Posts: 249
Likes Given: 1
Likes Received: 19 in 14 posts
Joined: Mar 2010
Reputation: 4



Post: #8
RE: weapon speed calculating formula
Copy and paste in a file.
05-18-2012 12:13 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 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 


Forum Jump:


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