View unanswered posts | View active topics It is currently 18 Jan 2018 01:45

Forum rules


- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.



Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Math 
Author Message
Veteran

Joined: 21 Mar 2016 09:17
Posts: 205
I can already imagine the responses I'm gonna get. "Do it yourself, not that hard!" Well, I get tired of swapping apps on my phone. Anyways, my dilemma is:

Surely there's a way to make a money calculating trigger, right? I have calculator apps, but every time I exit chrome to go to my calculator, I have to re-log. Ugh. Can I make a trigger to do this? Something like, "I have this many coppers, what does that boil down to" would even be helpful. But, could you put in a series of numbers and have that reduced? I'm thinking this for comparison purposes. It must be possible, right? How would you do it?

_________________
Alea iacta est. Serius regredi est.


25 May 2017 07:48
Profile
Wanderer

Joined: 14 Jun 2016 16:34
Posts: 62
Why do you want to calculate it?
Is it for withdrawing the perfect amount of coins for that next skill?

I always just withdrew as many coins as I could carry and trained all the skills I could with it.
If I didn't need all the coins, I would return to the back and deposit the rest.

If you don't like copper, find yourself a bank with a low rate of fee and minimize them all.
That way you will probably be able to carry all your coins at once.


25 May 2017 09:36
Profile
Rising Hero
User avatar

Joined: 29 Feb 2016 19:51
Posts: 313
Location: Everywhere
Very basic. Save this in a text editor as .html then open in a browser.
Bookmark it for ease of access.
Code:
<!DOCTYPE html>
<html>
<title>money converter</title>
<body>

<h2>Money Converter</h2>
<p>Type a value in the Coins field to convert the value to platinum:</p>

<p>
  <label>Coppers</label>
  <input id="inputCoppers" type="number" placeholder="Copper Coins" oninput="cCoinConverter(this.value)" onchange="cCoinConverter(this.value)">
</p>
<p>Platinum Coins: <span id="cOutputPlats"></span></p>
<p>
  <label>Silvers</label>
  <input id="inputSilvers" type="number" placeholder="Silver Coins" oninput="sCoinConverter(this.value)" onchange="sCoinConverter(this.value)">
</p>
<p>Platinum Coins: <span id="sOutputPlats"></span></p>
<p>
  <label>Golds</label>
  <input id="inputGolds" type="number" placeholder="Gold Coins" oninput="gCoinConverter(this.value)" onchange="gCoinConverter(this.value)">
</p>
<p>Platinum Coins: <span id="gOutputPlats"></span></p>

<script>
function cCoinConverter(valNum) {
  document.getElementById("cOutputPlats").innerHTML=valNum/12/12/12;
}
function sCoinConverter(valNum) {
  document.getElementById("sOutputPlats").innerHTML=valNum/12/12;
}
function gCoinConverter(valNum) {
  document.getElementById("gOutputPlats").innerHTML=valNum/12;
}
</script>
</body>
</html>
Very basic. No flashy CSS.
Though I could do something nicer, with time.
And add more functions.

EDIT: *facepalm* This won't work on your phone. Sorry. I misread your post at first. Oh well.

_________________
Chillin
[-_- ]
Click here to become a pupil of my Brute! It's really cool, I swear.


25 May 2017 09:57
Profile WWW
Myth
User avatar

Joined: 09 Mar 2010 20:33
Posts: 1331
Location: UK
When u are high up in the rich mens club you get the command <rc bankbook>
Tells you in plats how much money you have in the bank.
So I have a script to just use that and track how much I earn in a log in.

So its there just not for poor ppl. :P

_________________
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)


25 May 2017 10:12
Profile
Veteran

Joined: 21 Mar 2016 09:17
Posts: 205
Oh, it's definitely there. The bank has it. That value line. I would like something like that, not for banks or withdrawing, but because it's nice to know how much money you actually have in coppers. You have 3000 coppers, don't know it, and minimize that, you lose kinda a lot. I know there are ways of doing it, but maybe I'm just lazy lol

_________________
Alea iacta est. Serius regredi est.


25 May 2017 15:06
Profile
Myth
User avatar

Joined: 09 Mar 2010 20:33
Posts: 1331
Location: UK
If u make a start yourself we will help you on the finer points. Start by googling JavaScript math functions.

You can make a alias like
Calccopper 123 1234 12356 200000
Where the numbers r ur totals in the bank

Then the result will show on screen ur wealth in coppers

_________________
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)


25 May 2017 16:42
Profile
Veteran

Joined: 21 Mar 2016 09:17
Posts: 205
Okay, right off the bat, I have an idea here. To calc coppers, it would be count/12. Then, take that, and divide it by 12 again. If it's less than one, scrap it. If more, repeat, up to twice. Am I on the right track?

_________________
Alea iacta est. Serius regredi est.


25 May 2017 21:44
Profile
Veteran

Joined: 21 Mar 2016 09:17
Posts: 205
I discover that in order to do anything, I would need regex, and being able to use a wildcard in the pattern as a variable. What can I use for this purpose? Is it this:

(.*)\.$

_________________
Alea iacta est. Serius regredi est.


Last edited by Kwevin on 25 May 2017 22:02, edited 1 time in total.



25 May 2017 22:01
Profile
Rising Hero
User avatar

Joined: 29 Feb 2016 19:51
Posts: 313
Location: Everywhere
Kwevin wrote:
Okay, right off the bat, I have an idea here. To calc coppers, it would be count/12. Then, take that, and divide it by 12 again. If it's less than one, scrap it. If more, repeat, up to twice. Am I on the right track?
If you want to see how much Gold your Coppers are worth, yes. For Plats, divide once more.
A Silver is 12 Copper (Divide copper coins once by 12)
A Gold is 144 Copper (Divide copper coins twice by 12)
A Plat is 1728 Copper (Divide copper coins thrice by 12)

_________________
Chillin
[-_- ]
Click here to become a pupil of my Brute! It's really cool, I swear.


25 May 2017 22:02
Profile WWW
Veteran

Joined: 21 Mar 2016 09:17
Posts: 205
Hmm... Something like:

>ccalc var1
var1/12
If arg1<1, display var1+ " coppers, 0 silvers."
Else if arg1=var2
var2/12
If arg2<1, display var2 + " silvers " + remainder + " coppers."
Else if ans=var3

And so on. Is my thinking close?

_________________
Alea iacta est. Serius regredi est.


25 May 2017 22:22
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.