|
经测试393版本可以使用
转自moaku
Create the file:
Data\design\script\tradingandtokens\offlineomnicorpprices.data and fill it with:
------------------------------------------------------------------------------------------------------------------------
TradingHouse.OfflinePrices = TradingHouse.OfflinePrices or {}
-- these are the default prices that are used when there is not a specific price specified for this ressource
TradingHouse.DefaultOmniBuyUnitPrice = 250
TradingHouse.DefaultOmniBuySellPrice = 100
function TradingHouse:SetOfflineOmnicorp(_Name, _UnitSellPrice, _UnitBuyPrice)
local ID = TradingLogic:GetTokenID(_Name)
if (ID == -1) then
LOG_ERROR("Trying to set Unknown token : "..(_Name or "nil"))
return
end
if (math.floor(_UnitSellPrice) ~= _UnitSellPrice) then
LOG_ERROR("Trying to set a non integer sell price for token : "..(_Name or "nil"))
return
end
TradingHouse.OfflinePrices[_Name] = TradingHouse.OfflinePrices[_Name] or {}
TradingHouse.OfflinePrices[_Name].SellPrice = _UnitSellPrice
TradingHouse.OfflinePrices[_Name].BuyPrice = _UnitBuyPrice
end
-----------------------------------------------------------------------------------------------------------------------
This will "Scrooge" Don Madalf preparing his greedy mind for xmas and makes him want to help people instead of scamming them.
Feel free to edit TradingHouse.DefaultOmniBuyUnitPrice and TradingHouse.DefaultOmniBuySellPrice to fit your needs, but don't edit the rest of the file. |
|