adds CancelParcelSale

This commit is contained in:
Madpeter 2025-01-09 21:05:16 +00:00
parent ec038b53d3
commit 45b714451c

View file

@ -172,6 +172,23 @@ namespace SecondBotEvents.Commands
return BasicReply(JsonConvert.SerializeObject(reply));
}
[About("Cancels the current parcel the bot is in sale")]
[ReturnHints("ok")]
[ReturnHintsFailure("Error not in a sim")]
[ReturnHintsFailure("Parcel data not ready")]
public object CancelParcelSale()
{
KeyValuePair<bool, string> tests = SetupCurrentParcel();
if (tests.Key == false)
{
return Failure(tests.Value);
}
ParcelStatic.ParcelSetFlag(ParcelFlags.ForSale, targetparcel, false);
ParcelStatic.ParcelSetFlag(ParcelFlags.ForSaleObjects, targetparcel, false);
targetparcel.Update(GetClient());
return BasicReply("ok");
}
[About("Sets the current parcel for sale Also marks the parcel for sale")]
[ReturnHints("ok")]
[ReturnHintsFailure("Error not in a sim")]
@ -210,9 +227,11 @@ namespace SecondBotEvents.Commands
ParcelStatic.ParcelSetFlag(ParcelFlags.ForSale, targetparcel, true);
ParcelStatic.ParcelSetFlag(ParcelFlags.ForSaleObjects, targetparcel, false);
targetparcel.Update(GetClient());
return Failure("ok", new [] { amount, avatar });
return BasicReply("ok", new [] { amount, avatar });
}
[About("Gets the parcel Dwell (Traffic) value and returns it via the reply target")]
[ReturnHints("traffic value")]
[ReturnHintsFailure("Error not in a sim")]