lovekilz 95 Posted June 27, 2014 Share Posted June 27, 2014 Here`s the thing , i made a system that remove some items that has the timestamp < then get_date() the thing is it dosen`t remove the item.. i burned my brains out but no succes. Heres my code GAME 2089 when login begin local getCostume = { 41003, 41004, 41005, 41006, } for i = 1,table.getn(getCostume),1 do if(pc.count_item(getCostume[i]) >= 1 ) then item.select(getCostume[i]) if item.get_socket(0) <= get_time() then pc.remove_item() end end end end how can i make it remove the items that got socket0 < get_time() ? tyvm. Link to comment Share on other sites More sharing options...
MityQ 5 Posted June 27, 2014 Share Posted June 27, 2014 try this: when login begin local getCostume = { 41003, 41004, 41005, 41006, } for slot = 0, 90 do if item.select_cell(slot) then for i = 1,table.getn(getCostume),1 do if(pc.count_item(getCostume[i]) >= 1 ) then if item.get_socket(0) <= get_time() then item.remove() end end end end end end Link to comment Share on other sites More sharing options...
lovekilz 95 Posted June 27, 2014 Author Share Posted June 27, 2014 very very nice, tyvm, it burned my brains out Link to comment Share on other sites More sharing options...
lovekilz 95 Posted July 6, 2014 Author Share Posted July 6, 2014 one more thing tho, do u have any ideea how can i select items that are already equiped ? im using 2089, tryed with mysql , it deletes it from db, but still remains ingame. Link to comment Share on other sites More sharing options...
lovekilz 95 Posted July 12, 2014 Author Share Posted July 12, 2014 bump. Link to comment Share on other sites More sharing options...
Ken 904 Posted July 12, 2014 Share Posted July 12, 2014 quest limitTime begin state start begin when login or levelup or enter begin setskin(NOWINDOW) local costumeList = { 41003, 41004, 41005, 41006, } for i = 1,table.getn(costumeList),1 do if(pc.get_part(19) >= costumeList[i]) then syschat("You need to unequip this item from your equipment.") else local select = item.select(costumeList[i]) if(get_global_time() - pc.getf("limitTime",costumeList[i].."_time") < item.get_socket(0)) then pc.remove_item(costumeList[i]) end item.select(select) end end end when click with item.vnum >= 41003 and item.vnum <= 41006 begin pc.setf("limitTime",item.vnum.."_time",get_global_time()) end end end If item is equipped, system warning to him. Best Regards Ellie Do not be sorry, be better. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now