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
Editing spell effects
Author Message
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #1
Editing spell effects
Hi folks,
Today im trying to make a event that triggers on @spellcast (or any other) to chage the spell effect... like:


If i use Firestrke i wanto to give a bonus of 20% on damage, so mt FS will deal 48 of damage.

If i use a healing spell, i want to heal more 20%.

Something like that, someone can help me?

Thanks

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
11-24-2012 01:45 PM
Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #2
RE: Editing spell effects
For heal spells you can change the effect of s_heal and s_greater_heal. Here's an example:
Code:
on=@spelleffect
if (<serv.spell.<argn1>.defname>==s_heal) || (<serv.spell.<argn1>.defname>==s_greater_heal)
  if !(<tag0.tmp_heal>)
    tag.tmp_heal=1
    serv.spell.<argn1>.effect += <eval <eval <serv.spell.<argn1>.effect> *<tag0.bonus_heal>> /100> //assuming tag.bonus_heal if your 20% value (20)
    spelleffect <argn1> <argn2> <src.uid> //resend the heal spell with the new effect added
    serv.spell.<argn1>.effect -= <eval <eval <serv.spell.<argn1>.effect> *<tag0.bonus_heal>> /100> //remove the bonus resetting the effect
    tag.tmp_heal=
  endif
endif

As for firestrike? or maybe you meant Flamestrike, you can use @gethit since it does damage.
Code:
on=@spelleffect
if ( <serv.spell.<argn1>.flags> & spellflag_damage )
  tag.spell_argn=<argn1>
  tag.spell_strength=<argn2>
endif

on=@gethit
if ( <argn2> & 04 )
  if (<serv.spell.<tag0.spell_argn>.defname>==s_flamestrike)
    argn1 += <eval <eval <argn1> *<tag0.bonus_flamestrike>> /100>
  endif
endif

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
11-25-2012 08:06 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #3
RE: Editing spell effects
Skul, really thanks for help!


This works just like i want!!!! thanks!!!

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
11-25-2012 12:18 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)