SphereCommunity
Archery ARGN o.o - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Archery ARGN o.o (/Thread-Archery-ARGN-o-o)



Archery ARGN o.o - Lazarus - 07-31-2012 06:35 AM

Hi! First, sry for my english.

I was trying to do a double hit archery, in the trigger ON=@hit...
I add the macefighting [works nice], swords [nice too], fencing [too]
but i can't do works the archery special [Doble hit, the second hits it's a half of the dmg]

I try this:

Code:
[FUNCTION F_ARCHER]
IF ((<ARCHERY> >= 100.0) && (<TACTICS> >= 90.0) && (Rand(2) = 1))
ACT.SOUND=1314
SYSMESSAGE @30 "Le das un doble flechazo a <ACT.NAME>"
ACT.SYSMESSAGE @30 "<NAME> Te da un doble flechazo."
ACT.EFFECT=3,i_fx_curse,16,16,0
argn1 += (<argn1> / 2)
say <argn1>
ENDIF

And too with the argn1 = <argn1> + (<argn1> / 2)
but doesn't works...

I just put the SAY <ARGN1> and tryhit with it and the say is 0... ARGN2 too, and argn3 too o.o... [everytime when i hit this ^_^].
The effect works, the sound too, the messages too, the IF too. That works flawless...


The question is: How can I change the archery dmg?
[I have the default damage system]

And: How can I desactivate the ORIGINAL SOUND of ARCHERY when I hit this special attack? .NOSOUND? or something else? xD


Thank you very much Smile


RE: Archery ARGN o.o - darksun84 - 07-31-2012 07:31 AM

Did you put <argn1> as parameter's function in the @hit ?


RE: Archery ARGN o.o - Extreme - 07-31-2012 07:45 AM

try

ON=@HIT
F_ARCHER <ARGN1>

and change the <argn1> in your F_ARCHER function to <args>


RE: Archery ARGN o.o - Lazarus - 07-31-2012 08:53 AM

(07-31-2012 07:45 AM)Extreme Wrote:  try

ON=@HIT
F_ARCHER <ARGN1>

and change the <argn1> in your F_ARCHER function to <args>


like this:
Code:
ON=@HIT
....
ELIF (<ACTION>==SKILL_ARCHERY)
  F_ARCHER <ARGN1>
SKILLGAIN ARCHERY 1
ENDIF
return 0

[FUNCTION F_ARCHER]
IF ((<ARCHERY> >= 100.0) && (<TACTICS> >= 90.0) && (Rand(2) = 1))
ACT.SOUND=1314
SYSMESSAGE @30 "Le das un doble flechazo a <ACT.NAME>"
ACT.SYSMESSAGE @30 "<NAME> Te da un doble flechazo."
ACT.EFFECT=3,i_fx_curse,16,16,0
args += (<args> / 2)
say <args>
ENDIF

I'm using the say args and the number is changing o.o
This doesn't works fine =( don't changes the damage.

i need return something like:
return <args> at the final?

Thanks!


RE: Archery ARGN o.o - darksun84 - 07-31-2012 09:12 AM

Why it's better to use args instead of argn1 in the function-body Shock ?


Btw yes, you have to return the args


RE: Archery ARGN o.o - Lazarus - 07-31-2012 11:47 AM

(07-31-2012 09:12 AM)darksun84 Wrote:  Why it's better to use args instead of argn1 in the function-body Shock ?


Btw yes, you have to return the args

Thanks! i will try it, if it don't works, i will repost here ^_^
[i can't now Tongue]
tyyyyy people ^_^


RE: Archery ARGN o.o - Lazarus - 07-31-2012 01:04 PM

At final, had see that the ARGN1 has the HALF value of the TOTAL DAMAGE [because the default bonus of dmg of sphere ^_^] and not is the incoming damage...

And i use this:

src.hits = <src.hits> - <argn1>

But! the problem is that the number that AoS combat System shows me, is the true damage, and not the new damage... but... i guess.. this works now... It's just a new advice for the players Sad


RE: Archery ARGN o.o - Extreme - 07-31-2012 01:26 PM

Code:
ON=@HIT
....
ELIF (<ACTION>==SKILL_ARCHERY)
  F_ARCHER <ARGN1>
SKILLGAIN ARCHERY 1
ENDIF
return 0

[FUNCTION F_ARCHER]
IF ((<ARCHERY> >= 100.0) && (<TACTICS> >= 90.0) && (Rand(2) = 1))
ACT.SOUND=1314
SYSMESSAGE @30 "Le das un doble flechazo a <ACT.NAME>"
ACT.SYSMESSAGE @30 "<NAME> Te da un doble flechazo."
ACT.EFFECT=3,i_fx_curse,16,16,0
args += (<args> / 2)
ACT.DAMAGE <EVAL <ARGS>> 01 <UID>
SAY <EVAL <ARGS>>
ENDIF



RE: Archery ARGN o.o - darksun84 - 08-01-2012 12:03 AM

I see a "design" problem in that script , he is using sphere original damage and with damage flag 01(divine damage) most of time the 2nd arrow hit will do more damage than the first arrow hit(this is especially true if the enemy has a very high armor value), so i suggest you to use dam_physical(02)

i mean : act.damage <eval <args>> 02 <UID> Big Grin


RE: Archery ARGN o.o - sco - 08-01-2012 01:11 AM

This is my talent for doubleshot. It is not really a doubleshot as you think of it, it is more an ability to shoot twice and to do that very fast.

You will have to tweak it according to what you want and need - yet, it is tested and works on my shard.

Code:
[events e_doubleshot_talent]
on=@hit
if (<tag0.secshot> == 0)
    tag.secshot = 1
else
    //do only half the damage
    argn1 -= <argn1>/2
    tag.secshot =
endif

on=@hitmiss
if (<tag0.secshot> == 0)
    tag.secshot = 1
else
    tag.secshot =
endif


on=@hittry
if (!<weapon>)
    return 0
elif (<weapon.type> != t_weapon_bow)
    return 0
else
    if (<tag0.secshot> == 0)
        //if first shot: slow down a bit - thats specific to my ability and can be revised to whatever
        argn1=<eval <argn1> + ((<argn1>/4)*3)>
    else
        //setting this to 1 means: on tenth of a second then secondary shot goes off
        argn1=1
    endif
endif