mob
Merchant
icon = 'TatsumotoTestOutfit.dmi'
verb
Talk()
set src in oview(1)
switch(alert("What would you like to do?","Shopkeeper","Buy","Cancel")) // \
pops open an alert which allows only 3 max options.
if("Buy") // if usr press buy this will enable the \
proc
switch(input("What would you like to buy?","Buy Item") in list ("Shorts","Shoes","Pants","Short Sleeved Shirt", "Long Sleeved Shirt", "Glasses", "Sunglasses", "Summer Dress", "Long Dress", "Skirt", "Kimono", "Blindfold", "Jumpsuit", "Bandolier", "Nevermind..."))
if("Shorts")
if(usr.gold<10) // if your gold is lower than 10 it will disallow you from purchasing it.
usr << "You cannot afford this!" // tells you, that you cannot buy it.
return
else // otherwish you can purchase it.
usr.gold -= 10 // subtracts 10 gold from your original
var/icon/Clothes= new('Clothing.dmi',"Shorts")
var/colorthing = input("What color do you want?") as color
Clothes.Blend(colorthing)
set src(/icon/Clothes)
src.Move(usr)
usr << "Thank you and come again!"
return
Problem description:
I am trying to adapt a Hair Color code with a color wheel to work so that it colorizes your Clothes however you want when you guy them. But I am running into problems. Any Ideas on how I should write this instead?
What you have there won't work, mainly because src in this case is the clicked mob. Pretty sure you don't want to take the mob, now do you.
What you'll want to do is make an object for the shorts and modify that.
This isn't tested because I'm at work, but it should be something like that.