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 ➜ General ➜ Hi i was trying to find someone that can convert this to a different code

Hi i was trying to find someone that can convert this to a different code

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


Posted by Serve   (28 posts)  Bio
Date Tue 03 Apr 2007 06:20 PM (UTC)
Message
I was trying to use this code for mushclient. Sorry i didnt realize there was a general board also. Sorry i didnt mean to spam the others fourms.



<trigger
enabled="n"
group="rarestat"
match="Armor class is 115."
name="rareringstart"
send_to="12"
sequence="10"
other_text_colour="black"
other_back_colour="black"
>
<send>EnableTrigger("rareringstat", true)
EnableTrigger("rareringstop", true)
EnableTrigger("rareringstart", false)
stats = 0
highstat = 0
</send>
</trigger>

<trigger
enabled="n"
group="rarestat"
match="^Affects (strength|intelligence|wisdom|dexterity|constitution|luck) by (\d)\.$"
name="rareringstats"
regexp="y"
send_to="12"
sequence="9"
other_text_colour="black"
other_back_colour="black"
>
<send>stats = stats + %2
if highstat < %2 then
highstat = %2
end
</send>
</trigger>

<trigger
enabled="n"
keep_evaluating="y"
match="^.*$"
name="rareringstop"
regexp="y"
script="rarestat"
send_to="12"
sequence="11"
other_text_colour="black"
other_back_colour="black"
>
<send>EnableTrigger("rareringstat", false)
EnableTrigger("rareringstop", false)
if (stats==60) and ((highstat==35) or (highstat==25)) then
put rare bag
else
drop rare
end
</send>
</trigger>

and for the alias:

<alias
match="rareid"
enabled="y"
send_to="12"
>
<send>EnableTrigger("rareringstart", true)
Send("cast id rare")
</send>
</alias>
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 03 Apr 2007 11:09 PM (UTC)
Message
What is the question exactly?

- Nick Gammon

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

Posted by Serve   (28 posts)  Bio
Date Reply #2 on Wed 04 Apr 2007 12:56 AM (UTC)
Message
I wasnt sure if that code would work in lau. i was trying to see if it could be written in a differen code like jbscirpt something capatable with mush 3.42 gonna try to update mushclient so i can use it also..where do i get the program to run lau script
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 04 Apr 2007 02:09 AM (UTC)
Message
It is Lua, not Lau.

Lua comes with MUSHclient from version 3.52 onwards. You should probably download the latest version:

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

Quote:

I wasnt sure if that code would work in lau.


Try it and see.

- Nick Gammon

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

Posted by Shaun Biggs   USA  (644 posts)  Bio
Date Reply #4 on Wed 04 Apr 2007 02:43 AM (UTC)

Amended on Wed 04 Apr 2007 02:45 AM (UTC) by Shaun Biggs

Message
Sorry, I forgot to mention what I was using. You posted under the Lua forum, so I responded with a solution that worked in Lua. Jscript is pretty close, you just need to change the EnableTrigger to World.EnableTrigger and muck about with the if statement so it's syntactically correct.

Also, when posting code snippets, it's usually good practice to surround it in [code] [/code] tags. That way the boards will preserve the spacing.

I also did something really stupid in the send field for the rareringstop trigger. forgot to encapsulate what's sent to the mud in a Send() function. I'll fix it in the first post about it.

It is much easier to fight for one's ideals than to live up to them.
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.


15,150 views.

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.