[OASIS] [MEDIT] XP Preview

From: Tiago (tiago_ratto@terra.com.br)
Date: 08/15/02

Hi all !
I'm making an option on the medit command to preview the amount of xp that will be given to the char who kill the specified mob.
It's an quite simple code, but I'm getting some problems. There is the code:

void medit_preview_xp(struct descriptor_data *d) {
  int j=10,exp=0,i;

  sprintf(buf,"XP Test Table:\r\n");
  sprintf(buf+strlen(buf),"Level  Xp\r\n");
  i = i-10;
  for (j=1;j>20;j++)  {
    exp = MIN(max_exp_gain, GET_EXP(OLC_MOB(d)) / 3) + MAX(0, (exp * MIN(8, (GET_LEVEL(OLC_MOB(d)) - (i+j)))) / 8);
    exp = MAX(exp, 1);
    sprintf(buf+strlen(buf)," %3d  %d\r\n",i,exp);
  SEND_TO_Q("\r\nEnter new level to test. (0 to quit): ",d);

I've not forgot to add the MEDIT_PREVIEW in the oasis.h and add the necessary things to the medit_parse, the major problem is that the XP Table does not appears on the screen while testing, it's look like the for loop doesn't exists, the result on the screen is this:

R) Preview XP to levels
Q) Quit
Enter choice : r
XP Test Table:
Level  Xp

Enter new level to test. (0 to quit): 10
XP Test Table:
Level  Xp

Enter new level to test. (0 to quit): 0

I'm using a bpl19 whith OasisOLC 2.0 and DG (I don't know what version).
Well guys, I hope you can help me, thanks a lot....
PS: Sorry by the english, as I wrote in others emails, I'm not an english writer...

   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT