PDA

View Full Version : ScreenShot Taking Script



Shadow Wolf
12-25-2015, 05:12 AM
Hi guys,


I was wondering if anyone might be able to help me out here.
What I am looking for is a script to take screenshots of Level, MLevel and Skill advances. Screenshot of Death would also be nice.
Now I am aware that there are "Screenshot of Level" scripts out there and that Xeno takes screenshots of Death my itself, but as of yet I have been unable to find something which would take screenshots of MLevel and Skill advances.




EDIT: In case people are looking for a basic screenshot script, Elvang hooked me up with this one.

--[[
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


~ Shadow Wolf

shadowart
12-25-2015, 12:33 PM
Will screenshot level ups and skill advances. May not work on OTs due to a bug with generic text message proxy (that will be fixed in the next released).


GenericTextMessageProxy.OnReceive("Skill Level Screenshotter", function(_, msg)
-- Skills
local skill, level = msg:match("You advanced to (.*) level (%d+)")
if skill and level then
wait(1000)
screenshot(Self.Name().."_"..skill.."_"..level)
return
end

-- Regular levels
level = msg:match("You advanced from Level .- to Level (%d+)")
if level then
wait(1000)
screenshot(Self.Name().."_"..level)
end
end)