Jump to content
  • 0

Different Exp Rate For Each Group


serakh00

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

This is what i want :

Player A has Group ID 0 and he gain (100% * exp_rate * mob exp ) from killing monster and (100% *quest_exp_rate) from completing quest.

Player B has Group ID 1 and he gain (200% * exp_rate * mob exp) from killing monster and (200% *quest_exp_rate) from completing quest.

player C has group ID 3 etc....

is this possible via source edit?

if this is possible via npc script,please move this topic to script request section.

thanks..

Link to comment
Share on other sites

19 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Script is possible.

// http://rathena.org/board/topic/73652-different-exp-rate-for-each-group/
- script GroupBonuxEXP -,{
// OnInit:
// setarray .GroupLevel[0], 1, 10, 99; // Group Level
// setarray .GroupBonus[0], 1, 10, 1000; // Bonus EXP * 10%, might overflow in high-rate server due to large amount of number
// end;
OnNPCKillEvent:
if (getgmlevel <= 0) end;
getexp (getmonsterinfo(killedrid,3) * @BonusBase / 10), (getmonsterinfo(killedrid,4) * @BonusJob / 10);
end;
OnPCLoginEvent:
if (getgroupid() >= 1) {
 set @BonusBase, 10;
 set @BonusJob, 10;
} else if (getgroupid() >= 2) {
 set @BonusBase, 20;
 set @BonusJob, 20;
} else
end;
}

Got limited knowledge on setarray, so only touch the part below.

Edited by darristan
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

Script is possible.

// http://rathena.org/board/topic/73652-different-exp-rate-for-each-group/
- script GroupBonuxEXP -,{
// OnInit:
// setarray .GroupLevel[0], 1, 10, 99; // Group Level
// setarray .GroupBonus[0], 1, 10, 1000; // Bonus EXP * 10%, might overflow in high-rate server due to large amount of number
// end;
OnNPCKillEvent:
if (getgmlevel <= 0) end;
getexp (getmonsterinfo(killedrid,3) * @BonusBase / 10), (getmonsterinfo(killedrid,4) * @BonusJob / 10);
end;
OnPCLoginEvent:
if (getgroupid() >= 1) {
 set @BonusBase, 10;
 set @BonusJob, 10;
} else if (getgroupid() >= 2) {
 set @BonusBase, 20;
 set @BonusJob, 20;
} else
end;
}

Got limited knowledge on setarray, so only touch the part below.

thanks for answering.

i used this script before,but it doesnt calculate exp from party member.

and how bout quest exp?

i dont like to add some script into each quest script..

Edited by serakh00
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:  

Well, its all 100% possible with script, however, not practical... Your best bet is to go the src edit route.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

Well, its all 100% possible with script, however, not practical... Your best bet is to go the src edit route.

then thats the point why i made this thread...

i'm a baby in src edit >.<

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Other than quest_exp (Which is not possible with script), I think is 100% fine to use script to do it. Adding party member is also easy :3

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:  

Pretty sure you can use ' getbattleflag( "quest_exp_rate" ); ' to figure out the quest_exp_rate he has set, then calculate from there. Thus, making it possible with script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

But there aren't any OnEXPReceive, OnQuestDone such auto triggering label, how can script triggered when you receive:

*getexp <base xp>,<job xp>;
or
set BaseExp, BaseExp + 10000;
set JobExp, JobExp + 10000;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

Pretty sure you can use ' getbattleflag( "quest_exp_rate" ); ' to figure out the quest_exp_rate he has set, then calculate from there. Thus, making it possible with script.

But there aren't any OnEXPReceive, OnQuestDone such auto triggering label, how can script triggered when you receive:

*getexp <base xp>,<job xp>;
or
set BaseExp, BaseExp + 10000;
set JobExp, JobExp + 10000;

is there mapflag quest_exp_rate? i never know that..

@darristan

yah some quest use "set" method to give exp reward..

could you make me example script of party distribution exp?

Edited by serakh00
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Replace to this:

OnNPCKillEvent:
if (getcharid(1)) {
 set .@Location$, strcharinfo(3);
 set .BaseLvl, BaseLevel;
 getpartymember getcharid(1), 1;
 getpartymember getcharid(1), 2;
 for (set .@a, 0; .@a < .partymembercount; set .@a, .@a + 1)
  if (isloggedin(.partymemberaid[.@a]))
   attachrid (.partymemberaid[.@a]);
  if (strcharinfo(3) == .Location$ && (.BaseLevel - BaseLevel) <= 10) // 10 is the EXP Level Share Range
   getexp (getmonsterinfo(killedrid,3) * @BonusBase / 10), (getmonsterinfo(killedrid,4) * @BonusJob / 10);
} else {
 getexp (getmonsterinfo(killedrid,3) * @BonusBase / 10), (getmonsterinfo(killedrid,4) * @BonusJob / 10);
}
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

Replace to this:

OnNPCKillEvent:
if (getcharid(1)) {
 set .@Location$, strcharinfo(3);
 set .BaseLvl, BaseLevel;
 getpartymember getcharid(1), 1;
 getpartymember getcharid(1), 2;
 for (set .@a, 0; .@a < .partymembercount; set .@a, .@a + 1)
  if (isloggedin(.partymemberaid[.@a]))
attachrid (.partymemberaid[.@a]);
  if (strcharinfo(3) == .Location$ && (.BaseLevel - BaseLevel) <= 10) // 10 is the EXP Level Share Range
getexp (getmonsterinfo(killedrid,3) * @BonusBase / 10), (getmonsterinfo(killedrid,4) * @BonusJob / 10);
} else {
 getexp (getmonsterinfo(killedrid,3) * @BonusBase / 10), (getmonsterinfo(killedrid,4) * @BonusJob / 10);
}
end;

thank you.. it works with some edit..

now i have to find way to edit exp from quest..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

"better" and fastest way is to edit every single quest that give exp

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

"better" and fastest way is to edit every single quest that give exp

Exp boost can't be usefull? :l

(Script strange header)

End;

OnPCLoginEvent:

If (getgroupid() == 1) {expboostblabla;end;}

If (getgroupid() == 2) {expboostblablabla;end;}

End;

Lalalalalala~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

sc_expboost doesn't boost quest EXP.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   4
  • Joined:  02/08/12
  • Last Seen:  

"better" and fastest way is to edit every single quest that give exp

as said by GmOcean,it is not practical..

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:  

Well, I'm assuming all quests in game that give exp, use the getexp or set 'blah blah blah' + w/e right? If so then using getbattleflag("quest_exp_rate") * variable = exp to give. I never said anything about using 1 script to calculate all the exp gained by each script.

I merely stated that it was possible, just not practical... I mean, another way would be to edit, the get/set exp commands, for an optional parameter which could call a label if one is given. But i mean at that rate, i might as well just add a callfunc there...

So my suggestion still stands, either find yourself a src edit, or manually go into each quest, and do your configs there.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

what if a group id 1 can gain zeny every time killing a monster?

Edited by GM Takumirai
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

what if a group id 1 can gain zeny every time killing a monster?

OnNPCKillEvent:

if( getgroupdid() == 1 ) 
   set Zeny,Zeny + 1;
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

thanks Emistry..

what if a group id 1 can gain zeny every time killing a monster?

OnNPCKillEvent:

if( getgroupdid() == 1 )
set Zeny,Zeny + 1;
end;

@Emistry its not working..

- i want the script activate when a GM group level 1 can have 100k zeny on monster

and if GM group level 2 will have 500k zeny

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

@GM Takumirai...

/swt ... if it's not working..elaborate more...

beside..the script work just fine in my test server..

http://pastebin.com/raw.php?i=EYr9uUBb

and your request are out of this topic...you should open your own topic in script request section...

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...