request for help debugging: my login/logout script pair is not working quite right

Jatopian

Member
A while ago, I wrote this small pair of scripts for logging in and out, and basically all they were meant to do is maximize rollover adventures when I log off and put what I was last wearing back on when I log on again. The strange thing is that a while ago the scripts stopped working, but only for one of my characters. Specifically, it either isn't properly saving the backup outfit or is failing to reequip it on logon, and so a couple times I've accidentally gone chatting or adventuring wearing +adventure gear instead of something useful. I'm not sure what changed that I need to compensate for.

Could someone please look at it briefly and see what I'm missing?
 

Attachments

  • login.ash
    325 bytes · Views: 35
  • logout.ash
    166 bytes · Views: 35

lostcalpolydude

Developer
Staff member
You could try "ash outfit(Backup)" in the CLI after you notice that it failed to work when you logged in and see why it fails.
 

Jatopian

Member
For some reason it is working again now. For the first time in at least a month. :\ I will try that next time it messes up, thanks.
 

lostcalpolydude

Developer
Staff member
A random comment about the code that doesn't actually need changing...

"outfit(Backup) != true" could be replaced with "!outfit(Backup)". It's a bit shorter, but if it's less clear to you then it probably isn't worth changing.
 

Jatopian

Member
OK, apparently it only happens the first time I log into the account that day, or something. I get this from the CLI:
Putting on outfit: Backup
You are already wearing "Backup."
Failed to equip outfit Backup. Replace +adventure equipment manually.
and am still wearing my +adventure gear. Trying your suggestion yielded this:
> ash outfit(Backup)

Unknown variable 'Backup' ()
Returned: void
and a slight modification yielded this:
> ash outfit("Backup")

Putting on outfit: Backup
Equipment changed.
Returned: false
....but it put the +adventure gear back on. So maybe it's just not saving the outfit properly for some reason even though it says it is, or those commands are being executed out of order for some reason? But what really confuses me is that it only happens on one character. ...Or maybe it's just that I log in to that character second usually? I'll test that tomorrow.
 
Last edited:

lostcalpolydude

Developer
Staff member
Backup is the name mafia uses for backing up outfits. Maybe mafia is overwriting the outfit along the way, or at least what it thinks is in the outfit. Try a different outfit name maybe?
 

Jatopian

Member
Yeah, that was why I chose the name. I guess that could be it, though. I'll try it.

Edit: Well, it's not because I login to the other account first. I switched up the order today and the problem persisted on that same account. Tomorrow I'll try changing the outfit name.

Edit2: Seems to be working now. Thanks!
 
Last edited:
Top