www.ClassicTW.com
https://mail.black-squirrel.com/

FigHitWatch.ts and FigGridReport.ts
https://mail.black-squirrel.com/viewtopic.php?f=15&t=30502
Page 1 of 1

Author:  Promethius [ Mon Oct 25, 2010 11:13 am ]
Post subject:  FigHitWatch.ts and FigGridReport.ts

A simple script to monitor fig hits and change the sectorparameter to false allowing an up-to-date fig report.

Does not take into acount a corpie gridding and adding sectors.

FigHitWatch.ts

Code:
# figSec parameter watch
# view variable sectorHits to see how many fig hits since script start

systemScript
setVar $sectorHits 0

:begin
  setTextLineTrigger enteredSector :enteredSector "of your fighters in sector"
  setTextLineTrigger fedDestroyed :fedDestroyed "The Federation We destroyed your"
  pause

  :enteredSector
    setTextLineTrigger enteredSector :enteredSector "of your fighters in sector"
    setVar $line CURRENTLINE & "END"
    getText $line $hit "in sector " "END"
    setSectorParameter $hit "FigSec" FALSE
    add $sectorHits 1
    pause

  :fedDestroyed
    setTextLineTrigger fedDestroyed :fedDestroyed "The Federation We destroyed your"
    getWord Currentline $hit 11
    stripText $hit "."
    setSectorParameter $hit "FigSec" FALSE
    add $sectorHits 1
    pause


Script to report grid percentage:

figGridReport.ts
Code:
# grid report

setVar $figCount 0
setVar $i 11
send "'Checking figged sector count *"
while ($i <= SECTORS)
   getSectorParameter $i "FigSec" $isFigged
   if ($isFigged)
      add $figCount 1
   end
   add $i 1
end
setVar $unFigged (sectors - $figCount)
setPrecision 4
setVar $pCent ($figCount / (SECTORS - 11))
multiply $pCent 100
setPrecision 2
multiply $pCent 1

send "'We have " $figCount " sectors figged and " $unfigged " unfigged - " $pCent  "% gridded.*"
halt

Author:  Parrothead [ Mon Oct 25, 2010 1:06 pm ]
Post subject:  Re: FigHitWatch.ts and FigGridReport.ts

Your missing the offensive trigger

settexttrigger offen :_offen "Your fighters in sector"

u have no spam filter

Author:  Promethius [ Mon Oct 25, 2010 3:08 pm ]
Post subject:  Re: FigHitWatch.ts and FigGridReport.ts

Parrothead wrote:
Your missing the offensive trigger

settexttrigger offen :_offen "Your fighters in sector"

u have no spam filter


Good catch on the offensive trigger. I seldom use offensive fighter settings that I worry about. The spam filter would need to be added. I haven't ran into issues with people spamming, but now that they know what the triggers are, it would be a good idea.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/