Jump to content
  • 0

Different Exp Rate For Each Group


Question

Posted

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

19 answers to this question

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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

Posted

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;

Posted (edited)

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
Posted

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;

Posted

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

Posted

"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~

Posted

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.

Posted

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...