Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Percentages (https://forums.graalonline.com/forums/showthread.php?t=47934)

GoZelda 09-13-2003 12:29 PM

Percentages
 
1 Attachment(s)
Well, i had a lot of homework today, most of them is boring stuff you all have to do with the same calculation, so i decided to make a NPC to do the work for me. Well, here it is!

A brief explaination:

Calculate 100%
With this option, you need to give the percentage, and then how much it's worth. Then, the NPC will calculate what 100% is.

Example:
NPC Code:

6% = 108
108*100=10800
10800/6 = 1800
1800 = 100%



Calculate Percent
You must pass what 100% is, and what the value is. Then, the NPC will calculate how much percent the value is.

Example:
NPC Code:

100% = 80
Value = 20
20*100
2000/80
25 %



Calculate value of a percent
You must tell what 100% is, and a percent. Then, the computer will calculate how much the value is of the percent.

Example:
NPC Code:

100%=100
Value=20
100/100
1*value(20)
20 = 20%



Yes i know it's a bit simple but it's useful for doing homework XD

Benm00t 09-13-2003 02:20 PM

i'm sure a few extra seconds with a calculator would have done the job for you :-P

GoZelda 09-13-2003 03:17 PM

Yes but it makes my head hurt.

KuJiGX 12-07-2003 06:32 PM

Quote:

Originally posted by GoZelda
Yes but it makes my head hurt.
Wow dude. Your lazy x.x

tlf288 12-07-2003 08:38 PM

i write stuff in graal script all the time to do my work. ussualy i create a way to do everything that is needed on my paper, then i insert everything into arrays hardcoded into the script. then i make it just display each answer.

GoZelda 12-07-2003 09:03 PM

Beh i re-wrote it in C++ :p

Python523 12-07-2003 11:31 PM

What math class is this oO Intro to prealgebra?

GoZelda 12-07-2003 11:43 PM

Quote:

Originally posted by Python523
What math class is this oO Intro to prealgebra?
I guess so, the teacher once wrote down something on the blackboard for the higher class, so next year we'll probably do Sinus and Cosinus, that is, if you pick Algebra 'heavy' or 'strong' (dunno in English :\). Amazing what knowledge you can pick up from hearing people speak in hallways and glancing at the blackboard once :eek:

Dach 12-07-2003 11:44 PM

Quote:

Originally posted by KuJiGX


Wow dude. Your lazy x.x

[WHINY] three months... [/WHINY]


but yeah, graal is usefull for homework, bah why am I perpetuating this revival?

Python523 12-07-2003 11:48 PM

Quote:

Originally posted by GoZelda

I guess so, the teacher once wrote down something on the blackboard for the higher class, so next year we'll probably do Sinus and Cosinus, that is, if you pick Algebra 'heavy' or 'strong' (dunno in English :\). Amazing what knowledge you can pick up from hearing people speak in hallways and glancing at the blackboard once :eek:

Going from calculating percentages to sine and cosine is... a pretty big jump

wonderboysp2p 12-08-2003 12:33 AM

Quote:

Originally posted by Python523


Going from calculating percentages to sine and cosine is... a pretty big jump


O_o im thinking they might cover more than just precentages in their math class?

Python523 12-08-2003 02:27 AM

Quote:

Originally posted by wonderboysp2p



O_o im thinking they might cover more than just precentages in their math class?

usually it's
basic math -> prealgebra -> algebra -> geometry -> trig, I think

ForgottenLegacy 12-08-2003 05:42 AM

Quote:

Originally posted by Python523

usually it's
basic math -> prealgebra -> algebra -> geometry -> trig, I think

-> precalc -> calc/stats -> somthing else

GoZelda 12-08-2003 07:37 PM

Quote:

Originally posted by Python523


Going from calculating percentages to sine and cosine is... a pretty big jump

Hey, i'm not the teacher :whatever:

And it was mainly some revising.

CheeToS2 12-08-2003 11:08 PM

my county's system is

fundamentals-> pre-algebra (if needed)-> algebra I-> geometry(trig included I guess)-> algebra II-> pre-calculus->calculus->..

a lot of the stuff I do in the class i'm taking now i've already learned, so i'll script my calculator to do it :p

GoZelda 12-08-2003 11:21 PM

Quote:

Originally posted by CheeToS2
my county's system is

I don't use a national system :o

Lance 12-08-2003 11:35 PM

Quote:

Originally posted by GoZelda

I don't use a national system :o

Um. county != country.

MrGannondorf 12-15-2003 07:44 AM

I forget the order of mine, but I know trig is mixed in with geometry and algebra2 where I live.
Heres my nifty way of calculating percents.
lets say we want to find out what percent 8 is of 47.
first we'd take 100 and devide it by 47...
NPC Code:
#  100/47


then we'd take that resulting number and multiply it by the 8...
NPC Code:
#  (100/47)*8


and then you'd get the answer, wich comes to about 17, I think.
NPC Code:
#  (100/47)*8=17.ish


GoZelda 12-15-2003 05:44 PM

Quote:

Originally posted by Lance


Um. county != country.

Oh, i thought it was a typing error. I'm on an European school.

Lance 12-15-2003 08:20 PM

Quote:

Originally posted by GoZelda

Oh, i thought it was a typing error. I'm on an European school.

Schools in the USA are in large part controlled by their school district, and the school districts by each state.

ZeLpH_MyStiK 12-16-2003 02:20 AM

OMG why are you people making this harder for yourself? Think about it, you have to first make up the script around 10-20 seconds, and then type in the questions (depending on the amount of questions), and then read the answer. If you just do the math in your head, then write down the answer, wouldn't that be a lot faster? I'm sure this stuff isn't hard for you people:
6%=108
108*100=w00t add two zeros to the end of 108=10800
10800/6=w00t 10/6=1 remainder 4
48/6=8 remainder 0 (add these up)
--------------------------------
1+8+(two zeros left)
w00t, you get 1800 omg?!? but but but how?
Wow that took like a good 2 minutes? Subtract the time it took writing this from 2 minutes, and you got ???, 15 seconds max.

Dach 12-16-2003 10:53 AM

1 Attachment(s)
here is something that will definately spare you some time, matricies! *checks out level* wow, I explained alot in the signs... wait, I thought I added support for any dimensions of matrice-ey, ohwell 2-2 to 3-3 is good enough for me


All times are GMT +2. The time now is 05:15 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.