• Welcome to Valhalla Legends Archive.
 

Wishes for new VB functions

Started by Dyndrilliac, September 13, 2004, 09:39 PM

Previous topic - Next topic

Dyndrilliac

Make a function to assassinate select individuals. That would be very useful.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

phvckmeh

#1
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")

MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Meh

Judging by the control bit he wants to Control his ass, ewwwww!

Dyndrilliac

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.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Banana fanna fo fanna


Adron

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.

Grok

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

Stealth

#8
QuotePublic Enum G_KILLMETHOD
   ASPHIXIATION
   BLADE
   BLEEDING
   CONCUSSION
   CRUSH
   ELECTROCUTION
   EMBARRASSMENT
   FALL
   FIREARM
   POISON
   CHOCOLATE
End Enum

My favorite one! :)
- Stealth
Author of StealthBot

Soul Taker

#9
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.

Dyndrilliac

Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Grok

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