PDA

View Full Version : Screen Shots



bartoszz192
01-03-2016, 09:40 PM
hey..

Need script for screen shots when level up.

thanks :)

xto94
01-03-2016, 11:06 PM
--[[
This is a XenoBot example script, intended to
teach new users about the scripting API and
act as script that is usable in actual play.

levelupScreenshot.lua - takes a screenshot upon level up

** DO NOT EDIT THIS FILE. INSTEAD, COPY IT TO
"Documents\XenoBot\Scripts" AND EDIT THE COPY. **
]]--


--this continuously loops, executing the code inside over and over again
while (true) do
local name = Self.Name() --stores our name at the start
local level = Self.Level() --stores our level at the start

--this loops until our name changes (meaning we switched characters)
while (name == Self.Name()) do
--this checks if our level has increased, and screenshots if so
if (Self.Level() > level) then
level = Self.Level() --updates the stored level
screenshot(name .. " level " .. level) --filename is "{name} level {level}
end

--this causes the loop to wait between 1 and 2 seconds before retrying
wait(1500, 2500)
end
end

its one of xenobot's built in example scripts