Page 1 of 1

Monster Points Rewards needs a major overhaul

Posted: 25 Jan 2007, 23:44
by namaaa
As one gets up in lvls, the monster rewards points seem to stack up, e.g. 20,000 30,000 +. Now the way you have it set up, when I want to use these points, I must go through 3-4 clicks per 300 or so points. That is a pain, to say the least.

I propose an easy solution, have the points/rewards done the first time asked. As a batch.

If you were to have it divide # of reward points by current # taken per reward, and round down to nearest whole integer, using a loop statement to give the rewards, then the rewards can be given the first time asked.


I am no programmer by any stretch of the imagination, so bear with me. Also I am making up most of this, so if value names don't match, well you can figure it out.


Let's use P = Points earned R = Reward Points subtracted per reward. N = # of rewards earned X = Reward itself


{

Divide P by R rounding to next lowest whole integer

If N => 1 Then

Get random reward

Give random reward

Echo You pick up X (in dialog box only)

Else Echo You don't have enough points to redeem.

}


I hope this makes some sense, as i said I am no programmer. But this may keep the higher lvl chars from having to stand by Rewards Master for 5+ minutes getting single rewards.

Peace

Paul

Posted: 26 Jan 2007, 00:07
by Nickman
Is the goal to give as much awards as possible for the monster points you have? So that you spend all your monster points at once instead of having toc lick for every reward?

Then the pseudo code would be more like this:

Code: Select all

{ 
     Divide P by R rounding to next lowest whole integer 
     If N => 1 Then {
          for(i=0; i <=N; i++){
               Get random reward 
               Give random reward 
               Echo You pick up X (in dialog box only)
          }
     } Else {
          Echo You don't have enough points to redeem.
     }
}
A little bit more accurate ;)

But maybe if this is going to be implemented, you should be able to choose how many monster points you whant to spend, since maybe you want to save some for later? :)

Posted: 26 Jan 2007, 01:54
by CurtisMJun
But why would you want to save them for later? What benifit would you get from that?

Posted: 26 Jan 2007, 04:49
by namaaa
I can't see why any high lvl char 50+ would want to hoard the Monster reward points



But you could ask how many points to spend, would have to do a points check.

So

P = Points Earned P1 = inputted # from player

Input P1

if P1 > P Echo your don't have that many points to exchange.

Else Previous Subroutine (from post 1)


I think it is doable, not that hard to integrate with the existing Rewards Module, as all the variables are already in place so that shouldn't be much of an obstacle.

I would write it myself, but as I stated I am not a programmer.


Peace

Paul

Posted: 26 Jan 2007, 14:19
by Crush
This is an open source game.

Why don't you learn the eAthena scripting language (it is really simple, just google for a tutorial) and write a better script?

You can find the current script (like every other server data file) on the svn repository: http://themanaworld.svn.sourceforge.net ... iew=markup

Posted: 26 Jan 2007, 16:36
by Dr Wahl
i too would be interested in some scripting on eAthena server, but would it be worth our time? Seeing as how we will be migrating to the new server. Is there any forcast for an estimated time for the new server? 1 year? 2 year? If it is more than 6 months, I would be interested in picking up eAthena scripting, but if we are changing platforms in less than 6 months, I feel it might be a waste of my time.

Posted: 26 Jan 2007, 16:37
by Crush
I hope that we can switch to the new server platform in this year but it is far too early to tell.

Posted: 26 Jan 2007, 16:50
by Platyna
If eAthena scripting is easy, I am a pope...

Regards.

Posted: 26 Jan 2007, 17:43
by namaaa
I have laid everything out, so it shouldn't be a problem for someone who knows the scripting to do it. Also I have no compiler.

Posted: 26 Jan 2007, 17:57
by Crush
That's not how open source projects work. When you want something to be done you do it yourself.

You don't need a compiler. Scripts are interpreted and not compiled. You just need eAthena to test it. You can download the windows version here:
http://forums.themanaworld.org/viewtopic.php?t=1909
and the linux version here:
http://forums.themanaworld.org/viewtopic.php?t=1701

Posted: 26 Jan 2007, 18:03
by namaaa
Ok got it, now how do I use the script you sent me to? How do I save it, and how do I run/compile it??

Posted: 26 Jan 2007, 18:08
by Crush
namaaa wrote:Ok got it, now how do I use the script you sent me to? How do I save it, and how do I run/compile it??
When you download the windows version of the server or the linux version with the server data it will already be set up like on the original server. All you have to do is to change the script in the subfolder \npc\tulimshar\reward-master.txt

To test it run the three server programs (char-server, login-server and map-server), connect to it with your normal tmw client (enter 127.0.0.1 as server in the login dialog), register a new account on your server and speak to the npc.