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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  New at scripting and looking for help

New at scripting and looking for help

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by NavyNuke   (7 posts)  [Biography] bio
Date Mon 13 Jun 2005 08:15 PM (UTC)
Message
I play on a mud that has the the command 'hack' that allows you to hack people's bank accounts which are a 5 digit number from 00000 to 99999.

I'm looking to make a script that will hack starting at a number that I specify and if it recieves the message that no account exists to hack the next progressive account. The message it will recieve is this:

Damn! You cant find that account! Maybe its not there...

There is another failure message that just requires you to hack that same account again:

You failed to hack into the system! A loud beep signals your failure.

And the message for when you get money from the account is:

You steal # credits from the account!

where # is the amount of credits stolen, which is never constant.

If a good hack is made, I want to keep hacking the account until I give another command to hack a different account

Can anyone help me out?
[Go to top] top

Posted by NavyNuke   (7 posts)  [Biography] bio
Date Reply #1 on Mon 13 Jun 2005 08:26 PM (UTC)
Message
oh and the command used to hack is 'hack #####'
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #2 on Tue 14 Jun 2005 04:01 AM (UTC)
Message
Think this should do it, although I might have overlooked something.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Monday, June 13, 2005, 8:57 PM -->
<!-- MuClient version 3.66 -->

<!-- Plugin "BankHack" generated by Plugin Wizard -->

<muclient>
<plugin
   name="BankHack"
   author="Flannel"
   id="86822aed3348d709fabc5bce"
   language="VBscript"
   purpose="Hacking numeric bank accounts"
   save_state="y"
   date_written="2005-06-13 20:55:15"
   requires="3.24"
   version="1.0"
   >
<description trim="y">
<![CDATA[
Hack:On
  Turn hacking on
Hack:Off
  Turn hacking off
Hack:SetAcct #
  Set the account number
Hack:RandAcct
  Generate a random account number
Hack:Auto:On
  Turn automatic hacking on (see below)
Hack:Auto:Off
  Turn automatic hacking off (see below)

Optional (disabled by default):
hack #
  Will capture your hack attempt and set the account number automatically.
  Does NOT turn hacking on, but it will send your command regardless.
]]>
</description>

</plugin>


<!--  Triggers  -->

<triggers>
  <trigger
   enabled="y"
   group="Hacking"
   ignore_case="y"
   keep_evaluating="y"
   match="^Damn\! You cant find that account\! Maybe its not there\.\.\.$"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>dim num, i
num = getVariable("AcctNum") + 1
if num = 100000 then
  num = 0
  note "Hack Account Rollover!"
end if
for i = Len(num) to 4
num = "0" &amp; num
next
SetVariable "AcctNum", num
Send "hack " &amp; getvariable("AcctNum")</send>
  </trigger>
  <trigger
   enabled="y"
   expand_variables="y"
   group="Hacking"
   ignore_case="y"
   keep_evaluating="y"
   match="^You failed to hack into the system\! A loud beep signals your failure\.$"
   regexp="y"
   sequence="100"
  >
  <send>hack @AcctNum</send>
  </trigger>
  <trigger
   enabled="y"
   expand_variables="y"
   group="Hacking"
   ignore_case="y"
   keep_evaluating="y"
   match="^You steal (\d+) credits from the account\!$"
   regexp="y"
   sequence="100"
  >
  <send>hack @AcctNum</send>
  </trigger>
</triggers>

<!--  Aliases  -->

<aliases>
  <alias
   match="^Hack:(On|Off)$"
   enabled="y"
   regexp="y"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  <send>if (StrComp("%1","on",0) = 0) then
  EnableTriggerGroup "Hacking", 1
  note "Hacking Enabled"
  send "hack " &amp; getvariable("AcctNum")
elseif (StrComp("%1","off",0) = 0) then
  EnableTriggerGroup "Hacking", 0
  note "Hacking Disabled"
end if</send>
  </alias>
  <alias
   match="^Hack:SetAcct (\d+)$"
   enabled="y"
   regexp="y"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  <send>dim num, i
num = "%1"
for i = Len(num) to 4
num = "0" &amp; num
next
SetVariable "AcctNum", num
Note "Hacking account set to: "  &amp; getvariable("AcctNum")</send>
  </alias>
  <alias
   match="^Hack:Auto:(On|Off)$"
   enabled="y"
   regexp="y"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  <send>if (StrComp("%1","on",0) = 0) then
  EnableAlias "AutoHack", 1
  note "Automatic Account Setting Enabled"
elseif (StrComp("%1","off",0) = 0) then
  EnableAlias "AutoHack", 0
  note "Automatic Account Setting Disabled"
end if</send>
  </alias>
  <alias
   match="^Hack:RandAcct$"
   enabled="y"
   regexp="y"
   send_to="12"
   ignore_case="y"
   sequence="100"
  >
  <send>dim num, i
num = CStr(Int(Rnd*100000))
for i = Len(num) to 4
num = "0" &amp; num
next
SetVariable "AcctNum", num
Note "Hacking account set to: "  &amp; getvariable("AcctNum")</send>
  </alias>
  <alias
   name="AutoHack"
   match="^hack (\d+)$"
   enabled="n"
   echo_alias="y"
   expand_variables="y"
   regexp="y"
   send_to="12"
   ignore_case="y"
   keep_evaluating="y"
   sequence="100"
  >
  <send>SetVariable "AcctNum", "%1"
send "%0"</send>
  </alias>
</aliases>

<!--  Variables  -->

<variables>
  <variable name="AcctNum">00000</variable>
</variables>

<!--  Script  -->


<script>
<![CDATA[
Sub OnPluginConnect
  Randomize
end Sub
]]>
</script>


<!--  Plugin help  -->

<aliases>
  <alias
   script="OnHelp"
   match="BankHack:help"
   enabled="y"
  >
  </alias>
</aliases>

<script>
<![CDATA[
Sub OnHelp (sName, sLine, wildcards)
  world.Note world.GetPluginInfo (world.GetPluginID, 3)
End Sub
]]>
</script> 

</muclient>

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by NavyNuke   (7 posts)  [Biography] bio
Date Reply #3 on Tue 14 Jun 2005 04:52 PM (UTC)
Message
Thanks, this is great but I can't get it to work. When I try to load it into the plugins screen, it doesn't work and when I try to load it as a script it doesn't work.

What exactly do I have to do make this thing a plugin?

I keep getting some wierd error that says the following whenever I try to load it

Error number: -2146827264
Event: Execution of line 1 column 1
Description: Expected statement
Line in error:
<?xml version="1.0" encoding="iso-8859-1"?>
Called by: Immediate execution
[Go to top] top

Posted by NavyNuke   (7 posts)  [Biography] bio
Date Reply #4 on Tue 14 Jun 2005 05:52 PM (UTC)
Message
Okay, I saved the file as an xml and it seems to be working, only this is that the triggers don't work at all.
[Go to top] top

Posted by NavyNuke   (7 posts)  [Biography] bio
Date Reply #5 on Tue 14 Jun 2005 05:58 PM (UTC)
Message
Got the triggers to work, but it seems when I type hack:on or when the trigger for an account not being found sends it's command, it hacks the same account twice
[Go to top] top

Posted by NavyNuke   (7 posts)  [Biography] bio
Date Reply #6 on Tue 14 Jun 2005 07:23 PM (UTC)
Message
Okay, after using this and successfully hacking 2.9 million credits from one account, I found out this works...however everything is still outputting a double command.

Hack:On hacks outputs 2 commands to hack the same acount, Hack:randacct outputs 2 commands to hack random accounts, whenever an account is not found, I get 2 commands sent incrementing both account numbers sent previosuly, when one that has credits is found I get 2 commands sent

I have no idea what is going on.
[Go to top] top

Posted by NavyNuke   (7 posts)  [Biography] bio
Date Reply #7 on Tue 14 Jun 2005 07:31 PM (UTC)
Message
Fixed it, looks like I had the triggers/aliases in the script and also in my world settings for some reason. Works like a charm now

Thanks, great work.
[Go to top] top

Posted by ArmyDennis   (3 posts)  [Biography] bio
Date Reply #8 on Thu 29 Sep 2011 01:57 AM (UTC)
Message
Every time I attempt to load this as a plug in I get the error:
Line 210: Could not initialise script engine (Cannot load)



Any ideas? I'm only familiar with python scripting and don't know how to fix this.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Fri 30 Sep 2011 12:31 PM (UTC)
Message
What operating system are you using?

Template:bug

Please provide a summary of your world configuration:

  • Either use the scripting Immediate window (Ctrl+I) to execute: Debug ("summary")

    or

  • Install the Summary plugin (see "Summary" feature) and type "summary"

Then copy the resulting information from the output window, and paste into a Forum message.

You need version 4.55 onwards of MUSHclient to do this.


- Nick Gammon

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

Posted by ArmyDennis   (3 posts)  [Biography] bio
Date Reply #10 on Fri 30 Sep 2011 04:46 PM (UTC)
Message
I am currently running MUSHclient through wine on Ubuntu 11.04.



-------------- MUSHclient summary --------------

MUSHclient version: 4.73
Compiled: May 8 2011.
Time now: Friday, September 30, 2011, 12:41 PM
Operating system: Windows XP
Libraries: Lua 5.1.4, PCRE 8.10, PNG 1.5.2, SQLite3 3.7.6.2, Zlib 1.2.5
World name: 'lotj', ID: 3c8ff3523efb613aff964c7f
-- Scripting --
Script language: Lua, enabled: yes
Scripting active: yes
Script file: Z:\home\dennis\Desktop\new file.lua
Lua sandbox is 127 characters, DLL loading allowed: yes
Scripting prefix: '/'. External editor in use: NO.
Scripting for: 0.000197 seconds.
-- Triggers, aliases, timers, variables --
** Triggers: 0 in world file, triggers enabled: yes.
0 enabled, 0 regexp, 0 attempts, 0 matched, 0.000000 seconds.
** Aliases: 0 in world file, aliases enabled: yes.
0 enabled, 0 regexp, 0 attempts, 0 matched, 0.000000 seconds.
** Timers: 0 in world file, timers enabled: yes.
0 enabled, 0 fired.
Timers checked every 0.1 seconds.
** Variables: 0.
-- MCCP --
MCCP active, took 0.000292 seconds to decompress
MCCP received 1860 compressed bytes, decompressed to 3777 bytes.
MCCP compression ratio was: 49.2% (lower is better)
-- Plugins (Processing order) --
** Plugins: 0 loaded, 0 enabled.
-- Comms --
Connect phase: 8 (Open). NAWS wanted: NO
Received: 4115 bytes (4 Kb)
Sent: 94 bytes (0 Kb)
Received 10 packets, sent 7 packets.
Total lines received: 142
This connection: Sent 4 lines, received 128 lines.
Telnet (IAC) received: DO: 3, DONT: 0, WILL: 2, WONT: 1, SB: 2 [Telnet]
-- MXP --
MXP active: NO, Pueblo mode: NO, Activated: On command
MXP tags received: 0
MXP entities received: 0
MXP errors: 0
-- Commands --
Commands in command history: 2
Speed walking enabled: NO. Speed walking prefix: #
Command stacking enabled: NO. Command stack character: ';'
Accelerators defined: 0
-- Miniwindows --
** Miniwindows: 0 loaded, 0 shown.
-- Output window --
Output pixels: width 1660, height: 772, font width: 11, font height: 21
can show 150 characters, wrapping at column 80, height 36 lines.
Output buffer: 160 of 5000 lines.
-- Miscellaneous --
Logging: NO, tracing: NO
** SQLite3 databases: 0
Sound buffers in use: 0

---------------------- End summary ----------------------
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Sun 02 Oct 2011 12:50 AM (UTC)
Message
Under Wine you may not have VBscript installed. See here for how to download (not sure it the links still work):

http://www.gammon.com.au/forum/?bbtopic_id=2

- Nick Gammon

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

Posted by ArmyDennis   (3 posts)  [Biography] bio
Date Reply #12 on Sun 02 Oct 2011 06:15 PM (UTC)
Message
I managed to find and download the aforementioned installer but when I attempted to execute the file it told me that my service pack version was newer than the version I was attempting to install. The help is much appreciated, but I fear I might be better off re-installing windows on another machine. MUSHclient seems to experience considerable lag on this outdated machine having to be run under an emulation of windows anyhow. No more emulated zoo, it's time to let the beast run wild in it's native environment. :)
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Mon 03 Oct 2011 02:01 AM (UTC)
Message
And loving it!

Although I have heard that it runs OK on Linux, but probably more modern machines.

- 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.


40,558 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at HostDash]