ID:144128
 
Code:
obj/glasses
icon='gfx/glasses.dmi'



mob/Shopkeeper_2
icon='gfx/shopkeeper_2.dmi'
verb/Buy()
set src in oview(2)
usr<<"Welcome to the Marshblob ! The clothing store giant what may we do for you ?"
input("Pick anything you like !")in list("Jeans(30 blobbers)","Blue Glasses(5 blobbers)","Black Shirt(10 blobbers)","White Shirt(10 blobbers)")
if("Jeans(30 blobbers)" && usr.blobbers>=30)
usr.blobbers-=30
usr<<"Thanks for buying at Marshblob"
else
usr<<"Hey dont come here without anymoney sucurity!"
if("Blue Glasses(5 blobbers)" && usr.blobbers>=1)
usr.overlays+="gfx/glasses.dmi"
usr<<"Thanks for shoping at Marshblob !"


Problem description:

why arnt the glasses showing up as an overlay.What I mean is when I buy them my apperence does not change.
mob/Shopkeeper_2
icon='gfx/shopkeeper_2.dmi'
verb/Buy()
set src in oview(2)
usr<<"Welcome to the Marshblob ! The clothing store giant what may we do for you ?"
input("Pick anything you like !")in list("Jeans(30 blobbers)","Blue Glasses(5 blobbers)","Black Shirt(10 blobbers)","White Shirt(10 blobbers)")
if("Jeans(30 blobbers)" && usr.blobbers>=30)
usr.blobbers-=30
usr<<"Thanks for buying at Marshblob"
else
usr<<"Hey dont come here without anymoney sucurity!"
if("Blue Glasses(5 blobbers)" && usr.blobbers>=1)
usr.overlays+='gfx/glasses.dmi'
usr<<"Thanks for shoping at Marshblob !"


I'm not sure but I think this will fix it from where you put usr.overlays+= "gfx/glasses.dmi" for an icon it should be '
and for an icon state it should be "
When you did the command to add the overlay you used double quotes. Change them to single quotes and try again :)
In response to Betrayer1337
Alright thanks for your help its working now. :)
In response to TaintedSoul707
mob/Shopkeeper_2
icon='gfx/shopkeeper_2.dmi'
verb/Buy()
set src in oview(2)
usr<<"Welcome to the Marshblob ! The clothing store giant what may we do for you ?"
input("Pick anything you like !")in list("Jeans(30 blobbers)","Blue Glasses(5 blobbers)","Black Shirt(10 blobbers)","White Shirt(10 blobbers)")
if("Jeans(30 blobbers)" && usr.blobbers>=30)
usr.blobbers-=30
usr<<"Thanks for buying at Marshblob"
else
usr<<"Hey dont come here without anymoney sucurity!"
if("Blue Glasses(5 blobbers)" && usr.blobbers>=10)
usr.overlays+='gfx/glasses.dmi'
usr<<"Thanks for shoping at Marshblob !"
usr.blobbers-=10
else
usr<<"Yea.. uh.. you dont have enough money"
if("Black Shirt(10 blobbers)" && blobbers>=10)
usr<<"You have purchased a black shirt"
usr.blobbers-=10
usr.overlays+='gfx/black_shirt.dmi'
if("White Shirt(10 blobbers)" && usr.blobbers>=10)
usr<<"You have purchased a white shirt"
usr.blobbers-=10
usr.overlays+='gfx/white_shirt.dmi'



I did something wrong. Heres the prob I added a few more items you may purchase and now when I try to buy the blue glasses you buy a black shirt instead and then you buy a white shirt.No matter what you try to buy you will forced to get the black shirt and then the white shirt can someone inform me in what I have done wrong?
In response to TaintedSoul707
Well.

input("blah") in list("blah")


This will return the selection, but it isn't being assigned to anything, so there is nothing to check the outcome of the input.

switch(input("Blah") in list("blah"))


This will pass the returnal of the input through a switch statement.

        switch(input("Pick anything you like !")in list("Jeans(30 blobbers)","Blue Glasses(5 blobbers)","Black Shirt(10 blobbers)","White Shirt(10 blobbers)"))
if("Jeans(30 blobbers)")
if (usr.blobbers>=30)
usr.blobbers-=30
usr<<"Thanks for buying at Marshblob"
else
usr<<"Hey dont come here without anymoney sucurity!"
if("Blue Glasses(5 blobbers)")
if (usr.blobbers>=10)
usr.blobbers-=10
usr<<"Thanks for shoping at Marshblob"
usr.overlays+='glasses.dmi'
else
usr<<"Yea.. uh.. you dont have enough money"
if("Black Shirt(10 blobbers)")
if (usr.blobbers>=10)
usr.blobbers-=10
usr<<"You have purchased a black shirt"
usr.blobbers-=10
usr.overlays+='black_shirt.dmi'
if("White Shirt(10 blobbers)")
if (usr.blobbers>=10)
usr.blobbers-=10
usr<<"You have purchased a white shirt"
usr.blobbers-=10
usr.overlays+='white_shirt.dmi'


You don't need to include the folder it's in.
The DME includes all of the files, so it'll know where it is already.