[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]  Jscript
. . -> [Subject]  Necromium-related script (anyone who can script should read =P)

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Necromium-related script (anyone who can script should read =P)
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Fri 30 Nov 2001 10:02 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Smeagol   (10 posts)  [Biography] bio
Date Thu 29 Nov 2001 03:03 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Thu 29 Nov 2001 02:41 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Smeagol   (10 posts)  [Biography] bio
Date Thu 29 Nov 2001 12:08 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Mon 26 Nov 2001 09:08 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Smeagol   (10 posts)  [Biography] bio
Date Sun 25 Nov 2001 01:14 AM (UTC)  quote  ]
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.
[Go to top] top

Posted by Nick Gammon   Australia  (18,769 posts)  [Biography] bio   Forum Administrator
Date Sun 25 Nov 2001 12:21 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Smeagol   (10 posts)  [Biography] bio
Date Sat 24 Nov 2001 11:19 PM (UTC)  quote  ]
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
[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,248 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]