Register forum user name Search FAQ

Gammon Forum

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 ➜ Multiline Regexp Trigger

Multiline Regexp Trigger

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


Posted by Zalethon   USA  (13 posts)  Bio
Date Sun 22 Apr 2007 07:22 AM (UTC)
Message
I created a regexp trigger, and had it run vbscript. But it seems to only match once another line is on the screen in addition to the two lines it should match to.. Is there any way around this, or is there something I've done wrong that I can fix..?

Overkill is better than underkill.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 22 Apr 2007 07:45 AM (UTC)
Message
It would help greatly if you posted the trigger, and the lines from the MUD that you were hoping would match.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zalethon   USA  (13 posts)  Bio
Date Reply #2 on Sun 22 Apr 2007 03:24 PM (UTC)
Message
The trigger:
^(\w+):(\d+)\/(\d+) \((\w+)\) \$(\d+) \(QP(\d+)\/XP(\d+)\/RP(\d+)\%\)\s?(\d+) \(T:(\w*)\) HP(\d+)\/(\d+) \(VH(\d+)\/(\d+) VF(\d+)\/(\d+) VA(\d+)\/(\d+)\) (\d+) >$

It matches to my prompt:
Field:12/791 (NESW) $104575 (QP99999/XP0/RP0%)
0 (T:) HP1000/1000 (VH0/0 VF0/0 VA0/0) 1319 >

And runs this code:

sub prompt (sName, sLine, aWildcard)
	dim x
	dim y
	dim z
	x = 1
	while x < 20
		y = gettriggerwildcard("prompt", x)
		select case x
			case 1
				z = "TerrainType"
			case 2
				z = "CoordX"
			case 3
				z = "CoordY"
			case 4
				z = "Exits"
			case 5
				z = "Cash"
			case 6
				z = "QuestPoints"
			case 7
				z = "Experience"
			case 8
				z = "GainPercentage"
			case 9
				z = "CombatTimer"
			case 10
				z = "Target"
			case 11
				z = "Health"
			case 12
				z = "MaxHealth"
			case 13
				z = "VHealth"
			case 14
				z = "VMaxHealth"
			case 15
				z = "VFuel"
			case 16
				z = "VMaxFuel"
			case 17
				z = "VAmmo"
			case 18
				z = "VMaxAmmo"
			case 19
				z = "DeathTimer"
		end select
		world.setvariable z, y
		x = x + 1
	Wend
End Sub

Overkill is better than underkill.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 22 Apr 2007 09:11 PM (UTC)
Message
Please read http://mushclient.com/faq, item 11.

- 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.


13,697 views.

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

Go to topic:           Search the forum


[Go to top] top

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