function initPlotFlags() { list = list.new(); list.add(list, initPlotFlag(calcLeftShift(30), "SUB_PLOT_FLAG")); list.add(list, initPlotFlag(calcLeftShift(29), "FREE_FLAG")); list.add(list, initPlotFlag(calcLeftShift(28), "CITY_FLAG")); list.add(list, initPlotFlag(calcLeftShift(27), "EXPLOSION_FLAG")); list.add(list, initPlotFlag(calcLeftShift(26), "DISABLE_SIGNS_FLAG")); list.add(list, initPlotFlag(calcLeftShift(5), "ENTITY_INTERACT_FLAG")); list.add(list, initPlotFlag(calcLeftShift(4), "BLOCK_INTERACT_FLAG")); list.add(list, initPlotFlag(calcLeftShift(3), "HIT_AMBIENT_FLAG")); list.add(list, initPlotFlag(calcLeftShift(2), "BUCKET_FLAG")); list.add(list, initPlotFlag(calcLeftShift(1), "BREAK_FLAG")); list.add(list, initPlotFlag(calcLeftShift(0), "PLACE_FLAG")); setScriptVar("all_plot_flags", list); } function initPlotFlag(f, f_name) { a = array.new(2); a[0] = f; a[1] = f_name; return a; } function getAllPlotFlags() { return getScriptVar("all_plot_flags"); } function getFlagLists(plot) { flags = plot.getFlags(plot); all_flags = getAllPlotFlags(); flags_true = list.new(); flags_false = list.new(); iter = iterator(all_flags); while(hasNext(iter)) { a = next(iter); f = a[0]; if(flags >= f) { list.add(flags_true, a); flags -= f; } else { list.add(flags_false, a); } } a = array.new(2); a[0] = flags_true; a[1] = flags_false; return a; } function getRickRollSounds() { RickRollSounds = list.new(); list.add(RickRollSounds, math.pow(2, -6 / 12));//6 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, -1 / 12));//11 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, 3 / 12));//15 list.add(RickRollSounds, math.pow(2, 3 / 12));//15 list.add(RickRollSounds, math.pow(2, 1 / 12));//13 list.add(RickRollSounds, math.pow(2, -6 / 12));//6 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, -1 / 12));//11 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, 1 / 12));//13 list.add(RickRollSounds, math.pow(2, 1 / 12));//13 list.add(RickRollSounds, math.pow(2, -1 / 12));//11 list.add(RickRollSounds, math.pow(2, -2 / 12));//10 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, -6 / 12));//6 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, -1 / 12));//11 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, -1 / 12));//11 list.add(RickRollSounds, math.pow(2, 1 / 12));//13 list.add(RickRollSounds, math.pow(2, -2 / 12));//10 list.add(RickRollSounds, math.pow(2, -4 / 12));//8 list.add(RickRollSounds, math.pow(2, -6 / 12));//6 list.add(RickRollSounds, math.pow(2, -6 / 12));//6 list.add(RickRollSounds, math.pow(2, -6 / 12));//6 list.add(RickRollSounds, math.pow(2, 1 / 12));//13 list.add(RickRollSounds, math.pow(2, -1 / 12));//11 //6,8,11,8,15,15,13,6,8,11,8,13,13,11,10,8,6,8,11,8,11,13,10,8,6,6,6,13,11 return RickRollSounds; } function getRickRollSoundDists() { RickRollSoundDists = list.new(); list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 12);//6 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 8);//4 list.add(RickRollSoundDists, 4);//2 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 2);//1 list.add(RickRollSoundDists, 4);//2 list.add(RickRollSoundDists, 4);//2 list.add(RickRollSoundDists, 6);//3 list.add(RickRollSoundDists, 8);//4 list.add(RickRollSoundDists, 2);//1 //2,2,2,2,2,6,6,12,2,2,2,2,6,6,6,2,6,2,2,2,2,8,4,6,2,4,4,6,8 return RickRollSoundDists; } function getBobbyCarSounds() { bobbyCarSounds = list.new(); list.add(bobbyCarSounds, math.pow(2, 4 / 12)); list.add(bobbyCarSounds, math.pow(2, 2 / 12)); list.add(bobbyCarSounds, math.pow(2, 1 / 12)); list.add(bobbyCarSounds, math.pow(2, 4 / 12)); list.add(bobbyCarSounds, math.pow(2, -3 / 12)); list.add(bobbyCarSounds, math.pow(2, 1 / 12)); list.add(bobbyCarSounds, math.pow(2, -1 / 12)); list.add(bobbyCarSounds, math.pow(2, 2 / 12)); list.add(bobbyCarSounds, math.pow(2, -4 / 12)); list.add(bobbyCarSounds, math.pow(2, -1 / 12)); list.add(bobbyCarSounds, math.pow(2, -3 / 12)); list.add(bobbyCarSounds, math.pow(2, -1 / 12)); list.add(bobbyCarSounds, math.pow(2, 1 / 12)); return bobbyCarSounds; } function getBobbyCarSoundDists() { bobbyCarSoundDists = list.new(); list.add(bobbyCarSoundDists, 8); list.add(bobbyCarSoundDists, 8); list.add(bobbyCarSoundDists, 4); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 4); list.add(bobbyCarSoundDists, 6); list.add(bobbyCarSoundDists, 6); return bobbyCarSoundDists; }