mob/var
list/moneyex = list()
converting=0
confrom= 0
conto = 0
mob/verb
Ex_money()
set name = "curency exchange"
if(!usr.converting)
usr.converting = 1
if(usr.Orch)
moneyex.Add("Orch")
if(usr.Dram)
moneyex.Add("Dram")
if(usr.Elo)
moneyex.Add("Elo")
if(usr.Lygh)
moneyex.Add("Lygh")
if(usr.Jing)
moneyex.Add("Jing")
if(usr.Raan)
moneyex.Add("Ra'an")
if(!moneyex)
_message(usr,"You have no money!")
return
if(moneyex)
switch(input(src,"What are you echanging from?","Currency Type") in moneyex)
if("Orch")
switch(input(src,"What are you echanging to?","Currency Type") in list("Dram","Elo","Lygh","Jing","Ra'an"))
if("Dram")
usr.confrom = input("Enter an amount to exchange:","Orch to Dram",usr.confrom) as num
if(usr.confrom>usr.Orch||usr.confrom<1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
alert(usr,"You dont have enough for this transaction")
usr.converting = 0
return
usr.Orch-=usr.confrom
usr.confrom = usr.confrom*10
usr.Dram += usr.confrom/4
usr.Dram = round(usr.Dram,1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
usr.converting = 0
if("Elo")
usr.confrom = input("Enter an amount to exchange:","Orch to Elo",usr.confrom) as num
if(usr.confrom>usr.Orch||usr.confrom<1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
alert(usr,"You dont have enough for this transaction")
usr.converting = 0
return
usr.Orch-=usr.confrom
usr.confrom = usr.confrom*10
usr.Elo += usr.confrom/4
usr.Elo = round(usr.Elo,1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
usr.converting = 0
if("Lygh")
usr.confrom = input("Enter an amount to exchange:","Orch to Lygh",usr.confrom) as num
if(usr.confrom>usr.Orch||usr.confrom<1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
alert(usr,"You dont have enough for this transaction")
usr.converting = 0
return
usr.Orch-=usr.confrom
usr.confrom = usr.confrom*10
usr.Lygh += usr.confrom/3
usr.Lygh = round(usr.Lygh,1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
usr.converting = 0
return
if("Jing")
usr.confrom = input("Enter an amount to exchange:","Orch to Jing",usr.confrom) as num
if(usr.confrom>usr.Orch||usr.confrom<1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
alert(usr,"You dont have enough for this transaction")
usr.converting = 0
return
usr.Orch-=usr.confrom
usr.confrom = usr.confrom*10
usr.Jing += usr.confrom/2
usr.Jing = round(usr.Jing,1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
usr.converting = 0
return
if("Ra'an")
usr.confrom = input("Enter an amount to exchange:","Orch to Raan",usr.confrom) as num
if(usr.confrom>usr.Orch||usr.confrom<1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
alert(usr,"You dont have enough for this transaction")
usr.converting = 0
return
usr.Orch-=usr.confrom
usr.confrom = usr.confrom*10
usr.Raan += usr.confrom/3
usr.Raan = round(usr.Raan,1)
moneyex.Remove("Orch")
moneyex.Remove("Dram")
moneyex.Remove("Elo")
moneyex.Remove("Lygh")
moneyex.Remove("Jing")
moneyex.Remove("Ra'an")
usr.converting = 0
return
Problem description: In my game there are 6 currencies, there HAS to be a better way than this! This is just the code to convert 1 currency, is there a better way or do I just have to suffer?