Author Topic: VBScripting help  (Read 2691 times)

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« on: February 25, 2009, 04:38:50 PM »
ok i went to w3school.com (or something) like vector told me to do
it was ok but i only learned/understood how to do the openings and closings:

<html>
<head>
stuff here loads as the page loads
</head>
<body>
not too sure about here
</body>
</html>

i kinda got grounded.(  don't tell any1 I'm here  ) that's all i have to say for now >.>
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
VBScripting help
« Reply #1 on: February 25, 2009, 05:07:41 PM »
You are reading the wrong stuff, that's all HTML web development stuff.

Start from here:

http://w3schools.com/vbscript/vbscript_variables.asp
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #2 on: February 25, 2009, 05:36:09 PM »
ya.. i kinda didn't understand that part T.T ill reread it. ty for telling me
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
VBScripting help
« Reply #3 on: February 25, 2009, 09:26:02 PM »
Yah, the VBScript tutorials will help you a lot, but the way the tutorial does them, they lay an emphasis on VBScript with HTML, but the concept for VBScript still applies. Another way I learned VBScript was looking at the stealthbot scripts, until I found out how to write ok scripts.

http://rev77.net/scripts is a good starting place as well. You may look at our scripts, and learn from them too. Don't hesitate to ask any of us if you're stuck.
« Last Edit: February 25, 2009, 10:11:01 PM by Hero »
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #4 on: February 26, 2009, 04:36:36 AM »
at : http://rev77.net/scripts/?query=view&script=run.plug
 
"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.
« Last Edit: February 26, 2009, 04:38:59 AM by shhdn »
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
VBScripting help
« Reply #5 on: February 26, 2009, 05:04:10 AM »
zomg i replied and nothing happened !

Code: [Select]
AddChat vbGreen, "Hi" Would say Hi in the bot window, green.

Here is a list of other colors you could use.
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #6 on: February 26, 2009, 07:37:48 AM »
does a script have to have a name? in the w3school the say the following:

[div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto']
Sub mysub()
 some statements
End Sub
[/div]

does the "mysub" have to be there?
« Last Edit: February 26, 2009, 07:38:27 AM by shhdn »
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #7 on: February 26, 2009, 09:09:20 AM »
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.

sub text_test()
    AddChat vbBlue "o hai"
end sub

if this does work. then i guess i need to try something harder
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
VBScripting help
« Reply #8 on: February 26, 2009, 10:34:23 AM »
Quote from: shhdn
at : http://rev77.net/scripts/?query=view&script=run.plug
 
"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.
Talk to Mike about getting your own subdomain, like blake.rev77.net, so you don't have to do this every single time.

I could always set you up with an ftp account on clanmage.phost.ws as an alternative.

Quote from: shhdn
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.

sub text_test()
    AddChat vbBlue "o hai"
end sub

if this does work. then i guess i need to try something harder
According to the plugin system, that line will fire when you add the following:

Quote
'test
'0.1


sub test_Event_Load()
    AddChat vbBlue "o hai"
end sub
the first line "'test" defines the prefix, and is how the plugin system will call your plugin.

This line:
Code: [Select]
Sub test_Event_Load()Fires EACH time the bot either starts up, or the scripts are reloaded
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #9 on: February 26, 2009, 11:22:09 AM »
'test
'0.1


sub test_Event_Load()
    AddChat vbBlue "o hai"
end sub

ok i understand. the Test in  "Test_event_load()" is the name as mentioned above that in " 'test "
and i under stand to tell it when to show up the event(trying to learn quickly and underline things without knowing what im doing if it works im happy) is the load up. but y is there a " '0.1 " that i dont get. and yes i do need a better place for this. im happy i under stand a bit now tho
« Last Edit: February 26, 2009, 11:25:20 AM by shhdn »
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
VBScripting help
« Reply #10 on: February 26, 2009, 11:38:07 AM »
The 0.1 indicates the plugin version, and is required to be there in order to load the plugin.
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #11 on: February 26, 2009, 12:42:46 PM »
2 more things:

1. i write this on notepad right? if not then on what?
2. i save them as yadayada.plug?
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #12 on: February 26, 2009, 02:49:53 PM »
ok for my next little try i am stuck again. i want to make it say something to the channel not just the person useing the sb. i think i have it so far but im stuck i dont know how to make it run only when a trigger is said either :/



Code: [Select]
'talk
     '0.1
    
     sub {dont know what goes here, or is it talk_Event_Load()}
         DSP Origin, "HAI PPL"
     end sub

at least i think "DSP Origin" is how you make it talk in a channel as of :
http://rev77.net/scripts/?query=view&script=pageme.plug
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

shhdn

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • http://
VBScripting help
« Reply #13 on: February 26, 2009, 05:37:43 PM »
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^_^
Quote
[8:01:08 PM] <Nice> lol you would say thats what you said
 [8:01:19 PM] <shhdn> yes
 [8:01:23 PM] <Nice> you would agree
 [8:01:26 PM] <shhdn> nope
 [8:01:32 PM] <Nice> you would disagree to agreeing
 [8:01:37 PM] <shhdn> maby
 [8:01:46 PM] <Nice> you would be indecisive when i make fun of you
 [8:01:59 PM] <shhdn> most likely

Dare you click this?

~I am the Global in your Sig. Guess who I am.

its obvious who you are. you are text, but not any text, you are Sentient!!
Nope.-Mysterious Global

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
VBScripting help
« Reply #14 on: February 26, 2009, 07:12:59 PM »
He can just use http://mike.vbscript.pastebin.com or http://blake.pastebin.com

Fixed this up
Code: [Select]
'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
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector