Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: GoSuGaMING on June 28, 2004, 12:44 AM

Title: Clan Member List
Post by: GoSuGaMING on June 28, 2004, 12:44 AM
What do you guys think is the best way to sort the different ranks out?

(http://www.gosugaming.net/ClanList.JPG)

You know
(Chieftain top)
(shamin)
(Grunt)
(Peon)
Title: Re:Clan Member List
Post by: MyndFyre on June 28, 2004, 02:58 PM
Quote from: GoSuGaMING on June 28, 2004, 12:44 AM
What do you guys think is the best way to sort the different ranks out?

(http://www.gosugaming.net/ClanList.JPG)

You know
(Chieftain top)
(shamin)
(Grunt)
(Peon)

I do it this way:

Chieftan: Insert at 0.

Shaman: Insert at 0 plus the number of Chieftans received.

Grunt: Insert at 1 plus the number of Shamans received.

Peons: Insert at 1 plus the number of Shamans and Grunts received.

Recruits: Insert at 1 plus the number of Shamans, Grunts, and Peons received.
Title: Re:Clan Member List
Post by: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array

Than for each item in the array

i had

Name as String
Rank as Integer
Status as Integer

Than i just used a Loop to add them to the listview depending on Rank ;\
Title: Re:Clan Member List
Post by: Stealth on June 28, 2004, 04:36 PM
I use the ListView's built-in sorting system - one of my columns [invisible] contains their rank, so I just sort Ascending based on that column.
Title: Re:Clan Member List
Post by: BaDDBLooD on June 28, 2004, 04:43 PM
Stealth.. I might look into doing it that way! Is that ok if i use your idea?
Title: Re:Clan Member List
Post by: GoSuGaMING on June 28, 2004, 06:02 PM
Quote from: Stealth on June 28, 2004, 04:36 PM
I use the ListView's built-in sorting system - one of my columns [invisible] contains their rank, so I just sort Ascending based on that column.


Public Function GetClanList(Data As String)

Form1.LvClan.ListItems.Clear

Dim List() As String
Dim x As Integer
List = Split(Mid$(Data, 10), Chr(0), -1)
     For x = 0 To UBound(List)
     
     If Not List(x) = "" Then

     Select Case Asc(List(x))
     Case Is > 4
     Form1.LvClan.ListItems.Add , , List(x)
     Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 128
     Case 0, 1, 2, 3, 4
 
Select Case Asc(List(x))
Case 4
   Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 131
       Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "1"
'Clan Chieftain
Case 3
   Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 132
       Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "2"
'Clan Leader
Case 2
   Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 130
       Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "3"
'Clan Member
Case 1
   Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 129
       Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "4"
'Member thats been in clan for over a week
Case 0
   Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 128
       Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "4"
'Member thats been in clan under a week


       
       Case Else
           Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).SmallIcon = 128
               Form1.LvClan.ListItems(Form1.LvClan.ListItems.Count).Add , , "4"
       End Select
       Case Else
       End Select
       End If
 Next x

Form1.LvClan.Refresh
End Function


It doesnt add the 4 for Peons... I know that it sorts it by Numerical Numbers... Do you see a flaw in the code?
Title: Re:Clan Member List
Post by: Stealth on June 28, 2004, 06:56 PM
Sub AddMember(ByVal Name As String, Rank As Integer, Online As Integer)
   
   If Rank = 0 Then Rank = 1
   If Rank > 4 Then Rank = 5 '// handle bad ranks
   
   '// add user
   
   With lvClan
       .ListItems.Add lvClan.ListItems.Count + 1, , Name, , Rank
       .ListItems(.ListItems.Count).ListSubItems.Add , , , Online + 6
       .ListItems(.ListItems.Count).ListSubItems.Add , , Rank
       .SortKey = 2
       .SortOrder = lvwDescending
       .Sorted = True
   End With
   
End Sub
Title: Re:Clan Member List
Post by: GoSuGaMING on June 28, 2004, 07:19 PM
Quote from: Stealth on June 28, 2004, 06:56 PM
Sub AddMember(ByVal Name As String, Rank As Integer, Online As Integer)
   
   If Rank = 0 Then Rank = 1
   If Rank > 4 Then Rank = 5 '// handle bad ranks
   
   '// add user
   
   With lvClan
       .ListItems.Add lvClan.ListItems.Count + 1, , Name, , Rank
       .ListItems(.ListItems.Count).ListSubItems.Add , , , Online + 6
       .ListItems(.ListItems.Count).ListSubItems.Add , , Rank
       .SortKey = 2
       .SortOrder = lvwDescending
       .Sorted = True
   End With
   
End Sub


If i use your code i will never learn.. help me with mine if you would :X
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 07:53 AM
Quote from: MoNeY on June 29, 2004, 12:30 AM
the code you posted wasnt yours >.< it was from Void Bot Source

I'm not surprised

Anyways, Maybe if you Instant Messaged Or Private Messaged stealth and asked him to explain how to use the Listview's Sort Property, he would explain it to you.

Otherwise you could post in the Visual Basic section of this forum; under the topic "Sorting listview items".
Title: Re:Clan Member List
Post by: Tuberload on June 29, 2004, 02:46 PM
Or here's a revolutionary idea: rtfm...
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 04:47 PM
rtfm?
Title: Re:Clan Member List
Post by: Eli_1 on June 29, 2004, 04:50 PM
Quote from: BaDDBLooD on June 29, 2004, 07:53 AM
Quote from: MoNeY on June 29, 2004, 12:30 AM
the code you posted wasnt yours >.< it was from Void Bot Source
Anyways, Maybe if you Instant Messaged Or Private Messaged stealth and asked him to explain how to use the Listview's Sort Property, he would explain it to you.

The ListView's sort feature is self-explanitory, as are most VB things.

Edit:
Whew, this is my first post in this forum in a little while - feels wierd. :P
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 04:56 PM
Quote from: BaDDBLooD on June 29, 2004, 07:53 AM
Quote from: MoNeY on June 29, 2004, 12:30 AM
the code you posted wasnt yours >.< it was from Void Bot Source

I'm not surprised

Anyways, Maybe if you Instant Messaged Or Private Messaged stealth and asked him to explain how to use the Listview's Sort Property, he would explain it to you.

Otherwise you could post in the Visual Basic section of this forum; under the topic "Sorting listview items".

I know the method for it... stop posting stupid shit... better yet dont try to help me... you never can or do so ignore my threads ... k thnx
Title: Re:Clan Member List
Post by: Tuberload on June 29, 2004, 05:01 PM
Quote from: BaDDBLooD on June 29, 2004, 04:47 PM
rtfm?

read the f*cking manual
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 05:27 PM
Quote from: Tuberload on June 29, 2004, 05:01 PM
Quote from: BaDDBLooD on June 29, 2004, 04:47 PM
rtfm?

read the f*cking manual

MSDN is better


The problem right now is that its not recgonizing my &H0 case
Title: Re:Clan Member List
Post by: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array

Than for each item in the array

i had

Name as String
Rank as Integer
Status as Integer

Than i just used a Loop to add them to the listview depending on Rank ;\

keep in mind, you didn't write your code, you took it from a source.

Edit: Sorry,  I know Badd made his own 0x7D code, I was just feeling the effects of a boot to the colon.
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 05:46 PM
Quote from: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array

Than for each item in the array

i had

Name as String
Rank as Integer
Status as Integer

Than i just used a Loop to add them to the listview depending on Rank ;\

keep in mind, you didn't write your code, you took it from a source.

thats not helping me :X

0x00: Initiate that has been in the clan for less than one week
0x01: Initiate that has been in the clan for over one week
0x02: Member
0x03: Officer
0x04: Leader

im not even recieving 0x00
Title: Re:Clan Member List
Post by: Tuberload on June 29, 2004, 05:59 PM
Quote from: GoSuGaMING on June 29, 2004, 05:27 PM
Quote from: Tuberload on June 29, 2004, 05:01 PM
Quote from: BaDDBLooD on June 29, 2004, 04:47 PM
rtfm?

read the f*cking manual

MSDN is better

You know you're a real genius...
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 06:23 PM
Quote from: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array

Than for each item in the array

i had

Name as String
Rank as Integer
Status as Integer

Than i just used a Loop to add them to the listview depending on Rank ;\

keep in mind, you didn't write your code, you took it from a source.

CRoNo [email protected]: Oh yeah I gave this code to baddblood since his code sucked
GoSuGaMING: what code
CRoNo [email protected]: 0x7d

BaddBlood you have no room to post on this thread...
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 07:03 PM
Yeah it sucked.

I did it myself, so of course it sucked.

I am a Complete Novice at Visual Basic, and i never ever say i am better than what i actually am.

Binary was nice enough to give me the "Parsing" of 0x7D cause the way i did it was Really Really bad.  Than i took what he gave me and Added my own for the listview, which i used a array.  Which is EXACTLY what i stated in that one post.

You have no right to say where i can or can't post.
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 07:05 PM
Quote from: GoSuGaMING on June 29, 2004, 05:46 PM
Quote from: ChR0NiC on June 29, 2004, 05:42 PM
Quote from: BaDDBLooD on June 28, 2004, 03:42 PM
I added them all to a array

Than for each item in the array

i had

Name as String
Rank as Integer
Status as Integer

Than i just used a Loop to add them to the listview depending on Rank ;\

keep in mind, you didn't write your code, you took it from a source.

thats not helping me :X

0x00: Initiate that has been in the clan for less than one week
0x01: Initiate that has been in the clan for over one week
0x02: Member
0x03: Officer
0x04: Leader

im not even recieving 0x00

I Don't know why your not recieving 0x00, maybe Noone is a Initiate?

EDIT: Please don't flame me, all i was trying to do was help to the best of my ability.
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 07:24 PM
You told me to "test" it... theres nothing to test....  so hows that helping me? and nice double post :X
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 07:48 PM
Well i thought testing the problem with different solutions would have been the best idea at the time.. sorry if you didn't feel that would work. Sorry to the admins for the double post.. but i thought that 2 different ones would be more clear.
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 07:58 PM
Quote from: BaDDBLooD on June 29, 2004, 07:48 PM
Well i thought testing the problem with different solutions would have been the best idea at the time.. sorry if you didn't feel that would work. Sorry to the admins for the double post.. but i thought that 2 different ones would be more clear.


you havnt helped me at all through this whole thread of course im a member under a weekold... i added myself to the clan list 2 days ago...
Title: Re:Clan Member List
Post by: Soul Taker on June 29, 2004, 09:21 PM
Jesus Christ, would you two stop fighting in EVERY goddamn BotDev thread?
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 10:34 PM
Maybe instead of being a fucking ass saying i didn't help you, you could say thanks for trying. You should definately say thanks to everyone in this thread who has actually helped you.

next time i won't even post, you can help your self.
Title: Re:Clan Member List
Post by: muert0 on June 29, 2004, 10:51 PM
http://www.rancidkoolaid.com/images/arguing.jpg
Title: Re:Clan Member List
Post by: Falcon[anti-yL] on June 29, 2004, 10:53 PM
You two should really just ignore each other for a while.
Title: Re:Clan Member List
Post by: BaDDBLooD on June 29, 2004, 10:58 PM
Quote from: muert0 on June 29, 2004, 10:51 PM
http://www.rancidkoolaid.com/images/arguing.jpg

That always cracks me up

I do ignore him falcon, i was just trying to help someone, i guess i shouldn't ;\
Title: Re:Clan Member List
Post by: GoSuGaMING on June 29, 2004, 10:58 PM
Quote from: BaDDBLooD on June 29, 2004, 10:58 PM
Quote from: muert0 on June 29, 2004, 10:51 PM
http://www.rancidkoolaid.com/images/arguing.jpg

That always cracks me up

I do ignore him falcon, i was just trying to help someone, i guess i shouldn't ;\

You provoke every fight....
Title: Re:Clan Member List
Post by: muert0 on June 29, 2004, 11:01 PM
provoke
www.webster.com
Be quiet already.
Title: Re:Clan Member List
Post by: Arta on June 30, 2004, 06:44 AM
I'm getting sick of this. I've already had to delete numerous stupid posts in this thread. So, warning:

Stop posting useless crap. There are several forums where that is appropriate. This one is not among them. Please make only useful, relevant, substantive posts. Flaming is not allowed. Personal attacks are not allowed. Mildly offensive images debasing disabled people are not allowed.

I'm going to start requesting bans if people do not adhere to the policy of this forum, which has been very clearly laid out by Spht (http://forum.valhallalegends.com/phpbbs/index.php?board=17;action=display;threadid=707).