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
➜ Miniwindows
➜ Miniwindows for Awakened Worlds
Miniwindows for Awakened Worlds
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
3
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Wed 07 Jul 2010 06:55 PM (UTC) |
Message
| What's up, folks?
I've recently started using Mushclient for the first time yesterday, and I came across the miniwindow thing and realized it's got alot of pretty useful uses. My problem is that I have no clue how to code or script.
I'd really like to see a miniwindow that shows what I'm carrying, my total Reputation and Notoriety and TKE, whether I'm weidling a weapon or have it holstered/sheathed, how much nuyen I have on a credstick, in the bank, how many clips of ammunition I have in various mag-straps and pockets, and how much weight in Kilos I'm carrying, versus my maximum weight allowance.
If any of you feel up to the project, let me know. I wish I had at least some kind of experience with scripting so I didn't feel like I was asking for a handout, but maybe someone out there would think it's a fun challenge. |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 07 Jul 2010 10:09 PM (UTC) Amended on Tue 26 Nov 2013 03:46 AM (UTC) by Nick Gammon
|
Message
| |
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #2 on Thu 08 Jul 2010 12:54 AM (UTC) |
Message
| I watched the tutorials, notably the inventory miniwindow (you give excellent and easy to follow tutorials, btw), and when all was said and done, I was able to create the miniwindow, but it was empty. I'm sure it had to do with the fact that on Awakened Worlds, when you type inventory, after You are carrying:, each inventory line starts at the border, there are no spaces. I tried changing a few things where you had 5 spaces indicated, but it didn't change anything. I'm not sure how you would tell the script that the inventory has ended.
When "i" is typed:
You are carrying:
A handheld Nav-Dat GPS system
a cellular phone
an invitation to Smith's Pub
a pocket secretary
an electronic kit
a set of low grade ultrasound goggles
There IS an empty space after the last line, obviously, Idunno if that helps. My miniwindow simply says "Inventory", with nothing else in it. |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #3 on Thu 08 Jul 2010 01:31 AM (UTC) |
Message
| Well in that script, where it says:
-- see if end of inventory
if not string.match (line, "^ ") then
break
end -- if
Instead of checking for not matching a line with spaces in it, match on an empty line, eg.
-- see if end of inventory
if line == "" then
break
end -- if
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #4 on Thu 08 Jul 2010 01:33 AM (UTC) |
Message
| ahh, I tried that, but left the ^ in. I'll try it. |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #5 on Thu 08 Jul 2010 01:54 AM (UTC) |
Message
| That did it, the inventory window works like a charm. I also attempted to use the drop|get|buy trigger, adding a couple other things like put, sell, give, gives you, but the trigger fires the alias, "inv", but the window doesn't update unless I manually type "inv" to fire the alias. |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #6 on Thu 08 Jul 2010 01:55 AM (UTC) |
Message
| Nevermind, I see the problem, I didn't add the fix you put in for when the prompt is on the same line as the "You are carrying:" |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Thu 08 Jul 2010 01:58 AM (UTC) |
Message
| Also make sure that the trigger does "inv" as "send to Execute" rather than "send to World". Otherwise it bypasses your inv alias.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #8 on Thu 08 Jul 2010 02:10 AM (UTC) Amended on Thu 08 Jul 2010 02:12 AM (UTC) by Crashdivide
|
Message
| I got it working after using the fix you mentioned, but I can't seem to get a trigger that fires the alias when someone gives me something, such as:
Tinmai gives you a plastic credstick.
Or when I buy:
You now have a pint of Sapporo.
Or when I junk something:
You junk a pint of Sapporo. It vanishes into a recylcing bin!
|
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #9 on Thu 08 Jul 2010 02:20 AM (UTC) |
Message
| Can you show us what you tried?
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
Something like:
... should work.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #10 on Thu 08 Jul 2010 02:25 AM (UTC) |
Message
| That worked amazingly well. What I was trying to do was use your trigger from the other thread, just changing the text, such as removing "^You" and replacing it with random crap. Is the "*" used for generally anything? Because all of the examples I gave in the last reply work now. |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #11 on Thu 08 Jul 2010 02:44 AM (UTC) |
Message
| And as for gagging the inventory in the output window, since we had to change the line under "--see if end of inventory" to
if line == "" then
What would I need to change that to to get this gag to work? |
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #12 on Thu 08 Jul 2010 02:50 AM (UTC) |
Message
| Add the flag trigger_flag.OmitFromOutput as described in the other thread. That is to the wait.match part, so the change you made doesn't make any difference.
The latest versions of MUSHclient support that flag, so you should just be able to use it as described.
Crashdivide said:
Is the "*" used for generally anything?
If you are *not* using regular expressions, that matches any text (except newlines which you shouldn't have anyway in a single line trigger).
The stuff with ^ and $ in it is generally used in regular expressions, it is best not to confuse the two things.
This gives more details:
http://www.gammon.com.au/mushclient/funwithtriggers.htm |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Crashdivide
USA (22 posts) Bio
|
Date
| Reply #13 on Thu 08 Jul 2010 03:02 AM (UTC) |
Message
| Now getting:
[string "Alias: "]:21: ')' expected near 'trigger_flag'
|
AwakenedWorlds.net Port:4000 | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #14 on Thu 08 Jul 2010 03:03 AM (UTC) Amended on Thu 08 Jul 2010 03:04 AM (UTC) by Twisol
|
Message
| You have a ( without a matching ) somewhere near your use of trigger_flag, or you may be missing a comma in a function arguments list. Paste what you have? |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | 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.
81,040 views.
This is page 1, subject is 3 pages long: 1 2
3
It is now over 60 days since the last post. This thread is closed.
Refresh page
top