forums wiki races classes cabals religions world history immortals all pages bugs items helps changes calendar map login donate play now

Matt's Scripts for FL

Ok just started using Mushclient so I figured I'd add these. I'm trying to tweak the ticktimer for my prompt but don't see what I need to change in the plugin. I see where Matt has his prompt but do I need to put my entire prompt in there to replace that one or do I need to change where it gets the time from entirely?

Edit: My prompt is: <1/1hp 1/1m 1/1mv> D 16 4452 <6388 GOLD>

%n%P%C<%h/%Hhp %m/%Mm %v/%Vmv> %l6%i%L %l6%t%L %l8%X%L <%l3%g%L GOLD> %c

Messing with it, still have no clue how to tweak it to my prompt.

What's the ticker code look like? If I saw the code I'm pretty certain I could help you tweak it.

What's the ticker code look like? If I saw the code I'm pretty certain I could help you tweak it.

Jibber, is there anything you can't do?

I think Nasa is looking for someone to figure out how to colonize mars, you might want to give them a ring

Also, to Hilltop for my prompt I use $%g that way gold just shows up with a dollar sign in front, well unless you're not in america, then maybe your keyboard doesn't have a dollar sign. Do other countries keyboards have the dollar sign as the shift 4? I imagine not.

name="FlTicker" author="Mattamue" id="4217787a996a35824e97226a" language="VBscript" purpose="Notify a player of an incoming tick." date_written="2006-04-11 23:57:16" requires="3.73" version="1.0" >

Get out your favorite text editor and open up the plugin file. You'll need to change some of the code for this plugin to work with your own personal promt. The promt will need to have the hour listed somewhere. If you don't know how to list the hour in your promt you're already in trouble. Ask on the forums and you should get friendly hugs and help.

enabled="y" match="^\[(\d+)\/(\d+) (\d+)\/(\d+) (\d+)\/(\d+) (\d+) (\d+) (D|M) (\d+)\]" name="TickTrigger" regexp="y" script="TickTimer" sequence="100" > enabled="y" match="Abandon hope, all ye who enter here..." script="OnLoad" sequence="100" > > world.note "Twenty-five past."

' Dim globals - I don't know what dim is, I just know you have to dim things.

dim hour

dim hourly

' Called from the "Abandon hope, all ye who enter here..." trigger

' this script gives the hour variable a numeral when you connect - can't hurt to be safe

sub OnLoad (name, line, wildcards)

hour = 0

end sub

' this next subroutiene is called from the trigger that matches my promt:

'

' [715/715 752/752 412/412 3850 16623 D 22] which is, in regular terms:

' ^\[(\d+)\/(\d+) (\d+)\/(\d+) (\d+)\/(\d+) (\d+) (\d+) (D|M) (\d+)\]

'

' This is the trigger you'll have to change to get the thing to work with

' your promt.

sub TickTimer (name, line, wildcards)

' "hourly" is a variable that gets checked every time the mud spits out my

' promt. When I "GetTriggerWildcard" blah blah 10 - I'm telling the script

' to get the 10th variable which is the hour of the day I've put into my promt.

'

' If you put your own promt in you'll have to figure out its regular expression

' and what variable place it holds.

hourly = GetTriggerWildcard ("TickTrigger", "10")

' Here's the simple if statement that runs the ticker. Every time I hit enter

' the promt is spit out again. The script sees the promt and grabs the number

' for the hour and puts it into the "hourly" variable.

'

' If it's the same as the "hour" variable then nothing happens. If it's different

' that means that the hour changed and THAT means that a tick happened. The script

' puts the new number for the hour into the "hour" variable and starts watching

' for another change. Simple.

'

' It's a lot of variable checking, but Mush is fast enough to handle it.

if hour <> hourly then

hour = hourly

world.resetTimer "Ticker"

end if

end sub

script="OnHelp" match="FlTicker:help" enabled="y" >

Sub OnHelp (sName, sLine, wildcards)

world.Note world.GetPluginInfo (world.GetPluginID, 3)

End Sub

Jesus christ is its like reading chinese

:runs to the smurf side: Rev Rev Rev...I want to use the force

I just press zero. I am aware now that some of you are crazy.

In the code, replace all instances of

^\[(\d+)\/(\d+) (\d+)\/(\d+) (\d+)\/(\d+) (\d+) (\d+) (D|M) (\d+)\]

with:

^\ (D|M) (\d+) (\d+) \

Let me know if it works -- I'm a little rusty with regex.

I never understand this ****.

I see how the if statement works there, just unsure what the whole d stuff is for how the client handles variables. My client doesnt have a timer, damn.

None of you ever learn how to freaking count in your head?

Got it, the D stuff is just a guide to my prompt. I had to change what you said and:

hourly = GetTriggerWildcard ("TickTrigger", "10")

to

hourly = GetTriggerWildcard ("TickTrigger", "8")

since the hour was the 8th thing in my prompt.