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
➜ Couple of questions
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| David
USA (49 posts) Bio
|
Date
| Sat 29 Dec 2001 11:41 AM (UTC) |
Message
| 1.) I want to send my who list to a seperate window that updates on a regular basis I also what that list in a seperate window... prefereably one that is ansi compliant so I can have all them nifty colors.
2.) I also would like to some how create an auto equipment changer... Meaning... If I look into my backpack I see a list of items, I wouldl ike it to remember that list and then at a later date if i call upon an alias/script It will automatically get all those items and wear them for me( I have a decent idea how this might work... however when I wear multiple items I am getting issues. I.E. More than one ring, or more than one cloak)
3.) Using the same idea as Idea #1, I want to make 2 windows. one that updates my inventory everytime i put soething in it, and one that updates my score every 5 minutes or so...
4.) If all that works I was wondering... how to make an exp counter. i know I can omit lines from my output and replace it with something new. i would like to know how to change my output for my prompt to something more user friendly.
*chuckles* I know this is a lot of work, and i been out of the loop for a while, but i am getting back into mudding and i am playing one that i played years ago...
If for some chance you can't send say the wholist to a window with ansi code perhaps thats something for the next version |
My code(with a LOT of Nicks help) to fame:
sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
| Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 29 Dec 2001 11:42 PM (UTC) |
Message
| Most of what you want can be done easily enough with some triggers, timers, aliases and scripts. I don't have time to do a full solution here, but will give you some pointers. Some of the regular posters on this forum might do a more complete answer if you ask them. ;)
Things like who lists, eq lists, and so on, can be done with three triggers, and a "notepad" window. You can have multiple notepad windows (text windows) which you can use triggers to send or append to. The only problem is that notepad windows are monochrome, as they are "text only".
The basic technique, which you modify to suit your requirements is to have three triggers, which I will call A, B and C.
- Trigger A detects the start of the list (eg. "You are carrying:" or "You are using:"). When you get a match on this you enable trigger B (in a script) and initialise the notepad window. (ie. Use "replacenotepad" to remove any previous inventory items).
- Trigger B detects inventory items and appends them to the notepad window (this trigger is initially disabled).
- Trigger C detects the end of the inventory list and disables trigger B.
I used this system on Medievia to good effect, so that every time I got my inventory it would be retained in a notepad window that I resized and kept off to the right.
You could if you wanted then set up a timer that (say every 5 minutes) sent an inventory command, so that the inventory window is automatically refreshed.
My code for Medievia is below. First the three triggers:
Trigger: You are carrying the following non-donation equipment:
Enabled: checked
Label: StartInventory
Script: OnStartInventory
Trigger: \s*\[.*\].*$
Enabled: not checked
Regular expression: checked
Label: GatherInventory
Script: OnInventoryItem
Trigger: ^\<\d+hp \d+m \d+mv \d+br\>.*$
Enabled: checked
Regular expression: checked
Label: StopInventory
Script: OnStopInventory
Note that I had to use a prompt line to detect the end of the inventory list, as there was no particular line that signalled the inventory end. This was a regular expression that matched on something like: <10hp 5m 10mv 300br>
You may need to modify these triggers a bit depending on exactly what output you get from your MUD.
The script code follows. Note I have commented out the line which activates the inventory window - you could uncomment it if you want the inventory to "pop up" in front every time you got it.
dim gGettingInventory
gGettingInventory = false
sub OnStartInventory (strTriggerName, trig_line, arrWildCards)
gGettingInventory = true
world.ReplaceNotepad "Inventory", trig_line + vbcrlf
world.EnableTrigger "GatherInventory", true
world.Send " " ' force newline so prompt appears
end sub
sub OnStopInventory (strTriggerName, trig_line, arrWildCards)
if gGettingInventory = true then
gGettingInventory = false
' world.ActivateNotepad "Inventory"
world.EnableTrigger "GatherInventory", false
end if
end sub
sub OnInventoryItem (strTriggerName, trig_line, arrWildCards)
if gGettingInventory = true then
world.AppendToNotepad "Inventory", trig_line + vbcrlf
end if
end sub
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David
USA (49 posts) Bio
|
Date
| Reply #2 on Sun 30 Dec 2001 06:01 AM (UTC) |
Message
| Awesome thanks nick, If possible could you put that in your to do list... Make it so that you can have an ansi window.. I think it would be really killer. I think you get into freal real neat stuff with being able to have multiple "world" windows that you can't send info into, but only recieve it... It might make that auto mapper your talking about a little easier to do if you could imp something along those lines.
Just an idea...
If anyone could help me a bit further, that would be righteous.
|
My code(with a LOT of Nicks help) to fame:
sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
| Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #3 on Sun 30 Dec 2001 10:13 PM (UTC) |
Message
| You can actually have multiple windows to the world right now (go to Window menu and select New Window), however they are each a copy of the main window. The main point is that you can have some of them "frozen" (paused) so that you could pause one at (say) an inventory list) and quickly switch to it when you want to see the inventory. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David
USA (49 posts) Bio
|
Date
| Reply #4 on Tue 01 Jan 2002 05:51 AM (UTC) |
Message
| I don't know if you know what I mean...
What I mean is simply this... It would be very very sweet if you could open another window(and have it always on top) that does not have a command prompt... Just a window that is ansi compatiable. And have MC send information from a mud directly to it. so that you could have multiple windows telling you different things...
You can do this with notepad, but notepad is monochrome
My desk top is 1600x1200.. I have all this extra space.
I know that for certain MU*'s having another window open that you can keep information updated all the time would be incredibly helpful
Not only would this help the normal players but also the immortals/implementors/admins
I know as a builder I would love to have a window open at all times with my available vnums.
Or if I am playing a real Time MUX like Battletech I would want my Map constantly refreashed ever few seconds, or my navigation updated on a 3 second basis..
On a normal MUD i would want the wholist always updated every 2 minutes or so.
Also I know that when your leveling it can be incredebly annoying to have to stop to scroll back to see what someone said. Transfering the gossip/ooc channel to a window that is ansi compliant would be very helpful to keep you up to date.
I don't believe it would be that hard to code a strictly output window that you can send info to.
|
My code(with a LOT of Nicks help) to fame:
sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
| Top |
|
Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
Date
| Reply #5 on Tue 01 Jan 2002 06:58 AM (UTC) |
Message
| It would be simple enough in some respects, but currently the world windows are a "view" of the output buffer (ie. the last 10,000 lines you received or whatever you have it configured at).
To make another window, which still supports the ANSI colours etc. but only displays certain lines would be a bit different. I suppose one possibility would be to make a copy of the lines you want to display, and use most of the existing code.
I have added that as suggestion #432. |
- 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.
19,412 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top