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
Targetting a Corpse
Author Message
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #2
RE: Targetting a Corpse
Asuming you are using a function to make character sleep (something like KnockOut and calling sleep inside) you can add one event to the player which handle all @SpellEffect, using something like if (<serv.spell.<argn1>.flags>&spellflag_good) will tell you if the spell is benefitial (there is a spellflag_bless too, maybe you have to look at sphere_defs to have a better idea of what you can use there).

Bad news come now, if no one corrects me (i'm a little sleep yet), there is no easy way to handle the corpse's targetting since there is a MUST-HAVE flag for spells 'spellflag_targ_item' that allows/deny spells to be casted at items. My best ideas now are:

a) Add this flag to all spells you may want to allow to this system and then add to them something like @Start in these spells checking if ACT is t_corpse and return 1 if not, if target is a corpse then you have to 'transfer' the spell effect to corpse's link (try ACT=<act.link>), this must work.
b) Using @Select to redo all the casting system from scratch for these spells (more instructive if you want to learn about it, more stupid/non-sense/boring if not) disallowing everything from targetting and handling yourself timers,events,checks, etc until you finished and have to call the spelleffect on target (Possible, but I see no profit here).
03-05-2015 07:14 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Targetting a Corpse - Nachtmusique - 03-05-2015, 08:20 AM
RE: Targetting a Corpse - XuN - 03-05-2015 07:14 PM
RE: Targetting a Corpse - JohnVeritas - 03-05-2015, 08:46 PM
RE: Targetting a Corpse - XuN - 03-05-2015, 11:06 PM
RE: Targetting a Corpse - JohnVeritas - 03-05-2015, 11:26 PM
RE: Targetting a Corpse - Nachtmusique - 03-05-2015, 11:34 PM

Forum Jump:


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