Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------------------------------------------------------------------------------------------
- // THE TEXT PROCESSING PHYSICS CALCULATION PORTION
- // This tag will process text in a specific way, and was made using the Laxus bot.
- // It goes from start to end processing the information it reads, then at the end,
- // I have the math split up so that it can process the physics calculations in logical order.
- // Once its done the physics calculations, it can then tell the user the results.
- // CreateGlobal, means that the tag will exist on the bot for all servers, storing who made it as well.
- //----------------------------------------------------------------------------------------------------------------------
- ?tag createglobal getsolar {oneline:
- {set:Pi|3.14159265358979323846264338}
- {set:Sol|383000000000000000000000000}
- {set:Proxima|651100000000000000000000}
- {set:Barnard|1340500000000000000000000}
- {set:VYCanis|103410000000000000000000000000000}
- {set:UYScuti|130220000000000000000000000000000}
- {set:2MASS|48258000000000000000000}
- {set:AU|149597870700}
- {set:Star|
- {if:{arg:0}|~|Sol|then:{get:Sol}|else:
- {if:{arg:0}|~|Proxima|then:{get:Proxima}|else:
- {if:{arg:0}|~|Barnard|then:{get:Barnard}|else:
- {if:{arg:0}|~|Canis|then:{get:VYCanis}|else:
- {if:{arg:0}|~|Scuti|then:{get:UYScuti}|else:
- {if:{arg:0}|~|2MASS|then:{get:2MASS}|else:
- {arg:0}}}}}}}}
- {set:Dist|
- {if:{arg:1}|~|Mercury|then:0.4|else:
- {if:{arg:1}|~|Venus|then:0.72|else:
- {if:{arg:1}|~|Earth|then:1|else:
- {if:{arg:1}|~|Mars|then:1.53|else:
- {if:{arg:1}|~|Belt|then:2.96|else:
- {if:{arg:1}|~|Jupiter|then:5.21|else:
- {if:{arg:1}|~|Saturn|then:9.55|else:
- {if:{arg:1}|~|Uranus|then:19.21|else:
- {if:{arg:1}|~|Neptune|then:30.07|else:
- {if:{arg:1}|~|Pluto|then:40.7|else:
- {if:{arg:1}|~|Voyager|then:129|else:
- {if:{arg:1}|~|Sedna|then:900|else:
- {if:{arg:2}|~|m|then:{math:{arg:1}|/|{get:AU}}|else:
- {if:{arg:2}|~|meters|then:{math:{arg:1}|/|{get:AU}}|else:
- {if:{arg:2}|~|km|then:{math:{arg:1}|*|1000|/|{get:AU}}|else:
- {arg:1}}}}}}}}}}}}}}}}}
- {set:Dist|{math:{get:Dist}|*|{get:AU}}}
- {set:math2|{math:4|*|{get:Pi}|*|{get:Dist}|^|2}}
- {set:Result|{math:{get:Star}|/|{get:math2}}}
- {set:Result|{round:{math:{get:Result}|*|100}}}
- {set:Result|{math:{get:Result}|/|100}}
- {set:Result2|{round:{math:{get:Dist}|/|{get:AU}|*|1000}}}
- {set:Result2|{math:{get:Result2}|/|1000}}
- {if:{argslen}|=|0|then:Need help? Type `!solarinfo`|else:
- The solar constant for {arg:0} is {get:Result} W/m² at {get:Result2} AU. (error? type `?tag solarinfo`)}}
- //----------------------------------------------------------------------------------------------------------------------
- // THE HELP AND INFORMATION PORTION
- // This tag would show you information you can use with the above tag,
- // to assist you in making decisions since the above tag is already near maximum text limit.
- //----------------------------------------------------------------------------------------------------------------------
- ?tag createglobal solarinfo Thank you for investigating this wonderful command made by **Vas**!
- The proper usage of this command is `?tag getsolar STAR DISTANCE Measurement`
- Measurement is optional, currently there is `m`, `meters`, and `km`. m = meters.
- If you don't specify a measurement, the default will be used (au).
- Available arguments for STAR:
- `Sol`: This is our star.
- `Proxima`: This is a nearby star system.
- `Barnard`: This is a random star system I chose that is cooler than our star.
- `Canis`: This is a rather hot star, brighter than ours.
- `Scuti`: This is the brightest star I could find.
- `2MASS`: This is the dimmest star I could find, a very cold barely alive star.
- Available arguments for DISTANCE:
- `Mercury`: Average Distance from our star.
- `Venus`: Average Distance from our star.
- `Earth`: Average Distance from our star.
- `Mars`: Average Distance from our star.
- `Belt`: The middle average of th asteroid belt's distance from our star
- `Jupiter`: Average Distance from our star.
- `Saturn`: Average Distance from our star.
- `Uranus`: Average Distance from our star.
- `Neptune`: Average Distance from our star.
- `Pluto`: Average Distance from our star.
- `Voyager`: Voyager 1's location as of 2017.
- `Sedna`: The furthest object in our system from our star.
- You may also enter a manual distance, either in meters `m` or `meters` as the 3rd argument, kilometers `km` as the third argument, or even as AU, without a third argument.
- Here's a few examples:
- `!getsolar Sol Earth` Returns the solar constant of earth's average distance from our star.
- `!getsolar Sol 149598023 km` Same as above, but with an exact value of distance specified in km.
- `!getsolar 2MASS 0.2` Returns the solar constant of 2MASS at a distance of 0.2 AU from it.
- If you have any questions, feel free to ask. I am unable to make the command any more advanced, as it is already near the maximum discord text limit.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement