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
➜ Suggestions
➜ a color status bar
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2 3
Posted by
| Guest1
USA (256 posts) |
Date
| Reply #15 on Mon 03 Feb 2003 12:18 PM (UTC) |
Message
| hmm.. do you play on SlothMUD III by any chance Nick?
btw any release date on 3.33 as yet, now that it's February? | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #16 on Mon 03 Feb 2003 10:45 PM (UTC) |
Message
| No, but a lot of their prompts are similar.
I am working on 3.33 now, shouldn't be too long. :) |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Guest1
USA (256 posts) |
Date
| Reply #17 on Tue 04 Feb 2003 09:45 PM (UTC) |
Message
| |
Posted by
| David B
USA (80 posts) Bio
|
Date
| Reply #18 on Sun 16 Feb 2003 08:56 AM (UTC) |
Message
| Oh, This is just sexy....
I'd really like to set this up for the Current mud I'm playing...
Its called Xaos, its Addy is Xaos.ath.cx:5000
Its got 3 modes of play, HCRP mode is the ultimate mode of playing, Now I love how this color display works in the info bar
Unfortunately there is no #/# HP
Instead it gives you the % of your HP
I.E. 100% HP, 80%HP and so on and so forth.
Can this be modified to work with that? |
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
| David B
USA (80 posts) Bio
|
Date
| Reply #19 on Sun 16 Feb 2003 10:26 AM (UTC) |
Message
| I figured I'd post again, and show you what my prompt is exactly so you might be better able to understand what would need to be done
<100%HP 100%Mana>
<100%Move 0-100%TNL>
This ofcourse can be changed to anything I want in any configuration.
I'd imagine the way you'd want to setup the trigger would be something Similar to this.
Now, about the EXP part, I was thinking instead of a bar like HP and Mana and Move
It could just be numbers... Right now it counts from 0 up to 100% experience towards level.
I'd somehow like to make it count from 100% down to 0%, then when I level it starts @100% again.
I'd Imagine I would change my prompt to:
<100%HP 100%Mana 100%move 0-100%TNL>
Thanks... BTW I changed email addresses, I used to be Just Plain David, and I didn't want to take the time to email support and what not so I just made a new account :/
|
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
| David B
USA (80 posts) Bio
|
Date
| Reply #20 on Sun 16 Feb 2003 10:26 AM (UTC) |
Message
| I figured I'd post again, and show you what my prompt is exactly so you might be better able to understand what would need to be done
<100%HP 100%Mana>
<100%Move 0-100%TNL>
This ofcourse can be changed to anything I want in any configuration.
I'd imagine the way you'd want to setup the trigger would be something Similar to this.
Now, about the EXP part, I was thinking instead of a bar like HP and Mana and Move
It could just be numbers... Right now it counts from 0 up to 100% experience towards level.
I'd somehow like to make it count from 100% down to 0%, then when I level it starts @100% again.
I'd Imagine I would change my prompt to:
<100%HP 100%Mana 100%move 0-100%TNL>
Thanks... BTW I changed email addresses, I used to be Just Plain David, and I didn't want to take the time to email support and what not so I just made a new account :/
|
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,133 posts) Bio
Forum Administrator |
Date
| Reply #21 on Sun 16 Feb 2003 10:33 PM (UTC) |
Message
| If you have a percentage, that makes it slightly simpler. The bar drawing subroutine was working the percentage out, like this:
pc = CInt ((CInt (iCurrent) / CInt (iMax)) * 10)
If you already know the percentage then you just need to use that. I was multiplying by 10 so that (say) 50% would be 5 "bars", so if you already have a percentage (from 0 to 100) you would *divide* by 10, so that 50% is still 5 bars.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David B
USA (80 posts) Bio
|
Date
| Reply #22 on Mon 17 Feb 2003 06:18 AM (UTC) |
Message
| Oh ya, its only 0-100%
I'd appreciate it if someone could email me the working bar code, or even put it in a pluggin for me, I'd be eternally grateful.
This seems REALLY complicated for me to code, if someone wanted to walk me through it via email, or just email me the code, that'd be great.
Morpheus1040@attbi.com |
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
| Enkidu
(2 posts) Bio
|
Date
| Reply #23 on Wed 19 Mar 2003 02:10 AM (UTC) |
Message
| Alright, I've never before done anything more advanced than variables using mushclient, so I was wondering if anyone could help me here. I want to have something like what has been posted here, but my prompt is a little bit different. Here is an example:
2072h, 2734m ex-
Yes, that's Achaea, and i'm pretty sure posting a script for this will help out a lot of the many players. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #24 on Thu 20 Mar 2003 02:32 AM (UTC) |
Message
| If the prompt is slightly different, just change the trigger to match. eg. if the prompt is:
2072h, 2734m ex-
The trigger might look like:
*h, *m ex- |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Enkidu
(2 posts) Bio
|
Date
| Reply #25 on Fri 21 Mar 2003 12:35 AM (UTC) |
Message
| Alright, Nick, I tried that and it didn't work. This is exactly what I have on my script, if anyone could please tell me what's wrong it'd be very helpful. Thanks.
sub DoGauge (sPrompt, iCurrent, iMax, sGoodColour, sBadColour)
dim pc, count
<trigger
enabled="y"
match="^(.*?)h\, (.*?)m (.*?)\-$"
name="InfoBar"
omit_from_log="y"
omit_from_output="y"
sequence="1"
regexp="y"
script="InfoBar"
>
</trigger>
world.InfoColour "black"
world.InfoFont "Arial", 10, 0
world.Info sPrompt
world.InfoFont "Webdings", 10, 0
pc = CInt ((CInt (iCurrent) / CInt (iMax)) * 10)
world.InfoColour "red"
if pc < 2 then
world.InfoColour sBadColour
else
world.InfoColour sGoodColour
end if
for count = 1 to pc
world.Info "g"
next
world.InfoColour "dimgray"
while count < 10
count = count + 1
world.Info "g"
wend
end sub
sub DoPrompt (sName, sLine, wildcards)
world.InfoClear
Achaea
world.InfoFont "Arial", 12, 1 ' 12 point Arial *bold*
world.InfoColour "purple"
world.Info world.GetInfo (2) ' world name
DoGauge " HP: ", wildcards (1), wildcards (2), "darkgreen", "maroon"
DoGauge " Mana: ", wildcards (3), wildcards (4), "mediumblue", "mediumblue"
DoGauge " Move: ", wildcards (5), wildcards (6), "gold", "gold"
end sub | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #26 on Fri 21 Mar 2003 04:27 AM (UTC) |
Message
| I don't quite understand the appearance of the XML trigger text in the middle of the script, nor all those question marks. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Reply #27 on Fri 21 Mar 2003 02:36 PM (UTC) |
Message
| Nick, I don't see question marks in his post, but rather some wierd special character.
At any rate, Enkidu, your posting seems to indicate that your script is not formatted properly.
The break lines of special characters do not appear to have an comment character (Which is a single quote in VBS) at the beggining of the line. Those lines will cause syntax errors when you attempt to load your script.
The XML style quote of your trigger does not belong directly in your script in this manner, as you have posted it. If this project is built within the main environment of your world file, the triggers should be assembled in the trigger configuration screen. If you are using the "copy" feature to copy the "code" of the trigger, then you should post it at the beginning or end of your forum posting so we know that you have built it correctly.
(You've got it smack in the middle of your script, which would cause errors if this is actually a direct quote of your script file)
Plugin files are different, in that you would embed the trigger code directly in the file... However, if this is the case, there are other XML tags required to properly format the file. That is, triggers are marked by their <trigger> and </trigger> tags. Your script would also need to be contained within <script> and </script> tags.
Please refer to the sample .VBS script file and the plugins that come with MUSHclient, for examples of how those files should be formatted. |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| Norbert
USA (61 posts) Bio
|
Date
| Reply #28 on Sun 27 Apr 2003 05:59 PM (UTC) |
Message
| I'm greatly new to this world of programming, I'm using the infobar supplied here in this thread by Nick, and I'm running into a bit of trouble trying to modify it to work for my mud. My mud supplies these lines which i have made triggers for
HP: 124/142, SP: 116/142
HP: */*, SP: */* is my trigger
and
You are alchemist level 54, with 5,152,064 guild exp (335,436 more needed).
Your are alchemist level 54, with * guild exp (* more needed). is my trigger
the problems I've run into are that the HP/SP doesnt work for my max if i'm at 124 hp the bar shows full and if i'm below 2% it doesnt show up in the bad color
and I want to add on a bar for my gxp to show a % of how close I am to the next level where 100% would be the next level mainly I think it's the ','s that are giving me the biggest trouble, any suggestions or help would be me nice
thank you |
Norbert
-Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens
It's a dumb question... skip it.
| Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #29 on Sun 27 Apr 2003 10:59 PM (UTC) |
Message
| The status bar draws a "bar" by drawing between 0 and 10 little boxes in a different font. The calculation bit is here:
pc = CInt ((CInt (iCurrent) / CInt (iMax)) * 10)
Now 124/142 is 0.87 times 10 = 8.7 which will probably draw 9 boxes. This shouldn't be "full" as I thought full would be 10 boxes, however maybe it looks full.
Similarly 2% would be less than one box, so you don't see any red. Maybe you should add a test, that if there is < 1 box always show one red box.
As for the commas, you need to get rid of them. Something like this:
dim num
num= wildcards (1)
num = CInt (world.Replace (num, ",", ""))
The Replace command will replace commas with nothing, and then you use CInt to convert the result to a number. |
- 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.
84,831 views.
This is page 2, 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