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-nmm6 (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-nmm6 (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-nmm6 (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-nmm6 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My Dragon Breath needs improvement
Author Message
Crusader
Master
**

Posts: 254
Likes Given: 7
Likes Received: 19 in 12 posts
Joined: Apr 2012
Reputation: 6

Erehwon New Hera

Post: #1
My Dragon Breath needs improvement
How should it work:
the dragon fire on an enemy, but the fire reach the ground some meters BEFORE the enemy, doing a line of fire that goes along a straight line that hits also the enemy and goes thorught it.
so, if X is the fire breathed and Y is the enemy is something like this:

=O*breath* -> xxyxxxx

or u can better see here: http://www.youtube.com/watch?v=yGpJZAMPKV0

That's what i did:

Code:
[SPELL 600]
DEFNAME=s_dragon_Breath
NAME=Soffio del Drago
CAST_TIME=1.5
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM | SPELLFLAG_FX_TARG | SPELLFLAG_RESIST | 010000
MANAUSE=1
RESOURCES=
SKILLREQ=MAGERY 0.0
INTERRUPT=100.0,40.0

ON=@SELECT
IF (<ARGN3> > 2)
ENDIF
RETURN 0

ON=@START
    SRC.EMOTE Soffia!
    RETURN 0

ON=@EFFECT
serv.log sorg: <src.p> | dest: <p>
local.newcalc1= <eval <src.p.x> - <p.x>>
local.newcalc2= <eval <src.p.y> - <p.y>>
IF <dlocal.newcalc1> <= 0
    local.newcalc1= <eval (<p.x> - <src.p.x>)/3>
    var.newsourcex= <eval <src.p.x> + <local.newcalc1>>
    var.newdestx= <eval <p.x> + <local.newcalc1>>
ELSE
    local.newcalc1 = <dlocal.newcalc1>/3
    var.newsourcex= <eval <src.p.x> - <local.newcalc1>>
    var.newdestx= <eval <p.x> - <local.newcalc1>>
ENDIF
IF <dlocal.newcalc2> <= 0
    local.newcalc2= <eval (<p.y> - <src.p.y>)/3>
    var.newsourcey= <eval <src.p.y> + <local.newcalc2>>
    var.newdesty= <eval <p.y> + <local.newcalc2>>
ELSE
    local.newcalc2 = <dlocal.newcalc2>/3
    var.newsourcey= <eval <src.p.y> - <local.newcalc2>>
    var.newdesty= <eval <p.y> - <local.newcalc2>>
ENDIF

// src chi soffia
// [] il target
SFX snd_spell_explosion
var.speed=3
local.diff = 2
for x 0 1
    for y 0 3
    var.speed +=2
    firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
    firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
    firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
    firebreath <eval <var.newsourcex> + <local.x> +- <local.diff>> <eval <var.newsourcey> +- <local.y> + <local.diff>> <eval <SRC.p.z>+8>
    endfor
endfor
var.newsourcex
var.newdestx
var.newsourcey
var.newdesty
var.speed
RETURN 0

[FUNCTION firebreath]
//local.t_x=<argn1>
//local.t_y=<argn2>
//local.t_z=<argn3>
sector.allclients sendpacket 0c0 00 D00 D00 W036b0 W<eval <var.newsourcex>> W<eval <var.newsourcey>> B<eval <argn3>> W<eval <var.newdestx>> W<eval <var.newdesty>> B<eval <p.z>+2> B<var.speed> B016 00 00 00 B01 D026 D03

This kind of 'work' but sometimes the firebreath doesn't "really" hit the enemy (depending on the corner) and it goes like down the z (even if i put an higher z) resulting with a 'cut' of the firebreath animation. Plus i'd like to do a longer fire line; plus, i'm not really certain on how to do apply damage. Thinking about "forchar 3" in 3 middle point during the fire line. but ...yeah dunno.

Suggestion & fix are appreciated
10-31-2013 08:15 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
My Dragon Breath needs improvement - Crusader - 10-31-2013 08:15 PM

Forum Jump:


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