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
➜ VBscript
➜ Numerical calculator/tracker.
|
Numerical calculator/tracker.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
3
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #30 on Mon 01 Sep 2003 07:16 AM (UTC) |
| Message
| Ok Poromenos. How do I use that little tidbit you posted? I tried putting that in my little scripts that are run with various commands, but I can't get it to work.
Any idea? |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #31 on Mon 01 Sep 2003 12:12 PM (UTC) |
| Message
| You use it like this:
myNumber = fnAddCom("10000000")
and then myNumber is a string that contains the number with commas. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #32 on Mon 01 Sep 2003 08:54 PM (UTC) |
| Message
| | Ok. Screw it. I don't know what the hell you people are talking about and I've just decided that this plugin is just a lost cause. I'll wait till someone else does something productive. |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #33 on Mon 01 Sep 2003 10:48 PM (UTC) |
| Message
| | Well, actually, Nick's trigger works fine :p |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #34 on Mon 01 Sep 2003 10:49 PM (UTC) Amended on Mon 01 Sep 2003 11:31 PM (UTC) by Xyborg
|
| Message
| Ok. I'm pissed off that I can't get this to work and I'm not going to give up on this stupid thing.
This is one of my triggers.
<trigger
enabled="y"
match="CURR POWERLEVEL:"
regexp="y"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
<send>Note "GAIN POWERLEVEL: " & GetVariable ("power")</send>
</trigger>
Ok. This is what you posted.
Function fnAddCom(strNumber)
Dim strTemp
Dim intCounter
For intCounter = Len(strNumber) To 1 Step -1
If (((Len(strNumber) - intCounter) + 1) Mod 3) <> 0 Then
strTemp = strTemp & Mid(strNumber, intCounter, 1)
Else
If intCounter <> 1 Then
strTemp = strTemp & Mid(strNumber, intCounter, 1) & ","
Else
strTemp = strTemp & Mid(strNumber, intCounter, 1)
End If
End If
Next
For intCounter = Len(strTemp) To 1 Step -1
fnAddCom = fnAddCom & Mid(strTemp, intCounter, 1)
Next
End Function
Now. This is what I think you are telling me to do. I have two variables. "power" and "battle" Where I placed them below is what I'm understanding which is prolly very wrong.
Function fnAddCom(strNumber)
Dim strTemp
Dim intCounter
For intCounter = Len(strNumber) To 1 Step -1
If (((Len(strNumber) - intCounter) + 1) Mod 3) <> 0 Then
strTemp = strTemp & Mid(strNumber, intCounter, 1)
Else
If intCounter <> 1 Then
strTemp = strTemp & Mid(strNumber, intCounter, 1) & ","
Else
strTemp = strTemp & Mid(strNumber, intCounter, 1)
End If
End If
Next
For intCounter = Len(strTemp) To 1 Step -1
power = fnAddCom & Mid(strTemp, intCounter, 1)
Next
End Function |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #35 on Mon 01 Sep 2003 11:31 PM (UTC) |
| Message
| For one thing, the number formatting is too complex. Poremenos, try this:
world.note FormatNumber (1234567, 0)
That will add commas to a number. Your lengthy script is an overkill.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #36 on Mon 01 Sep 2003 11:32 PM (UTC) Amended on Mon 01 Sep 2003 11:38 PM (UTC) by Xyborg
|
| Message
| ok. So with this
world.note FormatNumber (1234567, 0)
In place of 1234567 can I place my "power" variable?
[EDIT]
I'm stupid... kinda.
Note "GAIN POWERLEVEL: " & FormatNumber (GetVariable ("power"), 0)
Works PERFECTLY.
Thank you so much for the help. I LOVE YOU!!!
In the non-gay way of course >_< |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #37 on Tue 02 Sep 2003 11:01 AM (UTC) Amended on Tue 02 Sep 2003 11:05 AM (UTC) by Poromenos
|
| Message
| | Nick, I hate you :P Stop dissing my scripts :P I should freshen up on the builtin functions... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #38 on Tue 02 Sep 2003 07:07 PM (UTC) Amended on Tue 02 Sep 2003 07:24 PM (UTC) by Xyborg
|
| Message
| Just wanted to know if this would work since I have so many damn triggers, many of which all perform the same function.
<trigger
enabled="y"
match="You stop training your *"
match="has reached it's peak for now."
match="is already at maximum."
regexp="y"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
<send>SetVariable "battle", "0"
SetVariable "spar", "0"</send>
</trigger>
*crosses his fingers* Hopefully this works.
[EDIT]
It didn't. So now I have to find a way to have tree of my triggers in one kinda and then have them all perform the same SetVariable commands... Great... |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #39 on Tue 02 Sep 2003 08:43 PM (UTC) |
| Message
| Lol, try this:
match="(You stop training your |has reached it's peak for now\.|is already at maximum\.)"
instead of the others |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #40 on Tue 02 Sep 2003 11:58 PM (UTC) |
| Message
| | Yeah. I figured it out when I was reviewing some stuff on regular expressions. But thanks for pointing it out :P |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | Top |
|
| Posted by
| Xyborg
Canada (47 posts) Bio
|
| Date
| Reply #41 on Thu 04 Sep 2003 06:34 AM (UTC) Amended on Thu 04 Sep 2003 06:49 AM (UTC) by Xyborg
|
| Message
| Ok. Is there a way I can change my display to a set background and foreground color without having to tell people to change their custom colors?
[EDIT]
By 'display' I mean the echo for when a trigger is set off. |
We offer power to those willing to take it. Sadly, few are unburdened enough by their prejudices to accept. | | 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.
109,760 views.
This is page 3, 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