[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Calculate script

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Calculate script

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Jcet   USA  (25 posts)  [Biography] bio
Date Fri 19 Apr 2002 07:17 PM (UTC)  quote  ]
Message
Ok, I'm trying to make a script that when it reads the line (Already have the trigger) "* tells you 'Calculate *'"
So when someone tells you "Calculate 1600"...

Sub Calculate (TriggerName, TriggerLine, arrWildcard)
world.send "tell " & arrWildcard (1) & " from " & arrWildcard (2) & " you;" (this tells them from %2 you;)
world.send "tell " & arrWildcard (1) & " Gain: " & arrWildcard (2) * 0.05 (gain 60)
world.send "tell " & arrWildcard (1) & " Have to power down to: " & arrWildcard (2) * 0.25 + the arrWildcard (2) (power down to 1500"
world.send "tell " & arrWildcard (1) & " Stop gaining at: " & arrWildcard (2) * 2 (Stop gaining at:2400)
end sub

see what im getting at? or do i need to explain it to you more?(it confuses me)

-Jcet
See no good, hear no good, be no good, kill all good!
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 20 Apr 2002 01:16 AM (UTC)  quote  ]
Message
I don't see what the problem is. It works, pretty-well as you had it ...


Sub Calculate (TriggerName, TriggerLine, arrWildcard) 
 world.send "tell " & arrWildcard (1) & " from " & arrWildcard (2) & " you:"
 world.send "tell " & arrWildcard (1) & " Gain: " & arrWildcard (2) * 0.05  
 world.send "tell " & arrWildcard (1) & " Have to power down to: " & arrWildcard (2) * 0.25 + arrWildcard (2)
 world.send "tell " & arrWildcard (1) & " Stop gaining at: " & arrWildcard (2) * 2 
end sub 

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,176 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]