User:SPICYDIAPSID

From Elanthipedia
Revision as of 01:43, 8 January 2022 by SPICYDIAPSID (talk | contribs) (Adding number converter script.)
Jump to navigation Jump to search
Here be spreadsheets.

Quality of Life Stuff

Alteration Thesaurus

Work in Progress project intended to be a helpful source for inspiration, approved synonyms, lists of Elanthian colors, and more. Feedback, suggestions, and edits that improve it are welcome.


Micro-Transaction Event Cost Planners

These cost planners are maintained on Google sheets and are intended as a way to remove the obfuscation of item costs and create shopping lists that display total costs based on configurable settings such as subscription type and simucoin package. If you have found an error with one, have feedback, or feature suggestions/requests, please check the How To Use tab on any sheet for contact information.

MT Event Cost Planner Link Current Status
Drathrok's Duskruin https://tinyurl.com/DuskruinCosts Mid-upgrade to new configuration, end loot, and shopping list tabs.
Droughtman's Challenge https://tinyurl.com/DroughtmanCosts Pending How To Use update.
House of the Revenant Fang https://tinyurl.com/RevenantFangCosts Now in Testing for 2022.
Sleeping Dragon Corn Maze https://tinyurl.com/CornMazeCosts Last updated for 2021.
Su Helmas https://tinyurl.com/SuHelmasCosts Mid-upgrade to new configuration, end loot, and shopping list tabs.
Taisidon Mystery Cruise https://tinyurl.com/TaisidonMysteryCosts Pending How To Use update.

Number Converter Script (Genie)

This script will accept either a global variable name or a string of text and will attempt to convert it from a string to an integer. If it is not provided with a global variable name, it will return the result in a global variable named $numConvertResult. It will also echo out the results into the Game window. It is suggested that you have a trigger set up to make the initial variable setting as well as the script call.

Raw Script
###############################
###    Number Convert
###############################
# This script will accept a global variable OR a string of text and attempt to convert it from a string to an integer.
# If providing a global variable, the script will overwrite the variable provided with the integer result.
# If providing a string, the script will set the global variable numConvertResult equal to the integer result.
#
# It is suggested that you have a trigger set up to make the initial variable setting as well as the script call.
# Example Triggers:
#  #trigger {^You sense (.*) slivers from (Katamba|Xibar|Yavash) suitable for use in Telekinetic Throw orbiting your head\.$} {#var slivers $1; #send .numConvert slivers ; #echo >Log [Moonblade] Slivers - $slivers} {moonblade}
#  #trigger {^There are (.*) non-ammunition items inside your .*.$} {#var nonAmmo $1; #send .numConvert nonAmmo}
#  #trigger {^You count .* in .* and see there (is|are) (.*) left\.$} {#var ammoCount $2; #send .numConvert ammoCount}
#  #trigger {^You count .* bolt(s)? in .* and see there (is|are) (.*) left\.$} {#var boltCount $3; #send .numConvert boltCount}
#
# Usage:  .scriptName variableName
#         .scriptName textToConvert
#    ie:
#         .numConvert ammoCount
#         .numConvert thirty-two
###############################
###    VARIABLES
###############################
var num 0
var wordBig hundred|thousand
var wordTens twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|eighty
var wordOnes one|two|three|four|five|six|seven|eight|nine
var wordTeens ten|eleven|twelve|thirteen|fourteen|sixteen|seventeen|eighteen|nineteen


###############################
###    PARAMETERS
###############################
if_1 then {
    if ((matchre("%1", "^\d+$")) || (matchre("$%1", "^\d+$"))) then {
        echo [numConvert] Detected integer provided.  Exiting.
        exit
    }
    if (contains("$%1", "$")) then {
        echo [numConvert] Detected non-variable provided.  Returning results in \\$numConvertResult.
        var varName numConvertResult
        var numWord %0
        # Initialize numConvertResult.
        if (!($numConvertResult > 0)) then {
            put #var numConvertResult 0
        }
    } else {
        var varName %1
        var numWord $%varName
    }
    goto convert-main
} else {
    goto convert-error
}


###############################
###    MAIN
###############################
convert-main:
    var str %numWord
    gosub convert-replaceTeens
    gosub convert-replaceOnes
    gosub convert-replaceTens
    eval str replacere("%str", " thousand", "000 +")
    eval str replacere("%str", " hundred", "00 +")
    evalmath num (%str)
    put #var %varName %num
    goto convert-exit


###############################
###    UTILITY
###############################
convert-error:
    put #echo >Log [numConvert] Called without providing a parameter.  Usage:  .scriptName varName or .scriptName stringToConvert.
    echo *********************
    echo Number Convert Error
    echo *********************
    echo You must call this script with a parameter of either a global variable such as ammoCount or with a string of text to convert.
    echo If providing a global variable, the script will overwrite the variable provided with the integer result.
    echo If providing a string, the script will set the global variable numConvertResult equal to the integer result.
    echo
    echo Examples:
    echo            .scriptName ammoCount
    echo            .scriptName thirty-two
    exit


convert-exit:
    pause .2
    echo [numConvert] \\$%varName = $%varName.
    # Parse added below for users calling this script from another or using triggers to capture the result.  Uncomment it if you prefer this method.
    # put #parse [numConvert] $%varName
    exit


convert-replaceOnes:
    eval str replacere("%str", "zero", " 0")
    eval str replacere("%str", "-one", " + 1")
    eval str replacere("%str", "-two", " + 2")
    eval str replacere("%str", "-three", " + 3")
    eval str replacere("%str", "-four", " + 4")
    eval str replacere("%str", "-five", " + 5")
    eval str replacere("%str", "-six", " + 6")
    eval str replacere("%str", "-seven", " + 7")
    eval str replacere("%str", "-eight", " + 8")
    eval str replacere("%str", "-nine", " + 9")
    eval str replacere("%str", "one", " 1")
    eval str replacere("%str", "two", " 2")
    eval str replacere("%str", "three", " 3")
    eval str replacere("%str", "four", " 4")
    eval str replacere("%str", "five", " 5")
    eval str replacere("%str", "six", " 6")
    eval str replacere("%str", "seven", " 7")
    eval str replacere("%str", "eight", " 8")
    eval str replacere("%str", "nine", " 9")
    return


convert-replaceTeens:
    eval str replacere("%str", "ten", " 10")
    eval str replacere("%str", "eleven", " 11")
    eval str replacere("%str", "twelve", " 12")
    eval str replacere("%str", "thirteen", " 13")
    eval str replacere("%str", "fourteen", " 14")
    eval str replacere("%str", "fifteen", " 15")
    eval str replacere("%str", "sixteen", " 16")
    eval str replacere("%str", "seventeen", " 17")
    eval str replacere("%str", "eighteen", " 18")
    eval str replacere("%str", "nineteen", " 19")
    return


convert-replaceTens:
    eval str replacere("%str", "twenty", " 20")
    eval str replacere("%str", "thirty", " 30")
    eval str replacere("%str", "forty", " 40")
    eval str replacere("%str", "fifty", " 50")
    eval str replacere("%str", "sixty", " 60")
    eval str replacere("%str", "seventy", " 70")
    eval str replacere("%str", "eighty", " 80")
    eval str replacere("%str", "ninety", " 90")
    return

Sorcery Finder

Lists ideal spells for sorcery that are available on scrolls and denotes if they are available as a runic tattoo. Results can be configured based on guild, spell type, spell difficulty, and whether or not to include higher risk spells. (See Sorcery for more details on risks and backlash.) This spreadsheet will never suggest spells with the highest risk for mana type, however, these can be found on the Spell List tab.


Other Stuff

Feature Mirror Idea Drive

Open access spreadsheet to submit Feature Alteration ideas for mirrors. This was provided to staff in December 2021.