PDA

View Full Version : Whee my first Neocron app



Morpheous
01-08-04, 13:01
http://www.icarusnetworks.co.uk/neocron/Runspeed.exe

My first ever Neocron application, more coming :p

I'm learning Visual Basic .NET at the moment, actually bought a MS product- the VB Studio .NET thingy! Feel all wierd...

It's a calculator for spy runspeed :)
Enjoy

Edit: I'll do them for other classes or put it all in one app if someone can post or PM me with the number of points you need in AGL and ATL added together, gimmie numbers for Fast, Slow and turtle :p
Anyhow, i'll release the source later but here's the code if you're interested:



Public Class Form1
Inherits System.Windows.Forms.Form
Dim agl As Single
Dim ath As Single
Dim runspeed As Single

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ExitButton As System.Windows.Forms.Button
Friend WithEvents InputAthletics As System.Windows.Forms.TextBox
Friend WithEvents InputAgility As System.Windows.Forms.TextBox
Friend WithEvents OutputRunspeed As System.Windows.Forms.Label
Friend WithEvents Calc As System.Windows.Forms.Button
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ExitButton = New System.Windows.Forms.Button
Me.InputAthletics = New System.Windows.Forms.TextBox
Me.InputAgility = New System.Windows.Forms.TextBox
Me.OutputRunspeed = New System.Windows.Forms.Label
Me.Calc = New System.Windows.Forms.Button
Me.Button1 = New System.Windows.Forms.Button
Me.Label1 = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'ExitButton
'
Me.ExitButton.Location = New System.Drawing.Point(296, 48)
Me.ExitButton.Name = "ExitButton"
Me.ExitButton.Size = New System.Drawing.Size(96, 24)
Me.ExitButton.TabIndex = 0
Me.ExitButton.Text = "Exit"
'
'InputAthletics
'
Me.InputAthletics.Location = New System.Drawing.Point(8, 24)
Me.InputAthletics.Name = "InputAthletics"
Me.InputAthletics.Size = New System.Drawing.Size(88, 20)
Me.InputAthletics.TabIndex = 1
Me.InputAthletics.Text = "Athletics"
'
'InputAgility
'
Me.InputAgility.Location = New System.Drawing.Point(104, 24)
Me.InputAgility.Name = "InputAgility"
Me.InputAgility.Size = New System.Drawing.Size(112, 20)
Me.InputAgility.TabIndex = 2
Me.InputAgility.Text = "Agility"
'
'OutputRunspeed
'
Me.OutputRunspeed.Location = New System.Drawing.Point(224, 24)
Me.OutputRunspeed.Name = "OutputRunspeed"
Me.OutputRunspeed.Size = New System.Drawing.Size(152, 24)
Me.OutputRunspeed.TabIndex = 3
Me.OutputRunspeed.Text = "Runspeed"
'
'Calc
'
Me.Calc.Location = New System.Drawing.Point(8, 48)
Me.Calc.Name = "Calc"
Me.Calc.Size = New System.Drawing.Size(88, 24)
Me.Calc.TabIndex = 4
Me.Calc.Text = "Calculate"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(104, 48)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(72, 24)
Me.Button1.TabIndex = 5
Me.Button1.Text = "Help!"
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(16, 0)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(368, 16)
Me.Label1.TabIndex = 6
Me.Label1.Text = "App by Morpheous using Visual Basic .NET"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(392, 73)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Calc)
Me.Controls.Add(Me.OutputRunspeed)
Me.Controls.Add(Me.InputAgility)
Me.Controls.Add(Me.InputAthletics)
Me.Controls.Add(Me.ExitButton)
Me.Name = "Form1"
Me.Text = "Neocron Spy Runspeed Calculator by Morpheous"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click
End
End Sub

Private Sub Calc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calc.Click
agl = InputAgility.Text
ath = InputAthletics.Text
If (ath + agl >= 140) Then
OutputRunspeed.Text = "Optimal Spy Runspeed"
End If
If (ath + agl <= 100) Then
OutputRunspeed.Text = "Quite fast"
End If
If (ath + agl <= 50) Then
OutputRunspeed.Text = "Very slow. Invest more points in either skill"
End If
End Sub

Private Sub OutputRunspeed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OutputRunspeed.Click
OutputRunspeed.Text = ""
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("Type your Agility and Athletics skill points into the two fields and press calculate to see your runspeed. This version deals for the spy class only. Click on the result to clear it.", MsgBoxStyle.Question, "Don't Panic!")
End Sub

Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs)

End Sub
End Class

enigma_b17
01-08-04, 13:04
nice prog mr morpheus :)

Freaky Fryd
01-08-04, 13:11
I can tell by just looking at the code that I have well over the Optimal Spy Runspeed number you set!
;)
w00h00!!
:D

I didn't download it, but it helped confirm something for me, thanks!
:)

G.0.D.
01-08-04, 13:31
The logic is wrong, you are basing optimal run speed off of agil and ath adding up to 140 when you should be checking two things

if ath >= 70 and agil >=70 then Optimal runspeed

Also note that the 70 isnt where your speed stops going up, rather its where the amount of speed increase per point goes down. EDIT: So you can still be faster... Thus its not really optimal


Btw, neat little program none the less :D
Edit: Nice to see some authers on the boards and open source is always apreciated by someone.


EDIT: EDIT: I got a internet security warning when I launched your program... O_o

Freaky Fryd
01-08-04, 13:36
if ath >= 70 and agil >=70 then Optimal runspeed

I still qualify by a long-shot, so I'm still happy...
;)

G.0.D.
01-08-04, 13:38
oopps one more thing in your code
where you have
agl = InputAgility.Text
ath = InputAthletics.Text
It should be
agl = val(InputAgility.Text)
ath = val(InputAthletics.Text)
as to not crash the program when hitting calc with string information still in the boxes. cheers

Edit: I think Im getting the internet security warning because the program was compiled in debug mode, make sure to change it to release in the project options.. hopefully im being helpfull rather then annoying :lol:

Birkoff
01-08-04, 13:42
I still qualify by a long-shot, so I'm still happy...
;)

But u don't count ur kami :D

Saza
01-08-04, 13:47
Nice program Morph, but your numbers are way off.

I am nowhere near optimal and I have over 200 total AGL/ATL.

G.0.D.
01-08-04, 13:47
He is basing it off of the boost break at 70, each point does less after that.

Dargeshaad
01-08-04, 14:20
Hmm I always thought it was 75 it started going down :lol:

Morpheous
01-08-04, 15:19
Ok, thanks for all the suggestions/tips/fixes guys, will release a new one soon :p

If someone can just kinda tell me exactly what you need in Ath/Atl for optimal and stuff, that'd help tons :p

Note: This is a SPY class calculator at the moment, if you want classes adding then gimmie details :p

Edit: g0d, your code is testing for 70 in both, which is not needed. You just need 140 points overall. Also means if you've got 140 in AGL and nothing in ATH which as a spy will still make you run fast you get the "You're gonna be slow" message. The Val(InputAthletics.Text) is good though, thanks! :p

G.0.D.
01-08-04, 15:54
Actually you must not have seen the same memo I did then.

140 ath vs 70 ath and 70 agil
The 70's win by a long shot.

because after 70 in each skill the points are worth less and less,,, so to achieve optimal speed you would want at least 70 in each.

Morpheous
01-08-04, 15:59
True...but then you have to code in a thing that checks if one is massivley larger than the other, how the heck would you go about doing that?

/me is a VB newbie :p

juvestar15
01-08-04, 16:06
Is VB your first language?
It's pretty much based on logic so it wouldn't matter what programming language you are working with.

G.0.D.
01-08-04, 16:12
There are thousands of ways you can aproch this programing problem. Perhaps you want to make every point under 70 worth double its value? in that case you could do somthing like this

if ath > 70 then
points = points + 140 : points = points+(ath-70)
else
points = points + (ath*2)
end if

thats probably not the best way of doing it, but its just to show you the basic logic you can use...

EDIT: Just in case you are woundering the ":" just allows you to have anouther instruction on the same line...

Morpheous
01-08-04, 16:13
Yeah first ever language :p

G.0.D.
01-08-04, 16:26
Just a side note... I hate VB.NET - Like RAWRz0rSk4t3s hate it, really its just that I dont like the changes they made to it from previus VB versions. To me VB was always meant to be the brain dead language that anyone with basic knowledge should be able to pick up and code with out having to look up every command under the sun. (then again... I dont have the help file because my version of .net didnt come from the stores - so that might have somthing to do with it) :o

I recommend version 5 or 6 for learning - because you dont have to worry about the .net overhead.

juvestar15
01-08-04, 16:31
Ye i have VB.NET and VB6 sitting here and i always use VB6. It was the first language i learnt, was pretty hard working out the logic at the start. Took me ages. But if you do lots of different types of things like file handling and general excercises you can pick it up easy. Then move onto other languages.

I'm actually starting uni tommorow after semester break and VB.NET is what i'm meant to be learning. :D

G.0.D.
01-08-04, 16:59
Well the logic is the same for vb6 as it is for .net, but theres alot less overhead in vb6. What you need right now is a very simple language to learn the basic logic. Im sure it wont be that hard in .net as you actually bought it and have the pretty help database :o

Saza
01-08-04, 17:19
FFS I am trying to make this bleeding program work but its just error after error after error.

GOD DAMN YOU VB.NET!!!!!!!!!

:mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad:

Morpheous
01-08-04, 17:54
New version up, same URL. Compiled in release mode and with G.0.D's handy Val() fixes in, still working on the calculator code.

Dim
01-08-04, 18:18
What's my name doing in there? You name-stealer you!! :p

steweygrrr
01-08-04, 18:55
It has a bug...errr feature!

It wont calculate for 50 ath 75 agl or vice versa.

Morpheous
01-08-04, 19:18
It has a bug...errr feature!

It wont calculate for 50 ath 75 agl or vice versa.
Odd, i'll look into it.
And Dim, as with all things in life- BLAME MICROSOFT!!!! :p

Dim
01-08-04, 19:23
And Dim, as with all things in life- BLAME MICROSOFT!!!! :p
That could be a new southpark song... :p

Lachlan
01-08-04, 20:43
I'm working on a NC skillmanager written in C# that will (hopefully) stay up-to-date with a regular xml dump from the nc.synergyxr.net database.

That's assuming that I actually get enough time to work on it. Oh yeah, it'll be open source too.

Morpheous
01-08-04, 22:51
Hey that's my next project! :p

Anyhow, i'll release source for mine too - it'll just do one main skill at first, before I develop it more. Still learning about arrays ^^

Morpheous
02-08-04, 17:05
Ok, latest version (1.5) is up there, several bugs in it i'm working on, listed in the app.

Going to stop working on this soon and work on my next project- OP hack timer :p

[D]est
02-08-04, 17:59
Doesn't work!

Brammers
02-08-04, 18:14
est']Doesn't work!

That's.... helpful - what error message you get?

One thing thats not mentioned is that you need the .NET framework installed - get it by going to windows update. The .NET framework installer is in the "Windows xxxx" catergory when you click on scan for updates.

Also a little note, it works with .NET framework V2 Beta.

Morpheous
03-08-04, 10:36
Bugger, forgot to mention that :p

Anyhow, needs v1.1 of the .Net runtime library :p

ichinin
03-08-04, 12:15
To me VB was always meant to be the brain dead language that anyone with basic knowledge should be able to pick up and code with out having to look up every command under the sun.

True, BASIC stands for Beginners Allpurpose Symbolic Instruction Code.. even in the name it says "Keep it simple stupid"; .NET fuck that up. I hate .NET totally, rather go learn proper C++ linux programming instead.

Lachlan
03-08-04, 14:41
True, BASIC stands for Beginners Allpurpose Symbolic Instruction Code.. even in the name it says "Keep it simple stupid"; .NET fuck that up. I hate .NET totally, rather go learn proper C++ linux programming instead.
You hate it based on what? I had the same attitude about .NET until I picked up a book about it. I usually hate Microsoft, but .NET is something they did right for once.

(btw, I know several different languages and have released a couple of open source linux apps.)

ichinin
03-08-04, 14:55
You hate it based on what?

What i wrote. Compare regular VB code to .Net.


I had the same attitude about .NET until I picked up a book about it. I usually hate Microsoft, but .NET is something they did right for once.

Sorry, i dont agree, books didn't do it for me - i rather jump to Linux. MS usually do bad stuff like the windows API (Sometimes had to do a thing in C++ because it wasnt possible to use that particular API call in VB. GG M$. 3'rd party API''s are usually more thought through and better documented too.)


(btw, I know several different languages and have released a couple of open source linux apps.)

So?

Lachlan
03-08-04, 18:14
What i wrote. Compare regular VB code to .Net.
.NET is bigger that. There are serveral languages that use the .NET framework, such as C#. I haven't studied VB.NET, so I can't really compare. I have, however, compared C# to C/C++/Java.

C++, .C+, and Java are not even targetted at the same type of apps or the same type of programmer. Each of them have their strengths and weakness. A well-rounded programmer will write in different languages if necessary to emphasize strengths and minimize weaknesses. So, it's not a bad thing that you had to write something in C++ because VB didn't expose that part of the Windows API.

C# (and .NET) specifically addresses the issue by allowing you call "unmanaged" code from within a .NET application if you are willing to take the risk that your application will not be as stable or secure.

If you're interested in an intellectual (versus an emotional) analysis of .NET, you can read this (http://www.extremetech.com/article2/0,3973,467080,00.asp).

ichinin
04-08-04, 11:56
So, it's not a bad thing that you had to write something in C++ because VB didn't expose that part of the Windows API.

Oh really? I call that a language that is lacking..


C# (and .NET) specifically addresses the issue by allowing you call "unmanaged" code from within a .NET application if you are willing to take the risk that your application will not be as stable or secure.

Can do that already today with a few quirks.


If you're interested in an intellectual (versus an emotional) analysis of .NET, you can read this (http://www.extremetech.com/article2/0,3973,467080,00.asp).

A long article that goes into variable comparison and some techniques that already exist in VB 6.0 seems to be adopted into C# (which is cool, like Split/Array thing), CBA to read it all, lost intrest on page 6 since it didn't go into .NET that much really and was more of a debate on the java vs C world.

The idea of .Net is good, i just dont feel like everyone have to learn a new set of objects every damn time Bill gets a whim to change something just to say "Hey! Now we can sell new Certification courses to stupid people to make more money", when it's really just the same old crap in a new wrapper, give or take a few bells and whistles.

Compare code, before vs after, there is a crapload of new objects/stuff to learn, objects that we already know but now lost track of. Can we still play Threadpriority tricks with the system using DoEvents? Access to hardware just as easy with API calls or do we have to go through the MS jungle? Can we still do all the cool stuff we could in the earlier version or has MS screwed us over if we upgrade?

THAT is the kind of stuff i want to know, not what new things is in it.

Havent upgraded to .NET and really, i dont care if i dont. I've lost a great bit of intrest in programming when i lost my last job. Been digging myself into a world of Morrowind and Neocron since 2002, dont care much anymore for anything.