• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Exp tracker and calculator plugin

Joined
Aug 8, 2008
RedCents
31¢
Hello, I made a modular version of the exp tracker and calculator that I have been using for myself, and decided to share it with you.
It keeps track of how much exp you have gained since it started, and calculates the estimated time until ding. Regular Exp only at this time.

For example:
Rich (BB code):
[MQ2] /treport
[MQ2] 3.64 percent in 15 minutes.
[MQ2] Time until ding: 1 hours 25 minutes.

Rich (BB code):
| Trexp.inc v.1.0 
| Author: arneweise 
| Released on Redguides.com: 2016-01-28
|
| TREXP is an experience tracker and calculator
|
| Usage: add the following to your macro for tracking and calculating exp gains
|   #include Trexp.inc
|   /call SetupTrexp [EQBC|IRC|ECHO]
|
| Commands
|     /treport - Show the current exp calculation
|     /treset  - Restart the exp calculations
| To show report for all your characters, you could also do: "/bc trexp report"

#Event TrexpReport      "#*#trexp report#*#"
#Event TrexpReset       "#*#trexp reset#*#"

Sub SetupTrexp(string NewOutputChatChannel)

    /declare OutputChatChannel  string  outer   EQBC
    /if (${NewOutputChatChannel.Length}) /varset OutputChatChannel ${NewOutputChatChannel}
    

    /declare StartingPctExp     float   outer
    /declare StartingDay        int     outer
    /declare StartingTimeSSM    int     outer
    /call TrexpReset
    
    /noparse /squelch /alias /treport   /echo Trexp report
    /noparse /squelch /alias /treset    /echo Trexp reset

    /echo TREXP initialized.
/return

Sub TrexpReport

    /declare CurrentPctExp float local
    /varcalc CurrentPctExp (${Me.Level}*100 + ${Me.PctExp})

    /declare TimePassedSeconds int local
    /varcalc TimePassedSeconds (${Time.SecondsSinceMidnight} - ${StartingTimeSSM}) + (${Time.Day} - ${StartingDay})*60*60*24

    /declare TimePassedString string local
    /call TrexpGetTimeSpanString ${TimePassedSeconds}
    /varset TimePassedString ${Macro.Return}    
    
    /declare SoFarPctExp float local ${Math.Calc[${CurrentPctExp}-${StartingPctExp}]}
    /call TrexpChat "${SoFarPctExp} percent in ${TimePassedString}."

    /if (${SoFarPctExp} > 0) {
        /declare ToDingPctExp float local ${Math.Calc[100.0 - ${Me.PctExp}]}
        /declare TimeToDingSeconds int local ${Math.Calc[(${ToDingPctExp}/${SoFarPctExp})*${TimePassedSeconds}]}
        /declare TimeToDingString string local
        /call TrexpGetTimeSpanString ${TimeToDingSeconds}
        /varset TimeToDingString ${Macro.Return}    
        /call TrexpChat "Time until ding: ${TimeToDingString}."
    } else {
        /call TrexpChat "Time until ding: Unknown."
    }
    
/return

Sub TrexpReset
    /varcalc StartingPctExp (${Me.Level}*100 + ${Me.PctExp})
    /varset StartingDay ${Time.Day}
    /varset StartingTimeSSM ${Time.SecondsSinceMidnight}
/return

Sub TrexpGetTimeSpanString(int TotalSeconds)
    /declare TimePassedString string local
    /if (${TotalSeconds} < 60) {
        /varset TimePassedString ${TotalSeconds} seconds
    } else /if (${TotalSeconds} < 60*60) {
        /varset TimePassedString ${Math.Calc[${TotalSeconds}/60].Int} minutes
    } else {
        /varset TimePassedString ${Math.Calc[${TotalSeconds}/3600].Int} hours ${Math.Calc[${TotalSeconds}/60%60].Int} minutes
    }
/return ${TimePassedString}

Sub TrexpChat(string message) 
    
    /if (${OutputChatChannel.Equal[EQBC]}) {
        /bc [${Time.Time24}] ${message}
    } else /if (${OutputChatChannel.Equal[IRC]}) {
        /i say [${Time.Time24}] ${message}
    } else {
        /echo [${Time.Time24}] ${message}
    }
/return

Sub Event_TrexpReport
    /call TrexpReport
/return

Sub Event_TrexpReset
    /call TrexpChat "Resetting Trexp."
    /call TrexpReset
    /call TrexpReport
/return
 
Exp tracker and calculator plugin

Users who are viewing this thread

Back
Top
Cart