• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Exp tracker and calculator plugin

Arneweise

New member
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