Quest:
Cod: Selectaţi tot
[code]--[[
Quest: Exchange Bureau
Version: 1.0.0.3 w/ pre_qc
Language: Portuguese
Author: Owsap
Date: 20.07.2019 DMY
(C) 2019 / 2020 Owsap Productions
]]
define CHEQUE_MIN 1
define CHEQUE_MAX 19
define CHEQUE_VALUE 100000000
define CHEQUE_TAX 3
define MAX_CHEQUE 999
define MAX_GOLD 10000000000 -- 10.000.000.000
quest exchange_bureau begin
state start begin
when 9005.chat.gameforge[LC()][10043] begin
local ExchangeString = {gameforge[LC()][10045], gameforge[LC()][10046], gameforge[LC()][10035]}
local ExchangeOption = select_table(ExchangeString)
if ExchangeOption == 1 then
say_title(gameforge[LC()][10047])
say(string.format(gameforge[LC()][10048], CHEQUE_MIN, gold_format(CHEQUE_VALUE)))
say(string.format(gameforge[LC()][10049], CHEQUE_MIN, CHEQUE_MAX))
local Cheque = tonumber(input())
if tonumber(Cheque) and Cheque >= CHEQUE_MIN and Cheque <= CHEQUE_MAX then
local Gold = Cheque * CHEQUE_VALUE -- CHEQUE_VALUE
say_title(gameforge[LC()][10050])
say(string.format(gameforge[LC()][10033], Cheque, gold_format(Gold)))
if select(gameforge[LC()][10034], gameforge[LC()][10035]) == 1 then
if pc.get_cheque() >= Cheque then
if pc.get_gold() + Gold < MAX_GOLD then
pc.change_cheque(-Cheque)
pc.change_gold(Gold)
else
syschat(gameforge[LC()][10060])
end
else
syschat(gameforge[LC()][10060])
end
else return end
else
say(string.format(gameforge[LC()][10032], MAX_CHEQUE, gold_format(MAX_GOLD)))
return
end
elseif ExchangeOption == 2 then
say_title(gameforge[LC()][10036])
say(string.format(gameforge[LC()][10037], CHEQUE_MIN, gold_format(CHEQUE_VALUE)))
say(string.format(gameforge[LC()][10038], CHEQUE_MIN, CHEQUE_MAX))
local Cheque = tonumber(input())
if tonumber(Cheque) and Cheque >= CHEQUE_MIN and Cheque <= CHEQUE_MAX then
local Gold = Cheque * CHEQUE_VALUE -- CHEQUE_VALUE
local Tax = (Gold * CHEQUE_TAX) / 100
local GoldWithTax = Gold + Tax
say_title(gameforge[LC()][10039])
say(string.format(gameforge[LC()][10040], CHEQUE_TAX))
say(string.format(gameforge[LC()][10041], gold_format(GoldWithTax), Cheque))
if select(gameforge[LC()][10042], gameforge[LC()][10044]) == 1 then
if pc.get_gold() >= GoldWithTax then
if pc.get_cheque() + Cheque < MAX_CHEQUE then
pc.change_gold(-GoldWithTax)
pc.change_cheque(Cheque)
else
syschat(string.format(gameforge[LC()][10062], (MAX_CHEQUE - 1)))
end
else
syschat(gameforge[LC()][10063])
end
else return end
else
say(string.format(gameforge[LC()][10032], MAX_CHEQUE, gold_format(MAX_GOLD)))
return
end
else return end
end
end
end
Eroare putty:
Cod: Selectaţi tot
./qc exchange_bureau.quest
exchange_bureau.quest:10:must start with 'quest'
Abort (core dumped)



de