PHP-Code:
----------------------------------------------------------------------------------------------------------------------
function Mission_InitPlayers()
end
----------------------------------------------------------------------------------------------------------------------
function Mission_SetStartingMonth()
Logic.SetMonthOffset(1)
end
----------------------------------------------------------------------------------------------------------------------
function Mission_InitMerchants()
local Handel_1 = Logic.GetStoreHouse(2)
AddOffer (Handel_1, 5, Goods.G_Wood)
AddOffer (Handel_1, 5, Goods.G_Herb)
AddOffer (Handel_1, 5, Goods.G_Medicine)
local Handel_2 = Logic.GetStoreHouse(4)
AddOffer (Handel_2, 5, Goods.G_Gain)
AddOffer (Handel_2, 5, Goods.G_Bread)
end
----------------------------------------------------------------------------------------------------------------------
function Mission_FirstMapAction()
-- init players in singleplayer games only
if Framework.IsNetworkGame() ~= true then
Startup_Player()
Startup_StartGoods()
Startup_Diplomacy()
end
-- create quests
do
local MapName = Framework.GetCurrentMapName()
local ScriptName = "Maps\\ExternalMap\\"..MapName.."\\QuestSystemBehavior.lua"
Script.Load(ScriptName)
CreateQuests()
end
MachSchatzVersteck( "Brunnen", 1 , Goods.G_Gold)
MachSchatzVersteck( "Klosterruine", 350 , Goods.G_Gold)
--bewegungseinheiten festlegen
Entity1 = Logic.GetEntityIDByName("handler")
Entity2 = Logic.GetEntityIDByName("handler1")
Entity3 = Logic.GetEntityIDByName("handler2")
Entity4 = Logic.GetEntityIDByName("handler3")
--weg definieren
ControlPointsList = { "weg1", "weg2", "weg3", "weg4", "weg5", "weg6", "weg7", "weg8", "weg9", "weg10", "weg11", "weg12", "weg13", "weg14", "weg15", "weg16", "weg17", "weg18", "weg19", "weg20", "weg21", "weg22", "weg23", "weg24", "weg25", "weg26", "weg27", "weg28" }
--weg zuweisen
Path:new( Entity1, ControlPointsList, nil, true, nil, nil, nil, nil, nil,99)
Path:new( Entity2, ControlPointsList, nil, true, nil, nil, nil, nil, nil,99)
Path:new( Entity3, ControlPointsList, nil, true, nil, nil, nil, nil, nil,99)
Path:new( Entity4, ControlPointsList, nil, true, nil, nil, nil, nil, nil,99)
end
function MachSchatzVersteck(_entity, _menge, _type)
_type = _type or Goods.G_Gold
_menge = _menge or 100
if type(_entity) == "string" then
_entity = Logic.GetEntityIDByName(_entity)
end
Logic.InteractiveObjectClearCosts(_entity)
Logic.InteractiveObjectSetInteractionDistance(_entity, 1000)
Logic.InteractiveObjectSetTimeToOpen(_entity, 0)
Logic.InteractiveObjectClearRewards(_entity)
Logic.InteractiveObjectAddRewards(_entity, _type, _menge)
Logic.InteractiveObjectSetAvailability(_entity,true)
Logic.InteractiveObjectSetRewardResourceCartType(_entity, Entities.U_ThiefCart) -- Hier der Wagen für Resorcen.
Logic.InteractiveObjectSetRewardGoldCartType(_entity, Entities.U_GoldCart)--hier der Wagen für Gold
table.insert(HiddenTreasures, _entity)
end
Lesezeichen