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
Enhancing the power or duration if a spell through an event
Author Message
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #1
Enhancing the power or duration if a spell through an event
Hey there, Ran into a problem. my bro made an idea on making an event which strengthens a particular spell. I've had a go at making this event happen but it doesn't seem to work. there are no console errors. is it just not possible or have I done something wrong?

[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==20)
ARGN3=30
SRC.SOUND=480
RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==30)
ARGN2=65
SRC.SOUND=480
RETURN 1
ENDIF
04-24-2014 06:58 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #2
RE: Enhancing the power or duration if a spell through an event
return 1 prevents the object from being affected by the spell.
04-24-2014 07:05 PM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #3
RE: Enhancing the power or duration if a spell through an event
Updated:


[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =20)
ARGN3=30
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =30)
ARGN2=65
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

Still nothing, i added a say, and nothings even appearing.
04-24-2014 07:24 PM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #4
RE: Enhancing the power or duration if a spell through an event
On the second example, why are you using ARGN2?

http://wiki.sphere.torfo.org/index.php/@SpellEffect

It says on Wiki: "ARGN3 - A multiplier for the spell's duration or effect."

From this, I understand that you have to multiply it from a number.
Oh well, just trying to help. ;(
04-24-2014 07:44 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #5
RE: Enhancing the power or duration if a spell through an event
(04-24-2014 07:24 PM)UltimaAku Wrote:  Updated:


[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =20)
ARGN3=30
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1> =30)
ARGN2=65
SRC.SOUND=480
SRC.SAY WORKED!
//RETURN 1
ENDIF

Still nothing, i added a say, and nothings even appearing.

did you put == instead of =
04-24-2014 08:01 PM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #6
RE: Enhancing the power or duration if a spell through an event
yea sorry, lol it is ==, still nothing

(04-24-2014 07:44 PM)pinku Wrote:  On the second example, why are you using ARGN2?

http://wiki.sphere.torfo.org/index.php/@SpellEffect

It says on Wiki: "ARGN3 - A multiplier for the spell's duration or effect."

From this, I understand that you have to multiply it from a number.
Oh well, just trying to help. ;(

I wasn't entirely sure, I presumed that the strength of the spell was for damage spells which is ARGN2, but duration for poison is ARGN3. I don't know if it's correct but its a theory. but even when swapping them around still changes nothing.
(This post was last modified: 04-24-2014 09:08 PM by UltimaAku.)
04-24-2014 09:06 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

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



Post: #7
RE: Enhancing the power or duration if a spell through an event
AS dark said... IF (<ARGN1> =30) must be IF (<ARGN1> == 30)

There are differences between
Argn1=30 // Sets it as 30
if (<argn1> == 30 ) // == is used for comparisons.
04-24-2014 09:20 PM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #8
RE: Enhancing the power or duration if a spell through an event
Updated:

[EVENTS e_poison_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==20)
ARGN3=30
SRC.SOUND=480
SRC.SAY WORKED!
RETURN 0
//RETURN 1
ENDIF

[EVENTS e_lightning_buff]

ON=@SPELLEFFECT
IF (<ARGN1>==30)
ARGN3=65
SRC.SOUND=480
SRC.SAY WORKED!
RETURN 0
//RETURN 1
ENDIF

Still got nothing, i can't work out why...
04-24-2014 09:26 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

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



Post: #9
RE: Enhancing the power or duration if a spell through an event
Did you install the events in the caster or in the target? because they have to be installed in the target
04-24-2014 09:41 PM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #10
RE: Enhancing the power or duration if a spell through an event
(04-24-2014 09:41 PM)darksun84 Wrote:  Did you install the events in the caster or in the target? because they have to be installed in the target

misread, ill try it when i get back *smacks head*
(This post was last modified: 04-24-2014 11:17 PM by UltimaAku.)
04-24-2014 10:42 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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