I know this function is in Bot but when i farm any dungeon its not always work, i don't know why and i write this small function.
For run use Start_CrashWindowKiller.bat after start its scan for Crash Window and kill it.
For automatic restart client after crash and autostart CrashWindowKiller add this code in profile:
Code: Select all
<onLoad>
-- onClientCrash
local currAcc = RoMScript("LogID");
local currChar = RoMScript("CHARACTER_SELECT.selectedIndex");
local dirPath = string.gsub( getExecutionPath()," ","\" \"" );
local currPath = __WPL.FileName;
local Clientlink = false; -- specify you client shortcut links name if it not contains *client*
if( Clientlink == false ) then
local romdir = getDirectory(dirPath);
for i,v in pairs(romdir) do
local match = string.match(string.lower(v), "client(.*)%.lnk")
if( match ~= nil ) then
Clientlink = v
break
end
end
end;
cprintf(cli.white, "Current Acc: %s, Char: %s, Path: %s, dirPath: %s, Client: %s\n\n", currAcc, currChar, currPath, dirPath, Clientlink)
function onClientCrash()
yrest(5000)
if( not windowValid(getAttachedHwnd()) ) then
-- write Crash Log
local filename = ""..dirPath.."/logs/CrashLog.log";
local file, err = io.open(filename, "a+");
if file then
file:write("Account: "..currAcc.." \tName: " ..string.format("%-10s",player.Name ).." \tDate: "..os.date().." \tPath: "..currPath.." \n")
file:close()
end
-- Restart client and Bot
os.execute("START "..dirPath.."/../../micromacro.exe "..dirPath.."/login acc:"..currAcc.." char:"..currChar.." client:"..Clientlink.." path:"..currPath.."")
os.exit()
end
end;
if( Clientlink ) then
atError(onClientCrash)
end;
-- Start Crash Window Killer
local a,b,c = os.execute("START "..dirPath.."/../../micromacro.exe "..dirPath.."/CrashWindowKiller.lua")
if not a then
error("Trouble executing file. Values returned were: "..(a or "nil")..", "..(b or "nil")..", "..(c or "nil"))
end;
</onLoad>
http://www.solarstrike.net/phpBB3/viewt ... =27&t=4663
and rock5's "fastLogin Revisited"
http://www.solarstrike.net/phpBB3/viewt ... t=loginxml
For another language with another Crash Window name not "Crash Report" use my modified update.inf file.
If you version of client different open file update.inf with any archiver its simply ZIP archive and in archive open version.ini and change version number. My version update.inf without password but if you need Password: tarubK2Vy5gT8Xo6
If on you server started special Event open update.inf and in file localization.ini add necessary event.
You can try to started event from another server
And in localization.ini you can change ROM window name.