Register forum user name Search FAQ

Gammon Forum

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 ➜ Lua ➜ Is there is newbie guide to scripting?

Is there is newbie guide to scripting?

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


Pages: 1 2  

Posted by Junkiee24   (24 posts)  Bio
Date Fri 25 Nov 2011 11:09 PM (UTC)
Message
is there a newbie guide to how to set up scripting on MUSH? i been using this client to mud for a while but never understood how to set up a script. i am not fluent in coding so i have no idea what kinda line by line needs to be written and how to trigger it to script.

I usually play ncmud.org 9000 which uses a DIKU type mudding. any help would be nice.

thanks
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 26 Nov 2011 01:37 AM (UTC)
Message
Try this:

http://www.gammon.com.au/forum/?id=10212

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #2 on Sat 26 Nov 2011 03:55 AM (UTC)
Message
thanks nick.. trying to figure it out..
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #3 on Sun 27 Nov 2011 12:03 AM (UTC)
Message
okay i followed the guide but when it came to the part when you edit a trigger (using the * in place of the numbers) .. my results didnt print the numbers
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 27 Nov 2011 03:03 AM (UTC)
Message
Did the trigger fire? You can see a trigger fire count in dialog when you edit it.

Can you show the trigger?

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


And the text from the MUD that it was supposed to match?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #5 on Sun 11 Dec 2011 10:40 AM (UTC)
Message
triggers work fine.. but i cant get the script and varibles to work.. triggers and alias work fine..
i dont think i can get the wild card to work also.. is that possible?


i ideally want to set a level script..
(i dont know how to run it from the beg)
i spd wlk to zone A and walk into first room, kill the mobs, then go to next room, etc..
when zone is cleared i go to zone B do the same..

how can i set (alias?) so that when my hp goes below certain % i grab heals from bag and quaf, when my exp is negative (since it count downs) and i am done with zone i go to trainer to train level..
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #6 on Sun 11 Dec 2011 11:00 AM (UTC)
Message
what i meant earlier is that when i set (h%1 m%2 e%3) doesnt return %1 %2 or %3..
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #7 on Sun 11 Dec 2011 11:30 AM (UTC)
Message
triggers work fine.. but i cant get the script and varibles to work.. triggers and alias work fine..
i dont think i can get the wild card to work also.. is that possible?


i ideally want to set a level script..
(i dont know how to run it from the beg)
i spd wlk to zone A and walk into first room, kill the mobs, then go to next room, etc..
when zone is cleared i go to zone B do the same..

how can i set (alias?) so that when my hp goes below certain % i grab heals from bag and quaf, when my exp is negative (since it count downs) and i am done with zone i go to trainer to train level..
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #8 on Sun 11 Dec 2011 07:43 PM (UTC)
Message
It would help to see what you are doing, and then we can suggest improvements:

Template:bug Please help us by advising:
  • The version of MUSHclient you are using. Use the Help menu -> About MUSHclient.
  • A copy of the trigger, alias or timer you were using (see Copying XML)
  • The output from the MUD that caused the problem
  • The error message, if any, that you got (or other relevant output)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #9 on Sun 11 Dec 2011 07:53 PM (UTC)
Message
hmm i am trying to figure out how to implement a script.
and how to run it
how can i show you what i have? email you the world i created?
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #10 on Sun 11 Dec 2011 08:34 PM (UTC)
Message
also i dont know how to turn on the script.. in the script config page, under script prefixes its says (not active) how do i turn it on?
i tried to make a simple script comment to see it actually do something like get heal bag but it doesnt even run that..
been stuck for a while.
do you have a simple short script that works on a particular mud so i can compare and see what i am doing wrong?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #11 on Mon 12 Dec 2011 05:48 AM (UTC)
Message
Did you look at all the "Getting Started" stuff? How about this?

http://www.gammon.com.au/forum/?id=8411

Quote:

triggers work fine.. but i cant get the script and varibles to work.. triggers and alias work fine..
i dont think i can get the wild card to work also.. is that possible?


They work but they don't work? Of course you can get wildcards to work. They are used extensively by many people.

This is all very vague without showing what you are doing, and what you are expecting to match.

Can you please copy and paste the trigger you are working on ...

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.


If it calls a script, copy and paste the script. I presume it isn't very long.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #12 on Tue 13 Dec 2011 04:18 AM (UTC)
Message
that link is very useful.. i dont think i got that far.
the only items i have in my world is triggers and aliases..
eg
Alias (rune) (cast 'rune')
Trigger (You get a heal from your bag) triggers (quaf heal)

i havent got to the steps on the link.. will check it out and report back.. thanks NICK!
Top

Posted by Junkiee24   (24 posts)  Bio
Date Reply #13 on Sun 18 Dec 2011 11:08 AM (UTC)
Message
k i still dont get how to write a script..
how do you input a wildcard as a trigger..
say mending equipment..
i will type <mend *> with * being the obj.
and the mud returns <You buff and polish * a bit.>

i want to keep sending <mend *> till it doesnt return the msg.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #14 on Sun 18 Dec 2011 06:56 PM (UTC)

Amended on Sun 18 Dec 2011 06:57 PM (UTC) by Nick Gammon

Message
I will ask you again, please show us your trigger:

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

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


77,779 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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

Go to topic:           Search the forum


[Go to top] top

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