obj/Uzi
icon = 'Guns.dmi'
icon_state = "Uzi"
Pickup = 1
weapon = 1
ammo = 30
maxammo = 30
value = 300
obj/USSCOM
icon = 'Guns.dmi'
icon_state = "USSCOM"
Pickup = 1
weapon = 1
ammo = 15
maxammo = 15
value = 100
obj/Armour
icon = 'Guns.dmi'
icon_state = "Armour"
Pickup = 1
defence = 1
defencevalue = 5
value = 500
//Not all objects are in.
mob/verb/Buy()
var/obj/weapon = input ("What item do you want?") in list ("Medi Kit","Clip","USSCOM","Uzi","RPG","None")
if (weapon == "None")
return
else
var/really = input ("[weapon] costs [weaponvalue], are you sure?") in list ("Yes","No")
if (really == "Yes")
if (usr.cash >= weaponvalue)
usr.cash -= weaponvalue
new weapon(usr)
usr << "[weapon] brought for [weaponvalue]."
else
usr << "You can't afford [weapon]! You got [usr.cash]."
My problem is I need to call a Obj's value using Input (which is a different thing).
This is in How-To because I have no clue.
Please use weaponvalue as a Var, if used.
EDIT: I managed it! Haha...