Bug - Fixed Crimbo Shrub gets a present, log and cli screen get filled with junk

antipasta

Member
I see a lot of this when my crimbo shrub gets a present:

[488756] The Sleazy Back Alley
Encounter: big creepy spider
Round 0: coyotik wins initiative!
Round 0: coyotik tries to steal an item! (auto-attack)
Round 1: You win the fight!A love scabie scurries out of a nearby hobo and hands you some Meat.You gain 26 Meat.The Seltzer Watercress burbles up some bubbly water and gives it to you. Who knew plant spit could be so refreshing?You gain 5 Muscularity Points.You gain 7 Meat"Ohmigosh ohmigosh you got a PRESENT!" Trufferson yells. "MERRY CRIMBO!" You pick up the present from underneath Trufferson and tear off the paper.It's from bigevildan!You acquire an item: Green ManalishiTrufferson grins wildly and flexes his branches. "Hoo-ah! Crimbo! WOOOOO! LET'S DO THIS!!!" (+11 Stats)You gain 26 Strengthliness.You gain 6 Magicalness.You gain 8 Sarcasm.You catch a line from the song playing on your SongBoom™ BoomBox:"Turnaround, every now and then I get a little bit more meat"Adventure Again (The Sleazy Back Alley)Go back to The Wrong Side of the Tracksparent.charpane.location.href="charpane.php";
function updateParseItem(iid, field, info) {
var tbl = $('#ic'+iid);
var data = parseItem(tbl);
if (!data) return;
data[field] = info;
var out = [];
for (i in data) {
if (!data.hasOwnProperty(i)) continue;
out.push(i+'='+data);
}
tbl.attr('rel', out.join('&'));
}
function parseItem(tbl) {
tbl = $(tbl);
var rel = tbl.attr('rel');
var data = {};
if (!rel) return data;
var parts = rel.split('&');
for (i in parts) {
if (!parts.hasOwnProperty(i)) continue;
var kv = parts.split('=');
tbl.data(kv[0], kv[1]);
data[kv[0]] = kv[1];
}
return data;
}



var tp = top;
function pop_ircm_contents(i, some) {
var contents = '',
shown = 0,
da = ' [some] <a href="#" rel="',
db = '" class="small dojaxy">[all] ',
dc = '<div rel="',
dd = ' [';
one = 'one'; ss=some;
if (i.d==1 && i.s>0) { shown++;
contents += dc + 'sellstuff.php?action=sell&ajax=1&type=quant&whichitem%5B%5D=IID&howmany=NUM&pwd=035f5271f69e82cc147aa156a33b2532" id="pircm_'+i.id+'" style="width: 100%; padding-bottom: 3px">Auto-Sell ('+i.s+' meat): '+dd+one+'] ';
if (ss) { contents += da + i.n + db;}
contents += ' ';
}
one = 'one'; ss=some;
if (i.q==0) { shown++;
contents += dc + 'inventory.php?action=closetpush&ajax=1&whichitem=IID&qty=NUM&pwd=035f5271f69e82cc147aa156a33b2532" id="pircm_'+i.id+'"> Closet: '+dd+one+'] ';
if (ss) { contents += da + i.n + db;}
contents += ' ';
}
one = 'one'; ss=some;
if (i.q==0 && i.g==0 && i.t==1) { shown++;
contents += dc + 'managestore.php?action=additem&qty1=NUM&item1=IID&price1=&limit1=&ajax=1&pwd=035f5271f69e82cc147aa156a33b2532" id="pircm_'+i.id+'"> Stock in Mall: '+dd+one+'] ';
if (ss) { contents += da + i.n + db;}
contents += ' ';
}

return [contents, shown];
}
tp=top
var todo = [];
function nextAction() {
var next_todo = todo.shift();
if (next_todo) {
eval(next_todo);
}
}
function dojax(dourl, afterFunc, hoverCaller, failureFunc, method, params) {
$.ajax({
type: method || 'GET', url: dourl, cache: false,
data: params || null,
global: false,
success: function (out) {
nextAction();
if (out.match(/no\|/)) {
var parts = out.split(/\|/);
if (failureFunc) failureFunc(parts[1]);
else if (window.dojaxFailure) window.dojaxFailure(parts[1]);
else if (tp.chatpane.handleMessage) tp.chatpane.handleMessage({type: 'event', msg: 'Oops! Sorry, Dave, you appear to be ' + parts[1]});
else $('#ChatWindow').append(' Oops! Sorry, Dave, you appear to be ' + parts[1] + '. ' + "\n");
return;
}

if (hoverCaller) {
float_results(hoverCaller, out);
if (afterFunc) { afterFunc(out); }
return;
}
$(tp.mainpane.document).find("#effdiv").remove(); if(!window.dontscroll || (window.dontscroll && dontscroll==0)) { window.scroll(0,0);}
var $eff = $(tp.mainpane.document).find('#effdiv');
if ($eff.length == 0) {
var d = tp.mainpane.document.createElement('DIV');
d.id = 'effdiv';
var b = tp.mainpane.document.body;
if ($('#content_').length > 0) {
b = $('#content_ div:first')[0];
}
b.insertBefore(d, b.firstChild);
$eff = $(d);
}
$eff.find('a[name="effdivtop"]').remove().end()
.prepend(' ' + out + ' ').css('display','block');
if (!window.dontscroll || (window.dontscroll && dontscroll==0)) {
tp.mainpane.document.location = tp.mainpane.document.location + "#effdivtop";
}
if (afterFunc) { afterFunc(out); }
}
});
}
 

Veracity

Developer
Staff member
Try revision 19402

If this doesn't work or causes other problems, I'll need a DEBUG log.
 

antipasta

Member
The new version fixed the junk code problem, but lost the name of the player sending the present -
After Battle: "It's Crimbo present tiiiiiime!" Trufferson cheers. "Open your present! Open it open it OPEN IT!" You pick up the present from underneath Trufferson and tear off the paper.
After Battle: It's from !
After Battle: You gain 44 Strengthliness
After Battle: You gain 15 Magicalness
After Battle: You gain 8 Roguishness

Debug file attached.
 

Attachments

  • DEBUG_20190715.txt
    89.9 KB · Views: 20

antipasta

Member
Worked great!
After Battle: "It's Crimbo present tiiiiiime!" Trufferson cheers. "Open your present! Open it open it OPEN IT!" You pick up the present from underneath Trufferson and tear off the paper.
After Battle: It's from Hamo_Boy!
You acquire an item: eagle feather
 
Top