Postado Abril 16, 2015 10 anos Galera, to fazendo um script pra ED nos cycs e queria comprar stealth ring no market. Alguem sabe os comandos para conseguir isso? Desde ja grato
Postado Abril 16, 2015 10 anos Acho que não é possível! Porém, tem como você retirar itens do DP... Segue o código... só fazer as devidas alterações -- How to use : -- WithdrawSupplies(item id , amount, index of depot bp, bp to move items) -- WithdrawSupplies(ammoID, maxAmmo, 2, SupplyBP) -- WithdrawSupplies(3155, 2000, 0, 5) function WithdrawSupplies(itemto,max,from,to) if type(to) == 'number' then to = to elseif type(to) == 'string' then to = Container(to):Index() else to = to:Index() end local name = Item.GetName(itemto) local icap = Item.GetWeight(itemto) function GetCount() -- counts from all bps except dp local count = 0 for i=0, #Container.GetAll() do local bp = Container(i) if bp:Index() ~= dpIndex then count = count + bp:CountItemsOfID(itemto) end end return count end function getSpot(to) if type(to) == 'number' or type(to) == 'string' then cont = Container(to) else cont = to end for i = 0 , cont:ItemCapacity() do if (not Item.isContainer(cont:GetItemData(i).id)) then local slot = i return slot end end return 0 end function StillHasContainers(container, open, window) local bp = Container(container) for i=bp:ItemCount()-1, 0, -1 do if Item.isContainer(bp:GetItemData(i).id) then if open then bp:UseItem(i,window) w8(450,700) end return true end end return false end function Draw() while GetCount() < max do if dp:CountItemsOfID(itemto) > 0 then for i = dp:ItemCount()-1, 0, -1 do amount = math.min(max-GetCount(), 100, dp:GetItemData(i).count) if amount > 0 then if dp:GetItemData(i).id == itemto then dp:MoveItemToContainer(i, to, getSpot(to), amount) wait(450,700) end else return true end end elseif GetCount() < max then if not StillHasContainers(dp:Index(),true, true) then assert(false,"Could not find enough "..name..'.') end end end end print('Trying to withdraw '..max - Self.ItemCount(itemto)..' '..name..'s.') if not Container('Depot Chest'):isOpen() then if Container('Locker'):isOpen() then Container('Locker'):UseItem(0,true) else Self.OpenDepot() end end local _bpstonotclose = #Container.GetAll() wait(300,500) Container.GetLast():UseItem(from,false) wait(450,700) dp = Container.GetLast() dpIndex = dp:Index() if Self.Cap() < (max - GetCount())*icap then assert(false,"Not enough cap to withdraw "..max-GetCount()) else Draw() end for i = _bpstonotclose, #Container.GetAll() do Container(i):Close() wait(300,500) end end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.