[Guide] Friend Exp exchanged into EPs

09/01/2009 14:48 SoulNecturn#1
ok, not sure if anyone interested, but this is simplest way to give players more pleasure ;)

Description:
Does under your server players cant use anymore Friend Exp?? They have max level but firiend Exp still rising and rising...

well there is an way out - you can make an even for them - for instance: once per week you can exchange this gathered friend exp of all players from certain group and give them for it EP..

HOW?

Code:
update cq_user set Friend_share = 23998212 where Friend_share > 23998212;
23998212 - means that they will get max 2 mill ep

you can for example change this limit to 1millep so it will be
23998212/2 = 11999106

or make it 5 mill = 11999106*5 = 59995530
I hope you catch this limit ;)

If you dont wanna limit it - just dont run this query never .. ;) BUt if you want - always run it before this next one ;)


Code:
update cq_user set Friend_share = Friend_share*0.16668 where level = 255;
update cq_user set Friend_share = Friend_share/2 where level = 255;
update cq_user set emoney = emoney + Friend_share where level = 255;
update cq_user set Friend_share = 0 where level = 255;
now:

** All this codes you must use while maintenance (to be sure that no characters are online so it will 100% work)

** first code you can use in query to limit max ep that players will receive after using next query...

** this second query that has 4 actions will:
-> convert their exp into certain number that will correspond to this that is visible under client (in percent) (since in DB this number isnt same)
-> will divide this number into 2
-> will grow certain player ep amount for additional number from this exp convertion
-> will reset all players friend share to 0

AND all this is set here only for players who have 255 lvl (I believe most server has 255lvl peak - so from this time friend exp is useless)

OK more info about this feature can be read under our web:
[Only registered and activated users can see links. Click Here To Register...]

I know its hand work - but it takes seconds to do it - but many players can benefit and feelll happy ;)

Regards
09/01/2009 15:56 funhacker#2
just a suggestion I would not know if this is the right syntax because we are implamenting a simliar system but instead it will be user controlled not maintenance.

I would suggest another table if you wanted to limit the amount of EP given each day/week/month. Without removing the whole friendshare exp. This way they are limited to their 2mil (your example) per script run but do not lose the total accumalated.

TableName cq_award
Fields:
id,amount
Code:
update cq_award 
using cq_award inner join cq_user 
set cq_award.id = cq_user.id,
cq_award.amount = cq_user.Friend_Share 
where 
level > 254;

update cq_award 
set amount = 23998212 
where 
amount > 23998212;

update cq_user using 
cq_user inner join cq_award 
on cq_user.id = cq_award.id 
set cq_user.emoney = cq_user.emoney + cq_award.amount*0.16668,
cq_user.Friend_Share = cq_user.Friend_Share - cq_award.amount;
I would suggest testing this first if you were going to try in theory this should work but I never say anything will work untill tested. :)
I am not trying to shoot your ideas soul just adding a suggestion if you didn't want to completely remove their friendshare.
09/01/2009 16:29 SoulNecturn#3
yea I know what you mean - your version will be probably advanced and more user friendly :P ... well I didnt have fun to prepare software that will give players ability to do it by hand ... but like I wrote its simple fastest version just for run inside query ;)

and yea any upgrades are welcome - I believe many servers would use it in future as cool for players ;)