Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Dyndrilliac on September 13, 2004, 09:39 PM

Title: Wishes for new VB functions
Post by: Dyndrilliac on September 13, 2004, 09:39 PM
Make a function to assassinate select individuals. That would be very useful.
Title: Wishes for new VB functions
Post by: phvckmeh on September 13, 2004, 10:01 PM
Quote from: Dyndrilliac on September 13, 2004, 09:39 PM
Make a function to assassinate select individuals. That would be very useful.

Done.
Usage: VBControl1.Ass("Dyndrilliac")
Title: Wishes for new VB functions
Post by: MyndFyre on September 14, 2004, 07:53 PM
Quote from: phvckmeh on September 13, 2004, 10:01 PM
Quote from: Dyndrilliac on September 13, 2004, 09:39 PM
Make a function to assassinate select individuals. That would be very useful.

Done.
Usage: VBControl1.Ass("Dyndrilliac")

That function seems more like it would shove your ass at Dyndrilliac, or show Dyndrilliac's ass, than anything else.
Title: Re:Wishes for new VB functions
Post by: Meh on September 16, 2004, 11:01 AM
Judging by the control bit he wants to Control his ass, ewwwww!
Title: Re:Wishes for new VB functions
Post by: Dyndrilliac on September 16, 2004, 09:32 PM
Wow.
Quote from: Adron on September 15, 2004, 02:22 PM
Quote from: LivedKrad on September 15, 2004, 05:08 AM
Some replies were removed. :( ?

They were off-topic. They got split off to the trash can.
So this was considered important enough to be spared?  ;)  :P

As for the actual function, phuckmeh, I'd like to see how you actually wrote it:P . Also, change "Ass" to Terminate.
Title: Re:Wishes for new VB functions
Post by: Banana fanna fo fanna on September 18, 2004, 02:48 PM
irc.stabpersonintheface
Title: Re:Wishes for new VB functions
Post by: Adron on September 18, 2004, 06:32 PM
Quote from: Dyndrilliac on September 16, 2004, 09:32 PM
So this was considered important enough to be spared?  ;)  :P

Well, typically all posts are spared. They're just put in different forums. This particular thread seemed to be going into methods for properly naming VB functions, and as such, could be considered on-topic for the forum.
Title: Re:Wishes for new VB functions
Post by: Grok on September 18, 2004, 09:44 PM
Quote from: Dyndrilliac on September 13, 2004, 09:39 PM
Make a function to assassinate select individuals. That would be very useful.

Hmm, I didn't like the other solution, so here is another option.


Public Enum G_SELECTINDIVIDUALS
   DRYNDRILLIAC
End Enum
Public Enum G_KILLMETHOD
   ASPHIXIATION
   BLADE
   BLEEDING
   CONCUSSION
   CRUSH
   ELECTROCUTION
   EMBARRASSMENT
   FALL
   FIREARM
   POISON
End Enum

Public Function Assassinate(ByVal SelectIndividual AS G_SELECTINDIVIDUALS, ByVal Method AS G_KILLMETHOD) As Boolean
   Select Case Method
   Case     ASPHIXIATION, BLEEDING, CONCUSSION, CRUSH, DECAPITATION, ELECTROCUTION, EMBARRASSMENT, FALL, FIREARM, IMPALEMENT, POISON
           Assassinate = True
   Case Else
       Assassinate = False
   End Select
End Function
Title: Re:Wishes for new VB functions
Post by: Stealth on September 19, 2004, 01:22 AM
QuotePublic Enum G_KILLMETHOD
   ASPHIXIATION
   BLADE
   BLEEDING
   CONCUSSION
   CRUSH
   ELECTROCUTION
   EMBARRASSMENT
   FALL
   FIREARM
   POISON
   CHOCOLATE
End Enum

My favorite one! :)
Title: Re:Wishes for new VB functions
Post by: Soul Taker on September 19, 2004, 10:05 AM
Quote from: Grok on September 18, 2004, 09:44 PM
Quote from: Dyndrilliac on September 13, 2004, 09:39 PM
Make a function to assassinate select individuals. That would be very useful.

Hmm, I didn't like the other solution, so here is another option.


Public Enum G_SELECTINDIVIDUALS
   DRYNDRILLIAC
End Enum
Public Enum G_KILLMETHOD
   ASPHIXIATION
   BLADE
   BLEEDING
   CONCUSSION
   CRUSH
   ELECTROCUTION
   EMBARRASSMENT
   FALL
   FIREARM
   POISON
End Enum

Public Function Assassinate(ByVal SelectIndividual AS G_SELECTINDIVIDUALS, ByVal Method AS G_KILLMETHOD) As Boolean
   Select Case Method
   Case     ASPHIXIATION, BLEEDING, CONCUSSION, CRUSH, DECAPITATION, ELECTROCUTION, EMBARRASSMENT, FALL, FIREARM, IMPALEMENT, POISON
           Assassinate = True
   Case Else
       Assassinate = False
   End Select
End Function

Why check for IMPALEMENT when it's not part of the enumeration  :P

Edit:  Neither is DECAPITATION.  And apparently using BLADE won't result in assassination.
Title: Re:Wishes for new VB functions
Post by: Dyndrilliac on September 19, 2004, 05:55 PM
Quote from: Grok on September 18, 2004, 09:44 PMDRYNDRILLIAC

Who's that?  :P ;D
Title: Re:Wishes for new VB functions
Post by: Grok on September 19, 2004, 07:03 PM
Quote from: Soul Taker on September 19, 2004, 10:05 AM
Why check for IMPALEMENT when it's not part of the enumeration  :P

Edit:  Neither is DECAPITATION.  And apparently using BLADE won't result in assassination.

They were but I had already pasted the enumerations when I modified the function and then pasted it.  Forgot to copy the updated ENUM.  I had also corrected the spelling of Dyndrilliac too.  My function works :p