Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 20 von 31
  1. #1

    Frage Was ist falsch ?(Kein LUA-ERROR)

    Das ist der Script :
    Code:
    --------------------------------------------------------------------------------
    -- MapName: XXX
    --
    -- Author: XXX
    --
    --------------------------------------------------------------------------------
    
    -- Include main function
    Script.Load( Folders.MapTools.."Main.lua" )
    IncludeGlobals("MapEditorTools")
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called from main script to initialize the diplomacy states
    function InitDiplomacy()
    SetHostile(1,3)
    SetPlayerName(3,"Kerberros")
    end
    
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called from main script to init all resources for player(s)
    function InitResources()
        -- set some resources
        AddGold  (0)
        AddSulfur(0)
        AddIron  (0)
        AddWood  (0)    
        AddStone (0)    
        AddClay  (0)    
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called to setup Technology states on mission start
    function InitTechnologies()
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start and after save game is loaded, setup your weather gfx
    -- sets here
    function InitWeatherGfxSets()
        SetupNormalWeatherGfxSet()
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start you should setup your weather periods here
    function InitWeather()
        AddPeriodicSummer(10)
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start and after save game to initialize player colors
    function InitPlayerColorMapping()
    end
        
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start after all initialization is done
    function FirstMapAction()
    armeenmacher()
    ki()
    --einleitung()
    armeen()
    armme2()
    armee3()
    message()
    test()
    StartSimpleJob("VictoryJob")-- Sieg ?
    StartSimpleJob("Dario")
    StartSimpleJob("Brifings")
    end
    function test()
    SpeedUpGame()
      SpeedUpGame()
      SpeedUpGame()
      Tools.ExploreArea( -1, -1, 900 )
      end
    function armeen()
    Army = {}
    Army.player = 3
    Army.id = 1
    Army.strength = 3
    Army.position = GetPosition("EnemySpawn")
    Army.rodeLength = 1000
     
    SetupArmy(Army)
     
    -- Statt nun Truppen manuell mit EnlargeArmy() zu erzeugen, erweitern wir jetzt die Army-Table um einige Werte:
    -- Hier wird angegeben, welcher Einheitentyp und wieviel Soldaten der Truppe angehören. Es funktionieren auch Kanonen.
    -- Die Liste kann beliebig lang sein, es werden maximal soviele Truppen gespawned wie in Army.strength angegeben.
    -- Nachteil gegenüber dem EnlargeArmy(): Es kann keine Erfahrung verteilt werden
    Army.spawnTypes = {
        {Entities.PU_LeaderPoleArm4, 8},
        {Entities.PU_LeaderPoleArm4, 8},
        {Entities.PU_LeaderSword4,   8},
        {Entities.PU_LeaderSword4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
        {Entities.PV_Cannon4,   8},
    }
     
    -- Wenn endless true ist wird am Ende der Liste wieder oben angefangen, 
    -- ansonsten ist die Armee am Ende besiegt und es spawned nix mehr
    Army.endless = true
    
    -- spawnPos sollte der gleiche Punkt sein wie die normale Army.position, aber es geht auch ein anderer Spawnpunkt
    Army.spawnPos = GetPosition("EnemySpawn")
     
    -- spawnGenerator ist das Gebäude aus dem die Truppen "rauskommen". Ist das Gebäude zerstört spawnen keine Truppen mehr
    Army.spawnGenerator = "DARKCASTEL"
     
    -- Nach jeweils x Sekunden spawnen neue Gegner wenn sie gebraucht werden
    Army.respawnTime = 1
     
    -- Wenn refresh true ist, werden angeschlagene Truppen wieder aufgefüllt
    Army.refresh = true
     
    -- Pro Spawn werden maximal x neue Truppen der Armee hinzugefügt falls nötig
    Army.maxSpawnAmount = 100
     
    -- Wenn noEnemy true ist, spawnen nur neue Gegner wenn kein Feind in der Nähe ist
    Army.noEnemy = false
     
    -- Die Reichweite in der sich keine Gegner befinden dürfen wenn noEnemy true ist
    Army.noEnemyDistance = 0
     
    --Mit diesen erweiterten Angaben kann man dann die Funktion aufrufen:
    SetupAITroopSpawnGenerator("EnemyArmy", Army)
    --EnemyArmy ist dabei ein frei wählbarer, eindeutiger Name.
    --Jetzt sollten die Truppen völlig automatisch erstellt werden und bei Bedarf erneuert.
     
    --Einen Job um die Armee zu steuern, braucht man allerdings immer noch.
    end
    function armme2()
    Army = {}
    Army.player = 3
    Army.id = 1
    Army.strength = 3
    Army.position = GetPosition("EnemySpawn1")
    Army.rodeLength = 1000
     
    SetupArmy(Army) -- das ist was die einheiten machen sollen in diesem fall Spieler 1 angreiffen
     
    -- Statt nun Truppen manuell mit EnlargeArmy() zu erzeugen, erweitern wir jetzt die Army-Table um einige Werte:
    -- Hier wird angegeben, welcher Einheitentyp und wieviel Soldaten der Truppe angehören. Es funktionieren auch Kanonen.
    -- Die Liste kann beliebig lang sein, es werden maximal soviele Truppen gespawned wie in Army.strength angegeben.
    -- Nachteil gegenüber dem EnlargeArmy(): Es kann keine Erfahrung verteilt werden
    Army.spawnTypes = {
        {Entities.PU_LeaderPoleArm4, 8},
        {Entities.PU_LeaderPoleArm4, 8},
        {Entities.PU_LeaderSword4,   8},
        {Entities.PU_LeaderSword4,   8},
        }
     
    -- Wenn endless true ist wird am Ende der Liste wieder oben angefangen, 
    -- ansonsten ist die Armee am Ende besiegt und es spawned nix mehr
    Army.endless = true
     
    -- spawnPos sollte der gleiche Punkt sein wie die normale Army.position, aber es geht auch ein anderer Spawnpunkt
    Army.spawnPos = GetPosition("EnemySpawn1")
     
    -- spawnGenerator ist das Gebäude aus dem die Truppen "rauskommen". Ist das Gebäude zerstört spawnen keine Truppen mehr
    Army.spawnGenerator = "DARKCASTEL"
     
    -- Nach jeweils x Sekunden spawnen neue Gegner wenn sie gebraucht werden
    Army.respawnTime = 10
     
    -- Wenn refresh true ist, werden angeschlagene Truppen wieder aufgefüllt
    Army.refresh = true
     
    -- Pro Spawn werden maximal x neue Truppen der Armee hinzugefügt falls nötig
    Army.maxSpawnAmount = 3
     
    -- Wenn noEnemy true ist, spawnen nur neue Gegner wenn kein Feind in der Nähe ist
    Army.noEnemy = false
     
    -- Die Reichweite in der sich keine Gegner befinden dürfen wenn noEnemy true ist
    Army.noEnemyDistance = 0
     
    --Mit diesen erweiterten Angaben kann man dann die Funktion aufrufen:
    SetupAITroopSpawnGenerator("EnemyArmy", Army)
    --EnemyArmy ist dabei ein frei wählbarer, eindeutiger Name.
    --Jetzt sollten die Truppen völlig automatisch erstellt werden und bei Bedarf erneuert.
     
    --Einen Job um die Armee zu steuern, braucht man allerdings immer noch.
    end
    function armee3()
    Army = {}
    Army.player = 3
    Army.id = 1
    Army.strength = 3
    Army.position = GetPosition("EnemySpawn2")
    Army.rodeLength = 1000
     
    SetupArmy(Army)
     
    -- Statt nun Truppen manuell mit EnlargeArmy() zu erzeugen, erweitern wir jetzt die Army-Table um einige Werte:
    -- Hier wird angegeben, welcher Einheitentyp und wieviel Soldaten der Truppe angehören. Es funktionieren auch Kanonen.
    -- Die Liste kann beliebig lang sein, es werden maximal soviele Truppen gespawned wie in Army.strength angegeben.
    -- Nachteil gegenüber dem EnlargeArmy(): Es kann keine Erfahrung verteilt werden
    Army.spawnTypes = {
        {Entities.PU_LeaderPoleArm4, 8},
        {Entities.PU_LeaderPoleArm4, 8},
        {Entities.PU_LeaderSword4,   8},
        {Entities.PU_LeaderSword4,   8},
        }
     
    -- Wenn endless true ist wird am Ende der Liste wieder oben angefangen, 
    -- ansonsten ist die Armee am Ende besiegt und es spawned nix mehr
    Army.endless = true
     
    -- spawnPos sollte der gleiche Punkt sein wie die normale Army.position, aber es geht auch ein anderer Spawnpunkt
    Army.spawnPos = GetPosition("EnemySpawn2")
     
    -- spawnGenerator ist das Gebäude aus dem die Truppen "rauskommen". Ist das Gebäude zerstört spawnen keine Truppen mehr
    Army.spawnGenerator = "DARKCASTEL"
     
    -- Nach jeweils x Sekunden spawnen neue Gegner wenn sie gebraucht werden
    Army.respawnTime = 10
     
    -- Wenn refresh true ist, werden angeschlagene Truppen wieder aufgefüllt
    Army.refresh = true
     
    -- Pro Spawn werden maximal x neue Truppen der Armee hinzugefügt falls nötig
    Army.maxSpawnAmount = 3
     
    -- Wenn noEnemy true ist, spawnen nur neue Gegner wenn kein Feind in der Nähe ist
    Army.noEnemy = false
     
    -- Die Reichweite in der sich keine Gegner befinden dürfen wenn noEnemy true ist
    Army.noEnemyDistance = 0
     
    --Mit diesen erweiterten Angaben kann man dann die Funktion aufrufen:
    SetupAITroopSpawnGenerator("EnemyArmy", Army)
    --EnemyArmy ist dabei ein frei wählbarer, eindeutiger Name.
    --Jetzt sollten die Truppen völlig automatisch erstellt werden und bei Bedarf erneuert.
     
    --Einen Job um die Armee zu steuern, braucht man allerdings immer noch.
    
    end
    function message()
    Message("Dario darf NICHT sterben")
    end
    function armeenmacher()
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Schwert(2,8," armee1")
    Schwert(2,8," armee2")
    StartCountdown(20,endfunction(),false)
    end
    function endfunction()
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Speer(2,8," armee1")
    Speer(2,8," armee2")
    StartCountdown(20,armeenmacher(),false)
    end
    function ki()
    MapEditor_SetupAI(2, 1, 50000, 1, "DARKCASTEL", 0, 0)
    end
    function VictoryJob() --Das ist ein SimpleJob
    if IsDead("DARKCASTEL") then -- ist DARKCASTEL tot,dann ...
    Victory()  -- ... Sieg
    end
    end
    function Dario()
    if IsDead("dario") then
    Defeat()
    else
    Move("1","dario")
    Move("2","dario")
    Move("3","dario")
    Move("4","dario")
    end
    end
    function Brifings()
    if IsNear("dario","bishop",2000)then
    createBriefingBishop()
    return true
    end
    end
    function createBriefingBishop()  -- hier startet das Brifing
    BriefingBishop = {} 
    BriefingBishop.restoreCamera = true 
    -- call on end of biefing 
    BriefingBishop.finished = BriefingBishopFinished 
    local page = 0 
    -- page #1 
    page = page + 1 
    BriefingBishop[page] = {} 
    BriefingBishop[page].title = "Wanderer" 
    BriefingBishop[page].text = "Hallo!" 
    BriefingBishop[page].position = GetPosition("bishop") 
    BriefingBishop[page].dialogCamera = true 
    -- page #2 
    page = page + 1 
    BriefingBishop[page] = {} 
    BriefingBishop[page].title = "Wanderer" 
    BriefingBishop[page].text = "Ich \195\188berlasse dir mein Dorf !!!."
    
    BriefingBishop[page].position = GetPosition("bishop") 
    -- Npc
    local npc          = {}
    npc.name           = "bishop" --Name des Npc
    npc.briefing           = BriefingBishop --Briefing
    npc.heroName           = "dario" --Name des Helden mit dem der NPC nur spricht
    npc.wrongHeroMessage = "Ich rede nur mit Dario !Mach dich Acker." -- Meldung bei falschen Ansprechpartner 
    npc.follow           = "dario" -- Startet vom Startpunkt und bewegt sich zum anzusprechenden Npc
    CreateNPC(npc)
    
    function BriefingBishopFinished() 
    repleace()
    player()
    ---------------
    --ROHSTOFFE--
    AddGold (1000)
    AddSulfur (100)
    AddIron  (100)
    AddWood  (1000)
    AddStone (1000)
    AddClay  (1000)
    end 
    function repleace()
    ReplaceEntity("1", Entities.PU_Serf)
    ReplaceEntity("2", Entities.PU_Serf)
    ReplaceEntity("3", Entities.PU_Serf)
    ReplaceEntity("4", Entities.PU_Serf)
    end
    function player ()
    ChangePlayer("HQ1", 1)
    ChangePlayer("5", 1)
    ChangePlayer("6", 1)
    ChangePlayer("7", 1)
    ChangePlayer("8", 1)
    ChangePlayer("9", 1)
    ChangePlayer("10", 1)
    ChangePlayer("11", 1)
    ChangePlayer("12", 1)
    ChangePlayer("13", 1)
    ChangePlayer("14", 1)
    ChangePlayer("15", 1)
    ChangePlayer("16", 1)
    ChangePlayer("17", 1)
    ChangePlayer("18", 1)
    ChangePlayer("19", 1)
    ChangePlayer("20", 1)
    ChangePlayer("21", 1)
    ChangePlayer("22", 1)
    ChangePlayer("23", 1)
    ChangePlayer("24", 1)
    ChangePlayer("25", 1)
    ChangePlayer("26", 1)
    ChangePlayer("27", 1)
    ChangePlayer("28", 1)
    ChangePlayer("29", 1)
    end
    -- Quest data
    MapEditor_QuestTitle                = ""
    MapEditor_QuestDescription     = ""
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------COMPFORTFUNKTIONEN------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    
    function AddTribute( _tribute )
        assert( type( _tribute ) == "table", "Tribut muß ein Table sein" );
        assert( type( _tribute.text ) == "string", "Tribut.text muß ein String sein" );
        assert( type( _tribute.cost ) == "table", "Tribut.cost muß ein Table sein" );
        assert( type( _tribute.playerId ) == "number", "Tribut.playerId muß eine Nummer sein" );
        assert( not _tribute.Tribute , "Tribut.Tribute darf nicht vorbelegt sein");
        
        uniqueTributeCounter = uniqueTributeCounter or 1;
        _tribute.Tribute = uniqueTributeCounter;
        uniqueTributeCounter = uniqueTributeCounter + 1;
        
        local tResCost = {};
        for k, v in pairs( _tribute.cost ) do
            assert( ResourceType[k] );
            assert( type( v ) == "number" );
            table.insert( tResCost, ResourceType[k] );
            table.insert( tResCost, v );
        end
        
        Logic.AddTribute( _tribute.playerId, _tribute.Tribute, 0, 0, _tribute.text, unpack( tResCost ) );
        SetupTributePaid( _tribute );
        
        return _tribute.Tribute;
    end
    function Armee(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderBow4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderPoleArm4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderSword4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderHeavyCavalry2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderSoldierCavalry2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderRifle2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon1,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon3,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon4,_number,GetPosition(_pos))
      end
    function Bogen(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderBow4,_number,GetPosition(_pos))
    end
    function Speer(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderPoleArm4,_number,GetPosition(_pos))
    end
    function Schwert(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderSword4,_number,GetPosition(_pos))
    end
    function Kavallerie(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderHeavyCavalry2,_number,GetPosition(_pos))
    end
    function KavallerieBogen(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderSoldierCavalry2,_number,GetPosition(_pos))
    end
    function Gewehr(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderRifle2,_number,GetPosition(_pos))
    end
    function Kannone1(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon1,_number,GetPosition(_pos))
    end
    function Kannone2(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon2,_number,GetPosition(_pos))
    end
    function Kannone3(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon3,_number,GetPosition(_pos))
    end
    function Kannone4(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon4,_number,GetPosition(_pos))
    end
    function StartCountdown(_Limit, _Callback, _Show)
    assert(type(_Limit) == "number")
    assert( not _Callback or type(_Callback) == "function" )
    Counter.Index = (Counter.Index or 0) + 1
    if _Show and CountdownIsVisisble() then
    assert(false, "StartCountdown: A countdown is already visible")
    end
    Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Callback, Show = _Show, Finished = false}
    if _Show then
    MapLocal_StartCountDown(_Limit)
    end
    if Counter.JobId == nil then
    Counter.JobId = StartSimpleJob("CountdownTick")
    end  
    return Counter.Index
    end 
    function StopCountdown(_Id)
    if Counter.Index == nil then
    return
    end
    if _Id == nil then
    for i = 1, Counter.Index do
    if Counter.IsValid("counter" .. i) then
    if Counter["counter" .. i].Show then
    MapLocal_StopCountDown()
    end
    Counter["counter" .. i] = nil
    end
    end
    else
    if Counter.IsValid("counter" .. _Id) then
    if Counter["counter" .. _Id].Show then
    MapLocal_StopCountDown()
    end
    Counter["counter" .. _Id] = nil
    end
    end
    end
    function CountdownIsVisisble()
    for i = 1, Counter.Index do
    if Counter.IsValid("counter" .. i) and Counter["counter" .. i].Show then
    return true
    end
    end
    return false
    end
    function CountdownTick()
        local empty = true
        for i = 1, Counter.Index do
            if Counter.IsValid("counter" .. i) then
                if Counter.Tick("counter" .. i) then
                    Counter["counter" .. i].Finished = true
                end
                
                if Counter["counter" .. i].Finished and not IsBriefingActive() then
                    if Counter["counter" .. i].Show then
                        MapLocal_StopCountDown()
                    end
                    
                    -- callback function
                    if type(Counter["counter" .. i].Callback) == "function" then
                        Counter["counter" .. i].Callback()
                    end
                    
                    Counter["counter" .. i] = nil
                end
                
                empty = false
            end
        end
        
        if empty then
            Counter.JobId = nil
            Counter.Index = nil
            return true
        end
    end
    end

  2. #2
    12 of 5
    Registriert seit
    28.01.2010
    Beiträge
    3
    Downloads
    0
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Hallo,

    Beim PlayerName muss ein
    Code:
    Display.SetPlayerName("Name")
    hin.

    FG
    andre111

  3. #3

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    ich habs gelöst

  4. #4
    12 of 5
    Registriert seit
    06.02.2010
    Beiträge
    1
    Downloads
    0
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    könntest du den Script nochmal reinstellen, so wie er richtig ist? Würd mich interessieren, wo da der Fehler lag.

    Gruß

  5. #5
    Serf
    Registriert seit
    06.02.2010
    Beiträge
    84
    Downloads
    0
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Zitat Zitat von Siedlergamer Beitrag anzeigen
    ich habs gelöst
    eher die Schweizer. ^^

    Zitat Zitat von trabbi Beitrag anzeigen
    function createBriefingBishop()
    Du hast ja Alles in diese Funktion gepackt, absicht,
    oder fehlt nicht wo ein end??
    guck mal ganz ganz ganz weit unten rein. der war ein bissel fix beim comfortfkt. reinkopieren.

    Edit: @SG: Lass dir ruhig ne Minute mehr zeit generell beim Skripten. Bei mir sind am Anfang auch diese Fehler aufgetreten beim Programmieren, vor S5.
    Geändert von aCid (06.02.2010 um 19:47 Uhr)

  6. #6

    Daumen runter AW: Was ist falsch ?(Kein LUA-ERROR)

    der script (aber geht immer noch nit ):
    RapidShare: 1-CLICK Web hosting - Easy Filehosting

  7. #7
    Planierer Avatar von Pirat92
    Registriert seit
    30.08.2009
    Ort
    Bremen
    Beiträge
    37
    Downloads
    0
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    kann das grad nicht Runterladen Rapidshare ist überlastet, probier doch nächstes mal diese Seite File-Upload.net - Ihr kostenloser File Hoster! da braucht man keinen Account

  8. #8
    Lanzenträger Avatar von trabbi
    Registriert seit
    09.03.2006
    Beiträge
    4,967
    Downloads
    1
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Und ... warum wird das nicht hier eingestellt ??
    Bin deshalb schon Sauer, und hab meinen Post gelöscht !
    trabbi
    Was ist Theorie, - Wenns klappen soll und es klappt nie
    Was ist Praxis, - Frag nicht so dumm, wenns klappt und Du weißt nicht warum

  9. #9

    Lächeln AW: Was ist falsch ?(Kein LUA-ERROR)

    1. sonst währe der beitrag zu groß !
    2. ich lads auf meinen webserver

  10. #10
    Lanzenträger Avatar von trabbi
    Registriert seit
    09.03.2006
    Beiträge
    4,967
    Downloads
    1
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Zitat Zitat von Siedlergamer Beitrag anzeigen
    1. sonst währe der beitrag zu groß !
    2. ich lads auf meinen webserver
    Kannste auch in mehrere Teile Posten
    trabbi
    Was ist Theorie, - Wenns klappen soll und es klappt nie
    Was ist Praxis, - Frag nicht so dumm, wenns klappt und Du weißt nicht warum

  11. #11

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    ok...

  12. #12

    Beitrag AW: Was ist falsch ?(Kein LUA-ERROR)

    script teil 1 :
    Code:
    --------------------------------------------------------------------------------
    -- MapName: Der groesste Kampf in Siedler 5
    -- Kampfmap
    -- Author: Siedlergamer
    -- Maptester :
    -- Script : Siedlergamer
    -- Landschaft : Siedlergamer
    --------------------------------------------------------------------------------
    
    -- Include main function
    Script.Load( Folders.MapTools.."Main.lua" )
    IncludeGlobals("MapEditorTools")
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called from main script to initialize the diplomacy states
    function InitDiplomacy()
    SetHostile(1,3)
    Display.SetPlayerName(3,"Kerberros")
    end
    
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called from main script to init all resources for player(s)
    function InitResources()
        -- set some resources
        AddGold  (0)
        AddSulfur(0)
        AddIron  (0)
        AddWood  (0)    
        AddStone (0)    
        AddClay  (0)    
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called to setup Technology states on mission start
    function InitTechnologies()
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start and after save game is loaded, setup your weather gfx
    -- sets here
    function InitWeatherGfxSets()
        SetupNormalWeatherGfxSet()
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start you should setup your weather periods here
    function InitWeather()
        AddPeriodicSummer(1000)
        AddPeriodicRain(100)
        AddPeriodicWinter(1000)
        AddPeriodicRain(100)
    end
    
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start and after save game to initialize player colors
    function InitPlayerColorMapping()
    end
        
    --++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    -- This function is called on game start after all initialization is done
    function FirstMapAction()
    armeenmacher()
    ki()
    einleitung()
    ultraarmy() -- mega armee !
    message()
    test()
    StartSimpleJob("OpenDoorStein")
    StartSimpleJob("VictoryJob")-- Sieg ?
    StartSimpleJob("Dario")
    StartSimpleJob("Brifings")
    end
    function test()
    SpeedUpGame()
      SpeedUpGame()
      SpeedUpGame()
      Tools.ExploreArea( -1, -1, 900 )
      end
      function ultraarmy()
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
        Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
        Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
        Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      StartCountdown(1,ultraarmy2(),false)
      end
      function ultraarmy2()
        Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      Armee(2,8," ua1")
      Armee(2,8," ua2")
      Armee(2,8," ua3")
      Armee(2,8," ua4")
      Armee(2,8," ua5")
      Armee(2,8," ua6")
      StartCountdown(1,ultraarmy(),false)
      end
      function einleitung()
      local cutscene={
    StartPosition={
    zoom = 800,    
    rotation = -250,
    angle = 20,
    position = GetPosition( "dario" ),
    },
    Flights={
    {
    position = GetPosition( "bishop" ),
    angle = 15,
    zoom = 1000,
    rotation = -150,
    duration = 10,
    delay = 2,
    title = "Mentor",
    text = "Reded mit dem Wanderer.",
    },
    {
    position = GetPosition( "HQ1" ),
    angle = 15,
    zoom = 2300,
    rotation = -10,
    duration = 20,
    delay = 0,
    title = "Mentor",
    text = "Er gibt euch sein Dorf und Rohstoffe",
    },
    {
    position = GetPosition( "DARKCASTEL" ),
    angle = 10,
    zoom = 2000,
    rotation = 0,
    duration = 0,
    delay = 0,
    title = "Mentor",
    text = "Ihr m\195\188sst nun eine Armee aufstellen und Kerberros gegenübertreten",
    },
    },
    Callback = function()
    GetPosition( "HQ1" )
    sk()
    end,
    }
     StartCutscene( cutscene )
    end
    function sk()
      -- Das lokale Briefing
        local briefing = {}
        -- AddPage Funktion
        local AP = function( _page ) table.insert( briefing, _page ); return _page; end
        
        -- Seite 1
        local choicePage = AP{    -- Auswahlseite für die Auswertung merken
            mc   = {     -- Multiple Choice
                title   = "Siedlergamer",
                text    = "Welcher Schwierigkeitsgrad solls denn sein?",
                firstText   = "Schwer",
                secondText  = "Sehr Schwer",
                firstSelected  = 2,   
                secondSelected = 4,   
            },
            dialogCamera    =   true,
        }
        
        -- Seite 2
        AP{ 
            text = "Ihr habt den Schwierigkeitsgrad schwer gew\195\164hlt!Ihr bekommt 500 Gold.",
        }
     
        -- Seite 3
        AP()    -- Zwischen beiden Folgebriefings muss mindestens eine "Leerseite" liegen.
        
        -- Seite 4
        AP{ 
            text = "Ihr habt den Schwierigkeitsgrad sehr schwer gew\195\164hlt!Ihr bekommt 200 Gold abgezogen.",
        }
        
        -- Die finished Funktion:
        briefing.finished = function()
                if GetSelectedBriefingMCButton( choicePage ) == 1 then -- Erste Antwort gewählt?
                    AddGold(500)
                else    -- zweite Antwort gewählt?
                    AddGold (-200)
                end
            end
        
        -- Und los...
        StartBriefing( briefing)
        -- soll dieses Briefing nicht aus einer anderen Funktion heraus aufgerufen werden,
        -- kann hier statt StartBriefing auch ein NPC erzeugt werden
        end
    function message()
    Message("Dario darf NICHT sterben")
    end

  13. #13

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    script teil 2:
    Code:
    function armeenmacher()
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Schwert(2,8," armee1")
    Schwert(2,8," armee2")
    StartCountdown(20,endfunction(),false)
    end
    function endfunction()
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Armee(2,8," armee1")
    Armee(2,8," armee2")
    Speer(2,8," armee1")
    Speer(2,8," armee2")
    StartCountdown(20,armeenmacher(),false)
    end
    function ki()
    MapEditor_SetupAI(2, 1, 50000, 1, "DARKCASTEL", 0, 0)
    end
    function VictoryJob() --Das ist ein SimpleJob
    if IsDead("DARKCASTEL") then -- ist DARKCASTEL tot,dann ...
    Victory()  -- ... Sieg
    end
    end
    function Dario()
    if IsDead("dario") then
    Defeat()
    else
    Move("1","dario")
    Move("2","dario")
    Move("3","dario")
    Move("4","dario")
    end
    end
    function Brifings()
    if IsNear("dario","bishop",2000)then
    Move("bishop","dario")
    createBriefingBishop()
    return true
    end
    end
    function createBriefingBishop()  -- hier startet das Brifing
    BriefingBishop = {} 
    BriefingBishop.restoreCamera = true 
    -- call on end of biefing 
    BriefingBishop.finished = BriefingBishopFinished 
    local page = 0 
    -- page #1 
    page = page + 1 
    BriefingBishop[page] = {} 
    BriefingBishop[page].title = "Wanderer" 
    BriefingBishop[page].text = "Hallo!" 
    BriefingBishop[page].position = GetPosition("bishop") 
    BriefingBishop[page].dialogCamera = true 
    -- page #2 
    page = page + 1 
    BriefingBishop[page] = {} 
    BriefingBishop[page].title = "Wanderer" 
    BriefingBishop[page].text = "Ich \195\188berlasse dir mein Dorf !!!."
    
    BriefingBishop[page].position = GetPosition("bishop") 
    -- Npc
    local npc          = {}
    npc.name           = "bishop" --Name des Npc
    npc.briefing           = BriefingBishop --Briefing
    npc.heroName           = "dario" --Name des Helden mit dem der NPC nur spricht
    npc.wrongHeroMessage = "Ich rede nur mit Dario !Mach dich Acker." -- Meldung bei falschen Ansprechpartner 
    npc.follow           = "dario" -- Startet vom Startpunkt und bewegt sich zum anzusprechenden Npc
    CreateNPC(npc)
    end
    function BriefingBishopFinished() 
    repleace()
    player()
    ---------------
    --ROHSTOFFE--
    AddGold (1000)
    AddSulfur (100)
    AddIron  (100)
    AddWood  (1000)
    AddStone (1000)
    AddClay  (1000)
    end 
    function repleace()
    ReplaceEntity("1", Entities.PU_Serf)
    ReplaceEntity("2", Entities.PU_Serf)
    ReplaceEntity("3", Entities.PU_Serf)
    ReplaceEntity("4", Entities.PU_Serf)
    end
    function player ()
    ChangePlayer("HQ1", 1)
    ChangePlayer("5", 1)
    ChangePlayer("6", 1)
    ChangePlayer("7", 1)
    ChangePlayer("8", 1)
    ChangePlayer("9", 1)
    ChangePlayer("10", 1)
    ChangePlayer("11", 1)
    ChangePlayer("12", 1)
    ChangePlayer("13", 1)
    ChangePlayer("14", 1)
    ChangePlayer("15", 1)
    ChangePlayer("16", 1)
    ChangePlayer("17", 1)
    ChangePlayer("18", 1)
    ChangePlayer("19", 1)
    ChangePlayer("20", 1)
    ChangePlayer("21", 1)
    ChangePlayer("22", 1)
    ChangePlayer("23", 1)
    ChangePlayer("24", 1)
    ChangePlayer("25", 1)
    ChangePlayer("26", 1)
    ChangePlayer("27", 1)
    ChangePlayer("28", 1)
    ChangePlayer("29", 1)
    end
    function OpenDoorStein()
        if IsDead("toropen1") or IsDead("toropen2") then
            ReplaceEntity ("gate1", Entities.XD_WallStraightGate ) 
            ReplaceEntity ("gate2", Entities.XD_WallStraightGate ) 
            Message("Das Tor ist nun offen !")
            return true -- die ständige Abfrage wird beendet, da sie nicht mehr benötigt wird
        end -- Ende von if
    end -- Ende von OpenDoorStein
    -- Quest data
    MapEditor_QuestTitle                = ""
    MapEditor_QuestDescription     = ""
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------COMPFORTFUNKTIONEN------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    
    function AddTribute( _tribute )
        assert( type( _tribute ) == "table", "Tribut muß ein Table sein" );
        assert( type( _tribute.text ) == "string", "Tribut.text muß ein String sein" );
        assert( type( _tribute.cost ) == "table", "Tribut.cost muß ein Table sein" );
        assert( type( _tribute.playerId ) == "number", "Tribut.playerId muß eine Nummer sein" );
        assert( not _tribute.Tribute , "Tribut.Tribute darf nicht vorbelegt sein");
        
        uniqueTributeCounter = uniqueTributeCounter or 1;
        _tribute.Tribute = uniqueTributeCounter;
        uniqueTributeCounter = uniqueTributeCounter + 1;
        
        local tResCost = {};
        for k, v in pairs( _tribute.cost ) do
            assert( ResourceType[k] );
            assert( type( v ) == "number" );
            table.insert( tResCost, ResourceType[k] );
            table.insert( tResCost, v );
        end
        
        Logic.AddTribute( _tribute.playerId, _tribute.Tribute, 0, 0, _tribute.text, unpack( tResCost ) );
        SetupTributePaid( _tribute );
        
        return _tribute.Tribute;
    end
    function Armee(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderBow4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderPoleArm4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderSword4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderHeavyCavalry2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderSoldierCavalry2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderRifle2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon1,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon3,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon4,_number,GetPosition(_pos))
      end
    function Bogen(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderBow4,_number,GetPosition(_pos))
    end
    function Speer(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderPoleArm4,_number,GetPosition(_pos))
    end
    function Schwert(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderSword4,_number,GetPosition(_pos))
    end
    function Kavallerie(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderHeavyCavalry2,_number,GetPosition(_pos))
    end
    function KavallerieBogen(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderSoldierCavalry2,_number,GetPosition(_pos))
    end
    function Gewehr(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderRifle2,_number,GetPosition(_pos))
    end
    function Kannone1(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon1,_number,GetPosition(_pos))
    end
    function Kannone2(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon2,_number,GetPosition(_pos))
    end
    function Kannone3(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon3,_number,GetPosition(_pos))
    end
    function Kannone4(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon4,_number,GetPosition(_pos))
    end
    function StartCountdown(_Limit, _Callback, _Show)
    assert(type(_Limit) == "number")
    assert( not _Callback or type(_Callback) == "function" )
    Counter.Index = (Counter.Index or 0) + 1
    if _Show and CountdownIsVisisble() then
    assert(false, "StartCountdown: A countdown is already visible")
    end
    Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Callback, Show = _Show, Finished = false}
    if _Show then
    MapLocal_StartCountDown(_Limit)
    end
    if Counter.JobId == nil then
    Counter.JobId = StartSimpleJob("CountdownTick")
    end  
    return Counter.Index
    end 
    function StopCountdown(_Id)
    if Counter.Index == nil then
    return
    end
    if _Id == nil then
    for i = 1, Counter.Index do
    if Counter.IsValid("counter" .. i) then
    if Counter["counter" .. i].Show then
    MapLocal_StopCountDown()
    end
    Counter["counter" .. i] = nil
    end
    end
    else
    if Counter.IsValid("counter" .. _Id) then
    if Counter["counter" .. _Id].Show then
    MapLocal_StopCountDown()
    end
    Counter["counter" .. _Id] = nil
    end
    end
    end
    function CountdownIsVisisble()
    for i = 1, Counter.Index do
    if Counter.IsValid("counter" .. i) and Counter["counter" .. i].Show then
    return true
    end
    end
    return false
    end
    function CountdownTick()
        local empty = true
        for i = 1, Counter.Index do
            if Counter.IsValid("counter" .. i) then
                if Counter.Tick("counter" .. i) then
                    Counter["counter" .. i].Finished = true
                end
                
                if Counter["counter" .. i].Finished and not IsBriefingActive() then
                    if Counter["counter" .. i].Show then
                        MapLocal_StopCountDown()
                    end
                    
                    -- callback function
                    if type(Counter["counter" .. i].Callback) == "function" then
                        Counter["counter" .. i].Callback()
                    end
                    
                    Counter["counter" .. i] = nil
                end
                
                empty = false
            end
        end
        
        if empty then
            Counter.JobId = nil
            Counter.Index = nil
            return true
        end
        end

  14. #14

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    und das könnt ihr in eure maps kopieren :
    Code:
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------COMPFORTFUNKTIONEN------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------
    
    function AddTribute( _tribute )
        assert( type( _tribute ) == "table", "Tribut muß ein Table sein" );
        assert( type( _tribute.text ) == "string", "Tribut.text muß ein String sein" );
        assert( type( _tribute.cost ) == "table", "Tribut.cost muß ein Table sein" );
        assert( type( _tribute.playerId ) == "number", "Tribut.playerId muß eine Nummer sein" );
        assert( not _tribute.Tribute , "Tribut.Tribute darf nicht vorbelegt sein");
        
        uniqueTributeCounter = uniqueTributeCounter or 1;
        _tribute.Tribute = uniqueTributeCounter;
        uniqueTributeCounter = uniqueTributeCounter + 1;
        
        local tResCost = {};
        for k, v in pairs( _tribute.cost ) do
            assert( ResourceType[k] );
            assert( type( v ) == "number" );
            table.insert( tResCost, ResourceType[k] );
            table.insert( tResCost, v );
        end
        
        Logic.AddTribute( _tribute.playerId, _tribute.Tribute, 0, 0, _tribute.text, unpack( tResCost ) );
        SetupTributePaid( _tribute );
        
        return _tribute.Tribute;
    end
    function Armee(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderBow4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderPoleArm4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderSword4,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderHeavyCavalry2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderSoldierCavalry2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PU_LeaderRifle2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon1,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon2,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon3,_number,GetPosition(_pos))
      CreateMilitaryGroup(_player,Entities.PV_Cannon4,_number,GetPosition(_pos))
      end
    function Bogen(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderBow4,_number,GetPosition(_pos))
    end
    function Speer(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderPoleArm4,_number,GetPosition(_pos))
    end
    function Schwert(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderSword4,_number,GetPosition(_pos))
    end
    function Kavallerie(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderHeavyCavalry2,_number,GetPosition(_pos))
    end
    function KavallerieBogen(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderSoldierCavalry2,_number,GetPosition(_pos))
    end
    function Gewehr(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PU_LeaderRifle2,_number,GetPosition(_pos))
    end
    function Kannone1(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon1,_number,GetPosition(_pos))
    end
    function Kannone2(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon2,_number,GetPosition(_pos))
    end
    function Kannone3(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon3,_number,GetPosition(_pos))
    end
    function Kannone4(_player,_number,_pos)
      CreateMilitaryGroup(_player,Entities.PV_Cannon4,_number,GetPosition(_pos))
    end
    function StartCountdown(_Limit, _Callback, _Show)
    assert(type(_Limit) == "number")
    assert( not _Callback or type(_Callback) == "function" )
    Counter.Index = (Counter.Index or 0) + 1
    if _Show and CountdownIsVisisble() then
    assert(false, "StartCountdown: A countdown is already visible")
    end
    Counter["counter" .. Counter.Index] = {Limit = _Limit, TickCount = 0, Callback = _Callback, Show = _Show, Finished = false}
    if _Show then
    MapLocal_StartCountDown(_Limit)
    end
    if Counter.JobId == nil then
    Counter.JobId = StartSimpleJob("CountdownTick")
    end  
    return Counter.Index
    end 
    function StopCountdown(_Id)
    if Counter.Index == nil then
    return
    end
    if _Id == nil then
    for i = 1, Counter.Index do
    if Counter.IsValid("counter" .. i) then
    if Counter["counter" .. i].Show then
    MapLocal_StopCountDown()
    end
    Counter["counter" .. i] = nil
    end
    end
    else
    if Counter.IsValid("counter" .. _Id) then
    if Counter["counter" .. _Id].Show then
    MapLocal_StopCountDown()
    end
    Counter["counter" .. _Id] = nil
    end
    end
    end
    function CountdownIsVisisble()
    for i = 1, Counter.Index do
    if Counter.IsValid("counter" .. i) and Counter["counter" .. i].Show then
    return true
    end
    end
    return false
    end
    function CountdownTick()
        local empty = true
        for i = 1, Counter.Index do
            if Counter.IsValid("counter" .. i) then
                if Counter.Tick("counter" .. i) then
                    Counter["counter" .. i].Finished = true
                end
                
                if Counter["counter" .. i].Finished and not IsBriefingActive() then
                    if Counter["counter" .. i].Show then
                        MapLocal_StopCountDown()
                    end
                    
                    -- callback function
                    if type(Counter["counter" .. i].Callback) == "function" then
                        Counter["counter" .. i].Callback()
                    end
                    
                    Counter["counter" .. i] = nil
                end
                
                empty = false
            end
        end
        
        if empty then
            Counter.JobId = nil
            Counter.Index = nil
            return true
        end
        end

  15. #15
    Lanzenträger Avatar von trabbi
    Registriert seit
    09.03.2006
    Beiträge
    4,967
    Downloads
    1
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Frage:
    Warum machst Du so riesenlange Listen ?
    Kannst das doch auch einfacher machen.
    Entweder so:
    Code:
        Armee(2,8," ua1"), Armee(2,8," ua2"), Armee(2,8," ua3"), Armee(2,8," ua4"), Armee(2,8," ua5"), Armee(2,8," ua6"),
        Armee(2,8," ua1"), Armee(2,8," ua2"), Armee(2,8," ua3"), Armee(2,8," ua4"), Armee(2,8," ua5"), Armee(2,8," ua6"),
    oder eben mit diesem [i] (weiss nicht wie ich mich Ausdrücken soll, bin kein Programmierer)
    trabbi
    Was ist Theorie, - Wenns klappen soll und es klappt nie
    Was ist Praxis, - Frag nicht so dumm, wenns klappt und Du weißt nicht warum

  16. #16
    Planierer Avatar von Pirat92
    Registriert seit
    30.08.2009
    Ort
    Bremen
    Beiträge
    37
    Downloads
    0
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    oder eben mit diesem [i] (weiss nicht wie ich mich Ausdrücken soll, bin kein Programmierer)
    Mit i wäre das dann so:
    Code:
    function armeenmacher()
      for i = 1, 28 do
      Armee(2,8," armee1")
      Armee(2,8," armee2")
      end
    Schwert(2,8," armee1")
    Schwert(2,8," armee2")
    StartCountdown(20,endfunction(),false)
    end
    
    function endfunction()
      for i = 1, 28 do
      Armee(2,8," armee1")
      Armee(2,8," armee2")
      end
    Speer(2,8," armee1")
    Speer(2,8," armee2")
    StartCountdown(20,armeenmacher(),false)
    end
    
    function player ()
    ChangePlayer("HQ1", 1)
      for i = 5, 29 do
      ChangePlayer(""..i, 1)
      end
    end
    Das würde das ganze ein bischen vereinfachen
    Spontan fällt mir jetzt auf, das in armeenmacher
    Code:
    Schwert(2,8," armee1")
    Schwert(2,8," armee2")
    steht und in endfunction
    Code:
    Speer(2,8," armee1")
    Speer(2,8," armee2")
    mfg Pirat

  17. #17

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    ich hab mein problem gefunden :
    Code:
    Armee(2,8," armee1")
    und so ... haben spieler 2 !es soll spieler 3 sein .
    aber immer noch ...
    Geändert von Siedlergamer (13.02.2010 um 12:19 Uhr)

  18. #18

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    der script :
    http://www.12see.de/userdaten/000381..._siedler_5.zip
    dieser download ist highspeed , kostenlos und der server ist nicht überlastet !
    Geändert von Siedlergamer (13.02.2010 um 12:21 Uhr)

  19. #19
    Fischer Avatar von CineMachus
    Registriert seit
    30.09.2007
    Beiträge
    240
    Downloads
    0
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Zitat Zitat von Siedlergamer Beitrag anzeigen
    der script :
    http://www.12see.de/userdaten/000381..._siedler_5.zip
    dieser download ist highspeed , kostenlos und der server ist nicht überlastet !
    der script ist aber eine map...
    wenn du hilfe willst, sei so gut, dann stell' hier doch einfach das script rein oder lade es halt irgendwo hoch...

    ps: und mach' deine signatur doch kleiner, da bekommt man ja augenkrebs...

  20. #20
    Lanzenträger Avatar von trabbi
    Registriert seit
    09.03.2006
    Beiträge
    4,967
    Downloads
    1
    Uploads
    0

    Standard AW: Was ist falsch ?(Kein LUA-ERROR)

    Da funktioniert erst einmal nix !
    erste Auffälligkeit: Du verwendest für Umlaute die Asci-Tabelle.
    Das haut nicht hin!
    Stell in Notepad++ das Format UTF-8 ein.
    Denn kannste ganz normal schreiben.
    Wenn Du später wieder auf Ansi umstellst, siehst Du auch den richtigen Code!
    Schätze mal, das dadurch auch die Einleitung gar nicht anläuft.
    Selbst das Tools.ExploreArea funktioniert nicht!
    Obwohl ichs in die FMA, wo´s hingehört, gesetz hab.
    Also stimmt vorher schon was nicht!
    Das kann so nicht sein: Display.SetPlayerName(3,"Kerberros")
    ich kenns nur so: SetPlayerName(3,"Kerberros")
    Weiter hab ich noch nix angesehen. Habe auch heut keine Zeit mehr
    Geändert von trabbi (13.02.2010 um 15:02 Uhr)
    trabbi
    Was ist Theorie, - Wenns klappen soll und es klappt nie
    Was ist Praxis, - Frag nicht so dumm, wenns klappt und Du weißt nicht warum

Seite 1 von 2 12 LetzteLetzte

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Ähnliche Themen

  1. Einmal falsch geklickt - Strafverfolgung
    Von fradiavolo im Forum Cafe Paperlapapp (Klön)
    Antworten: 14
    Letzter Beitrag: 29.04.2009, 11:26
  2. [Frage] Workers on Error
    Von saladin im Forum S6 Scriptecke
    Antworten: 6
    Letzter Beitrag: 11.01.2009, 17:56
  3. [beantwortet] Trigger_OnAtLeastXOfYQuestsSuccess error in questsystembehavior.lua
    Von Lhibou im Forum Siedler 6 AeK Mapperecke
    Antworten: 4
    Letzter Beitrag: 08.09.2008, 16:18
  4. Script: Handeln: Was ist Falsch???
    Von Siedlerino im Forum Siedler 6 AeK Mapperecke
    Antworten: 11
    Letzter Beitrag: 06.01.2008, 12:20

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •