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
Checking for Loss of Sight
Author Message
mlyon83
Apprentice
*

Posts: 44
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #1
Checking for Loss of Sight
How would you reference loss of sight to be checked in a later event that wouldn't use <CANSEE>?
06-25-2013 08:57 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Checking for Loss of Sight
Need a better (more specific) use case of what you are trying to achive...
06-25-2013 10:23 AM
Find all posts by this user Like Post Quote this message in a reply
mlyon83
Apprentice
*

Posts: 44
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #3
RE: Checking for Loss of Sight
Code:
[FUNCTION castfs]
IF !(<RESTEST 1 i_scroll_flamestrike>)
    SYSMESSAGE @00 You have no flamestrike scroll to use that command.
ELSEIF (<SRC.MAGERY> < 70.0)
    SYSMESSAGE @00 You have insufficient Magery to use that command.
ELSEIF (<SRC.INSCRIPTION> < 70.0)
    SYSMESSAGE 200 You have insufficient Inscription to use that command.
ELSEIF (<MANA> < 20)
    SYSMESSAGE @00 You have insufficiant mana to use that command.
ELSE
    NEWITEM=i_player_cmd_castfs_memory
    ACT.EQUIP
    ACT.TARGET="Select target to cast flamestrike scroll."
ENDIF

[ITEMDEF i_player_cmd_castfs_memory]
ID=i_memory
TYPE=t_eq_script
LAYER=layer_special
NAME="Player Cmd Castfs Memory"

ON=@Equip
LINK=<UID>

ON=@Targon_Char
IF !(<LINK.TARG.CANSEE>)
    LINK.SYSMESSAGE @00 You cannot see your target.
ELSE
    CONT.SAY="Kal Vas Flam"
    SERV.NEWITEM=i_player_cmd_castfs_memory_dmg
    LINK.TARG.ACT.EQUIP
    VAR.CASTFS_UID=<LINK.TARG.UID>
ENDIF
REMOVE
RETURN 1

ON=@Targon_Item
LINK.SYSMESSAGE @00 You cannot target that item.
REMOVE
RETURN 1

ON=@Targon_Ground
LINK.SYSMESSAGE @00 You cannot target the ground.
REMOVE
RETURN 1

[ITEMDEf i_player_cmd_castfs_memory_dmg]
ID=i_memory
TYPE=t_eq_script
LAYER=layer_special
NAME="player Cmd Castfs Memory Dmg"

ON=@Equip
LINK=<VAR.CASTFS_UID>
TIMER=4

ON=@Timer
//CHECK TO SEE IF TARGET IS WITHIN LINE OF SIGHT BEFORE SPELL SETS OFF
LINK.SPELLEFFECT=s_flamestrike,{40 45},1,<LINK.UID>
REMOVE
RETURN 1
06-25-2013 01:04 PM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #4
RE: Checking for Loss of Sight
I would use canseelos, not cansee. (if its just casting KVF)
06-27-2013 08:31 AM
Find all posts by this user Like Post Quote this message in a reply
danielmuller
Apprentice
*

Posts: 18
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: May 2016
Reputation: 0



Post: #5
RE: Checking for Loss of Sight
(06-25-2013 01:04 PM)mlyon83 Wrote:  
Code:
[FUNCTION castfs]
IF !(<RESTEST 1 i_scroll_flamestrike>)
    SYSMESSAGE @00 You have no flamestrike scroll to use that command.
ELSEIF (<SRC.MAGERY> < 70.0)
    SYSMESSAGE @00 You have insufficient Magery to use that command.
ELSEIF (<SRC.INSCRIPTION> < 70.0)
    SYSMESSAGE 200 You have insufficient Inscription to use that command.
ELSEIF (<MANA> < 20)
    SYSMESSAGE @00 You have insufficiant mana to use that command.
ELSE
    NEWITEM=i_player_cmd_castfs_memory
    ACT.EQUIP
    ACT.TARGET="Select target to cast flamestrike scroll."
ENDIF

[ITEMDEF i_player_cmd_castfs_memory]
ID=i_memory
TYPE=t_eq_script
LAYER=layer_special
NAME="Player Cmd Castfs Memory"

ON=@Equip
LINK=<UID>

ON=@Targon_Char
IF !(<LINK.TARG.CANSEE>)
    LINK.SYSMESSAGE @00 You cannot see your target.
ELSE
    CONT.SAY="Kal Vas Flam"
    SERV.NEWITEM=i_player_cmd_castfs_memory_dmg
    LINK.TARG.ACT.EQUIP
    VAR.CASTFS_UID=<LINK.TARG.UID>
ENDIF
REMOVE
RETURN 1

ON=@Targon_Item
LINK.SYSMESSAGE @00 You cannot target that item.
REMOVE
RETURN 1

ON=@Targon_Ground
LINK.SYSMESSAGE @00 You cannot target the ground.
REMOVE
RETURN 1

[ITEMDEf i_player_cmd_castfs_memory_dmg]
ID=i_memory
TYPE=t_eq_script
LAYER=layer_special
NAME="player Cmd Castfs Memory Dmg"

ON=@Equip
LINK=<VAR.CASTFS_UID>
TIMER=4

ON=@Timer
//CHECK TO SEE IF TARGET IS WITHIN LINE OF SIGHT BEFORE SPELL SETS OFF
LINK.SPELLEFFECT=s_flamestrike,{40 45},1,<LINK.UID>
REMOVE
RETURN 1

Hail my friends... the script of flame strike scroll:

[ITEMDEF 01f5f]
DEFNAME=i_scroll_flamestrike
RESOURCES=i_scroll_blank, i_reag_spider_silk, i_reag_sulfur_ash
SKILLMAKE=INSCRIPTION 70.0, MAGERY 60.0
TYPE=T_SCROLL
WEIGHT=1
//CIRCLE=7
CATEGORY=Provisions - Alchemy & Magic
SUBSECTION=Scrolls - 7th Circle
DESCRIPTION=Flame Strike Scroll

ON=@Create
ATTR=ATTR_MAGIC
MOREX=s_flamestrike
MOREY=70 //{70 90}

ON=@DCLICK
ATTR=ATTR_MAGIC
IF (<SRC.MANA> < 35)
SRC.SYSMESSAGE Not mana for this spell! //CheckMana
Return 1
ELSE
SRC.CASTFS
Return 1
ENDIF

[FUNCTION CASTFS]
SERV.NEWITEM=i_fs_scroll
NEW.MORE1=51
NEW.EQUIP

[ITEMDEF i_fs_Scroll]
NAME=Delay Scroll FS
ID=i_handr_1
TYPE=T_EQ_SCRIPT
WEIGHT=0
LAYER=layer_special

ON=@CREATE
ATTR=002

ON=@EQUIP
TARGET=Select the target?
Return 1

ON=@TARGON_CHAR
if !( <SRC.TARG.CanSeeLos> )
SRC.ACTION=-1
SRC.sysmessage Target is not in line of sight <src.targ.name>.
return 1
ELSEIF (<MORE1>==51)
SRC.ACTION=-1
SRC.SAY @81 Kal Vas Flam [Scroll]
LINK=<SRC.TARG.SERIAL>
SRC.ANIM 10
TIMER=2
SRC.MANA=(<SRC.MANA>-35)
SRC.CHECKMANASPELL
src.consume=i_scroll_flamestrike
Return 1
ENDIF

ON=@UNEQUIP
if !( <SRC.TARG.CanSeeLos> )
MESSAGE Target is not in line of sight
ELSEIF (<MORE1>==51)
LINK.HITS=(<LINK.HITS>-22} /// CONTROL DE EFFECT SCROLL
LINK.SPELLEFFECT=s_harm 1.0 //DAMAGE
LINK.EFFECT 3,i_fire_column,6,15,1 //EFFECT
ENDIF

ON=@TIMER
REMOVE


Its work.. but you set the @START on spell Flamestrike to restest the i_fs_scroll on ACTION=-1

Bye fellows... =]
01-11-2017 09:07 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #6
RE: Checking for Loss of Sight
maybe you're looking for CANSEELOS

it works exactly in the same way of CANSEE, but CANSEE only check distance and CANSEELOS check distance, Z, objects blocking the line of sight, etc
01-12-2017 02:06 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)