viciousdead Posted March 24, 2011 Author Share Posted March 24, 2011 This is a very simple code that allows you to change the experiance(exp) rate of your game without going through and editting npc's. If I get the time, I'll add more.**Everything Is Server-sided****First make a scroll bar on the Server Conrol Panel and name it "scrlExpRate". Then above it make a label and call it "lblExpRate", should look something like this:**>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/94fc0e0983a1e9ca0dbfc8e6a007524f.png)**Now double click the scroll bar, and paste in this code:**>! ```Private Sub scrlExpRate_Change()Dim EXPRATE As Long>! lblExpRate.Caption = "Exp Rate: " & frmServer.scrlExpRate.Value EXPRATE = frmServer.scrlExpRate.Value If frmServer.scrlExpRate.Value > 1 Then Call GlobalMsg("Experiance Rate For The Server Is Currently: " & frmServer.scrlExpRate.Value & "x", Yellow) Else If frmServer.scrlExpRate.Value = 0 Then Call GlobalMsg("Experiance Rate For The Server Is Currently: Frozen", Yellow) Else Call GlobalMsg("Experiance Rate For The Server Is Currently: Normal", Yellow) End If End IfEnd Sub```**Now go to modCombat, then search for "Sub PlayerAttackNpc", add this code underneath it:**>! ``` Dim EXPRATE As Long```**Last, in modCombat, search for "Calculate exp to give attacker", replace that code with:**>! ``` ' Check server's experaince rate EXPRATE = frmServer.scrlExpRate.Value ' Calculate exp to give attacker exp = (Npc(npcNum).exp * EXPRATE)```**Screenshots**>! [![](http://www.freemmorpgmaker.com/files/imagehost/pics/db8394a49f6866bc495c65dbc66bd220.png)](http://www.freemmorpgmaker.com/files/imagehost/#db8394a49f6866bc495c65dbc66bd220.png)[![](http://www.freemmorpgmaker.com/files/imagehost/pics/4b87bfd97134de0bba790dd1fd335ca7.png)](http://www.freemmorpgmaker.com/files/imagehost/#4b87bfd97134de0bba790dd1fd335ca7.png) Link to comment Share on other sites More sharing options...
Drakiac Posted March 24, 2011 Share Posted March 24, 2011 This looks awesome! I'll check it out!-Drakiac Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 24, 2011 Share Posted March 24, 2011 Nice edit. Once i start working eo 2.0 again I'll use it. Although I'll probably use it in the engine i have right now. Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 24, 2011 Share Posted March 24, 2011 O.o hmmmm… =D Holiday EXP events!!!! Way to go! Link to comment Share on other sites More sharing options...
Dzastin Posted March 24, 2011 Share Posted March 24, 2011 Thanks, this is realy awesome! Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2011 Share Posted March 24, 2011 May want to know, it doesn't check for a level up. I.e. you're left with 999999/400 exp. You gotta kill something else to level up, etc. Link to comment Share on other sites More sharing options...
DarkKang Posted March 24, 2011 Share Posted March 24, 2011 You forgot:We need to do: "Dim EXPRATE As Long" at start of Public Sub PlayerAttackNpc(Sorry bad english I'm brazilian)Or I'm crazy? '-' Link to comment Share on other sites More sharing options...
viciousdead Posted March 24, 2011 Author Share Posted March 24, 2011 @Sekaru:> May want to know, it doesn't check for a level up. I.e. you're left with 999999/400 exp. You gotta kill something else to level up, etc.~~Your right, after I finish my homework, I'll edit the code.~~Wait, no, I was max leveled, that's why it did that, it auto detected the level, Robin made the code for that, I just edited the exp formula.@DarkKang:> You forgot:> > We need to do: "Dim EXPRATE As Long" at start of Public Sub PlayerAttackNpc> > (Sorry bad english I'm brazilian)> > Or I'm crazy? '-'Lol, I was half awake when I did this, it looks horrible, I'm editting right now.EDIT:I had to edit it twice, first time I changed directions, second time I changed the code to fit the directions(FAIL). It works now. Link to comment Share on other sites More sharing options...
Dzastin Posted April 10, 2011 Share Posted April 10, 2011 How to change this to party exp rate? Link to comment Share on other sites More sharing options...
The New World Posted April 10, 2011 Share Posted April 10, 2011 Find where it handles party exp. It's in the same module as Sub PlayerAttackNpc. Link to comment Share on other sites More sharing options...
Dzastin Posted April 10, 2011 Share Posted April 10, 2011 > ' in party?> If TempPlayer(attacker).inParty > 0 Then> EXPRATE = frmServer.expratescrl.Value> exp = (NPC(npcnum).exp * EXPRATE)> ' pass through party sharing function> Party_ShareExp TempPlayer(attacker).inParty, exp, attacker> Else> ' no party - keep exp for self> Call SetPlayerExp(attacker, GetPlayerExp(attacker) + exp)> SendEXP attacker> SendActionMsg GetPlayerMap(attacker), "+" & exp & " EXP", White, 1, (GetPlayerX(attacker) * 32), (GetPlayerY(attacker) * 32)> ' check if we've leveled> CheckPlayerLevelUp attacker> End IfThis is don't work… Link to comment Share on other sites More sharing options...
Sada Posted April 14, 2011 Share Posted April 14, 2011 Just a small note, a larger amount of functionality can be added to this by changing it to a % based system So instead of…exp = Npc(npcNum).exp * EXPRATEyou would put...exp = (Npc(npcNum).exp / 100) * EXPRATE):)allows an easy way to get 150% etc. Link to comment Share on other sites More sharing options...
Bloodmorphed Posted April 23, 2011 Share Posted April 23, 2011 I have a question, when I start my server it starts at frozen EXP rate, how do I change it to where It starts at normal EXP rate? Link to comment Share on other sites More sharing options...
Robin Posted April 23, 2011 Share Posted April 23, 2011 Change the default value of the control. Link to comment Share on other sites More sharing options...
Bloodmorphed Posted April 23, 2011 Share Posted April 23, 2011 Well I know that much but it doesn't have a default value… unless im blind. lol Link to comment Share on other sites More sharing options...
Sada Posted April 23, 2011 Share Posted April 23, 2011 Obviously it does have a default value, you are blind.Go to the form on the server then click on the tab which shows the slider you just added, then go to it's properties and go to default value, change this to 100. Link to comment Share on other sites More sharing options...
SholT Posted March 14, 2012 Share Posted March 14, 2012 @Robin:> Change the default value of the control.i can't do :( somebody do it?```Private Sub scrlExpRate_Change()Dim EXPRATE As Long lblExpRate.Caption = "Exp Rate: " & frmServer.scrlExpRate.Value EXPRATE = frmServer.scrlExpRate.Value If frmServer.scrlExpRate.Value > 1 Then Call GlobalMsg("Poziom doświadczenia: " & frmServer.scrlExpRate.Value & "x", Yellow) Else If frmServer.scrlExpRate.Value = 0 Then Call GlobalMsg("Poziom doświadczenia: Normalny", White) End If End IfEnd Sub``` Link to comment Share on other sites More sharing options...
Wortel Angels Posted March 16, 2012 Share Posted March 16, 2012 When it is on 0 will gain the player the normal EXP's which are generated in the NPC Data?And when i put in on 2 will the player gahter the EXP which are generatet x2 or only 2 EXP? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted March 16, 2012 Share Posted March 16, 2012 @Mortal:> When it is on 0 will gain the player the normal EXP's which are generated in the NPC Data?> And when i put in on 2 will the player gahter the EXP which are generatet x2 or only 2 EXP?When it is on zero no EXP will be given.When it is on one regular EXP will be given.When it is on two twice the EXP will be given.@SholT:> i can't do :( somebody do it?> ```> Private Sub scrlExpRate_Change()> Dim EXPRATE As Long> > lblExpRate.Caption = "Exp Rate: " & frmServer.scrlExpRate.Value> EXPRATE = frmServer.scrlExpRate.Value> > If frmServer.scrlExpRate.Value > 1 Then> Call GlobalMsg("Poziom doświadczenia: " & frmServer.scrlExpRate.Value & "x", Yellow)> Else> If frmServer.scrlExpRate.Value = 0 Then> Call GlobalMsg("Poziom doświadczenia: Normalny", White)> End If> End If> End Sub> ```Go to the scrollbar and just set the value to whatever you want the default rate to be. Link to comment Share on other sites More sharing options...
DepTa Posted June 26, 2012 Share Posted June 26, 2012 how make item but this function for 2x EXP ?exp : item -> klik -> and get duration 24 hours get 2x EXP , why setting that ? Link to comment Share on other sites More sharing options...
chamster Posted July 1, 2012 Share Posted July 1, 2012 When I first put this code into my server, I set the Exp Rate to "VERY HIGH" and it work fine, but later on (A couple Days) when I Killed monster I got 0 EXP and was Like WTF?!??! When I check the exp rate slide bar it was set to Zero on default … So, to help All Noobs out there (like myself), I suggest adding somewhere To change the "min. 0" to "min:1" in property box for the Exp Rate slide bar.... :)*It's no big problem but you'll just have to change the Min:0 to Min: 1 Every time you open the serverwhich is annoying and you are very likely to forget. Link to comment Share on other sites More sharing options...
Brodyzera Posted July 11, 2012 Share Posted July 11, 2012 Works great, took me a few tries until I noticed that in order to get the new scroll bar to appear, I needed to make a new server.exe xD First time using VB :SEDIT: To the comment above, I found that changing the value of the scroll box to 1 will default it to 1x exp. Link to comment Share on other sites More sharing options...
Domino_ Posted July 11, 2012 Share Posted July 11, 2012 @chamster:> When I first put this code into my server, I set the Exp Rate to "VERY HIGH" and it work fine, but later on (A couple Days) when I Killed monster I got 0 EXP and was Like WTF?!??! When I check the exp rate slide bar it was set to Zero on default … So, to help All Noobs out there (like myself), I suggest adding somewhere To change the "min. 0" to "min:1" in property box for the Exp Rate slide bar.... :)> > *It's no big problem but you'll just have to change the Min:0 to Min: 1 Every time you open the server> which is annoying and you are very likely to forget.In```Private Sub Form_Load()```add```frmServer.scrlExpRate.Value = 1```So exp rate will be 1 all time when start server. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now