Vending (25)

All currently available hooks that are found in Carbon. Most hooks would be ones compatible with Oxide, although there are Carbon-only ones as well.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches MarketTerminal.g__IsEligible|42_0 of Assembly-CSharp.dll.

Example
object CanAccessVendingMachine(MarketTerminal MarketTerminal , VendingMachine VendingMachine )
{
    Puts("CanAccessVendingMachine was called!");
    return (bool) null;
}
  • Called when a player attempts to administer a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.CanPlayerAdmin of Assembly-CSharp.dll.

Example
object CanAdministerVending(BasePlayer BasePlayer , VendingMachine VendingMachine )
{
    Puts("CanAdministerVending was called!");
    return (bool) null;
}
  • Called when a player attempts to administer a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches NPCVendingMachine.CanPlayerAdmin of Assembly-CSharp.dll.

Example
object CanAdministerVending(BasePlayer BasePlayer , NPCVendingMachine NPCVendingMachine )
{
    Puts("CanAdministerVending was called!");
    return (bool) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.DoTransaction of Assembly-CSharp.dll.

Example
object CanPurchaseItem(BasePlayer BasePlayer , Item Item , System.Action`2[[BasePlayer, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[Item, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] Action`2 , VendingMachine VendingMachine , ItemContainer ItemContainer )
{
    Puts("CanPurchaseItem was called!");
    return (bool) null;
}

This hook requires OnVendingTransaction, which loads alongside CanPurchaseItem.

  • Called when a player attempts to use a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.CanOpenLootPanel of Assembly-CSharp.dll.

Example
object CanUseVending(BasePlayer BasePlayer , VendingMachine VendingMachine )
{
    Puts("CanUseVending was called!");
    return (bool) null;
}
  • Called when a player attempts to administer a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.CanAcceptItem of Assembly-CSharp.dll.

Example
object CanVendingAcceptItem(VendingMachine VendingMachine )
{
    Puts("CanVendingAcceptItem was called!");
    return (bool) null;
}
  • Called when a sell order/offer is added to a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.AddSellOrder of Assembly-CSharp.dll.

Example
void OnAddVendingOffer(VendingMachine VendingMachine , ProtoBuf.VendingMachine.SellOrder SellOrder )
{
    Puts("OnAddVendingOffer was called!");
}
  • Called when a player buys an item from a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.BuyItem of Assembly-CSharp.dll.

Example
object OnBuyVendingItem(VendingMachine VendingMachine , BasePlayer BasePlayer , int Int32 , int Int32 )
{
    Puts("OnBuyVendingItem was called!");
    return (object) null;
}
  • Called when a sell order/offer is deleted from a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_DeleteSellOrder of Assembly-CSharp.dll.

Example
void OnDeleteVendingOffer(VendingMachine VendingMachine , int Int32 )
{
    Puts("OnDeleteVendingOffer was called!");
}
  • Called before a sold item is given.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.GiveSoldItem of Assembly-CSharp.dll.

Example
object OnGiveSoldItem(VendingMachine VendingMachine , Item Item , BasePlayer BasePlayer )
{
    Puts("OnGiveSoldItem was called!");
    return (object) null;
}
  • Called before making a purchase at the Marketplace terminal.

  • Returning a non-null value cancels default behavior.

  • This hook is Carbon-only compatible.

  • Patches MarketTerminal.Server_Purchase.

Example
object OnMarketplaceTerminalPurchase(MarketTerminal MarketTerminal , VendingMachine VendingMachine , BasePlayer BasePlayer , int Int32 , int Int32 )
{
    Puts("OnMarketplaceTerminalPurchase was called!");
    return (bool) null;
}
  • Called when a player opens the admin ui for a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_OpenAdmin of Assembly-CSharp.dll.

Example
void OnOpenVendingAdmin(VendingMachine VendingMachine , BasePlayer BasePlayer )
{
    Puts("OnOpenVendingAdmin was called!");
}
  • Called when the stock on a vending machine is updated.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RefreshSellOrderStockLevel of Assembly-CSharp.dll.

Example
void OnRefreshVendingStock(VendingMachine VendingMachine , ItemDefinition ItemDefinition )
{
    Puts("OnRefreshVendingStock was called!");
}
  • Called when a player attempts to rotate a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_RotateVM of Assembly-CSharp.dll.

Example
object OnRotateVendingMachine(VendingMachine VendingMachine , BasePlayer BasePlayer )
{
    Puts("OnRotateVendingMachine was called!");
    return (object) null;
}
  • Called before currency item is taken.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.TakeCurrencyItem of Assembly-CSharp.dll.

Example
object OnTakeCurrencyItem(VendingMachine VendingMachine , Item Item )
{
    Puts("OnTakeCurrencyItem was called!");
    return (object) null;
}
  • Called before currency item is taken.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches NPCVendingMachine.TakeCurrencyItem of Assembly-CSharp.dll.

Example
object OnTakeCurrencyItem(NPCVendingMachine NPCVendingMachine , Item Item )
{
    Puts("OnTakeCurrencyItem was called!");
    return (object) null;
}
  • Called when a player toggles the broadcasting of the vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_Broadcast of Assembly-CSharp.dll.

Example
void OnToggleVendingBroadcast(VendingMachine VendingMachine , BasePlayer BasePlayer )
{
    Puts("OnToggleVendingBroadcast was called!");
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_OpenShop of Assembly-CSharp.dll.

Example
object OnVendingShopOpen(VendingMachine VendingMachine , BasePlayer BasePlayer )
{
    Puts("OnVendingShopOpen was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches NPCTalking.OnConversationAction of Assembly-CSharp.dll.

Example
object OnVendingShopOpen(InvisibleVendingMachine InvisibleVendingMachine , BasePlayer BasePlayer )
{
    Puts("OnVendingShopOpen was called!");
    return (object) null;
}
  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TravellingVendor.SV_OpenMenu of Assembly-CSharp.dll.

Example
object OnVendingShopOpen(TravellingVendor TravellingVendor , BasePlayer BasePlayer )
{
    Puts("OnVendingShopOpen was called!");
    return (object) null;
}
  • Called when a player opens the customer ui for a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_OpenShop of Assembly-CSharp.dll.

Example
void OnVendingShopOpened(VendingMachine VendingMachine , BasePlayer BasePlayer )
{
    Puts("OnVendingShopOpened was called!");
}

This hook requires OnVendingShopOpen [VendingMachine], which loads alongside OnVendingShopOpened.

  • Called when a player opens the customer ui for a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches NPCTalking.OnConversationAction of Assembly-CSharp.dll.

Example
void OnVendingShopOpened(InvisibleVendingMachine InvisibleVendingMachine , BasePlayer BasePlayer )
{
    Puts("OnVendingShopOpened was called!");
}

This hook requires OnVendingShopOpen [NPCTalking], which loads alongside OnVendingShopOpened.

  • Called when a player opens the customer ui for a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches TravellingVendor.SV_OpenMenu of Assembly-CSharp.dll.

Example
void OnVendingShopOpened(TravellingVendor TravellingVendor , BasePlayer BasePlayer )
{
    Puts("OnVendingShopOpened was called!");
}

This hook requires OnVendingShopOpen [TravellingVendor], which loads alongside OnVendingShopOpened.

  • Called when a player tries to rename vending shop.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.RPC_UpdateShopName of Assembly-CSharp.dll.

Example
object OnVendingShopRename(VendingMachine VendingMachine , string String , BasePlayer BasePlayer )
{
    Puts("OnVendingShopRename was called!");
    return (object) null;
}
  • Called when a player attempts to buy an item from a vending machine.

  • Returning a non-null value cancels default behavior.

  • This hook is compatible within Carbon and Oxide.

  • Patches VendingMachine.DoTransaction of Assembly-CSharp.dll.

Example
object OnVendingTransaction(VendingMachine VendingMachine , BasePlayer BasePlayer , int Int32 , int Int32 , ItemContainer ItemContainer )
{
    Puts("OnVendingTransaction was called!");
    return (bool) null;
}

Last updated