ID:147274
 
mob/var/list/click = list()

obj
Pot
icon = 'items.dmi'
icon_state="pot"
var/list/contained = list()
var/amount
verb
Add()
set src in oview(10)
usr.click = new()
for(var/obj/O in usr)
if(O.clickable)
usr.click.Add(O)
var/obj/adding = input("What would you like to add?") in usr.click
if(adding)
contained.Add(adding)
del(adding)

Brew()
set src in oview(10)
var/obj/items/LizardEye/LE
var/obj/items/MountainRoot/MR
var/obj/items/SpiderLeg/SL
var/obj/items/BatWing/BW
var/obj/items/Enting/ET
if(contained.Find(LE) && contained.Find(MR) && contained.Find(SL))
new/obj/fastpotion(usr)
//for a new list contained = new()
contained -= /obj/items/LizardEye
contained -= /obj/items/MountainRoot
contained -= /obj/items/SpiderLeg
else if(contained.Find(BW) && contained.Find(BW))
contained -= /obj/items/BatWing
contained -= /obj/items/BatWing
new/obj/Healingpotion(usr)
else if(contained.Find(BW) && contained.Find(BW) && contained.Find(ET))
contained -= /obj/items/BatWing
contained -= /obj/items/BatWing
contained -= /obj/items/Enting
new/obj/Healingpotion2(usr)

thats *supposed* to make an item after adding 2-3items and brewing them together, can anyone tell me whats wrong with it?*Edit* when u add the items needed and click brew the wrong items come up. im thinkit it has something to do with :
contained.Find(SL))//(list.Find(var))
First of all, why are you using a contained list? Just use contents. Anyway, your problem is that you're searching the list twice, and finding the same item twice. You need a new proc
atom
proc
findMultiple(var/type, var/num)
var/list/found = list()
while(found.len < num)
var/atom/movable/A = locate(type) in (contents - found)
if(A)
found += A
else
return null
return found

findList(var/list/types)
var/list/found = list()
for(var/V in types)
var/list/L = findMultiple(V, types[V])
if(L)
found += L
else
return null
return L


Then, just use, for example, findList(list("/obj/bateyes"=2,"/obj/Something"=1).