Page 1 of 1

Zone Bonuses

PostPosted: Tue Dec 15, 2009 6:17 pm
by stephenxpimentel
my newest project is Zone Bonuses, i'm wondering if they should be based on Region though, instead of map tile.

Heres the research i've done on it so far.

http://camelotherald.com/section.php?id=42

thats mythics Zone Bonuses.

now, i see that ALL RvR zones get double xp, double coin (which btw i can't find the code to add a % increase to coin drop), and then in select zones they give a bonus 25% rps.

My only problem with doing it zone-by-zone is that theres alot of zones, and they are all getting the same bonuses, except for the NF zones. or am i reading this incorrectly?

DF gets Bonus 25% rps, 50% bps on all servers.
ALL CLASSIC ZONES get bonus 50% xp, 200% coin drop (mordred its 300% xp)
RVR ZONES get 200% xp 200% coin (mordred this is SI+ zones)
- Forest Sauvage, Snowdonia, Uppland, Yggdra Forest, Cruachan Gorge, Mount Collory : +25% RPS


ATM i have all the code completed (if it is based on RegionID and not ZoneID) Except for coin Drop (the code is there, just not sure where to place it, my find feature on my C# doesnt work!!!!!! so i cant find where ServerProperties.Properties.MONEY_RATE is called.)


my current code for it takes the already introduced rates, gets the RPs/Bps/Xp for kill, then adds to it via % of that if in a zone w/ bonuses. and is DB based of course :D

Any Suggestions would be great :D

Re: Zone Bonuses

PostPosted: Tue Dec 15, 2009 6:25 pm
by Graveen
yay, why not ?

Re: Zone Bonuses

PostPosted: Tue Dec 15, 2009 8:01 pm
by stephenxpimentel
i'm going to release this in a second, i'm making the command to add bonuses to the DB via /zonebonus(/zone works) add <rp bonus> <bp bonus> <xp bonus> <coin bonus>

i'm just wondering if i should make it so that if the zone already has bonuses, it should change the values ?

BTW this updates in-game, no restart needed to change the bonuses :)

Re: Zone Bonuses

PostPosted: Thu Dec 17, 2009 3:15 pm
by stephenxpimentel
kk here it is! :D

it works perfect imo, nothing in DB then no bonus, etc. none in ur zone no bonus, i haven't made a command yet to add the bonuses in-game, but it does update in-game if changed in DB!

Re: Zone Bonuses

PostPosted: Thu Dec 17, 2009 3:26 pm
by Tolakram
Your patch includes startuplocations. ;)

Why call it zone bonuses if it's using regions? I realize live calls it zone bonuses, but this might be confusing.

expTotal = (long)(expTotal * ServerProperties.Properties.XP_RATE) + (Convert.ToInt64(((expTotal * ServerProperties.Properties.XP_RATE) * regionBonusXps) / 100));


edit:

not sure this is correct but too busy at work to run through the numbers. If a mob is worth 2000 XP and server is 2X and zone bonus is 100% (double xp) will the outcome if 8000 be correct?

Re: Zone Bonuses

PostPosted: Thu Dec 17, 2009 4:19 pm
by stephenxpimentel
yes :D

is correct ;)

tested, made an npc to give specified RPs, BPs, XP, /whisper 1200, thats how many it gives un-modified, then u click the modified and it gives 1800 rps, with a bonus of 50%, 1200 / 2 = 600, 1200 + 600 = 1800. :D works nicely, and yes i realized that Zone Bonuses MIGHT get confusing going by Region, but the way i looked at it was to do it my zoneID would first of all, take forever, lets think about it.

Alb Classic alone has... Camelot, Camelot Hills, Campacorentin Forest, Salisbury Plains, Black Mountains North/South, all of the dungeons, i know thats not all i've missed alot and tbh i cba to figure them all out, So maybe it should be "Region Bonuses", but thats a minor change, i just wanted it to match live's name for it :D

Re: Zone Bonuses

PostPosted: Thu Dec 17, 2009 4:20 pm
by Decatur
One may override the other (kind of like having two classes with the same ID), or they would be 8000.

Re: Zone Bonuses

PostPosted: Thu Dec 17, 2009 4:28 pm
by stephenxpimentel
One may override the other (kind of like having two classes with the same ID), or they would be 8000.
this is how it works


XP * xp_rate = baseXP

then it takes baseXP and does this...

baseXP + (baseXP * regionBonus / 100);

so lets say its 50% bonus in ur region, u use 2x xp, and ur getting 100 xp

a = 100*2 = 200
b = 200/2 = 100

You get - a + b xp so 300 :D

EDIT: Patch File above is Fixed.