• Welcome to Valhalla Legends Archive.
 

Ping

Started by Hidden, January 11, 2005, 06:58 AM

Previous topic - Next topic

Hidden

I've added a handle error, i did all i could understand from what u guys said. Can someone plz gimme a similar function that would make me realise my mistake or should I just give up and ask for it? :/
I tried, and still not working :(

EviL_MarinE

#16
Hm, well you can get it to give ping for when a user joins right?


Now all you have to do is swap some things around and make it say it when you talk, i would have it like this


Dim Username as String

Username = PublicModule.KillNull(Mid(Data, 29))


If Username = EviL_MarinE And Mid(strtext,1 ,5) = frmConfig.trigger.text & "ping " then


If you dont see how i got Mid(Strtext,1, 5) then msg me

Maybe your bot isnt agreeing with whar you have said for your username or "ping" bit. go over and check it
ElseIf intAccess >= 60 And Left((LCase(Message)), 6) = Form2.txttrigger.Text & "ping " Then
That part

Make sure its telling the right thing for the bot to see

Hidden

The bot agrees since i don't get an error, i just get told that my ping is 0. which it isn't. I've tried to get around using the normal Ping function to get it, but i was unsuccessful. Now what u did marine, was redo my condition a bit differently.

Arta

Quote from: CrAz3D on January 11, 2005, 12:42 PM
Makes sense, but would you be reloading the data from the array into the list everytime it was restored from the task bar & remove it when the list isn't showing?...is that really efficent?

I doubt it very much - not unless VB sucks even more than I think it does. You shouldn't ever have to entirely reload the list, unless you're clearing and repopulating it - like you would if you were moving channels. Normally, you'd just be reloading a single element, which would happen when a user joined your channel.

Arta

Making assumptions like that is unwise.

Zakath

Besides which, it's using it for a purpose for which it was not designed. While it may work in specific instances, as a principle that is not a good idea.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Hidden

And throughout the 21 posts I have yet to get my answer or bot working :/

Adron

Quote from: CrAz3D on January 12, 2005, 08:42 AM
So why wouldn't it be acceptable (if storing JUST ping & username) to use the channellist as a sotrage device?  This is assuming that you will not add things later on.

It's much slower to access than any other list. If you make a loop through the users, checking their names against some kind of pattern match, that loop will be slower if the list is stored in a listbox than if it's in a collection or an array.

Blaze

Quote from: S-1-5-<[email protected]>-501 on January 13, 2005, 10:30 AM
I just "/w *USERNAME* Ping!" to find out their ping, that way it can be done in other channels also. The ping is returned to you after whispering someone, it's so PIMP like that.
The ping is also sent to you when you join, or they join a channel. It would save a message if you just stored it into an array then.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

MyndFyre

Quote from: S-1-5-<[email protected]>-501 on January 13, 2005, 04:42 PM
That is why I mentioned the whole thing about other channels, that way I didn't look dumb like someone who doesn't read my whole post.

If they don't join your channel, or visa versa, then you don't know their ping...therefore "/w " them.

The utility of such a function is questionable, though.  If you have a bot specifically for pinging other users, then great; however, if you have one bot that's responsible for maintaining order in a channel, you can pretty quickly overload its queue by having a dozen users "ping" someone all at once.
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.

CrAz3D

The same can happen when using the "say" command.

BTW, where did my post go to & why is it where ever it is?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Hidden

Problem is that Ping cannot specify! Thats why u need the Tping. I can get the ping but I can't get who evers ping i want. So the bot doesn't read the username that i type like it does when someone joins a channel when i used the command.

CrAz3D

This is my ping  command
Case "ping"
        'SendW pA(1) & "'s last reported ping was " & Form1.RoomList.FindItem(pA(1)).ListSubItems(2).text, strAccount
        Queue.AddQueue "/w " & pA(1) & " Ping!"
        Pinging = True


This is my WhisperTo event codePrivate Sub OnWhisperTo(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Integer)
    Chat True, True, WhispNLn, "«To: " & Username & "» "
    Chat False, False, WhispLn, Message
If Pinging = True Then
    SendW Username & "'s ping is " & Ping, CommandName
    Pinging = False
End If
Form1.VBScript.Run "OnWhisperTo", Username, Flags, Message, Ping
PL.PlugEvent "whisperto", Username, Message, Flags, Ping
End Sub


Pinging is a Public Boolean I have declared, CommandName is just something I use so I can have a whisperback command....instead of the SendW Username &... You could just do SEND Username & "'s ping is " & ping (Send would change depending upon how you send chat to bnet)

I really REALLy hope this helps.  This way lets you see other people's ping that are in other channels, & it will give you the correct ping for whomever.  Just make sure that you use the boolean thing too.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Kp

Perhaps this is an obvious question, but why're you trying so hard to incorporate a remotely queryable feature into the bot?  Just modify your client to display the info natively, save you lots of trouble.

Crazed: assuming your posts were the ones screwing up the tables, that's why they vanished.  People were complaining about the table mislayout you caused.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

CrAz3D

Word, that's why I changed it...started to bug me too.  Now my name has spaces so it isn't a continuous name.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...