function scr_itemget(arg0) { var __i = 0; var loop = 0; _pocketed = 0; _noroominventory = 0; noroom = 1; global.item[12] = 999; for (__i = 0; __i < 12; __i++) { if (global.item[__i] == 0) { global.item[__i] = arg0; noroom = 0; break; } } if (noroom) { _noroominventory = 1; noroom = 1; for (var __j = 0; __j < global.flag[64]; __j++) { if (global.pocketitem[__j] == 0) { debug_message("Placed in pocket :" + string(__j)); global.pocketitem[__j] = arg0; _pocketed = 1; noroom = 0; break; } } } script_execute(scr_iteminfo_all); debug_message("noroom=" + string(noroom)); debug_message("_pocketed=" + string(_pocketed)); debug_message("_noroominventory=" + string(_noroominventory)); }