Discussion in 'Script Releases' started by Pantho, Aug 14, 2011.

  1. Pantho

    Pantho Member

    Messages:
    5
    So, I really wanted a local monitor. So I poked code and cried in OOC all night till they helped me come up with this
    Code was ripped from EveBot btw.

    Code (Text):

    function main()
    {
            ;dotnet LSMSound
            variable set AllianceWhiteList
            AllianceWhiteList:Add[222222]
            AllianceWhiteList:Add[9111115]
            AllianceWhiteList:Add[15711111145]     
            AllianceWhiteList:Add[11111111766]
            variable iterator PilotIterator
            variable int AllianceID
            variable index:pilot PilotIndex
            variable int IDontKnowAnotherWayToLoopThisSinceIRStupidAndDrinking
        do
        {
            if ${EVE.LocalsCount} > 1
            {
                ;echo "There are: "  ${EVE.LocalsCount} " Pilots in this system"

            PilotIndex:Clear
            LocMon:Set[0]
            EVE:DoGetPilots[PilotIndex]
            }      

            PilotIndex:GetIterator[PilotIterator]
            if ${PilotIterator:First(exists)}
            do
            {
            ;echo ${PilotIterator.Value.AllianceID} " Named: " ${PilotIterator.Value.Name}
                if !${AllianceWhiteList.Contains[${PilotIterator.Value.AllianceID}]}
                {
                    echo "Escaping due to pilot[ Name: " ${PilotIterator.Value.Name} " - AllianceID" ${PilotIterator.Value.AllianceID} " ] : Warping to bookmark - If this guy isn't evil add his alliance to the list!"
                    EVE.Bookmark[POSCHA]:WarpTo
                    ; play "c:/alarm.wav"
                   
                }
            }
            while ${PilotIterator:Next(exists)}
            wait 50
            echo "Still safe"
        }
        while ${IDontKnowAnotherWayToLoopThisSinceIRStupidAndDrinking} < 1

    }
     
    Change POSNAME to the name of your safe bookmark. I will make it beep later, just right now I cba.
    Last edited: Aug 18, 2011
  2. Pantho

    Pantho Member

    Messages:
    5
    Update:

    * Added sound warning when local enters
    (yes it loops the sound and yes it won't stop until you end the script.)
    * Fixed it not to trigger when alone in a system.

    Copy this code into a text file and rename it localmon.iss
    Place the file in your innerspace scripts folder.
    Follow the instructions from the code

    ; Instructions:
    ; Set the Safe bookname name @ line 41
    ; Put pathname to your audio file at line 44
    ; Load Eve with Innerspace / load isxeve
    ; type runscript localmon.iss
    ; If you want the alarm to stop type endscript.iss or it will stop when the neut leaves your system.

    Code (Text):

    ; Code was ripped out of EveBot and edited to only work on a whitelist basis.
    ; There might have been a better way to do it, all I know is it works and has saved me so many ships.
    ; Without this simple script I wouldn't be able to fly my beloved T3 ship.

    ; Instructions:
    ; Set the Safe bookname name @ line 41
    ; Put pathname to your audio file at line 44
    ; Load Eve with Innerspace / load isxeve
    ; type runscript localmon.iss
    ; If you want the alarm to stop type endscript.iss or it will stop when the neut leaves your system.

    function main()
    {
            variable set AllianceWhiteList
            AllianceWhiteList:Add[498125261]
            AllianceWhiteList:Add[912341115]
            AllianceWhiteList:Add[112342315]       
            AllianceWhiteList:Add[1191166] 
            AllianceWhiteList:Add[1312342317]
            AllianceWhiteList:Add[23423424199]
            AllianceWhiteList:Add[99245231]
            variable iterator PilotIterator
            variable int AllianceID
            variable index:pilot PilotIndex
            variable int IDontKnowAnotherWayToLoopThisSinceIRStupidAndDrinking
        do
        {
            if ${EVE.LocalsCount} > 1
            {
                PilotIndex:Clear
                LocMon:Set[0]
                EVE:DoGetPilots[PilotIndex]    

                PilotIndex:GetIterator[PilotIterator]
                if ${PilotIterator:First(exists)}
                do
                {
                    if !${AllianceWhiteList.Contains[${PilotIterator.Value.AllianceID}]}
                    {
                        echo "Escaping due to pilot[ Name: " ${PilotIterator.Value.Name} " - AllianceID" ${PilotIterator.Value.AllianceID} " ] : Warping to bookmark - If this guy isn't evil add his alliance to the list!"
                        ; enter name of bookmark here
                        EVE.Bookmark[BMNAME]:WarpTo
                        ; Enter file name to play here, I've only tried .wav but i presume a multitude of file types will work.
                        play "c:/alarm.wav"
                    }
                }
                while ${PilotIterator:Next(exists)}
                wait 50
                echo "Still safe"
            }
        }
        while ${IDontKnowAnotherWayToLoopThisSinceIRStupidAndDrinking} < 1

    }
     

Share This Page