serakh00 Posted November 6, 2012 Posted November 6, 2012 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.. Quote
Bin4ry Posted November 6, 2012 Posted November 6, 2012 (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 November 6, 2012 by darristan Quote
serakh00 Posted November 7, 2012 Author Posted November 7, 2012 (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 November 7, 2012 by serakh00 Quote
GmOcean Posted November 7, 2012 Posted November 7, 2012 Well, its all 100% possible with script, however, not practical... Your best bet is to go the src edit route. Quote
serakh00 Posted November 7, 2012 Author Posted November 7, 2012 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 >.< Quote
Bin4ry Posted November 7, 2012 Posted November 7, 2012 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 Quote
GmOcean Posted November 7, 2012 Posted November 7, 2012 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. Quote
Bin4ry Posted November 7, 2012 Posted November 7, 2012 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; Quote
serakh00 Posted November 7, 2012 Author Posted November 7, 2012 (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 November 7, 2012 by serakh00 Quote
Bin4ry Posted November 7, 2012 Posted November 7, 2012 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; Quote
serakh00 Posted November 8, 2012 Author Posted November 8, 2012 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.. Quote
EvilPuncker Posted November 8, 2012 Posted November 8, 2012 "better" and fastest way is to edit every single quest that give exp Quote
Relzz Posted November 8, 2012 Posted November 8, 2012 "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~ Quote
serakh00 Posted November 8, 2012 Author Posted November 8, 2012 "better" and fastest way is to edit every single quest that give exp as said by GmOcean,it is not practical.. Quote
GmOcean Posted November 8, 2012 Posted November 8, 2012 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. Quote
GM Takumirai Posted November 16, 2012 Posted November 16, 2012 (edited) what if a group id 1 can gain zeny every time killing a monster? Edited November 16, 2012 by GM Takumirai Quote
Emistry Posted November 16, 2012 Posted November 16, 2012 what if a group id 1 can gain zeny every time killing a monster? OnNPCKillEvent: if( getgroupdid() == 1 ) set Zeny,Zeny + 1; end; Quote
GM Takumirai Posted November 17, 2012 Posted November 17, 2012 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 Quote
Emistry Posted November 17, 2012 Posted November 17, 2012 @GM Takumirai... ... 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... Quote
Question
serakh00
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.