Skip to main content
The Deno 2 Release Candidate is here
Learn more
method InsuranceController.prototype.rollForDelete
import { InsuranceController } from "https://deno.land/x/sptaki@1.2.0/controllers/mod.ts";

Determines whether an insured item should be removed from the player's inventory based on a random roll and trader-specific return chance.

Parameters

traderId: string

The ID of the trader who insured the item.

optional
insuredItem: Item

Optional. The item to roll for. Only used for logging.

Returns

boolean | null

true if the insured item should be removed from inventory, false otherwise, or null on error.