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-nmm7 (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-nmm7 (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-nmm7 (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
Combat System
Author Message
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #1
Combat System
Hello, I would ask if there is any tutorial to make a combat system?
The only thing I found is this link on the wiki

http://wiki.sphere.torfo.org/index.php/How_Combat_Works


But it's not a great help, i don't know who scp edit or base myself
thx!
(This post was last modified: 01-13-2015 10:08 PM by pushim.)
01-13-2015 10:01 PM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #2
RE: Combat System
I don't know if this might help:
Code:
[FUNCTION f_calc_damage] // argn1 = armor, argn2 = damage
local.scale = <feval <floatval ((0.0018 * <argn1> @ 2) - (0.683 * <argn1>)) + 60.455>>
local.perc = <feval <floatval (<argn2> / 60) * 100>>
local.dmg = <floatval <dlocal.scale> + (<dlocal.scale> * ((<dlocal.perc> - 100)/100))>
return <feval <local.dmg>>


[FUNCTION f_damage_armor]
local.c = <R0,100>
if <local.c> < 7
    ref1 = <findlayer.layer_collar>
elseif <local.c> < 14
    ref1 = <findlayer.layer_gloves>
elseif <local.c> < 28
    ref1 = <findlayer.layer_arms>
elseif <local.c> < 43
    ref1 = <findlayer.layer_helm>
elseif <local.c> < 65
    ref1 = <findlayer.layer_legs>
else
    ref1 = <findlayer.layer_chest>
endif
if <ref1.uid>
    ref1.damage <argn1> <argn2> <argn3>
endif


[ITEMDEF i_memory_berserk]
Name = berserk memory
Type = t_eq_script

On=@Create
    attr = attr_move_never|attr_invis
    
On=@Timer
    cont.clearctags berserk
    remove
    return 1
I had this here in my script folder, from TDR project a shard that somehow I got the backup... I think is related to combat behavior.
01-14-2015 07:56 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #3
RE: Combat System
I am looking to build my own system, but is too hard to understand this script for me
Open the spoiler

01-14-2015 08:31 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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