New Content - Implemented Correctly handle totes.

gulaschkanone

New member
Currently, if a PVP fight causes you to acquire or transmit totes, the CLI output incorrectly reads like "You challenged <whomever> and lost the PvP fight, 0 to 0!". This is apparently caused by the pattern that matches the win/loss message and score (WIN_PATTERN1, if I'm looking at the right code) not accounting for "totes." being appended. The relevant HTML looks like
Code:
<span style="font-size: 120%;"><b>gulaschkanone</b> won the fight, <b>6</b> to <b>0</b>!  totes.</span>
([sic] on the two spaces), so the pattern being something like
Code:
Pattern.compile("<span[^>]*><b>(.*?)</b> won the fight, <b>(\\d+)</b> to <b>(\\d+)</b>!(\\W+totes.)?</span>")
should probably fix the basic functionality. It'd be even neater if the totes was reflected in the "You challenged yada yada" printout, but I guess that's technically a feature request.
 

gulaschkanone

New member
I think the way totes works is just that if there's a fight between a person with and a person without totes, the totes goes from the totes-haver to the totes-less, although there is possibly a very small chance that the original totes-haver doesn't lose theirs. I'm actually not sure whether it's guaranteed or a random chance. In a fite where totes transferrance happens, "totes." is appended to your "won the fight" message, both for losing and gaining it. I think it does work for targetted fights; you can see who currently has totes with the chat command /totescarriers.
 
Last edited:

Bale

Minion
WTF? I've never heard of "totes" before. What's up with this? Is it an item, or a chat effect trasnferable by PvP contact?

/totescarriers

arKaBee and MC Face and efOt and The Amazing Mr Toothpaste and jonball and vuvr and arandur. totes.
 

lostcalpolydude

Developer
Staff member
17272 handles this, by removing </span> instead of making the regex more complicated. It wouldn't surprise me if WIN_PATTERN2 also needs a change, but a bit of testing indicates that totes messages can not be generated on demand.
 

gulaschkanone

New member
Thanks for the fix, but what do you mean, can not be generated on demand? Targetted attacks against whatever dudes were at the end of the /totescarriers list worked just fine for me. If you were referring to compact PVP mode, I'd just assume that CDM didn't bother to add the totes there because nonzero effort that basically no one would care about.
 

lostcalpolydude

Developer
Staff member
I went with people at the start of the /totescarriers list. I also tried people from the end of the list, but the list had changed in the hours since I ran the command, and those people weren't on the list any more.
 
Top