Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: warz on September 08, 2002, 01:55 PM

Title: Re: VB - ranks
Post by: warz on September 08, 2002, 01:55 PM
If InStr(GetAccess(user),"A") Then
  Select Case Command
    Case "quit"
      unload frmmain
  End Select
End If

----

Public Function GetAccess(user as string) as string
 for x = 1 to lstDatabase.listitems.count
   if lstdatabase.listitems(x).text = user Then
     GetAccess = lstdatabase.finditem(user).tag
   Else
   End If
 Next
End Function

that's an idea for flag based bots. just load database into a listview. for number based bots i guess you could do..

If GetAccess(user) >= 90 Then
  Select Case Command
    Case "quit"
      unload frmmain
  End Select
End If

Get creative :P
Title: Re: VB - ranks
Post by: Mesiah / haiseM on September 08, 2002, 02:55 PM
1. warz said:

If GetAccess(user) >= 90 Then
  Select Case Command
    Case "quit"
 unload frmmain
  End Select
End If
 
2. Now if ur gonna make a quit command, u cant just unload frmmain, you would use the End statement to terminate the bot, otherwise the project will still be open and eatin resources :-P

Well if your going to load them into a listview and split em up, then you can make it extremely detailes, such as what rank, what access, when he was added, and who he was added by, and stick them in subitem arrays.

get super creative :-P
Title: Re: VB - ranks
Post by: Justin on September 08, 2002, 04:36 PM
k thx im trying it out right now  ;) ill be as creative as i can be   :D
Title: Re: VB - ranks
Post by: warz on September 08, 2002, 05:23 PM
Was general idea plz
Title: Re: VB - ranks
Post by: dxoigmn on September 08, 2002, 05:45 PM
Actually 'end' is much worse then 'unload'.  The smart thing to do is unload all active forms.
Title: Re: VB - ranks
Post by: CaPSuLeS on November 18, 2003, 12:02 PM
Ending thr program kills it from active process, resulting it it NOT eating resources. Unload simply takes those forms away, which takes longer to do, and leaves for more errors. :P
Title: Re: VB - ranks
Post by: Grok on November 18, 2003, 12:10 PM
Quote from: CaPSuLeS on November 18, 2003, 12:02 PM
Ending thr program kills it from active process, resulting it it NOT eating resources. Unload simply takes those forms away, which takes longer to do, and leaves for more errors. :P

Hi, welcome to our forums.

Two things.  1)  It is generally frowned upon to revive dead topics unless you have a significantly different viewpoint on maybe an unsolved issue.   2)  Your viewpoint in this reply is technically wrong.  Unload causes a form to follow a sequenced shutdown path, while End leaves allocated objects in memory.  End almost never appears in a program except when written by a first-year VB programmer.
Title: Re: VB - ranks
Post by: warz on November 18, 2003, 03:29 PM
Quote« on: September 08, 2002, 01:55 pm »

Damn, quite some time ago.
Title: Re: VB - ranks
Post by: Banana fanna fo fanna on November 18, 2003, 05:48 PM
Over a year ago!
Title: Re: VB - ranks
Post by: Grok on November 18, 2003, 07:38 PM
Seems as though it's a hit-and-run too.
Title: Re: VB - ranks
Post by: warz on November 18, 2003, 10:39 PM
Man, my skills were intense back then. Look at me go!
Title: Re: VB - ranks
Post by: Adron on November 20, 2003, 06:46 PM
And I still like to use End, and see it in lots of programs. And I still tend to look at it as a great way to shut down a program nice and quick. Sure, if there's cleanup you'd want to do first, you better do it, but if you just want to end the program, End does it.