Base64Encode("hello world!") -- returns an encoded string "hello world!"
Base64Decode("aGVsbG8gd29ybGQh") --returns a decoded string "hello world!"
CreateDir(COMMON_PATH.."YourTestHere\\") --returns a boolean on success/failure of creating a folder in the subdirs of GoS.
RemoveDir(COMMON_PATH.."YourTestHere\\") --returns a boolean on success/failure of removing a folder in the subdirs of GoS.
DirExists(COMMON_PATH.."YourTestHere\\") --returns a boolean if a folder exists or not in the subdirs of GoS.
GetTextRect("hello world!",35,200,200); --returns a x,y,w,h rect of the text area.
Args are as follows: Text, Size, OnScreenX, OnScreenY.
Interact(Object) -- allows you to interact with objects such as Crystal Scar towers, Thresh Lantern, Bard portals and much more.
Some code examples:
local savedobject = nil
local mychampname = myHero.charName
PrintChat(mychampname);
PrintChat(MD5Encode(mychampname));
local base64str = Base64Encode(mychampname);
PrintChat(base64str);
PrintChat(MD5Encode(base64str));
PrintChat(Base64Decode(base64str));
CreateDir(COMMON_PATH.."YourTestHere\\");
wtf = DirExists(COMMON_PATH.."YourTestHere\\");
if wtf == true then
PrintChat("<font color='#ff0000'>EXISTS!</font>");
else
PrintChat("<font color='#00ff00'>MISSING!</font>");
end
RemoveDir(COMMON_PATH.."YourTestHere\\");
wtf = DirExists(COMMON_PATH.."YourTestHere\\");
if wtf == true then
PrintChat("<font color='#ff0000'>EXISTS!</font>");
else
PrintChat("<font color='#00ff00'>ERASED!</font>");
end
OnCreateObj(function(Object)
if Object ~= nil then
if Object.name == 'ThreshLantern' then
savedobject = Object
end
end
end)
OnDraw(function(myHero)
if savedobject ~= nil then
DrawCircle(GetOrigin(savedobject),100,0,0,ARGB(255,255,255,255)); --draw current pos
Interact(savedobject);
end
DrawText("Hello there !!!!!!!!!!!!",35,200,200,0xffffffff);
textrect = GetTextRect("Hello there !!!!!!!!!!!!",35,200,200);
if textrect ~= nil then
FillRect(textrect.x,textrect.y,textrect.w,textrect.h,0x50ffffff);
end
end)
Sign In
Create Account
This topic is locked
Back to top
Report







