[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Help (is this Lua script, if not can anyone convert it to Lua)

Help (is this Lua script, if not can anyone convert it to Lua)

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


Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Tue 18 Sep 2007 04:32 PM (UTC)
Message
Well, it's certainly a Lua script...ish. Some parts are still pseudo code. In the "rareringstop" trigger, the put rare bag should be Send( "put rare bag" ), and the line two lines down from that should be modified in the same way. Also, you will need to open the script file (the one listed when you press ctrl-shift-6) and add in lines that say:

stats = 0
highstat = 0


I know I've seen this ring test somewhere in the forums before at some point earlier this year. Might want to search the forums for the earlier thread, as it might give you more information.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #1 on Tue 18 Sep 2007 04:44 PM (UTC)
Message
Also I am also kasata I forgot my user name because it had been so long so I posted a new topic under tk.
Yeah you actually helped me with this, please take a look at your previous post and help me figure out what to fix please. thanks

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=7751


I am also receiving and error

[string "Script file"]:1: unexpected symbol near '<'
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #2 on Tue 18 Sep 2007 07:49 PM (UTC)
Message
Did you copy everything into the script file instead of putting them in with the triggers and aliases? That's the only thing I can think of which would cause that error. Just follow the directions that Nick posted at the end of the other thread.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #3 on Tue 18 Sep 2007 07:54 PM (UTC)
Message
also in your reply regarding the stat= 0, highstat= 0, do i need to input any number to replace the 0 with?
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #4 on Tue 18 Sep 2007 08:03 PM (UTC)
Message
No, the 0s are just there to make the variables contain something. This way they are preserved instead of getting discarded after each trigger. They are just counters making sure that the total stats on a ring are 60, and that one of those stats is either a +35 or a +25.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #5 on Tue 18 Sep 2007 08:10 PM (UTC)
Message
okay so when i copy and try to paste the below text using shift+ctrl+8 I get the following errors

There was a problem parsing the XML on the clipboard. See the error window for more details
-error window
Line 19: Unexpected end-of-file while looking for </triggers> (problem in this file)




<triggers>
<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>
<triggers>
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #6 on Tue 18 Sep 2007 08:18 PM (UTC)
Message
look carefully at the last line and the error again.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #7 on Tue 18 Sep 2007 08:24 PM (UTC)
Message
okay I am getting it little by little. so I got this error when trying to paste the 2nd trigger

error-
Line 14: Element name must start with letter or underscore, but starts with " " (problem in this file)

this is what I was copy pasting

<triggers>
<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>
</triggers>
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Tue 18 Sep 2007 09:31 PM (UTC)
Message
Quote:

error-
Line 14: Element name must start with letter or underscore, but starts with " " (problem in this file)
Quote:



Line 14: if highstat < %2 then


You are mixing systems a bit here. If you look inside the trigger window (in the send box), this is OK. However inside the XML part the "<" symbol is being interpreted as the start of an element (like <trigger> or <send>). Hence the message.

Inside the XML, you need to make it:


if highstat &lt; %2 then


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #9 on Tue 18 Sep 2007 09:35 PM (UTC)
Message
I fixed this error up in the thread here: http://www.gammon.com.au/forum/?id=8194

Again, this is why it becomes difficult when a question is spread over several threads.

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


24,567 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]