Jump to content
  • 0

My getrefine() script isn't working.


PedroProplayer

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   4
  • Joined:  10/10/13
  • Last Seen:  

I am trying to make a custom weapon that gives extra bonuses depending on the refine rate(same concept as glorious weapons).

 

What I want is the following:

 

STR + 20, AGI + 15, DEX + 10

Every refine level grants a 2% reduction from Ranged Attacks(20% at +10).

At +4, 20% reduction from Demi Human.
At +7, Perfect Dodge+30
At +9, grants immunity to the Dispel effect(same as Rogue Spirit).
At +10, immunity to knockback-effect. Indestructible.

 

I left out the Indestructible, and the Ranged reduction out for the timebeing, while I tested the other effects.

 

I've run into two separate problems. First one is that I've no idea how to protect against the Dispel effect. I believe the line that protects against it is on the Dispell skill itself, it detects Rogue Spirit and fails. I've no idea how to mod the skill to also detect the weapon, so I need help with that.

 

The second problem is that the script I wrote doesn't work. I wrote:

 

{bonus bStr,20; bonus bAgi,15; bonus bDex,10; bonus bAtkEle,Ele_Holy; if(getrefine() > 3) { bonus2 bSubRace,7,20}; if(getrefine() > 6) { bonus bFlee2,30};if(getrefine() > 9) { bonus bNoKnockback,0}},{},{}

 

When I run the server, the effect isn't there. The weapon does nothing. If I delete the getrefine segments and only use...

 

bonus bStr,20; bonus bAgi,15; bonus bDex,10; bonus bAtkEle,Ele_Holy;

... it works fine, so the problem is somewhere on the getrefine(), although I wasn't able to figure out what's making it not work. I need to write a series of weapons using similar effects, so I am stuck on this problem for now. Anybody can help me out?



Okay, I got it to work now, after two days. Rewriting it from the bottom up solved the issue. Let me post the working script for reference:

 

{ bonus bStr,20; bonus bAgi,15; bonus bDex,10; bonus bLongAtkDef,getrefine()*2; if(getrefine() > 3) bonus2 bSubRace,RC_DemiHuman,20; if(getrefine() > 6) bonus bFlee2,20; if(getrefine() > 9) bonus bNoKnockback,0; if(getrefine() > 9) bonus bUnbreakableWeapon,0;; bonus bAtkEle,Ele_Holy;},{},{}

Now I only have the first issue: How do I make Dispell fail if cast on a player using a +9 or higher version of this weapon?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...