Posted by: Zakara
« on: March 08, 2009, 08:59:29 PM »What are or were you trying to do exactly?
is this good?Note the corrections in bold.
'talk
'0.2
Sub talk_Event_Load()
AddChat vbYellow, "talk test loaded"
End Sub
sub talk_Event_UserTalk(Username, Flags, Message, Ping)
If Left(LCase(Text), Len(BotVars.Trigger) + 6) = BotVars.Trigger & "speak " Then
sayTheRest = Right(Message, Len(Message) - (Len(BotVars.Trigger) + 6))
AddQ sayTheRest
End If
End Sub
sayTheRest = Right(Message, Len(Message) - (Len(BotVars.Trigger) + 6))
Len(Message) - (Len(BotVars.Trigger) + 6)
Ok, say someone said ".speak hai there"'talk
'0.2
Sub talk_Event_Load()
vbYellow "talk test loaded"
End Sub
sub talk_Event_UserTalk(Username, Flags, Message, Ping)
If Left(LCase(Text), Len(BotVars.Trigger) + 6) = BotVars.Trigger & "speak " Then
sayTheRest = Right(Message, Len(Message) - (Len(BotVars.Trigger) + 6)
AddQ sayTheRest
End If
End Sub
i found a few things. and sorry for spamming this topic. i was looking the HL plugins addon to abort the game and i found something here is my slightly revised script still need help tho. p.s. if i could just edit my above post i would have but i cant so once again sorry.Code: [Select]'talk
'0.1
Sub talk_Event_PressedEnter(Text)
If Left(LCase(Text), 11) = "/hai" Then
idk what to do here >.>
end sub
Sub talk_Event_PressedEnter(Text)
If Left(LCase(Text), 11) = "/hai" Then was stolen from the plugin at:http://rev77.net/scripts/?query=view&script=hlAbortPlaying.plug
so idk if it will work but it looks good^_^
'talk
'0.1
Sub talk_Event_PressedEnter(Text)
'// Lets check the leftmost nine characters to see if they said /saythis<space>
'// LCase() just means make it lowercase. That way they can use /SaY, and /saY, and it won't matter
If Left(LCase(Text), 9) = "/saythis " Then
AddChat vbGreen, "You said " & Right(Text, Len(Text) - 9)
End If
End Sub
'talk
'0.1
Sub talk_Event_UserTalk(Username, Flags, Message, Ping)
'// Lets check the leftmost eight characters plus the length of the trigger to see if they said <trigger>saythis<space>
'// LCase() just means make it lowercase. That way they can use /SaY, and /saY, and it won't matter
If Left(LCase(Text), Len(BotVars.Trigger) + 8) = BotVars.Trigger & "saythis " Then
'// get what they put after <trigger>saythis
sayTheRest = Right(Message, Len(Message) - (Len(BotVars.Trigger) + 8)
AddQ sayTheRest
End If
End Sub
'talk
'0.1
Sub talk_Event_PressedEnter(Text)
' Left takes the specified amount of letters off the left of a string or message
' You took off 11, for "/hai" you only need 4
If Left(LCase(Text), 4) = "/hai" Then
' This is a comment and should be used for things you want to remind yourself of or tell others
' If Statements must end in a matching End If
' Something you could put here would be:
AddChat vbGreen, "hai2u2"
End If
End Sub
'talk
'0.1
Sub talk_Event_PressedEnter(Text)
If Left(LCase(Text), 11) = "/hai" Then
idk what to do here >.>
end sub
'talk
'0.1
sub {dont know what goes here, or is it talk_Event_Load()}
DSP Origin, "HAI PPL"
end sub
at : http://rev77.net/scripts/?query=view&script=run.plugTalk to Mike about getting your own subdomain, like blake.rev77.net, so you don't have to do this every single time.
"AddChat vbGreen"
does that meen i can use other colors?
trying to make something that shows up on startup like the plugin manager. just more simple like "hi"
T.T i think i know what im doing. and lastly what program do i wright this on? is notepad ok?
ill probly be working on this at school so anything i make at school i have to post here so i can edit it when i get home. at least untill i find my flash drive. if this is not ok plz tell me.
ok here it is. as far as i know this will work then again its only 1 line long >.> i cant test it as i am in school for now but if there is no responce ill tryit when i get home.According to the plugin system, that line will fire when you add the following:
sub text_test()
AddChat vbBlue "o hai"
end sub
if this does work. then i guess i need to try something harder
'testthe first line "'test" defines the prefix, and is how the plugin system will call your plugin.
'0.1
sub test_Event_Load()
AddChat vbBlue "o hai"
end sub
Sub test_Event_Load()
Fires EACH time the bot either starts up, or the scripts are reloaded