Jump to content
  • 0

Bonus Experience per "Tier"(level)


Question

Posted

Hello everyone, i'm fairly new to scripting so go easy on me...as i know this is probably a simple issue.

I currently have 3 items that give 5% bonus experience by themselves and they apply correctly, however, I am attempting to place them in a set. The purpose would be if base level is 99 or less they receive a 50% bonus experience gain, between levels 100-200 they receive a 75% bonus experience gain and at 200-255 they receive a 100% total bonus experience gain. I went to my "item_combo_db" and added the following script:

32508:32509:32510,{ if(BaseLevel<=99) { bonus2 bExpAddRace,RC_All,50; bonus2 bExpAddClass,Class_All,50; } if(BaseLevel==100) {{ bonus2 bExpAddRace,RC_All,75; bonus2 bExpAddClass,Class_All,75; } if(BaseLevel>=200) {{ bonus2 bExpAddRace,RC_All,100; bonus2 bExpAddClass,Class_All,100; }

As I said, learning as I go so I apologize if this is a dumb question haha. I look forward to hearing from everyone!

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
32508:32509:32510,{ if (BaseLevel < 100) { .@rate += 50; } else if (BaseLevel < 200) { .@rate += 50; } else { .@rate = 100; } bonus2 bExpAddRace,RC_All,.@rate; }

try this, your script has wrong usage of curley brackets.

Edited by Emistry
  • 0
Posted
31 minutes ago, Emistry said:

32508:32509:32510,{ if (BaseLevel < 100) { .@rate += 50; } else if (BaseLevel < 200) { .@rate += 50; } else { .@rate = 100; } bonus2 bExpAddRace,RC_All,.@rate; }

try this, your script has wrong usage of curley brackets.

32508:32509:32510,{ if (BaseLevel < 100) { .@rate += 50; } else if (BaseLevel < 200) { .@rate += 75; } else { .@rate = 100; } bonus2 bExpAddRace,RC_All,.@rate; }

made a little edit ? thanks a ton for the help! I see that I was super way off...i'm sorry if its a bother but, would you mind going about explaining why that route instead of what I went with? If not, all is well, i'm still wrapping my head around RO scripting haha.

  • 0
Posted
On 4/6/2020 at 8:41 PM, Kami675 said:

why that route instead of what I went with?

just my own preference, look shorter and simpler, its less redundant, hence easier to read.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...