Re: rock5's "fastLogin Revisited"
Posted: Fri Jan 31, 2014 7:06 pm
You have a shortcut link to client.exe called 'myrom' in your script/rom folder right? Just guessing at stuff here xD
MicroMacro home
https://www.solarstrike.net/phpBB3/
Code: Select all
Loaded waypoint path /Xaviera/VineDaily/StartVine_char.xml
No return path with default naming /Xaviera/VineDaily/StartVine_char_return.xml found.
We use the normal waypoint path /Xaviera/VineDaily/StartVine_char.xml now.
Waypoint #51 is closer then #1. Hence we start with waypoint #51.
GM detection started
GM detection started
Moving to waypoint #51, (-6718, -3710)
We where running for 24 seconds.
Use MACRO: Executing RoMScript "}LoginNextToon=true;a={".
Resting for 2 seconds.
Resting finished after 2 seconds.
Use MACRO: Executing RoMScript "Logout();".
Player address changed: 0x4D3A5A00
The game client did not crash.
1:47pm - [string "..."]:9: attempt to perform arithmetic on a string value
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
<![CDATA[
startGMDetect()
]]>
function relog()
SetCharList({
{account=3, chars= {1,2}}, -- Juka
{account=4, chars= {1}}, -- Kuka
})
-- My game crashes after reloging 7 times so make it restart the game every 7 relogs.
-- SetRestartClientSettings(7, "rom4u")
-- SetRestartClientSettings(4, "Rom");
-- After finishing this script do dailies but have each client do different dailies.
if IsLastChar() then
-- if getAcc() == 6 then -- End of first CharList
ChangeChar() -- First char of first list.
loadProfile()
loadPaths("VineDaily/StartVine_char")
else
-- It's not the last character so continue with the list and reload this file.
LoginNextChar()
loadProfile()
-- loadPaths(__WPL.FileName)
loadPaths("VineDaily/StartVine_char")
end
end
--[[ Objects by ID for multi-language use ]]--
fiona = GetIdName(118070) -- NPC "Fiona Andus"
defenses = GetIdName(424176) -- Quest "The Elves' Defenses"
vine = 118193 -- Object "Protector Vine"
</onload>
<!-- # 1 --><waypoint x="-6322" z="-3913" y="173">
travelTo("Jinners")
</waypoint>
<!-- # 2 --><waypoint x="12873" z="1955" y="64">player:mount() </waypoint>
<!-- # 3 --><waypoint x="12897" z="2167" y="67"> </waypoint>
<!-- # 4 --><waypoint x="12822" z="2244" y="66"> </waypoint>
<!-- # 5 --><waypoint x="12736" z="2418" y="60"> </waypoint>
<!-- # 6 --><waypoint x="12713" z="2470" y="74"> </waypoint>
<!-- # 7 --><waypoint x="12620" z="2594" y="84"> </waypoint>
<!-- # 8 --><waypoint x="12336" z="2625" y="82"> </waypoint>
<!-- # 9 --><waypoint x="12085" z="2654" y="87"> </waypoint>
<!-- # 10 --><waypoint x="11774" z="2679" y="89"> </waypoint>
<!-- # 11 --><waypoint x="11500" z="2674" y="139"> </waypoint>
<!-- # 12 --><waypoint x="11297" z="2790" y="140"> </waypoint>
<!-- # 13 --><waypoint x="11078" z="3013" y="138"> </waypoint>
<!-- # 14 --><waypoint x="10917" z="3242" y="140"> </waypoint>
<!-- # 15 --><waypoint x="10784" z="3506" y="143"> </waypoint>
<!-- # 16 --><waypoint x="10590" z="3914" y="147"> </waypoint>
<!-- # 17 --><waypoint x="10552" z="4283" y="188"> </waypoint>
<!-- # 18 --><waypoint x="10567" z="4465" y="210"> </waypoint>
<!-- # 19 --><waypoint x="10551" z="4731" y="218"> </waypoint>
<!-- # 20 --><waypoint x="10522" z="4996" y="218"> </waypoint>
<!-- # 21 --><waypoint x="10478" z="5238" y="213"> </waypoint>
<!-- # 22 --><waypoint x="10435" z="5416" y="220"> </waypoint>
<!-- # 23 --><waypoint x="10358" z="5446" y="222" tag="fiona">
player:target_NPC(fiona)
if getQuestStatus(defenses) == "complete" then
CompleteQuestByName(defenses)
cprintn(cli.lightblue,"=-=-= "..player.Name.." - "..RoMScript("Daily_count()").." daily quests completed. =-=-=")
end
if RoMScript("Daily_count()") == 10 then
cprintf(cli.lightblue,"Completed max number 10 of daily quests.\n")
changeProfileOption("HARVEST_DISTANCE", 120)
goto_wp("fionaReturn")
else
if getQuestStatus(defenses) == "not accepted" then
AcceptQuestByName(defenses)
end
end
</waypoint>
<!-- # 24 --><waypoint x="10352" z="5444" y="223"> </waypoint>
<!-- # 25 --><waypoint x="10294" z="5609" y="220" tag="vines">
if 180 > settings.profile.options.HARVEST_DISTANCE then changeProfileOption("HARVEST_DISTANCE", 180) end
while getQuestStatus(defenses) == "incomplete" do
player:target_Object(vine, 500)
end
</waypoint>
<!-- # 26 --><waypoint x="10322" z="5577" y="208"> </waypoint>
<!-- # 27 --><waypoint x="10303" z="5576" y="220">
goto_wp("fiona")
</waypoint>
<!-- Waypoints to run from Fiona to Jinners Camp (best if Recall is on cd) -->
<!-- # 28 --><waypoint x="10358" z="5446" y="222" tag="fionaReturn">
player:mount()
</waypoint>
<!-- # 29 --><waypoint x="10435" z="5416" y="220"> </waypoint>
<!-- # 30 --><waypoint x="10478" z="5238" y="213"> </waypoint>
<!-- # 31 --><waypoint x="10522" z="4996" y="218"> </waypoint>
<!-- # 32 --><waypoint x="10551" z="4731" y="218"> </waypoint>
<!-- # 33 --><waypoint x="10567" z="4465" y="210"> </waypoint>
<!-- # 34 --><waypoint x="10552" z="4283" y="188"> </waypoint>
<!-- # 35 --><waypoint x="10590" z="3914" y="147"> </waypoint>
<!-- # 36 --><waypoint x="10784" z="3506" y="143"> </waypoint>
<!-- # 37 --><waypoint x="10917" z="3242" y="140"> </waypoint>
<!-- # 38 --><waypoint x="11078" z="3013" y="138"> </waypoint>
<!-- # 39 --><waypoint x="11297" z="2790" y="140"> </waypoint>
<!-- # 40 --><waypoint x="11500" z="2674" y="139"> </waypoint>
<!-- # 41 --><waypoint x="11774" z="2679" y="89"> </waypoint>
<!-- # 42 --><waypoint x="12085" z="2654" y="87"> </waypoint>
<!-- # 43 --><waypoint x="12336" z="2625" y="82"> </waypoint>
<!-- # 44 --><waypoint x="12620" z="2594" y="84"> </waypoint>
<!-- # 45 --><waypoint x="12713" z="2470" y="74"> </waypoint>
<!-- # 46 --><waypoint x="12736" z="2418" y="60"> </waypoint>
<!-- # 47 --><waypoint x="12822" z="2244" y="66"> </waypoint>
<!-- # 48 --><waypoint x="12897" z="2167" y="67"> </waypoint>
<!-- # 49 --><waypoint x="12873" z="1955" y="64">
travelTo("Heffner")
</waypoint>
<!-- # 50 --><waypoint x="-6368" z="-3873" y="165"> </waypoint>
<!-- # 51 --><waypoint x="-6718" z="-3710" y="172">
printf("We where running for %s seconds.\n", os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time );
sendMacro("}LoginNextToon=true;a={");player:rest(2)
sendMacro("Logout();"); waitForLoadingScreen() -- wait for next character to load
-- Re-initialize player
player = CPlayer.new();
settings.load();
printf("Loaded character " .. player.Name .. ""/n);
settings.loadProfile("Juka","Kuka");
-- settings.loadProfile("Juka");
yrest (4000)
loadPaths("VineDaily/StartVine_char")
relog()
</waypoint>
<!-- # 52 --><waypoint x="-6534" z="-3801" y="166"> </waypoint>
<!-- # 53 --><waypoint x="-6404" z="-3866" y="165"> </waypoint>
<!-- # 54 --><waypoint x="-6322" z="-3913" y="173"> </waypoint>
</waypoints>
Couldn't you add Label to the 4th CustomLoginButton and make it so thatrock5 wrote:The problem is, if we want to make this permanently part of the addon, how are we going to make it work with the Server, Account, AccountServer display option? I don't think we can just make it an extra setting because you might not want to add a label to every single account.
Code: Select all
if fastLoginButtonDisplay = "Label" then
if Label ~= "" then
show Label
else
show AccoutServer
end
Code: Select all
function relog()
SetCharList({
{account=3, chars= {1,2}}, -- Juka
{account=4, chars= {1}}, -- Kuka
})
LoginNextChar()
loadProfile()
loadPaths(__WPL.FileName)
end
Code: Select all
<!-- # 51 --><waypoint x="-6718" z="-3710" y="172">
printf("We where running for %s seconds.\n", os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time );
relog()
printf("Loaded character " .. player.Name .. ""/n);
</waypoint>
But then if you set it to display the labels and there isn't a label what do you display; Account, Server or AccountServer?ZZZZZ wrote:Couldn't you add Label to the 4th CustomLoginButton and make it so thatCode: Select all
if fastLoginButtonDisplay = "Label" then if Label ~= "" then show Label else show AccoutServer end
Code: Select all
function CustomLoginButton_ToggleDisplay()
fastLoginButtonDisplay = fastLoginButtonDisplay + 1
if fastLoginButtonDisplay > 3 then
fastLoginButtonDisplay = 1
end
Code: Select all
function CustomLoginButton_ToggleDisplay()
fastLoginButtonDisplay = fastLoginButtonDisplay + 1
if fastLoginButtonDisplay > 4 then
fastLoginButtonDisplay = 1
end
Code: Select all
elseif fastLoginButtonDisplay == 4 then -- Button Label
for i=1, 108 do
button = getglobal("CustomLoginButton"..i);
local Name, Pass, Server, Label = ReturnLoginID(i);
if ( Name ~= nil ) and ( Name ~= "" ) and ( Name ~= " " ) then
Label = Label or "nil" -- in case Label is not specified
if Label ~= nil then
if string.len(Label) > 16 then
button.tooltip = Label
Name = string.sub(Label, 1, 16)
else
button.tooltip = nil
end
else
?? fastLoginButtonDisplay = 1 ?? -- Maybe? Not sure.
?? CustomLoginButtonsDisplay_Update() ??
end
button:SetText(Label);
else
button:Hide();
end
end
I don't like just defaulting to that. What if the user prefers to use just Account because they only play on 1 server and they use similar account name that, if the server is included, then it would make it impossible to tell which is which because the account would get truncated. Example: say they want to use some labels and they have some accounts they don't want to label called account1, account2 and account3. If you force them to use AccountServer their display might look like this.ZZZZZ wrote:As for display when Label == "" I would use AccountServer. It shows both of the variables that you would need.
Code: Select all
Label1
Label2
accoun/server
accoun/server
accoun/server
Code: Select all
Label1
Label2
account1
account2
account3
Code: Select all
<!-- # 51 --><waypoint x="-6718" z="-3710" y="172">
relog()
goto_wp("aa")
</waypoint>
<!-- # 52 --><waypoint x="-6534" z="-3801" y="166" tag="aa"> </waypoint>
<!-- # 53 --><waypoint x="-6404" z="-3866" y="165"> </waypoint>
<!-- # 54 --><waypoint x="-6322" z="-3913" y="173"> </waypoint>
</waypoints>
Code: Select all
CharList = {}
if g1 == true then
table.insert(CharList,"{account=7 , chars= {1,2,3,4,5,6,7,8}},")
end
if g2 == true then
table.insert(CharList,"{account=19 , chars= {1,2,3,4,5,6,7,8}},")
end
Code: Select all
CharList = {{
{account=7 , chars= {1,2,3,4,5,6,7,8}},
{account=19 , chars= {1,2,3,4,5,6,7,8}},
{account=12 , chars= {1,2,3,4,5,6,7,8}},
{account=24 , chars= {1,2,3,4,5,6,7,8}},
}}
Code: Select all
subtable1 = {}
subtable2 = {}
local g1,g2,g3,g4 = string.match(raw,"(.*);(.*);(.*);(.*)")
if g1 == "true" then
subtable2 = {account = 7 , chars= {1,2,3,4,5,6,7,8}}
subtable1 = {subtable2}
table.insert(CharList,subtable1)
end
if g2 == "true" then
subtable2 = {account = 19 , chars= {1,2,3,4,5,6,7,8}}
subtable1 = {subtable2}
table.insert(CharList,subtable1)
end
if g3 == "true" then
subtable2 = {account = 12 , chars= {1,2,3,4,5,6,7,8}}
subtable1 = {subtable2}
table.insert(CharList,subtable1)
end
if g4 == "true" then
subtable2 = {account = 24 , chars= {1,2,3,4,5,6,7,8}}
subtable1 = {subtable2}
table.insert(CharList,subtable1)
end
Code: Select all
function readCharList()
filename = getExecutionPath() .. "/logs/Elves/Dailies.log"
local file, err = io.open(filename, "r");
if( not file ) then
error(err, 0);
end
local raw=file:read()
file:close()
subtable = {}
local g1,g2,g3,g4 = string.match(raw,"(.*);(.*);(.*);(.*)")
if g1 == "true" then
subtable1 = {account = 7 , chars= {1,2,3,4,5,6,7,8}}
table.insert(subtable,subtable1)
end
if g2 == "true" then
subtable2 = {account = 19 , chars= {1,2,3,4,5,6,7,8}}
table.insert(subtable,subtable2)
end
if g3 == "true" then
subtable3 = {account = 12 , chars= {1,2,3,4,5,6,7,8}}
table.insert(subtable,subtable3)
end
if g4 == "true" then
subtable4 = {account = 24 , chars= {1,2,3,4,5,6,7,8}}
table.insert(subtable,subtable4)
end
table.insert(CharList,subtable)
end
Code: Select all
SetCharList({
{account=7 , chars= {1,2,3,4,5,6,7,8}},
{account=19 , chars= {1,2,3,4,5,6,7,8}},
{account=12 , chars= {1,2,3,4,5,6,7,8}},
{account=24 , chars= {1,2,3,4,5,6,7,8}},
})
Code: Select all
SetCharList({
{
{account=7 , chars= {1,2,3,4,5,6,7,8}},
{account=19 , chars= {1,2,3,4,5,6,7,8}},
},{
{account=12 , chars= {1,2,3,4,5,6,7,8}},
{account=24 , chars= {1,2,3,4,5,6,7,8}},
}
})
looks like it has too many brackets but should still work. It basically looks like a "multiple list" type character list with only one list.noobbotter wrote:CharList = {{
{account=7 , chars= {1,2,3,4,5,6,7,8}},
{account=19 , chars= {1,2,3,4,5,6,7,8}},
{account=12 , chars= {1,2,3,4,5,6,7,8}},
{account=24 , chars= {1,2,3,4,5,6,7,8}},
}}