|
lewdpotato Novice
Joined: 16 May 2002 Posts: 48 Location: USA
|
Posted: Tue Sep 24, 2002 3:14 am
status window |
Hi
I am trying to figure out how to make a status window that will tell me some of the info that is listed when I type i and how do I make it so that it automaticaly updates as I use turns ect? here is the output when I type i
<Info>
Trader Name : Infamous Pirate lewdpotato
Rank and Exp : 26,499 points, Alignment=-2,118,592 Demonic
Times Blown Up : 3
Corp # 2, Road Kill
Ship Name : The Merchant Marines
Ship Info : QuadStar Corporate FlagShip Ported=2120 Kills=23
Date Built : 07:15:59 AM Fri Aug 29, 2014
Turns to Warp : 3
Current Sector : 7455
Turns left : 426
Total Holds : 200 - Fuel Ore=167 Empty=33
Fighters : 99
Shield points : 5,000
Limpet Mines T2: 4
Genesis Torps : 5
Atomic Detn. : 9
Cloaking Device: 5 Ether Probes : 25
Mine Disruptors: 6
Planet Scanner : Yes
LongRange Scan : Holographic Scanner
TransWarp Power
(Type 1 Jump): 55 hops
(Type 2 Jump): 27 hops
Credits : 1,557,129
any help would be great, Im trying to figure it out but im stuck. thanks. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Sep 24, 2002 3:44 am |
#TR {^Turns left : (%d)%} {#VAR Turns {%1}}
#TR {^Ship Info : %w (*) Ported=*$} {#VAR ShipType {%replace("%1"," ","_"}}
#STW {Turns Left: @Turns}
#VAR CurrentSector 0
#TR {^Sector%s:%s(%d)*$} {#IF (%1!=@CurrentSector) {#ADD Turns %db(@ShipTurns,@ShipType)}}
You will have to populate the ShipTurns variable, with each ship types turns using the #ADDKEY command with _ replacing any spaces in the name of the ship type.
What else do you want in the status window? |
|
|
|
lewdpotato Novice
Joined: 16 May 2002 Posts: 48 Location: USA
|
Posted: Wed Sep 25, 2002 1:35 am |
turns
fighters
shields
and holds would be great
thanks a bunch |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Sep 25, 2002 5:03 am |
This isn't difficult. All it takes is a set of triggers to capture the information and store it in variables, and a #ST or #STW to display the information from the variables in the status line or window.
Turns, Fighters, Shields, and Holds
#TR {Turns left : (%n)} {#VAR Turns %1}
#TR {Fighters : (%n)} {#VAR Fighters %1}
#TR {Shield points : (%n)} {#VAR Shields %1}
#TR {Total Holds : (%n) - Fuel Ore=%n Empty=(%n)} {#VAR TotalHolds %1;#VAR EmptyHolds %2}
#ST {Turns left: @Turns -- Fighters: @Fighters -- Shield points: @Shields -- Total Holds: @TotalHolds -- Empty Holds: @EmptyHolds}
Anything else you just do the same way -- make a trigger to match the line and a variable for the info, then put the variable in the status line (or window) with any identifying info you want.
LightBulb
Senior Member |
|
|
|
lewdpotato Novice
Joined: 16 May 2002 Posts: 48 Location: USA
|
Posted: Wed Sep 25, 2002 5:43 am |
ok Im getting a status line with turns left, fighters, shields, total holds and empty holds but it is not displaying the Info?
thanks guys, I really appreciate the help!!! |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Sep 26, 2002 12:34 am |
Did you use the "i" command, after creating the triggers, so that the variables have a chance to store the initial value?
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Sep 26, 2002 5:32 pm |
Also, make sure you have the spacing correct in your trigger-phrases. The forum only displays one space but most, if not all, of these triggers will require multiple spaces before the :.
LightBulb
Senior Member |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Oct 01, 2002 9:13 pm |
Trader Name : Infamous Pirate lewdpotato
Rank and Exp : 26,499 points, Alignment=-2,118,592 Demonic
Times Blown Up : 3
Corp # 2, Road Kill
Ship Name : The Merchant Marines
Ship Info : QuadStar Corporate FlagShip Ported=2120 Kills=23
Date Built : 07:15:59 AM Fri Aug 29, 2014
Turns to Warp : 3
Current Sector : 7455
Turns left : 426
Total Holds : 200 - Fuel Ore=167 Empty=33
Fighters : 99
Shield points : 5,000
Limpet Mines T2: 4
Genesis Torps : 5
Atomic Detn. : 9
Cloaking Device: 5 Ether Probes : 25
Mine Disruptors: 6
Planet Scanner : Yes
LongRange Scan : Holographic Scanner
TransWarp Power
(Type 1 Jump): 55 hops
(Type 2 Jump): 27 hops
Credits : 1,557,129
LightBulb pointed out the problem you have. Suggest you add #CO 71 or equivalent to all your triggers to see which lines show up in red (ie are triggered upon) and those that are not triggered upon perhaps. That way you can investigate your triggers and check for the spacing.
For example:
#TR {Turns left : (%n)} {#VAR Turns %1}
will have to change to something like:
#TR {Turns left%s: (%n)} {#VAR Turns %1}
because of all that space between the word left and the colon.
Ton Diening |
|
|
|
|
|