June 3, 200620 yr Public Function Experience(ByVal Lvl As Integer) As Double Dim a As Long Dim x As Long For x = 1 To Lvl - 1 a = a + Int(x + 300 * (2 ^ (x / 7))) Next Experience = Int(a / 4) End Function Public Function ExperienceToGoalLvl(ByVal YourXP As Double, GoalLvl As Integer) As Double ExperienceToGoalLvl = Experience(GoalLvl) - YourXP End Function Public Function Level(ByVal XP As Double) As Integer Dim A As Integer, i As Long If XP >= Experience(99) Then Level = 99 Exit Function End If For i = 1 To 98 If XP < Experience(i) Then Level = i - 1 Exit Function End If Next End Function Public Function CombatLvl(atk As Double, def As Double, str As Double, hits As Double, rng As Double, mag As Double, pry As Double) As Double 'Not 100% accurate Dim atkstr As Double, defhitspry As Double atkstr = atk + str defhitspry = ((def + hits) / 4) + (pry / 8) If atkstr < mag * 1.5 And rng <= mag Then CombatLvl = (mag * 0.4875) + defhitspry ElseIf atkstr < rng * 1.5 And rng > mag Then CombatLvl = (rng * 0.4875) + defhitspry Else CombatLvl = (atkstr * 0.325) + defhitspry End If End Function Private Function CalcGames(XP As Double, GoalLvl As Integer) As Long 'For Pest Control Minigame Dim X As Long, Y As Long X = XP Y = 0 Do Until X >= Experience(GoalLvl) X = X + Int((ExperienceToGoalLvl(X) ^ 2) / 6) Y = Y + 1 Loop CalcGames = Y End Function
June 3, 200620 yr hey not everyone can understand that (and me nether) the bird will always get the early wormbut the mouse will always get the cheesei am the jedi JOVLA PIAMS of the planet insulin!
June 3, 200620 yr i believe that by going through the code quickly it is a program that will gather your combat details from the runescape game and tell you what experience you get from the pest control minigame.... correct me if im wrong please :D Rsn: ScootenhabenCombat: 82 ::: Skill Total: 1238Current Goals: 71/80 Fletching, 51/50 Construction
June 3, 200620 yr My understanding of VB is very poor, but that code in no way could be used as macro code. Although i can't exactly figure the purpose of each, I would very much say it is NOT that.... CoolChris999
June 3, 200620 yr Definitely not macro or keylog, it just merely a calculation for RS. I haven't been using Visual Basic very much but here what I can tell. It's just equation, no number entry anywhere. Public Function Experience(ByVal Lvl As Integer) As Double Dim a As Long Dim x As Long For x = 1 To Lvl - 1 a = a + Int(x + 300 * (2 ^ (x / 7))) Next Experience = Int(a / 4) End Function Calculation for Experience (you enter Lvl). I think what I see wrong with this function is there's no preset variable "a". It going to mess up when you run that function again, right? Public Function ExperienceToGoalLvl(ByVal YourXP As Double, GoalLvl As Integer) As Double ExperienceToGoalLvl = Experience(GoalLvl) - YourXP End Function Calculation for how much Experience to Lvl (you enter your xp and goal lvl) Public Function Level(ByVal XP As Double) As Integer Dim A As Integer, i As Long If XP >= Experience(99) Then Level = 99 Exit Function End If For i = 1 To 98 If XP < Experience(i) Then Level = i - 1 Exit Function End If Next End Function Not sure about this, I guess to show level by entering what XP? BTW what's variable "A" for? You didn't use it anywhere in it. Public Function CombatLvl(atk As Double, def As Double, str As Double, hits As Double, rng As Double, mag As Double, pry As Double) As Double 'Not 100% accurate Dim atkstr As Double, defhitspry As Double atkstr = atk + str defhitspry = ((def + hits) / 4) + (pry / 8) If atkstr < mag * 1.5 And rng <= mag Then CombatLvl = (mag * 0.4875) + defhitspry ElseIf atkstr < rng * 1.5 And rng > mag Then CombatLvl = (rng * 0.4875) + defhitspry Else CombatLvl = (atkstr * 0.325) + defhitspry End If End Function Calculation for combat lvl, you enter all of these ( atk lvl, def lvl, str lvl, health lvl, ranged lvl, magic lvl, prayer lvl ) Private Function CalcGames(XP As Double, GoalLvl As Integer) As Long 'For Pest Control Minigame Dim X As Long, Y As Long X = XP Y = 0 Do Until X >= Experience(GoalLvl) X = X + Int((ExperienceToGoalLvl(X) ^ 2) / 6) Y = Y + 1 Loop CalcGames = Y End Function Out of my scope (I'm F2P).. I guess calculation for Pest Control? you enter Xp and Lvl Goal. Hacked 10 years old account, permamently quit if Jagex doesn't return items.
June 3, 200620 yr Handy, I guess. A bit of elaboration wouldn't have a gone a miss though. This is how much you all raised for charity. Thank you.
June 3, 200620 yr And this is...? Every path you have trod, through wilderness and through war, has led to this road...
June 3, 200620 yr I guess you guys didn't read what I say. I'll say it again, but short and simple. It's a calculation equation in Visual Basic code for different parts. Combat level, regular level, experience, experience left to lvl goal, pest control xp. He only posted "equation" in Visual Basic but no program / code to make number entry. Hacked 10 years old account, permamently quit if Jagex doesn't return items.
June 3, 200620 yr Que? it's 'qu'est ce-que c'est' parlez-vous francais monsieur? Moi, je la parle un petit peu.
June 3, 200620 yr Que? it's 'qu'est ce-que c'est' parlez-vous francais monsieur? Moi, je la parle un petit peu. sans blague!! mince alors!! je suis un imbecile.... lol, im not flaming you, thats just all i came out with after doing french for 5 years in high school, the last part was what my teacher called me :D Rsn: ScootenhabenCombat: 82 ::: Skill Total: 1238Current Goals: 71/80 Fletching, 51/50 Construction
June 3, 200620 yr Que? it's 'qu'est ce-que c'est' parlez-vous francais monsieur? Moi, je la parle un petit peu. sans blague!! mince alors!! je suis un imbecile.... lol, im not flaming you, thats just all i came out with after doing french for 5 years in high school, the last part was what my teacher called me :D Actually, that's spanish, and it's well written :roll: Que tios los franceses, se creen que cualquier palabra no inglesa que se paresca a su lengua, es frances mal escrito xP PkmarioPorygon 64Black Charlizard
June 3, 200620 yr I made an app for Pest Control Experience, seeing how many points is needed based on the difference of your level and the level's experience that you wanted. Although mine was in Actionscript and therefore slightly less 1337-esque and more readable, of course mine does go along with some button as you can see. prayer=false; yourLvl_txt.text=1; yourExp_txt.text=0 yourGoal_txt.text=2; button.onRelease=function(){ yourLvl=Number(yourLvl_txt.text); yourExp=Number(yourExp_txt.text); yourGoal=Number(yourGoal_txt.text); formula(yourLvl,yourExp,yourGoal); } prayerBTN.onRelease=function(){ if(prayer==false){ prayer=true; } if(prayer==true){ prayer=false; } } formula=function(level,experience,goal){ //setting the total goal exp to zero total=0; //Experience formula for goal experience for(a=1;a<=goal-1;a++){ total+=Math.floor(a+300*Math.pow(2,a/7)); } total=Math.floor(total/4); //Now find the differene between the goal total and your experience. difference=total-experience; //Find the number of points you need to reach your goal if(prayer==false){ points=Math.ceil(difference/Math.floor(Math.pow(level,2)/6)); } if(prayer==true){ points=Math.ceil(difference/Math.floor(Math.pow(level,2)/12)); } points_txt.text=points; }
June 3, 200620 yr Lol it seems that not too many people understand visual basic. I do (I know I'm not the only one though), and it looks pretty good. BTW is this the right section for this? RSN: Hellomoron
June 3, 200620 yr Cool 8-) . Thanks for explaining ventuzz. Looking for a signature to use on here ...
June 4, 200620 yr its a combat calculator, like the one on tip.it calcs what os the point of posting it here? Lastfm
June 4, 200620 yr I'm kinda a vb pro.ill pm you when I get home(on break at work browsing the forms on my cell)ill help ya out with anything you need.I have made combat calcs and such for personal use.I can give you the source if you'd like.
June 4, 200620 yr prayerBTN.onRelease=function(){ if(prayer==false){ prayer=true; } if(prayer==true){ prayer=false; } } Why not just: prayerBTN.onRelease=function(){ prayer = !prayer; } And also for: if(prayer==false){ points=Math.ceil(difference/Math.floor(Math.pow(level,2)/6)); } if(prayer==true){ points=Math.ceil(difference/Math.floor(Math.pow(level,2)/12)); } Why not either: if(prayer){ points=Math.ceil(difference/Math.floor(Math.pow(level,2)/12)); } else { points=Math.ceil(difference/Math.floor(Math.pow(level,2)/6)); } or: points = prayer ? Math.ceil(difference/Math.floor(Math.pow(level,2)/12)) : Math.ceil(difference/Math.floor(Math.pow(level,2)/6)); (but some people don't like the ternary operator) [sig too big, don't do it again]
Create an account or sign in to comment