Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Jscript
➜ Necromium-related script (anyone who can script should read =P)
|
Necromium-related script (anyone who can script should read =P)
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Smeagol
(10 posts) Bio
|
| Date
| Sat 24 Nov 2001 11:19 PM (UTC) |
| Message
| i was wondering if someone could help me make a script for mushclient for the circle-mud necromium. basically, i dont know how to script at all and need something to help me count the souls i have.. (im a Necromancer).. in necromium, each kill i get a soul, and theres something called a 'soul jar' to keep track, but they are very expensive, and i heard one could script a 'soulcounter'. err, so, i have the messages and what they do, i just need someone to put it all together. help? if anyone would like to, please reply to this (or e-mail asspants69@hotmail.com). thanks.
Gray, faithful mushclient user | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 25 Nov 2001 12:21 AM (UTC) |
| Message
| | Post the message that you get when you kill a soul and we'll see what we can do with it. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Smeagol
(10 posts) Bio
|
| Date
| Reply #2 on Sun 25 Nov 2001 01:14 AM (UTC) |
| Message
| ok, this is the information as was given to me by someone who supposedly know how this works: (=P)
[remove paranthesis of course]
{With a wicked grin, you absorb the soul} {increment your soul counter by 1}
{You scream in triumph as the souls of your enemies are released from your body into a sphere of deathly energy around you.} { -5 from soul counter}
{You begin chanting quietly, and your fingers glow with deathly energy.} {set it back to zero, that's the first death touch message}
{As the last drop of life is released from your body, a tunneling cyclone of energy erupts from your body spilling forth your captured souls.} {reset to zero again, that's what it says when you die}
thanks. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Mon 26 Nov 2001 09:08 PM (UTC) |
| Message
| You need three script routines, to add one, subtract five, and set to zero. If JScript they would look like this:
function OneMoreSoul (thename, theoutput, wildcardsVB)
{
var iSouls;
// get current number
iSouls = world.GetVariable ("souls");
// if no such variable, make zero
if (iSouls == null)
iSouls = 0;
iSouls++;
world.SetVariable ("souls", iSouls);
}
function FiveLessSouls (thename, theoutput, wildcardsVB)
{
var iSouls;
// get current number
iSouls = world.GetVariable ("souls");
// if no such variable, make zero
if (iSouls == null)
iSouls = 0;
iSouls -= 5;
if (iSouls < 0)
iSouls = 0;
world.SetVariable ("souls", iSouls);
}
function NoSouls (thename, theoutput, wildcardsVB)
{
world.SetVariable ("souls", 0);
}
Now you just need to set up some triggers, to call the appropriate scripts, eg.
Trigger: With a wicked grin, you absorb the soul
Label: OneMoreSoul
Script: OneMoreSoul
Trigger: You scream in triumph as the souls of your enemies are released from your body into a sphere of deathly energy around you.
Label: FiveLessSouls
Script: FiveLessSouls
Trigger: You begin chanting quietly, and your fingers glow with deathly energy.
Label: NoSouls_1
Script: NoSouls
Trigger: As the last drop of life is released from your body, a tunneling cyclone of energy erupts from your body spilling forth your captured souls.
Label: NoSouls_2
Script: NoSouls
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Smeagol
(10 posts) Bio
|
| Date
| Reply #4 on Thu 29 Nov 2001 12:08 AM (UTC) |
| Message
| ok.. i copied all three of those functions (whatever theyre referred to as) in a notepad, saved as soulcounter.js.. loaded it in mushclient, added the triggers just as you said.. and its all there. what do i do now to get it to tell me how many souls i have (or dont have)? sorry if this is an obvious answer, im totally new to scripting.
thanks
~Gray | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Thu 29 Nov 2001 02:41 AM (UTC) |
| Message
| You could just type in:
/world.note (world.getvariable ("souls"));
To save typing that all the time you could make an alias:
Alias: souls
Send: think souls = @souls
Expand variables: checked
Then just type "souls" it it will "think" "souls = 5" or whatever.
A third approach is to add the following line to each of the script functions (at the end, but before the final "}"):
world.setstatus ("souls = " + world.getvariable ("souls"));
What this will do is constantly update the status line (near the bottom of the window) with the number of souls, so you can just glance at that without having to type anything.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Smeagol
(10 posts) Bio
|
| Date
| Reply #6 on Thu 29 Nov 2001 03:03 AM (UTC) |
| Message
| um, i tried all three methods and it didnt work =( maybe i did something wrong (didnt choose an option, click a checkbox) or set up the triggers wrong. actually, my mushclient has never really handled triggers correctly. i cant figure it out. maybe thats the reason for all the problems. (when i type "souls" it always returns '0', even after ive just killed a few mobs/monsters) sorry if this is a bother to you, its very frustrating for me not knowing how to do anything nor keep track of my souls. thanks for trying to help.
~Gray | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #7 on Fri 30 Nov 2001 10:02 PM (UTC) |
| Message
| Set the triggers to colour the lines so you can see if the trigger is matching or not. If not, you might have an extra space or something in it. The trigger must match exactly what arrives.
If the trigger is matching make sure you have scripting enabled, and the "script file" as the file with the script functions in it.
Then check under the world configuration "variables" window, to see if the "souls" variable has a correct value in it.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
24,910 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top