Jump to content

Best4Gamers

Backer
  • Posts

    66
  • Joined

  • Last visited

Posts posted by Best4Gamers

  1. yes i think so ...

    i just got this mod also http://www.avorion.net/forum/index.php/topic,1196.0.html

    maybe they not going good together ?

     

    or i scrued something in the craftorders.lua

     

    ---

     

    function initUI()
    
        local res = getResolution()
        local size = vec2(250, 290)
    
        local menu = ScriptUI()
        local window = menu:createWindow(Rect(res * 0.5 - size * 0.5, res * 0.5 + size * 0.5))
        menu:registerWindow(window, "Orders"%_t)
    
        window.caption = "Craft Orders"%_t
        window.showCloseButton = 1
        window.moveable = 1
    
        local splitter = UIHorizontalMultiSplitter(Rect(window.size), 10, 10, 8)
    
        window:createButton(splitter:partition(0), "Idle"%_t, "onIdleButtonPressed")
        window:createButton(splitter:partition(1), "Passive"%_t, "onPassiveButtonPressed")
        window:createButton(splitter:partition(2), "Guard This Position"%_t, "onGuardButtonPressed")
        window:createButton(splitter:partition(3), "Patrol Sector"%_t, "onPatrolButtonPressed")
        window:createButton(splitter:partition(4), "Escort Me"%_t, "onEscortMeButtonPressed")
        window:createButton(splitter:partition(5), "Attack Enemies"%_t, "onAttackEnemiesButtonPressed")
        window:createButton(splitter:partition(6), "Mine"%_t, "onSafeMiningButtonPressed")
    window:createButton(splitter:partition(7), "Salvage"%_t, "onSalvageButtonPressed")
    window:createButton(splitter:partition(8), "Clean Sector"%_t, "onSalvageAllButtonPressed")
        --window:createButton(Rect(10, 250, 230 + 10, 30 + 250), "Attack My Targets", "onWingmanButtonPressed")
    
    end
    

     

    function onMineButtonPressed()
        if onClient() then
            invokeServerFunction("onMineButtonPressed")
            ScriptUI():stopInteraction()
            return
        end
    
        if checkCaptain() then
            removeSpecialOrders()
            Entity():addScript("ai/mine.lua")
        end
    end
    
    function onSafeMiningButtonPressed()
        if onClient() then
            invokeServerFunction("onSafeMiningButtonPressed")
            ScriptUI():stopInteraction()
            return
        end
    
        if checkCaptain() then
            removeSpecialOrders()
    	local ship = Entity()
    	local faction = Faction(ship.factionIndex)
    	local player = Player(faction.index)
    	local ai = ShipAI()
    	if ship.durability < ship.maxDurability / 2 then
    		player:sendChatMessage(player.name.." : "..ship.name, 0, "Currently waiting until damage is repaired.")
    		ai:setPassive()
    	end
            Entity():addScript("ai/safemine.lua")
        end
    end
    
    function onSalvageButtonPressed()
        if onClient() then
            invokeServerFunction("onSalvageButtonPressed")
            ScriptUI():stopInteraction()
            return
        end
    
        if checkCaptain() then
            removeSpecialOrders()
            Entity():addScript("ai/salvage.lua")
        end
    end
    
    function onSalvageAllButtonPressed()
        if onClient() then
            invokeServerFunction("onSalvageAllButtonPressed")
            ScriptUI():stopInteraction()
            return
        end
    
        if checkCaptain() then
            removeSpecialOrders()
            Entity():addScript("ai/salvageall.lua")
        end
    end
    
    function removeSpecialOrders()
    
        local entity = Entity()
    
        for index, name in pairs(entity:getScripts()) do
            if string.match(name, "data/scripts/entity/ai/") then
                entity:removeScript(index)
            end
        end
    end
    [code]

     

    both LUA in the AI folder , and still its not working ... can the SafeMining cousing it ?

     

    ---

     

    nvm problem solved . i forgot to copy it to steam game aslo.

  2. well i tryed to combine it with the safe mining mode ... and no luck still cant see the buttons ,,,

    what i am missing ?

     

    local splitter = UIHorizontalMultiSplitter(Rect(window.size), 10, 10, 8)
    
        window:createButton(splitter:partition(0), "Idle"%_t, "onIdleButtonPressed")
        window:createButton(splitter:partition(1), "Passive"%_t, "onPassiveButtonPressed")
        window:createButton(splitter:partition(2), "Guard This Position"%_t, "onGuardButtonPressed")
        window:createButton(splitter:partition(3), "Patrol Sector"%_t, "onPatrolButtonPressed")
        window:createButton(splitter:partition(4), "Escort Me"%_t, "onEscortMeButtonPressed")
        window:createButton(splitter:partition(5), "Attack Enemies"%_t, "onAttackEnemiesButtonPressed")
        window:createButton(splitter:partition(6), "Mine"%_t, "onSafeMiningButtonPressed")
    window:createButton(splitter:partition(7), "Salvage"%_t, "onSalvageButtonPressed")
    window:createButton(splitter:partition(8), "Clean Sector"%_t, "onSalvageAllButtonPressed")
    

     

    i see untill "mine" in game ...

  3. 5.9.99.23:27000 - Apocalyptic Galaxy PvP

     

    Join us now !!! Great ping to both EU and US regions !!!

     

    All players will start in random sectors !!!

     

    *HARD MODE*

     

    You will get some ores at start , with some rare weapons and mining lasers !

     

    working /sethome - setting a new home sector

    working player made stations !!!

    all resources set to x5 more

    drop rate x5

     

    (you need to download and replace this files in your game folder)

    Download : https://puu.sh/tQN6d.rar

    Replace in //:\STEAM\steamapps\common\Avorion\data\scripts\entity

     

    Download : https://puu.sh/tRdMJ.rar

    Replace in //:\STEAM\steamapps\common\Avorion\data\scripts\entity

     

     

     

    Good luck and have fun

     

    Discord - https://discord.gg/uFpcgSM

     

    --------------------------------------------------------

     

    --Change Log-- 05/02/17

     

    *sectoral claim works

    *Player made station works , no need to be insector for it to work

    */sethome , works for all

    *mail works

     

    ---------------------------------------------------------

     

    --Change Log-- 06/02/17

     

    After last update server was WIPED , sorry guys.

     

    *player can now make :

    Equipment Dock

    Turret Factory

    Research Station

    Repair Dock

     

    *mining - you can order you ship to mine asteroids , it will mine them 1 by 1 , also if attacked you will be announced .

    *salvaging - you can order your ship to salvage the sector

    *asteroid respawn in all ative sectors - you mined all asteroids in your sector ? no more an issue , just wait 5 minutes , they will respawn .

     

    --------------------------------------------------------

     

    --Change Log--  07/02/17

     

    Server full wipe and data restart

    *we had a major bug that prevented from all players to login , had to wipe .

     

    --------------------------------------------------------

  4. function onPlayerLogIn(playerIndex)
        local player = Player(playerIndex)
        Server():broadcastChatMessage("Server", 0, "Commander %s entered Apocalyptic Galaxy"%_t, player.name)
    
        player:addScriptOnce("headhunter.lua")
        player:addScriptOnce("eventscheduler.lua")
        player:addScriptOnce("story/spawnswoks.lua")
        player:addScriptOnce("story/spawnai.lua")
        player:addScriptOnce("story/spawnguardian.lua")
        player:addScriptOnce("story/spawnadventurer.lua")
    
        matchResources(player)
    
    local mail = Mail()
        mail.sender = "Apocalyptic Galaxy"
        mail.receiver = player.id
        mail.header = "Greetings newcomer"
        mail.text = "Welcome to Apocalyptic Galaxy , Join our steam group at http://steamcommunity.com/groups/bestforgamers"
        addMail(mail)
    end

     

    what i did wrong ?

  5. could not execute function 'onPlayerLogIn' in '"data/scripts/server/server.lua"':

    data/scripts/server/server.lua:56: attempt to call global 'addMail' (a nil value)

    stack traceback:

    data/scripts/server/server.lua:56: in function <data/scripts/server/server.lua:47>

×
×
  • Create New...