Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest charge_cash_by_voucher begin
- state start begin
- function charge(amount, charge_type)
- if charge_type == nil then
- charge_type = "cash"
- end
- if 0 < amount then
- local result = pc.charge_cash(amount, charge_type)
- if true == result then
- local item_id = item.get_id()
- char_log(item_id, "CHARGE_CASH_BY_VOUCHER", amount)
- chat(string.format("|cffffc700|h[Doładowanie SM]:|h|r Pomyślnie przypisano do Twojego konta %d SM.", amount))
- local flag_name = "total_" .. charge_type
- pc.setqf(flag_name, pc.getqf(flag_name) + amount)
- item.remove()
- end
- end
- return false
- end
- when 80014.use or 80015.use or 80016.use or 80017.use begin
- if not pc.can_warp() then
- syschat("Nie możesz teraz tego użyć.")
- return
- end
- local amount = item.get_value(0)
- charge_cash_by_voucher.charge(amount, "cash")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement