public static void SellItemAtItemMarket(FromWhereType fromWhereType, int slotNo, int itemCount, long pricePerOne) { //ManualResetEvent SyncClientServer = (ManualResetEvent)obj; using (NamedPipeClientStream pipeStream = new NamedPipeClientStream("PipesOfPiece")) { pipeStream.Connect(); //MessageBox.Show(“[Client] Pipe connection established”); using (StreamWriter sw = new StreamWriter(pipeStream)) { sw.AutoFlush = true; sw.WriteLine("SellItemAtItemMarket" + " " + Engine.Instance.mThread.Id + " " + Offsets._marketBase + " " + (int)fromWhereType + " " + slotNo + " " + itemCount + " " + pricePerOne); } } }
} //broken public static void useInventoryItem(FromWhereType fromWhereType, int inventorySlotNo) { //ManualResetEvent SyncClientServer = (ManualResetEvent)obj; using (NamedPipeClientStream pipeStream = new NamedPipeClientStream("PipesOfPiece")) { pipeStream.Connect(); //MessageBox.Show(“[Client] Pipe connection established”); using (StreamWriter sw = new StreamWriter(pipeStream)) { sw.AutoFlush = true; sw.WriteLine("UseInventoryItem" + " " + Engine.Instance.mThread.Id + " " + Collection.Actors.Local.PlayerData.Address + " " + (int)fromWhereType + " " + inventorySlotNo + " " + 31 + " " + 1 + " " + 1); } } }
public static void buyItemFromItemMarketByMaid(FromWhereType moneyType, int itemId, int marketSlot, int itemCount) { int type = (int)moneyType; //ManualResetEvent SyncClientServer = (ManualResetEvent)obj; using (NamedPipeClientStream pipeStream = new NamedPipeClientStream("PipesOfPiece")) { pipeStream.Connect(); //MessageBox.Show(“[Client] Pipe connection established”); using (StreamWriter sw = new StreamWriter(pipeStream)) { sw.AutoFlush = true; sw.WriteLine("BuyItemFromMarketByMaid" + " " + Engine.Instance.mThread.Id + " " + Collection.ItemMarket.Base.ItemMarketList.Address + " " + moneyType + " " + itemId + " " + marketSlot + " " + itemCount); } } } //broken
public void SellItem(FromWhereType fromWhereType, int sellValue) { var mi = Collection.ItemMarket.Base.ItemMarketList.List[ (int)x0000_PTR_ItemData.ItemIndex].First( x => x.x0012_EnchantLevel == x0000_PTR_ItemData.EnchantLevel); var count = x0008_ItemCount; if (x0008_ItemCount > x0000_PTR_ItemData.MaxRegisterCountForItemMarket) { count = x0000_PTR_ItemData.MaxRegisterCountForItemMarket; } long price = sellValue; if (sellValue == 0) { price = mi.x0038_RecentPrice; } else { if (sellValue < mi.x0050_MinPrice) { price = mi.x0050_MinPrice; } else if (sellValue > mi.x0048_MaxPrice) { price = mi.x0048_MaxPrice; } } Pipe.Call.SellItemAtItemMarket(fromWhereType, SlotNo, count, price); Log.Post("Registered Item At ItemMarket - ItemId(" + x0000_PTR_ItemData.ItemIndex + ") Count(" + count + ") SlotNo(" + SlotNo + ") Price(" + price + ")", LogModule.AutoItemRegister); Thread.Sleep(100); }