Çözüldü Ep Kuponu

Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

master24

Çaylak Üye
Üye
Mesaj
4
Beğeni
0
Puan
8
Konu başlığına "Çözüldü" diye değiştiremezsiniz ! Gerekli yaptırımlar uygulanmıştır.
Serverde Ep Kuponunu tek seferlik nasıl ayarlayabilirim bi ep kuponuna her sağ tıkladıkça ep hesaba geçiyor silinmiyor bunun flag ve anti flag ayarlarından mı kaynaklı bilen yazarsa sevinirim şimdiden teşekkürler
 
Çözüm
Bu questi deneyebilirsin

Lua (Quest):
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
                -- syntax : pc.charge_cash(amount, charge_type)
                -- warning:     1. 'charge_type' : "cash"(default) | "mileage"
                --            2. 'amount' must be positive number.
                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)
                    syschat(string.format("%s...
Bu questi deneyebilirsin

Lua (Quest):
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
                -- syntax : pc.charge_cash(amount, charge_type)
                -- warning:     1. 'charge_type' : "cash"(default) | "mileage"
                --            2. 'amount' must be positive number.
                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)
                    syschat(string.format("%s Ejderha Parası Kazandın.", amount))

                    local flag_name = "total_" .. charge_type
                    pc.setqf(flag_name, pc.getqf(flag_name) + amount)

                    if item.get_count() > 1 then
                        item.set_count(item.get_count()-1)
                    else
                        item.remove()
                    end
                end
            end

            return false
        end
    
        when 80014.use or 80015.use or 80016.use or 80017.use begin
            local amount = item.get_value(0)
            
            if pc.is_busy() == true then
                say_title("EP Kuponu: ")
                say("")
                say_reward("Meşgul durumda olduğunuz için EP Kuponunu kullanamazsınız.")
            elseif pc.is_dead() == true then
                say_title("EP Kuponu: ")
                say("")
                say_reward("Ölü durumda olduğunuz için EP Kuponunu kullanamazsınız.")
            else
                charge_cash_by_voucher.charge(amount, "cash")
            end
        end
    end
end
 
Çözüm
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst