xazax

Replace hard coded statuses with scripted ones

Recommended Posts

Hi!

First of all sorry for being inactive, I've been very busy lately, and still am, however noticed something.

There are some statuses such as the newly added SC_INCMHP.

Well, honestly, I don't really like that we add new statuses on each bonus, simply we do not need so many statuses, futhermore we want to be more flexible, to give users the possibility to create their own statuses.

There is a nice script command called autobonus. It can attach a bonus script to the user as a status, on attack, hit etc. We should create a similar command, which just simply starts a status, something like autobonus does. This way we can simply remove some statuses, and replace them with scriptet ones, which are more customizable.

Maybe we can even add support for adding status icons to those statuses.

Opinions?

  • Upvote 2

Share this post


Link to post
Share on other sites

I like the idea. Everything that make changes easiers for user is welcome.

Share this post


Link to post
Share on other sites

I agree..however how can we make it possible??

IMO is to do something like this

bonusname,n,m,y,x;

where n is the variable to change like maxHP,SP,aspd, etc

m is a value where is a fixed value

y is a value that is a percentage value

then x is for the duration...

what do you think???

Share this post


Link to post
Share on other sites

My idea would be something like customstatus "statusname","itemscript", duration, icon;

example:

customstatus "OP buff", "bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdRate,2;", 180000, SI_BERSERK;

This would display a status named OP buff, with the icon of berserk, that last 180 sec and gives 20% max hp 15% max sp and 2% aspd bonus.

  • Upvote 5

Share this post


Link to post
Share on other sites

=O I agree

Share this post


Link to post
Share on other sites

Bump well, that is really great xD

Share this post


Link to post
Share on other sites

I love this idea, but would this cause more strain on a server then the current way?

Share this post


Link to post
Share on other sites

In my opinion using scripted statuses would not reduce performance significantly (of course they would not perform as good as hard coded ones, but I doubt that overhead would be noticeable even for popular servers). However maintaining scripted statuses would be easier.

  • Upvote 1

Share this post


Link to post
Share on other sites

the question here is that, would it be possible to a script to interact with the client? specially with the icon part. i've created hardcoded statuses myself and i think it might be hard to make it variable-like as for a script well, i dunno. just my thoughts.

Share this post


Link to post
Share on other sites

Status icon would not be a problem, I'm almost 100% sure about that. As long as the selected status icon is available on the client side of course.

Share this post


Link to post
Share on other sites

i see. but still, status icon definitions would be hardcoded. but yeah, if that's the case then this one is good.

Share this post


Link to post
Share on other sites

This was already implemented in the form of the 'bonus_script' command.

Share this post


Link to post
Share on other sites