Code: Select all
(setq sysLevel (subtract (sysGetLevel) 2))
(if (leq sysLevel 0)
(setq sysLevel 1)
)
(setq weapList (itmGetTypes "w"))
(shuffle weapList)
(setq condition true)
(enumWhile weapList condition item
(block nil
(if (eq sysLevel (objGetLevel item))
(block nil
(setq condition Nil)
(objAddItem gSource (itmCreate (itmGetUNID item) 1))
)
)
)
)
I think the problem is that it isn't getting a weapon. My idea is to enumWhile over all the weapons in a list that is shuffled so they can all have different weapons, and stop once it finds a weapon that works. But when I dbgLogged everything I think the problem is it won't get the item. (I'm adding it to the cargo hold because I already have code in place to install it automatically)