will think character is stuck when identifying rares for an extended period of time
private static string path = "Plugins/UnstuckMe/Settings.cfg";
public void readSettings()
{
if (File.Exists(path))
{
StreamReader reader = new StreamReader(path);
while (!reader.EndOfStream)
{
string line = reader.ReadLine();
// Check if line is empty or a comment
if (line.Trim() == string.Empty || line.StartsWith(";"))
continue;
string[] split = line.Split(';');
split = split[0].Split('=');
Log("READ: " + split[0] + " -> \'" + split[1] + "\'");
switch (split[0])
{
case "NeededLogPositions":
NeededLoggedPositions = Convert.ToInt32(split[1].Trim());
break;
case "CheckTime":
CheckTime = Convert.ToInt32(split[1].Trim());
break;
case "MaxVendorTime":
MaxVendorTime = Convert.ToInt32(split[1].Trim());
break;
case "RestartTimeout":
RestartTimeout = Convert.ToInt32(split[1].Trim());
break;
case "PositionLoggingInterval":
PositionLoggingInterval = Convert.ToInt32(split[1].Trim());
break;
case "Distance":
Distance = Convert.ToInt32(split[1].Trim());
break;
case "MaxStuckCount":
MaxStuckCount = Convert.ToInt32(split[1].Trim());
break;
case "MaxRandomMoves":
MaxRandomMoves = Convert.ToInt32(split[1].Trim());
break;
case "RandomMoverCheckTime":
RandomMoverCheckTime = Convert.ToInt32(split[1].Trim());
break;
case "MoverDistance":
MoverDistance = Convert.ToInt32(split[1].Trim());
break;
case "MaxDeadCounts":
MaxDeadCounts = Convert.ToInt32(split[1].Trim());
break;
case "DeadCountTimeout":
DeadCountTimeout = Convert.ToInt32(split[1].Trim());
break;
case "ResetStuckCounter":
if (split[1].ToLower().Trim().Equals("true"))
ResetStuckCounter = true;
else
ResetStuckCounter = false;
break;
case "FightAnimationCheckTime":
FightAnimationCheckTime = Convert.ToInt32(split[1].Trim());
break;
}
/*
c
*/
}
reader.Close();
}
else
{
Log("ERROR: Can't find \"" + path + "\"");
}
}
; UnstuckMe Settings
NeededLoggedPositions = 5
CheckTime = 18
MaxVendorTime = 60
RestartTimeout = 10
PositionLoggingInterval = 3
Distance = 20
MaxStuckCount = 2
MaxRandomMoves = 5
RandomMoverCheckTime = 3
MoverDistance = 10
MaxDeadCounts = 2
DeadCountTimeout = 130
ResetStuckCounter = false ; Setting this to true will reset the stuckcounter to 0 instead of decreasing it by 1 for each time we are not stuck (default: false)
FightAnimationCheckTime = 3
BUG:
From reading your code you tell the ppl to set a profile name with ending .xml
in your stringformat in the code you add the .xml.. think you overlooked that
You can fix this by checking the BrainBehavior.IsVendoring
or try using:
if (ZetaDia.Me.CommonData.AnimationState == AnimationState.Casting)
it starts identifing when going to vendor so you can tell your plugin to stop checking while isVendoring = true
and to make it more userfriendly read the settings from a text file like some other plugins here already did.
Here is some example from my personal unstucker:
Config file example:
btw this is case sensitive you can add the tolower ofc
[edit]
Can't you use ProfileManager.CurrentProfile to get the profile that is used ?
ProfileManager.CurrentProfile.Path ?
[/edit]
The correct behavior would be for the plugin to restart the profile as well. Is that possible? Otherwise the waypoint will be messed up.
Hardcoded Profile is pretty crappy :/
Wow this actually works havent tested the whole unstucker since i dont need it, but the "relad profile" part seems to work fine for now. You should update your Leave game after x Minutes Script with this algorithm. Will report in after testing this for like 5-6 hours. Thx 4 the work
Last I heard, ProfileManager.CurrentProfile was buggy. I haven't tested it since so I suppose the devs may have fixed it. Have you had any luck with it?
BUG:
From reading your code you tell the ppl to set a profile name with ending .xml
in your stringformat in the code you add the .xml.. think you overlooked that
You can fix this by checking the BrainBehavior.IsVendoring
or try using:
if (ZetaDia.Me.CommonData.AnimationState == AnimationState.Casting)
it starts identifing when going to vendor so you can tell your plugin to stop checking while isVendoring = true
Where i found this clue?
I search in my profile and in my loot item rule and i don't find anything.
BUG:
You can fix this by checking the BrainBehavior.IsVendoring
or try using:
if (ZetaDia.Me.CommonData.AnimationState == AnimationState.Casting)
it starts identifing when going to vendor so you can tell your plugin to stop checking while isVendoring = true
Where i found this clue?
I search in my profile and in my loot item rule and i don't find anything.
why did you make it all complicated now...
earlier versions didnt need editing
I have read SEVERAL comment about the safety of opening a thread and the warden I made a test to wait from a diferent way. if you dont want to try just ignore ...... why reply ?+1 on that one....annoying to change settings everytime I want to bot a different character....why the change?
I have read SEVERAL comment about the safety of opening a thread and the warden I made a test to wait from a diferent way. if you dont want to try just ignore ...... why reply ?
doesnt work at all for me. i edited the profile name, the folder is in my plugins folder, unstucker is checked. and it doesnt even move when stuck...
I have read SEVERAL comment about the safety of opening a thread and the warden I made a test to wait from a diferent way. if you dont want to try just ignore ...... why reply ?
+1 on that one....annoying to change settings everytime I want to bot a different character....why the change?
why did you make it all complicated now...
earlier versions didnt need editing
What you think about that v1.8
added line 18;, 97,98
to remove thread