[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]  Script help, No idea on scripting

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

Script help, No idea on scripting

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


Posted by Robert Powell   Australia  (349 posts)  [Biography] bio
Date Sat 22 Oct 2005 06:55 AM (UTC)  quote  ]
Message
Hi all, i have the need to change the alignment of a lot of mobs in my game, so i thought a script would do this nicely for me, but i have no idea how to begin with using external script, nor the syntax for vb or any other scriptiing language.

So what i need to do is the following, the values can be hard coded for simplicity.

Have a start vnum
Have a finnish vnum,
mset currentvnum flags prototype
mset currentvnum align <hardcoded value>
mset currentvnum flags prototype
currentvnum ++
if currentvnum == finnishvnum
end

if anyone could point me in the right direction on this would be greatly apreciated.

Robert Powell.

EldhaMUD Game Developments
The_Fury: Lead Developer, Head Coder
http://fury.eldhamud2.org
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 22 Oct 2005 11:01 PM (UTC)  quote  ]
Message
Well that is really easy. You could do that in the Intermediate scripting window.


for i = 100 to 200 
  Send "mset " & i & " flags prototype"
  Send "mset " & i & " align 400"
  Send "mset " & i & " flags prototype"
next



Change the 100 and 200 to be the vnum range you want. You might want to make the words "Send" to be "Note" initially to check you are doing it correctly.

Backup your file(s) before you start.

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


1,786 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]