Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spellflag_Targ_XYZ and Spellflag_Area
Author Message
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #1
Spellflag_Targ_XYZ and Spellflag_Area
I´m trying to replicate some default spells, but scripting myself to have a better control about his functions.

In my new teleport spell:

Code:
[Spell 1120]
DEFNAME = s_teleportation
NAME = Teleportation
SOUND = snd_SPELL_TELEPORT
RUNES = UJ
CAST_TIME = 3.0
RESOURCES = 2 i_blood_moss
RUNE_ITEM =
SCROLL_ITEM = i_scroll_teleportation
FLAGS = SPELLFLAG_TARG_XYZ | SPELLFLAG_AREA
EFFECT_ID =
EFFECT = 0,0
DURATION = 0,0
MANAUSE = 28
SKILLREQ = MAGERY 95.0
INTERRUPT = 0.0,0.0
GROUP = 4

ON=@SUCCESS
    IF (<SRC.DISTANCE <TARGP>> <= 8)
        SRC.P = <TARGP>
        SRC.UPDATE
    ELSE
        SRC.SYSMESSAGE The target is too far away
        RETURN 1
    ENDIF

The strange thing is when i put only in FLAGS= SPELLFLAG_TARG_XYZ, the spell works correctly, but at the end, returns me a failed spell cast. ¿?

When I put in FLAGS = SPELLFLAG_TARG_XYZ | SPELLFLAG_AREA, then there is no fail at the end. ¿?

This only happens to me with SPELLFLAG_TARG_XYZ.
SPELLFLAG_TARG_CHAR or SPELLFLAG_TARG_ITEM works fine without anything more.

Anyone experienced this? Seems a bug, and I have to put always this two spellflags together.
03-29-2013 08:27 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Spellflag_Targ_XYZ and Spellflag_Area
SPELLFLAG_AREA is for area effect spells like meteor swarm, earthquake and so on.

I think you have to add SPELLFLAG_SCRIPTED
03-29-2013 08:51 PM
Find all posts by this user Like Post Quote this message in a reply
Gil Amarth
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: May 2012
Reputation: 0



Post: #3
RE: Spellflag_Targ_XYZ and Spellflag_Area
Yep, you are right.

The strange thing is with _TARG_CHAR and _TARG_ITEM I didn´t need to add _SCRIPTED. But if it works, perfect.

Thank you! Smile
03-29-2013 09:11 PM
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)