I have a bit of a scripting problem

Posted by Onyxx on Tue 08 Jun 2004 12:49 AM — 4 posts, 14,508 views.

#0
I've been trying to figure out a way to count the improvments to the skills I get in my game. After you practice something a line comes up if you have improved your skill at all:

* You think your minor_heal_other skill has improved. *

All of the skills use the same wording except for the skill in question. All I need a script to do would be to count each one because rank increases at different increments, and the farther up the fewer in between.

I used to know a little bit of Vb.net but I don't remember much and would appreicate any help I could get.

Thanks :)

USA #1
Trigger:
\* You think your (\w+) skill has improved\. \*
Flags: Regexp, enabled, whatever else youd like.

Send to: Script

Send:
setvariable "%1", Cint(getvariable "%1")+1

You will have to initially set the variables, they will simply be the name, you CAN add whatever you want (Skill_) infront and such. You can also initially set the variable with triggers, if you have a command that lists your percentages. Also, the variables are case sensetive, you might want to convert to lowercase.

This of course requires scripting to be enabled, and set to VBscript.
Amended on Tue 08 Jun 2004 03:54 AM by Flannel
#2
Thanks! That helps a little bit. But it's been a long time since I worked with it and I was hoping maybe I could get a 'sample'?
USA #3
Well, you can download the scripting help file, theres a link at the top of the Mushclient forum, you can also get a list of the "inbuilt script functions", which is basically the way you get the script to interact with the world, and the mud. They all have examples about how to use them. Unless youre doing complicated stuff, youll be using the MC functions, some basic logic, and some basic arithmetic.