viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 ~~Ok, so I have ScrlEXPRATE.Value = EXPRATE and in another piece of code I have an equation(this just being part of it): EXPTOTAL = (EXPRATE * 100)How do I define EXPRATE or w/e, all of this is server-sided.. I'm a bit confused. :confused:I get confused on the easy stuff guys, so over look me and don't be a t-bag. :embarrassed:~~Currently the equation is like this: killxp = (GetPlayerLevel(Victim) * EXPTOTAL) EXPTOTAL = (EXPRATE * 100) EXPRATE = frmServer.ScrlEXP.Valuethe scrlEXP.value is 0 so 0*100= 0 right?Well I changed the 0 on the server control panel to like 10, and killed another person 10*100 = 1000 but it still gave me 0, how do I make it update the exp rate when I raise/lower it? Link to comment Share on other sites More sharing options...
evilbunnie Posted March 19, 2011 Share Posted March 19, 2011 I'm not really understanding your question..Rewrite the whole post again without all the crosses.EditTo Define exprate you would putDim Exprate as longLong being the type of variable. Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 Ok, I'm horrible at explaining things.On my Server Control Panel, I have a scroll bar that changes the exp rate of PvP kills, the equation is like this:killxp = GetPlayerLevel(Victim)(Exp Rate * 100)killxp is the amount of experiance total you will receive for that kill. I have everything working except, the fact that when I change the Exp Rate on my Server Control Panel, the experience earned in-game doesn't *update*, it stays at 0..![](http://www.freemmorpgmaker.com/files/imagehost/pics/acf4dabf0f3381a2bc469f05ec24ad47.png) Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 @Captain:> I'm not really understanding your question..> > Rewrite the whole post again without all the crosses.> > Edit> > To Define exprate you would put> > Dim Exprate as long> > Long being the type of variable.I know that, I need to know how to update/refresh the exp rate, so that it reflects in-game… :o Link to comment Share on other sites More sharing options...
The New World Posted March 19, 2011 Share Posted March 19, 2011 On the event where you change the scroll bar, send a packet to the client with it's value and have the client handle that value, and modify a global expratechange variable with it, which can be used in modCombat. Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 @Yukiyo:> On the event where you change the scroll bar, send a packet to the client with it's value and have the client handle that value, and modify a global expratechange variable with it, which can be used in modCombat.modCombat? I'm using the EO Side-scrolling client by MrMiguu… Outdated maybe? Link to comment Share on other sites More sharing options...
The New World Posted March 19, 2011 Share Posted March 19, 2011 Kind of noticed from your server panel. Yes, outdated. He is currently re-writing it to fit EO v2b. We don't support older versions as much. Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 Ugh… Any idea on what I need to send...? I really dont know that much about sending/receiving packets... :( Link to comment Share on other sites More sharing options...
The New World Posted March 19, 2011 Share Posted March 19, 2011 It's different in that version, kind of. xP I suggest upgrading to EO v2b and reading this: [[EO] Packet Tutorial](http://www.touchofdeathforums.com/smf/index.php/topic,69393.0.html) Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 @Yukiyo:> It's different in that version, kind of. xP I suggest upgrading to EO v2b and reading this: [[EO] Packet Tutorial](http://www.touchofdeathforums.com/smf/index.php/topic,69393.0.html)Ok, I read that, but I still don't get why we have to Send a packet to make this work… It's not Client-sided in any way, its all Server Sided...Scroll bar code for frmserver:>! ```Private Sub ScrlEXP_Change()Dim EXPRATE As LongIf ScrlEXP.Value > 0 ThenEXPRATE = ScrlEXP.ValuelblEXP.Caption = "Exp Rate: " & ScrlEXP.ValueElseEXPRATE = 0lblEXP.Caption = "Exp Rate: Zero"End IfEnd Sub>! ```Here is my modplayer script:>! ```Sub AttackPlayer(ByVal Attacker As Long, ByVal Victim As Long, ByVal Damage As Long, Optional ByVal spellnum As Long = 0) Dim exp As Long Dim killxp As Long Dim EXPTOTAL As Long Dim EXPRATE As Long Dim n As Long Dim i As Long Dim Buffer As clsBuffer>! ' Check for subscript out of range If IsPlaying(Attacker) = False Or IsPlaying(Victim) = False Or Damage < 0 Then Exit Sub End If>! ' Check for weapon n = 0>! If GetPlayerEquipment(Attacker, Weapon) > 0 Then n = GetPlayerEquipment(Attacker, Weapon) End If>! ' Send this packet so they can see the person attacking Set Buffer = New clsBuffer Buffer.WriteLong SAttack Buffer.WriteLong Attacker SendDataToMapBut Attacker, GetPlayerMap(Attacker), Buffer.ToArray() Set Buffer = Nothing>! If Damage >= GetPlayerVital(Victim, Vitals.HP) Then 'Call PlayerMsg(Attacker, "You hit " & GetPlayerName(Victim) & " for " & Damage & " hit points.", White) 'Call PlayerMsg(Victim, GetPlayerName(Attacker) & " hit you for " & Damage & " hit points.", BrightRed) SendActionMsg GetPlayerMap(Victim), "-" & Damage, BrightRed, 1, (GetPlayerX(Victim) * 32), (GetPlayerY(Victim) * 32) ' Calculate exp to give attacker exp = (GetPlayerExp(Victim) \ 10) ' Calculate exp of a kill killxp = (GetPlayerLevel(Victim) * EXPTOTAL) EXPTOTAL = (EXPRATE * 100) EXPRATE = frmServer.ScrlEXP.Value>! ' Make sure we dont get less then 0 If exp < 0 Then exp = 0 End If>! If exp = 0 Then Call PlayerMsg(Victim, "You lost no exp.", BrightRed) Call PlayerMsg(Attacker, "You received " & killxp & " exp for killing " & GetPlayerName(Victim) & ".", BrightBlue) Call SetPlayerExp(Attacker, GetPlayerExp(Attacker) + killxp) SendEXP Attacker Else Call SetPlayerExp(Victim, GetPlayerExp(Victim) - exp) SendEXP Victim Call PlayerMsg(Victim, GetPlayerName(Attacker) & " absorbed " & exp & " exp from you.", BrightRed) Call SetPlayerExp(Attacker, GetPlayerExp(Attacker) + killxp) Call SetPlayerExp(Attacker, GetPlayerExp(Attacker) + exp) SendEXP Attacker Call PlayerMsg(Attacker, "You received " & killxp & " exp for killing " & GetPlayerName(Victim) & ".", BrightBlue) Call PlayerMsg(Attacker, "You absorbed " & exp & " bonus exp from " & GetPlayerName(Victim) & ".", BrightGreen) End If>! ' Check for a level up Call CheckPlayerLevelUp(Attacker)>! ' Check if target is player who died and if so set target to 0 If TempPlayer(Attacker).TargetType = TARGET_TYPE_PLAYER Then If TempPlayer(Attacker).Target = Victim Then TempPlayer(Attacker).Target = 0 TempPlayer(Attacker).TargetType = TARGET_TYPE_NONE End If End If>! Call OnDeath(Victim) Else ' Player not dead, just do the damage Call SetPlayerVital(Victim, Vitals.HP, GetPlayerVital(Victim, Vitals.HP) - Damage) Call SendVital(Victim, Vitals.HP) SendActionMsg GetPlayerMap(Victim), "-" & Damage, BrightRed, 1, (GetPlayerX(Victim) * 32), (GetPlayerY(Victim) * 32) 'if a stunning spell, stun the player If spellnum > 0 Then If Spell(spellnum).StunDuration > 0 Then StunPlayer Victim, spellnum End If End If>! ' Reset attack timer TempPlayer(Attacker).AttackTimer = GetTickCountEnd Sub```Those are the ONLY scripts/codes I have changed, this is just dealing with the exp rate of pvp. Link to comment Share on other sites More sharing options...
The New World Posted March 19, 2011 Share Posted March 19, 2011 Eh, just edit modCombat where it handles the exp and exp roll over. Add the ratechange to the algorithm. Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 @Yukiyo:> Eh, just edit modCombat where it handles the exp and exp roll over. Add the ratechange to the algorithm.Like I said, no modCombat. Link to comment Share on other sites More sharing options...
The New World Posted March 19, 2011 Share Posted March 19, 2011 Go to where it handles the experience for the player and manipulate the algorithm. That's the best I can help.Also: Ctrl + F Link to comment Share on other sites More sharing options...
viciousdead Posted March 19, 2011 Author Share Posted March 19, 2011 @Yukiyo:> Go to where it handles the experience for the player and manipulate the algorithm. That's the best I can help.> > Also: Ctrl + FFound out what was wrong…. The sequence in which I defined the variables.. XD Fail!~ 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