SphereCommunity
I have an idea about item,but need help... - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: I have an idea about item,but need help... (/Thread-I-have-an-idea-about-item-but-need-help)



I have an idea about item,but need help... - alucardxlx1986 - 08-23-2014 01:05 PM

First of all,sorry for my poor English...
I want a system like one of Dungeon and Fighters system..
That system make weapons and amors power-up..
I don't know other country's DNF...But in China,it's not always successed...maybe get power-down or broken and disappeared..

For example
an axe
I use that system to make it power up,and shows +1 axe,and damage get little higher,and power up this +1 axe,show +2 axe,and damage get higher again,but it's not always success like just i said,maybe +7 axe after do this,it will down to +4 axe,or even broken...

I want somebody can help me,inspire me.

Thanks a lot...


RE: I have an idea about item,but need help... - dagger4k - 08-25-2014 11:50 PM

you could script something that adds a modifier to all damage done by a player, so something like this
Code:
[Events e_player]
on=@hit
            var.damage = <eval <argn1> + (<argn1> + <tag.power>)>
        ARGN1 = <var.damage>

on=@click
IF (<ACT.TYPE> == t_sword)
message Power +(<eval <act.tag.power>)
message <act.name>
endif    
return 1

Then you can make your power up / down runes add tags to your weapons Thus giving your mele attacks more power. doing it this way you won't have to go through and change each item / add new events to each individual old and new weapon....

Code:
[Itemdef i_new_sword]
id=i_sword_viking
name = New Sword
tag.power=0

This is how I would go about it anyway... You can also add a success / fail system in adding the power up runes etc.


RE: I have an idea about item,but need help... - alucardxlx1986 - 08-28-2014 04:45 PM

(08-25-2014 11:50 PM)dagger4k Wrote:  you could script something that adds a modifier to all damage done by a player, so something like this
Code:
[Events e_player]
on=@hit
            var.damage = <eval <argn1> + (<argn1> + <tag.power>)>
        ARGN1 = <var.damage>

on=@click
IF (<ACT.TYPE> == t_sword)
message Power +(<eval <act.tag.power>)
message <act.name>
endif    
return 1

Then you can make your power up / down runes add tags to your weapons Thus giving your mele attacks more power. doing it this way you won't have to go through and change each item / add new events to each individual old and new weapon....

Code:
[Itemdef i_new_sword]
id=i_sword_viking
name = New Sword
tag.power=0

This is how I would go about it anyway... You can also add a success / fail system in adding the power up runes etc.

thanks a lot