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
Black Hole spell help
Author Message
falsemirage
Apprentice
*

Posts: 13
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: May 2013
Reputation: 0



Post: #1
Black Hole spell help
Hello guys
So I'm trying to script a black hole spell but I got stuck Tongue

how can I check the chars around caster's target ?

This is how I want it to work. You select the spell, target comes up and you target ground or char (doesn't matter). Spell checks around the targeted area and brings every char right on top of casters target.

is it possible ?

Code:
[spell 102]
DEFNAME=s_blackhole
NAME=Black Hole
SOUND=snd_SPELL_CLUMSY
RUNES=
CAST_TIME=2.0
RESOURCES=
RUNE_ITEM=i_rune_CLUMSY
//SCROLL_ITEM=i_scroll_CLUMSY
FLAGS=SPELLFLAG_SCRIPTED | SPELLFLAG_TARG_OBJ | spellflag_area
//EFFECT_ID=i_fx_curse
EFFECT=3,15
//DURATION=2*60.0,3*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

on=@select
return 6

on=@start
src.say Black Hole
endif

on=@success
forchars 4
p <src.targp>
update

this is what I got but this just checks around the caster and if there's anything it brings them to targeted area with the caster.
01-22-2016 04:13 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: Black Hole spell help
try this and use @effect

PHP Code:
on=@success
local
.areaRadius//for spell area effect the default radius value is 4

on=@Effect  //with SPELLFLAG_TARG_OBJ also item will be affected by the spell.
= <src.p>
update 
(This post was last modified: 01-22-2016 07:24 PM by darksun84.)
01-22-2016 07:14 PM
Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #3
RE: Black Hole spell help
I think its better using an item.

on=@start
serv.newitem=i_black_hole
new.timer=1
new.p=targp


[itemdef i_black_hole]

on=@timer
forchars 4
p <src.targp>
update
01-23-2016 05:11 AM
Find all posts by this user Like Post Quote this message in a reply
falsemirage
Apprentice
*

Posts: 13
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: May 2013
Reputation: 0



Post: #4
RE: Black Hole spell help
Thank for the replies!

(01-22-2016 07:14 PM)darksun84 Wrote:  try this and use @effect

PHP Code:
on=@success
local
.areaRadius//for spell area effect the default radius value is 4

on=@Effect  //with SPELLFLAG_TARG_OBJ also item will be affected by the spell.
= <src.p>
update 

Ok this kinda works I had to change p = <src.p> to p = <src.targp>

now I have 1 more problem when I cast it it brings caster to that position as well can I prevent that ?
01-23-2016 09:22 AM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #5
RE: Black Hole spell help
on=@Effect //with SPELLFLAG_TARG_OBJ also item will be affected by the spell.
if !(<uid>==<src>)
p = <src.p>
endif
update
01-23-2016 10:45 AM
Find all posts by this user Like Post Quote this message in a reply
falsemirage
Apprentice
*

Posts: 13
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: May 2013
Reputation: 0



Post: #6
RE: Black Hole spell help
@azmanomer Thanks!

also thanks to everyone !
01-23-2016 11:47 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)