This is something I felt was missing from all the bots (well most of them) and I added it to mine before release and most people loved it
Incense use by Button
The reason I have this "by button" rather than some sort of automatic timing system is because this is an easier way to teach people the code rather than some over the top timing system. This is in C# on a Windows Form. This is meant to be an add-on. This is for Ordinary Incense. In later updates, there will be more options for other types of incense to attract certain kinds of Pokemon. You can easily modify this code to attract or use the other incense.
What's Needed
RocketAPI
Basic Windows Form setup with 1 button
Client.CS of RocketAPI
Code:
public async Task<UseItemCaptureRequest> UseItemIncense(ItemId itemId)
{
var customRequest = new UseItemCaptureRequest
{
ItemId = itemId,
};
var useItemRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude,
new Request.Types.Requests
{
Type = (int)RequestType.USE_INCENSE,
Message = customRequest.ToByteString()
});
return
await
_httpClient.PostProtoPayload<Request, UseItemCaptureRequest>($"https://{_apiUrl}/rpc",
useItemRequest);
}
Your Form Code
-- Set Button Text with Advanced Info--
Code:
private void SetIncenseBtnText(int nrOfIncense)
{
btn_Incense.Text = $"Use Incense ({nrOfIncense.ToString()})";
if (nrOfIncense == 0)
{
btn_Incense.Enabled = false;
}
else
{
btn_Incense.Enabled = true;
}
}
--Button Activation--
Code:
private async void btn_Incense_Click(object sender, EventArgs e)
{
await UseIncense();
}
--Use Incense Function--
Code:
public async Task UseIncense()
{
var inventoryItems = await inventory.GetItems();
var IncenseItems = inventoryItems.Where(p => (ItemId)p.Item_ == ItemId.ItemIncenseOrdinary); //To use different incense, type ItemIncenseCool for example
var IncenseItem = IncenseItems.FirstOrDefault();
if (IncenseItem == null)
return;
var useIncenseItem = await client.UseItemIncense(ItemId.ItemIncenseOrdinary); //To use different incense, type ItemIncenseCool for example
Logger.Write($"Used Incense. Remaining: {IncenseItem.Count - 1}", LogLevel.Info);
await GetCurrentPlayerInformation();
}
Check out my YouTube Channel for more updates and Pokemon Go related leaks, news, and bot testings
TechX YouTube Channel Link