Valhalla Legends Forums Archive | Battle.net Bot Development | Help

AuthorMessageTime
ColT
Can someone help me make a database/access, and how to make commands. Thanks. Btw: This is in Visual Basic.
September 25, 2004, 3:30 AM
Spht
[quote author=ColT link=board=17;threadid=8828;start=0#msg81881 date=1096083021]
Can someone help me make a database/access, and how to make commands. Thanks. Btw: This is in Visual Basic.
[/quote]

You might want to search Google first, to get started. What you're asking sounds pretty general and non-botdev-specific. If you have a specific question later on, then feel free to ask.
September 25, 2004, 3:41 AM
ColT
Ok. Thanks by the way Spht.
September 25, 2004, 3:46 AM
Myndfyr
[quote author=titan0060 link=board=17;threadid=8828;start=0#msg82095 date=1096198616]
a pretty good way to learn about access lists and stuff is to look at other people sources.

Goto this site and look under downloads. I'm download admin there and there are like 70 sources u can look at.
http://bnetweb.com
[/quote]

No, a good way to learn about access lists is to think about how you want to structure yours, then apply your knowledge into creating one from scratch. Looking at other's sources is an efficient way of encouraging oneself to copy them and then not understanding them later.
September 26, 2004, 1:35 PM
-MichaeL-
ya, i would suggest something simple,  make a file put name access then make a code that opens the file and checks for user access.
example
[code]
public access as string
public sub loaddb(user as string)
dim info as string
dim split() as string
open app.path & "/database.txt" for input as #1
input #1, info
split(lcase(info), " ", 1)
if split(0) = lcase(name) then
access = lcase(split(1))
end if
close #1
end sub
[/code]
September 28, 2004, 11:34 PM
Minux
[quote author=-MichaeL- link=topic=8828.msg82522#msg82522 date=1096414477]
ya, i would suggest something simple,  make a file put name access then make a code that opens the file and checks for user access.
example
[code]
public access as string
public sub loaddb(user as string)
dim info as string
dim split() as string
open app.path & "/database.txt" for input as #1
input #1, info
split(lcase(info), " ", 1)
if split(0) = lcase(name) then
access = lcase(split(1))
end if
close #1
end sub
[/code]

[/quote]

Nah, use a function with a loop inside. For example

[code]
Public Function CheckAccess(Username As String, byRef Access As Integer)

Close #1

Dim Temp As String

Access = 0

Open App.Path & "/database.txt" For Input As #1

Do While Not EOF(1)

Input #1, Temp

If LCase(Split(Temp, " ")(0)) = LCase(Username) Then
Access = Split(Temp, " ")(1)
Exit Function
End If

Loop

Close #1

End Function[/code]

And when you call the function just do something along these lines.

[code]
CheckAccess(strUsername As String, strAccess As String)
[/code]
And strAccess will obtain the value of the user's access if found, otherwise it will be 0.
September 29, 2004, 12:04 AM
-MichaeL-
Whoops forgot the loop he sorry about that. hope i helped tho.
September 29, 2004, 8:54 PM

Search