Default Kafra already does this. Here is a small sample of when trying to open storage.
// Accessing Normal Storage (Skipped if accessing Storage from Guild castle) if (getarg(0) != 2) { // Consume "Free Ticket for Kafra Storage" if available. if (countitem(Cargo_Free_Ticket)) { delitem Cargo_Free_Ticket, 1; } else { if (Zeny < getarg(1)) { mes getarg(3); // Niflheim Specific Message if (getarg(2) == 1) { percentheal -50,-50; mes "^666666Zeeeeeny..."; mes "M-more z-zeny...!"; mes "N-neeed 150... zeny..."; mes "Ergh! T-taking bl-blood~!^000000"; return; } // Standard Message mes "I'm sorry, but you don't"; mes "have enough zeny to use"; mes "the Storage Service. Our"; mes "Storage access fee is "+getarg(1)+" zeny."; return; } Zeny -= getarg(1); if (getarg(2) != 6) RESRVPTS += getarg(1) / 5; } }If you look closely you'll see this:
// Consume "Free Ticket for Kafra Storage" if available. if (countitem(Cargo_Free_Ticket)) { delitem Cargo_Free_Ticket, 1;That tells it to take a ticket instead of paying zeny, should they have 1 in their inventory.
Thanks for the information =)