CLB
New Member
Posts: 9
|
Post by CLB on Aug 26, 2003 12:02:11 GMT -5
I have read all the source codes of viper addons i could get and still have the same problem... When i try to make an exe my vb reacts on this code: VAddonEngine.IAddonEngine with this msg: Comply Error: User-defined type not defined. I had the same question on tg's forum beafore and no anwsers... I realy hope i get a awnser here! ;D
|
|
|
Post by Webagent007 on Aug 26, 2003 12:19:02 GMT -5
I must have missed that post on TG board, what you need to do is add it as refrence in your vb project.
go to Project >> Refrences >>
browse to C:\Program Files\ViperBot\vsys\VAddonEngine.dll
add it and thats it
|
|
CLB
New Member
Posts: 9
|
Post by CLB on Aug 26, 2003 14:08:24 GMT -5
Can someone explain this bit of code? I have figgured some out but there is alot that i don't understand... Dim sMode As String
sMode = Split(str, " ")(3) Select Case LCase$(sMode) Case "-q" sNick = Split(str, " ")(4) sNick = Replace$(Replace$(sNick, Chr(10), ""), Chr(13), "") If UCase$(sNick) = UCase$(txtNick.Text) Then MyViperAddon.Send ("MODE " & txtNick.Text & " +h " & txtGold.Text) End If Case "-o" sNick = Split(str, " ")(4) sNick = Replace$(Replace$(sNick, Chr(10), ""), Chr(13), "") If UCase$(sNick) = UCase$(txtNick.Text) Then MyViperAddon.Send ("MODE " & txtNick.Text & " +h " & txtBrown.Text) End If End Select I hope there's someone that have time to help a neewbee in vb ;D But even the JJ was one?
|
|
|
Post by Webagent007 on Aug 26, 2003 16:30:05 GMT -5
what this does is it checks for -o or -q mode, then it checks if its you (wich it can only do if you filled in your IRC Nick name in the txtNick.Text), and if it is it hosts or owners you back up
MyViperAddon.Send ("MODE nk$ +h " & txtBrown.Text)
^^ that would work too btw
|
|
CLB
New Member
Posts: 9
|
Post by CLB on Aug 27, 2003 8:59:05 GMT -5
How do i use split(), chr() and replace$()?
|
|
|
Post by Webagent007 on Aug 29, 2003 0:02:44 GMT -5
like this: and and Chr$(charcode as long) for example in VB: """" these sings mean something, if you want to use them you can mention them like this: Chr$(34) you can type in your vb debug/Immediate window the following: ?Chr(34) press enter and it will translate into: " you can also type in vb debug/immediate window: ? asc("char") It will translate the other way around
|
|
|
Post by Webagent007 on Aug 29, 2003 0:15:05 GMT -5
here's a list for example, and you have extended lists aswell, you can get one asciichar on many diffrent ways (think of ALT codes too).. We used to be able to use smileys in our MSN nicknames, they only blocked the ascii chars and not the unicode that represents the same.. however they fixed that now. 10 = line feed, and 13 = carriage return
|
|
|
Post by hackerk on Sept 3, 2003 10:58:05 GMT -5
i'm trying to use the viper addon, how do i trap user input i.e. if someone types @command i want to excute some vb i've tried putting code in : Private Sub MyViperAddon_ChatWireSrv(CWStr_srv As String) Private Sub MyViperAddon_ChatWireCtl(CWStr_ctl As String) but these only seem to respond to join type events cheers hack
|
|
|
Post by Armstrong on Sept 3, 2003 22:59:56 GMT -5
Need to see more of your code.
|
|
|
Post by hackerk on Sept 4, 2003 6:38:58 GMT -5
Private Sub MyViperAddon_ChatWireCtl(CWStr_ctl As String)
text1.text = CWStr_ctl & vbCRLf & text1.text
End Sub
Private Sub MyViperAddon_ChatWireSrv(CWStr_srv As String)
text2.text = CWStr_srv & vbCRLf & text2.text
End Sub
only seems to display anything when a chatter join's is away, or returns.
nothing is sent when a chatter types anything. i was trying to get the trivia addon example to work, and it asks questions ok, but doesn't respond when chatters answer the questions.
|
|
CLB
New Member
Posts: 9
|
Post by CLB on Sept 4, 2003 8:30:13 GMT -5
I don't know what Addon Text* is but for me it sounds like somthing about some text... MAYBE it need to be ticktet for the addon to response on text? It's worth a try isn't it?
*You find it in: Controls > General
|
|
CLB
New Member
Posts: 9
|
Post by CLB on Sept 4, 2003 9:26:29 GMT -5
AND (correct me if im wrong) you have to have the timer you know... (Look in trivia source code for more info)
In MyViperAddon_ChatWireCtl(CWStr_ctl As String) you should enable the timer. All the text1.text = CWStr_ctl & vbCRLf & text1.text you should write in the timer sub instead... Everything with the timer is more explaned in trivia sorce code. (You can download it from http://www.techgear007.net)
|
|
|
Post by hackerk on Sept 4, 2003 15:51:44 GMT -5
yep the timer is enabled, and the addon checkbox checked. it just seems to be a prob responding to user input the example welcome addon works fine, just the trivia that doesn't repond to ppl answering questions hack
|
|
|
Post by Webagent007 on Sept 4, 2003 16:45:14 GMT -5
im not sure if I understand this, but you can use the select cases for things like PRIVMSG and JOIN (JOIN is used in the welcome)
Private Sub tmrAsyncCall_Timer() Select Case MyViperAddon.IrcMessageType_srv(strAysnc) Case IRCMessages_srv.Join Join (strAysnc) Case IRCMessages_srv.Prop Prop (strAysnc) Case IRCMessages_srv.Mode Mode (strAysnc) End Select tmrAsyncCall.Enabled = False
End Sub
you see the join, prop and mode? well you want the trivia to listen to PRIVMSG so then you need:
IRCMessages_srv.Privmsg
You dont have to do it like this but why code everything double thats already inside the addon?
then you parse what you receive (PRIVMSG in your case) and you make viper respond if anything matches the right answer.. responding is like this:
MyViperAddon.Send ("PRIVMSG rn$ :"hello! I'm saying something!")
but I guess the best way to see what your doing wrong is to see what you made
|
|
|
Post by hackerk on Sept 5, 2003 5:48:43 GMT -5
basically the main problem is that the addon doesn't capture a chatters input!
checking the any raw input shows join messages, but not chatter responses
|
|