Jump to content
  • 0

no experience gained when level 99


doommap

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   0
  • Joined:  11/21/12
  • Last Seen:  

I Tried this script somwhere here in rathena which is made by "darristan"

OnNPCKillEvent:

if (BaseLevel >= 150)

getexp - getmonsterinfo(killedrid,3), - getmonsterinfo(killedrid,4);

end;

and it doesn't work for me or should i say i edited some and i made it like this

- script noexp -1,{
OnNpCKillEvent:
if (BaseLevel == 99)
getexp - getmonsterinfo(killedrid,3), - getmonsterinfo(killedrid,4):
end;
}

what im trying to do is if a player reaches level 99 (255 max) his leveling will stop

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Using a npc script on this kind of situation is ugly.. It will still display the EXP gain.. Do it from within the source..

Index: pc.c
===================================================================
--- pc.c (revision 16820)
+++ pc.c (working copy)
@@ -5573,6 +5573,9 @@
 if(sd->bl.prev == NULL || pc_isdead(sd))
  return 0;

+ if(sd->status.base_level >= 99 && quest == 0)
+  return 0; // no exp if base level is 99 and above
+
 if(!battle_config.pvp_exp && map[sd->bl.m].flag.pvp)  // [MouseJstr]
  return 0; // no exp on pvp maps

Using this, the only way to get experience is from scripts via'getexp' scriptcommand. This applies to job exp too. Is that intended?

Use this instead if no.

Index: pc.c
===================================================================
--- pc.c (revision 16820)
+++ pc.c (working copy)
@@ -5573,6 +5573,9 @@
 if(sd->bl.prev == NULL || pc_isdead(sd))
  return 0;

+ if(sd->status.base_level >= 99 && quest == 0)
+  base_exp = 0; // no base exp if base level is 99 and above
+
 if(!battle_config.pvp_exp && map[sd->bl.m].flag.pvp)  // [MouseJstr]
  return 0; // no exp on pvp maps

PS: This way you can also specify what level can players start gaining exp again from monsters.

If you insist on using the script you provided, change == to >=, that way, it'll affect all levels above 98.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Truly, there is no need to do it from src. But, also, your script is wrong, in this case. Additionally, why did you make a new topic, if the solution you were looking for was in another topic, you posted in?

Simply open your exp.txt file, and change all exp values of level 100-255 to 0. They won't be able to gain a level via killing anything, only by a script which gives them a level. However, if you want you could go the src route. It's just you'll have to recompile each time you make changes to it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Ahh yes, I was suggesting this if ever he wanted the players to gain EXP again if it reaches a certain level (e.g. Players will only gain EXP from quests if they are within levels 99-150 ) Sorry I was editing my first post xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   0
  • Joined:  11/21/12
  • Last Seen:  

im sorry about that gmocean i was suppose to delete that but yeah i forgot after starting this new topic, anyway...

clydelion do you think it's possible that when a player reaches level 99 he wont gain any experience from monsters but only for quest THEN,

at 100 the exp continues to gain on monsters again?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

This will do the trick..

Index: pc.c
===================================================================
--- pc.c (revision 16820)
+++ pc.c (working copy)
@@ -5573,6 +5573,9 @@
 if(sd->bl.prev == NULL || pc_isdead(sd))
  return 0;

+ if(sd->status.base_level == 99 && quest == 0)
+  base_exp = 0; // no base exp if base level is 99
+
 if(!battle_config.pvp_exp && map[sd->bl.m].flag.pvp)  // [MouseJstr]
  return 0; // no exp on pvp maps

Note that players can still gain Job Exp.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Yea, that'll do the trick, additionally, this can also be done with using the same method i mentioned before using exp.txt. You' just set lvl 100 exp to 0. So they can never reach 100 unless via a command, then for 101-150 add exp as normal.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   0
  • Joined:  11/21/12
  • Last Seen:  

thank you guys :)

Link to comment
Share on other sites

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.

×
×
  • Create New...