I am making a program which helps me calculate price from exp to level
So i have to fill in current experience then i have to fill in a goal level then it has to find the difference between these values but the goal level has to be read out of a ini file which i already made
then it has to calculate the price depending on the experience between the current exp and goal level then it has to check what skill
so a better way to explain it is
This is the exp table which contains each level aswell as the experience to that level written in a ini format
Code: Select all
[Exp]
Level-1=0
Level-2=83
Level-3=174
Level-4=276
Level-5=388
Level-6=512
Level-7=650
Level-8=801
Level-9=969
Level-10=1154
Level-11=1384
Level-12=1584
Level-13=1833
Level-14=2107
Level-15=2411
Level-16=2746
Level-17=3115
Level-18=3523
Level-19=3973
Level-20=4470
Level-21=5018
Level-22=5624
Level-23=6291
Level-24=7028
Level-25=7842
Level-26=8740
Level-27=9730
Level-28=10824
Level-29=12031
Level-30=13363
Level-31=14833
Level-32=16456
Level-33=18247
Level-34=20224
Level-35=22406
Level-36=24815
Level-37=27473
Level-38=30408
Level-39=33648
Level-40=37224
Level-41=41171
Level-42=45529
Level-43=50339
Level-44=55649
Level-45=61512
Level-46=67983
Level-74=1096278
Level-48=83014
Level-49=91721
Level-50=101333
Level-51=111945
Level-52=123660
Level-53=136594
Level-54=150872
Level-55=166636
Level-56=184040
Level-57=203254
Level-58=224466
Level-59=247886
Level-60=273742
Level-61=302288
Level-62=333804
Level-63=368599
Level-64=407015
Level-65=449428
Level-66=496254
Level-67=547953
Level-68=605032
Level-69=668051
Level-70=737627
Level-71=814445
Level-72=899257
Level-73=992895
Level-75=1210421
Level-76=1336443
Level-77=1475581
Level-78=1629200
Level-79=1798808
Level-80=1986068
Level-81=2192818
Level-82=2421087
Level-83=2673114
Level-84=2951373
Level-85=3258594
Level-86=3597792
Level-87=3972294
Level-88=4385776
Level-89=4842295
Level-90=5346332
Level-91=5902831
Level-92=6517253
Level-93=7195629
Level-94=7944614
Level-95=8771558
Level-96=9684577
Level-97=10692629
Level-98=11805606
Level-99=13034431
and this is the code i currently have
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Home:
Gui, Home:Add, DropDownList, x5 y25 w125 h90 vSkill Choose1, Attack|Hitpoints|Mining|Strenght|Agility|Smithing|Defence|Herblore|Fishing|Ranged|Thieving|Cooking|Prayer|Crafting|Firemaking|Magic|Fletching|Woodcutting|Runecrafting|Slayer|Farming|Construction|Hunter
Gui, Home:Add, Text, x5 y10 w100 h15, Skill Requested:
Gui, Home:Add, Edit, x5 y75 w125 h20 vCurrentEXP, Current EXP
Gui, Home:Add, Text, x5 y60 w115 h15, Current EXP:
Gui, Home:Add, Text, x135 y80 w10 h10, ->
Gui, Home:Add, Edit, x155 y75 w44 h21 vGoal, Goal
Gui, Home:Add, Text, x155 y60 w75 h15, Goal Level:
Gui, Home:Add, Text, x5 y105 w200 h15, Price:
Gui, Home:Add, Edit, x5 y120 w230 h20 vPrice, Price
Gui, Home:Add, Text, x5 y145 w225 h15, Custommer Name:
Gui, Home:Add, Edit, x5 y160 w230 h20 vName, Name
Gui, Home:Add, Button, x250 y165 w43 h23 gSave, Save
Gui, Home:Show, w295 h189, OSRS Skill Service
return
HomeGuiClose:
ExitApp
Save:
Gui,Home:Submit,NoHide
IniWrite,%Name%,%A_WorkingDir%/Services/%Name%-Service.ini,Service,Name
IniWrite,%Skill%,%A_WorkingDir%/Services/%Name%-Service.ini,Service,Skill
IniWrite,%CurrentEXP%,%A_WorkingDir%/Services/%Name%-Service.ini,Service,Current-EXP
IniWrite,%Goal%,%A_WorkingDir%/Services/%Name%-Service.ini,Service,Goal
IniWrite,%Price%,%A_WorkingDir%/Services/%Name%-Service.ini,Service,Total-Price
return
for each skill there is a different price per 1 exp so thats the way it has to calculate the total price