Page 1 of 1

"Gladiators" masterscript

PostPosted: Wed May 08, 2013 4:29 pm
by bobdaduck
I use this script running my "gladiators" server. Its simple and effective, and also quite fun. When someone dies, it drops an energy pack and a burst that explodes immediately. It could easily be modified to drop health packs, resource items, asteroids, or cores.

I run the server with strictly FFA maps, which complements the script.

  Code:
function onShipKilled(ship)
    local loc = ship:getLoc()
   
    local boom = Burst.new()
    boom:setLoc(loc)
    levelgen:addItem(boom)
   
    local spoils = EnergyItem.new()
    spoils:setLoc(loc)
    spoils:setRegenTime(10000) --Technically not optimal, but does the job.
    levelgen:addItem(spoils)
end

function onMsgReceived(message, playerInfo)
    if(message == "!info") then
        globalMsg("Killing someone will cause them to drop a burst and an energy pack")
    end
end

function main()
    subscribe(Event.MsgReceived)
    subscribe(Event.ShipKilled)
end

Re: "Gladiators" masterscript

PostPosted: Fri May 10, 2013 1:53 am
by thread
bobdaduck wrote:It could easily be modified to drop health packs, resource items, asteroids, or cores.

Can you imagine creating a core every time a player dies? I can't see it ending well

Re: "Gladiators" masterscript

PostPosted: Fri May 10, 2013 1:48 pm
by Quartz
Nice!

bobdaduck wrote:I run the server with strictly FFA maps, which compliments the script.

*complements

thread wrote:
bobdaduck wrote:It could easily be modified to drop health packs, resource items, asteroids, or cores.

Can you imagine creating a core every time a player dies? I can't see it ending well

Pssh what do you mean, that would be great.