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:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SphereWiki
Author Message
Oxtar
Apprentice
*

Posts: 48
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0



Post: #7
RE: SphereWiki
We need more infos on how to use the dam_flags...

Example:
Quote:[DEFNAME dam_flags]
dam_lightning 00020 //electrical damage (lightning)

Well i found some information about it on a russian forum dedicated to sphere(yeah i had to get a translator lol)

That's what i found about it ;

- Set the Damage on the weapon you plan to use with a specific damage type (i don't know if you can use multiple types, should test it to see if we can do that)
Quote:[ITEMDEF i_test_sword]
NAME=Test Fire Sword
ID=i_radiant_scimitar
DAM= <physical> // do not take this for your dam_type

ON=@Damage
<<<<<<<<<<<<<<<<------------------ This is where you add the next line for the dam_flags

The way it should look is ;

Quote:ON=@Damage
SRC.DAMAGE <DMGAMOUNT> <DAM_FLAG> <SRC.UID>

Now if you wish to make a way to absorb/prevent this type of damage, simply add it to an event or directly on the character(I prefer Events, easier to manage)

Quote:[EVENTS e_prevent_lightning]

ON=@GetHit
IF (<ARGN2> & <dam_lightning>)
EMOTE absorbed the Element of Lightning
RETURN 1
ENDIF

Now my own question is, is there a workaround to let other type of damage to pass through it? Because right now, that event will completely block all the types of damage, including the physical one because it found the dam_lightning type. I thought about ELSEIF Statements... but i'm sure it ain't the right way to do that.

What i thought would be to do a SRC.DAMAGE for all the types(including physical) and in the event, to give a free pass to the selected type.

Quote:ON=@Damage
SRC.DAMAGE 50 dam_lightning <SRC.UID>
SRC.DAMAGE 50 dam_cold_new <SRC.UID>
then
Quote:IF (<ARGN2> & <dam_lightning>)
EMOTE absorb Lightning!
RETURN 1
ELSEIF (<ARGN2> & <dam_physical>)
do nothing
ELSEIF (<ARGN2> & <dam_cold_new>)
RETURN 1
ENDIF

Just not sure if the other damages will pass.

LAST EDIT:

Quick script error fix ^^
(This post was last modified: 12-18-2012 01:35 AM by Oxtar.)
12-17-2012 10:22 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
SphereWiki - Mordaunt - 12-13-2012, 12:03 PM
RE: SphereWiki - Oxtar - 12-13-2012, 12:11 PM
RE: SphereWiki - Valios - 12-13-2012, 06:43 PM
RE: SphereWiki - darksun84 - 12-13-2012, 11:55 PM
RE: SphereWiki - ShiryuX - 12-14-2012, 12:03 AM
RE: SphereWiki - Oxtar - 12-14-2012, 10:48 PM
RE: SphereWiki - Oxtar - 12-17-2012 10:22 PM
RE: SphereWiki - Oxtar - 12-17-2012, 11:54 PM
RE: SphereWiki - ShiryuX - 12-18-2012, 10:33 AM
RE: SphereWiki - Mordaunt - 12-18-2012, 10:41 AM
RE: SphereWiki - darksun84 - 12-18-2012, 08:54 PM
RE: SphereWiki - Oxtar - 12-18-2012, 11:31 PM
RE: SphereWiki - Extreme - 12-19-2012, 09:37 AM
RE: SphereWiki - Sharlenwar - 01-02-2013, 06:34 PM

Forum Jump:


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