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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with custom spell
Author Message
kstanton03
Apprentice
*

Posts: 2
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Dec 2016
Reputation: 0



Post: #1
Issue with custom spell
I wrote a script for a regen spell. It's still in the early stages. The script works fine when a player targets themselves; however, if the player target's another player the timer equips to the caster and not the person being casted on. Any help / suggestions would be appreciated.


[Spell 200]
DEFNAME=s_regen_rank1
NAME=Regen
SOUND=snd_SPELL_GREATER_HEAL
RUNES=IVM
CAST_TIME=0
RESOURCES=
RUNE_ITEM= //i_rune_GREATER_HEAL
SCROLL_ITEM=i_scroll_GREATER_HEAL
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_FX_TARG|SPELLFLAG_GOOD|spellflag_playeronly

ON=@Start
ANIM 17
SAY @,3,1 Casting Regen

ON=@Effect
local.healpower=12
local.spelltics=5

IF (<TAG0.BUFFS.REGEN>)
src.sysmessage That character already has this spell in effect.
return 1
else //NO BUFF ON
src.tag.mp -= 19
SERV.NEWITEM i_timer_regen
NEW.TAG.HEALPOWER=<local.healpower>
NEW.TAG.TICSLEFT=<local.spelltics>
NEW.EQUIP
tag.buffs.regen=<local.healpower>
RETURN 1
end if

return 1


[ITEMDEF i_timer_regen]
ID=i_memory
TYPE=t_eq_script

ON=@Create
TIMER = 3

ON=@Timer

if (<tag.TICSLEFT> < 1)
cont.TAG.BUFFS.REGEN=
REMOVE
return 1
end if

if (<cont.flags>&statf_dead)
cont.TAG.BUFFS.REGEN=
REMOVE
RETURN 1
end if

CONT.EFFECT=3,01153 ,9,30,1, 03e

if (<cont.tag.hp> < <cont.tag.maxhp>)
cont.tag.hp += <tag.HEALPOWER>
end if

if (<cont.tag.hp> > <cont.tag.maxhp>)
cont.tag.hp = <cont.tag.maxhp>
end if

local.newhits = ((<cont.tag.hp>*100) / <cont.tag.maxhp>)
cont.HITS = <local.newhits>

TAG.TICSLEFT -= 1
//cont.sysmessage You have <eval <tag.TICSLEFT>> tics to go.
//cont.say I got healed for <eval <tag.healpower>>
TIMER 3
RETURN 1
03-19-2017 06:08 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Issue with custom spell - kstanton03 - 03-19-2017 06:08 AM
RE: Issue with custom spell - Leonidas - 03-19-2017, 01:59 PM
RE: Issue with custom spell - kstanton03 - 03-19-2017, 07:13 PM
RE: Issue with custom spell - Artyk - 03-21-2017, 07:57 AM

Forum Jump:


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