Greasy Fork is available in English.
Automatically selects professions for empty slots
< Feedback em Neverwinter gateway - Profession Automation
xD, THX, did that FIX allready.
Its get "getValue", allways testing, but non-critical pass checks...
KK... no problem... ;)
About SCA, look this link, it works in console but how to make it work in Tampermonkey, cuold fill up IDLE times,
https://github.com/LaskonSoftware/NWGatewayAutomation
Just log in gateway, and copy paste that mainpage text to console and fill proper character name, other script is good turn off, ;).
Update: in updating your code, you inadvertently introduced a syntax error on line 3591... it's missing the closing ';' ... ;)
PS: took a look at the code, but my skills as a programmer are ancient and dusty or rusty at best... so I dunno how to implement that into the script...
yeah, tried wrong way that SCA -stuff, thisday !== lastDay (weekdays by name or index), that works for ever, but date needs to be day/month/year... long stuff.
That full SCA must be simplified, it is really nice but cause errors when stopped... well, its not needed, but fun to look.
ps. THX, small mistakes are worst...
Just how to make it look that day change on "14" o'clock... but no needed...
added... eh, many stuff to make sure that it rolls, still testing it and trying tamper that full SCA to work with Tampermonkey....
/**
* Switch to a character's swordcoast adventures and collect the daily reward
*/
function processSwordCoastDailies(_charStartIndex, _rollStartIndex) {
var _accountName = unsafeWindow.client.dataModel.model.loginInfo.publicaccountname;
var _charIndex = (!_charStartIndex || parseInt(_charStartIndex) > (charSettings.length + 1) || parseInt(_charStartIndex) < 0) ? 0 : parseInt(_charStartIndex);
var _fullCharName = settings["nw_charname" + _charIndex] + '@' + _accountName;
var _rollIndex = (!_rollStartIndex || parseInt(_rollStartIndex) >(charSettings.lenght + 1) || parseInt(_rollStartIndex) < 0) ? 0 : parseInt(_rollStartIndex);
var _hasLoginDaily = 0;
var _hasRollDaily = 1;
var _isLastChar = false;
var _scaHashMatch = /\/adventures$/;
if (!settings["paused"])
PauseSettings("pause");
// Switch to professions page to show task progression
if (!_scaHashMatch.test(unsafeWindow.location.hash)) {
return;
} else if (unsafeWindow.location.hash != "#char(" + encodeURI(_fullCharName) + ")/adventures") {
unsafeWindow.location.hash = "#char(" + encodeURI(_fullCharName) + ")/adventures";
}
if (settings["nw_charname" + (_charIndex + 1)] === undefined)
_isLastChar = true;
WaitForState("").done(function () {
try {
_hasLoginDaily = client.dataModel.model.gatewaygamedata.dailies.left.logins;
} catch (e) {
// TODO: Use callback function
window.setTimeout(function () {
processSwordCoastDailies(_charIndex, _rollIndex);
}, delay.SHORT);
return;
}
console.log("Checking SCA Dialy for", _fullCharName, "...",_charIndex, _rollIndex);
_hasRollDaily = client.dataModel.model.gatewaygamedata.dailies.roll;
if (_hasRollDaily !== 0) {
// Do SCA daily dice roll if the button comes up
WaitForState(".daily-dice-intro").done(function () {
$(".daily-dice-intro button").trigger('click');
WaitForState(".daily-awards-button").done(function () {
window.setTimeout(function() {
$(".daily-awards-button button").trigger('click');
},delay.SHORT);
});
});
_rollIndex = -1;
}
if (_rollIndex === _charIndex && _isLastChar) {GM_setValue("dailyswordcoast", 4); GM_getValue("dailyswordcoast", 0); console.log(" all rolls done", _isLastChar, _rollIndex, _charIndex, _hasRollDaily);}
else if (_rollIndex !== _charIndex && _isLastChar){GM_setValue("dailyswordcoast", 0); GM_getValue("dailyswordcoast", 0);} console.log("some rolls are failed", _isLastChar, _rollIndex, _charIndex, _hasRollDaily);
// If Dice roll dialog is non existant
WaitForNotState(".modal-window.daily-dice").done(function () {
if (_isLastChar) {
window.setTimeout(function () {
PauseSettings("unpause");
}, 3000);
} else {
window.setTimeout(function () {
processSwordCoastDailies(_charIndex + 1, _rollIndex + 1);
}, 3000);
}
});
});
}
>> Just how to make it look that day change on "14" o'clock... but no needed...
I'd imagine one would need to know when the servers at craptic change, then use the UTC time instead of local time. That way no interference with summertime...
I noticed that in the winter the daily reset was around 11 am (10:00 UTC, I am in Germany (UTC+1h) ), and 12 pm in MESZ (UTC+2h)...
but keeping it at 2pm (14 o'clock) is a safe for all of Europe and most of the Americas, but not so much further east, like Russia...
so if you'd change that to "getUTCHours()", then a check could be made against 12:00 UTC, and it should work then for all...
>> Just how to make it look that day change on "14" o'clock... but no needed... I'd imagine one would need to know when the servers at craptic change, then use the UTC time instead of local time. That way no interference with summertime... I noticed that in the winter the daily reset was around 11 am (10:00 UTC, I am in Germany (UTC+1h) ), and 12 pm in MESZ (UTC+2h)... but keeping it at 2pm (14 o'clock) is a safe for all of Europe and most of the Americas, but not so much further east, like Russia... so if you'd change that to "getUTCHours()", then a check could be made against 12:00 UTC, and it should work then for all...
YEAH, thats why I shouted it here, well I keep it how it is now and test that UTC -hour on my own script.
BTW, I think I use that Full SCA as external -script, it seems to be pretty stable, just adding returns so it will exit when profession tasks comes ready. Its looks well written, and that way harder to broke pieces, ;).
BTW, I think I use that Full SCA as external -script, it seems to be pretty stable, just adding returns so it will exit when profession tasks comes ready. Its looks well written, and that way harder to broke pieces, ;).
that would be awesome... ;)
Interesting point with this SCA -module is that original Author made for professions and SCA Adv was just low level part on it, ;).
I will just add it on test -version as "function", what will use,
So that way SCA Adventure -module will not break main script and we try get each rewards out.
Problem is make sure that Adventure exits on SCA mainscreen.
I will use just simple GM- values to check if something is done or not, but I think it will be better store all in array[daily][dailyAdv] or just do things dynamically per run...
Checked more this module and it may controll, Adv tier-X, pets used as well switch characters... so basically it needs own TAB for config, ;).
test that UTC -hour on my own script.
tried it myself...
strangely, it was 12 hrs off... it started to do SCA rolls at 2 a.m. (0000 Zulu) instead of 2 p.m. (1400 Zulu)...
and I can't figure out why... ;(
well, better make it do full SCA runs, so it daily rolls matters not.
ps. I can now run full SCA, but it really need rework, ;).
Should make it per char, as most would have one or two chars per account that could run SCA fully...
for example, I have one account where three or four could run SCA fully, but only one that can do Tier 6 dungeons...
Rotten, BorisValkov Here is a buddy of mine. Put him to work he says he's rusty but he knows his shit.
Rotten, BorisValkov Here is a buddy of mine. Put him to work he says he's rusty but he knows his shit.
SCA thing is github -project if your frien can look it, strip undeeded parts away, mke it run as function inside current script ...
Then xD, if he can give idea "how to" it hepls too, Githubbers seems uninterested make SCA more automated, but if we can do it then they can use it, ;).
Whole porject is here,
...and here is Gist, it runs well days but sometimes crashes for no reason, put character you want it run Full SCA last on your character list and it runs there, but it may also crash , Im just leveling companions now TOP,
https://gist.github.com/anonymous/f167f97bfdefa2b10002
That prototype is just something weird, ;)
Put him to work he says he's rusty but he knows his shit.
Thnx for the encouragement... I am rusty as hell (C and C++ are shinier, but still rusty, I am more of a hardware guy), and haven't done any real JScript programming in the past 8 or so years... ;(((
still trying to wrap this code around my ears and learning from it... specially on the part of "how not to do it"... he he...
On its current state this module works, but it lack controll from Gateway script and have few bugs what are "gateway" related so script must take care some errors too.
So this JQUERY needs just additions that script can,
Overall it just "killswitch" for it so main sript can controll it.
Adding it completely on script needs make it more stable and if done properly then Noonereally can use it as-well.
Its not big job to make SCA Full to run lover tier dungeons so it can catch each day prices, datamodel has simple information if they are done or not.
This original script has just limitations by UI so there is no meaning add all stuff to make it too complex, but Noonereallys -mod allready has lotsa features then Full SCA after its usable(stable) is pretty easy to add and controll per "character name".(or maybe they do it themself to make script whole)
Just "rip" it so it can be controlled.
BTW, it do "Epic" dungeons now, 1½ -items per day, not big advantage but satisfaction to have them... ;)
a bug in the SCA part of the script...
in the "function dailySCA()" you "set GM_setValue("dailyswordcoast", dailyroll);" (this part is correct) but then set "GM_setValue("dailyswordcoast", 0);" right after. This causes the SCA rolls to continue and continue all day long...
simple fix, delete the second "GM_setValue"... or REM it out...
other than that, I would like to see the professions parts separated from the script. Once the script gets updated, all the edits that I had made are gone. ;( and I have to reedit it all...
but if they where, lets say in a separate file, which gets loaded from the script, all the edits one does could be preserved, once the script gets updated.