Frame 1
ifFrameLoaded (94) {
gotoAndStop (4);
}
rules = "ÏÐÀÂÈËÀ ÈÃÐÛ:Èãðàòü ìîãóò îò 2-õ äî 4-õ èãðîêîâ, ïðè ýòîì îäèí èç èãðîêîâ îáÿçàòåëüíî ïîëüçîâàòåëü, à îñòàëüíûå èãðîêè êîìïüþòåðíûå. Âîçìîæíû âàðèàíòû èãðû â \"ïðîñòîãî\" (ïîäêèäíîãî) äóðàêà, èëè â ïåðåâîäíîãî (ñì. ðàçäåë \"Íàñòðîéêè\").  ïîñëåäíåì ñëó÷àå ïåðâûé êîí íå ïåðåâîäèòñÿ. Ïåðâûé \"îòáîé\" äî 5-òè êàðò.";
about = "Èãðà â ïîäêèäíîãî ïåðåâîäíîãî \"äóðàêà\".Ðåàëèçîâàíà íà Flash 4.Âåðñèÿ 2.1 îò 5.06.01 Àâòîð - rabbitkiller : rabbitkiller@newmail.ru, îáíîâëåíèÿ íà www.durak.nm.ru";
Frame 2
gotoAndPlay (1);
Frame 3
if (go == "1") {
gotoAndPlay (5);
}
Frame 4
gotoAndPlay (3);
Frame 5
loadMovieNum ("by_rabbitkiller.swf", 1);
frame_history = "";
Frame 6
if ("4" < numofpl) {
numofpl = "4";
}
if (numofpl < "2") {
numofpl = "2";
}
if (numofpl == "2") {
setProperty("pl2", _x , "260");
setProperty("pl2", _y , "75");
} else if (numofpl == "3") {
setProperty("pl2", _x , "85");
setProperty("pl2", _y , "75");
setProperty("pl3", _x , "490");
setProperty("pl3", _y , "75");
} else if (numofpl == "4") {
setProperty("pl2", _x , "85");
setProperty("pl2", _y , "75");
setProperty("pl3", _x , "260");
setProperty("pl3", _y , "75");
setProperty("pl4", _x , "490");
setProperty("pl4", _y , "75");
}
give_me_more = "0";
first_con = "1";
perevol = "0";
perevod = "1";
podbr = "0";
otbivat = "0";
go = "0";
lasacted = "0";
name2 = "Âèííè-Ïóõ";
name3 = "Ïÿòà÷îê";
name4 = "Èà";
num_of_bita = "0";
kozur_karta = random("36") + "1";
kozur = int((kozur_karta - "1") / "9");
setProperty(kozur_karta, _x , "505");
setProperty(kozur_karta, _y , "210");
go = "0";
sde = "0";
ttt = "1";
playercards = "6";
begining = "0";
i = "1";
while (numofpl >= i) {
Set("winner" add i, "0");
i = i + "1";
}
give_me_more = "0";
n = "1";
mlad_kozur = "null";
while (numofpl >= n) {
i = "1";
while ("6" >= i) {
ncard = "0";
while (ncard == "0") {
sde = sde + "1";
card = random("36") + "1";
ncard = "1";
k = "1";
while (ttt >= k) {
if ((card == eval ("cardingame" add k)) or (card == kozur_karta)) {
ncard = "0";
}
k = k + "1";
}
}
Set(("card" add n) add i, card);
if (int((card - "1") / "9") == kozur) {
if (mlad_kozur == "null") {
mlad_kozur = card;
striker_num = n;
} else if (card < mlad_kozur) {
mlad_kozur = card;
striker_num = n;
}
}
Set("cardingame" add ttt, card);
ttt = ttt + "1";
i = i + "1";
}
Set("number_of_cards" add n, "6");
n = n + "1";
}
i = "1";
while ("6" >= i) {
setProperty(eval ("card2" add i), _y , "-300");
setProperty(eval ("card2" add i), _x , "10" + (i * "71"));
i = i + "1";
}
if (mlad_kozur == eval("null")) {
striker_num = "1";
}
end_of_turn = "0";
lastacted = striker_num;
striker = "player" add striker_num;
otbiv_num = (striker_num + "1") - (int(striker_num / numofpl) * numofpl);
otbiv = "otb" add otbiv_num;
num_of_bita = "0";
cards_on_table = "0";
en = striker_num;
pl1 = striker_num;
rew = "1";
perevol = "0";
perevod = "1";
otb_speech0 = "Óáèë!";
otb_speech1 = "À âîò òàê âîò!";
otb_speech2 = "À âîò ýäàê!";
otb_speech3 = "À íà ýòî ?";
otb_speech4 = "Ïîáèë!";
coloda = "37" - ttt;
mast = "0";
n = "1";
while (number_of_cards1 >= n) {
i = n;
kard = "null";
while (number_of_cards1 >= i) {
the_mast = int((eval ("card1" add i) - "1") / "9");
if (the_mast == mast) {
if (kard == "null") {
kard = i;
} else if (eval ("card1" add kard) < eval ("card1" add i)) {
kard = i;
}
}
i = i + "1";
}
if (kard <> eval("null")) {
karta = eval ("card1" add n);
Set("card1" add n, eval ("card1" add kard));
Set("card1" add kard, karta);
n = n + "1";
} else {
mast = mast + "1";
}
}
i = "1";
if (number_of_cards1 < "9") {
baza = ("640" - (number_of_cards1 * "72")) / "2";
shag = "72";
} else {
baza = -"10";
shag = "640" / number_of_cards1;
}
i = "1";
while (number_of_cards1 >= i) {
duplicateMovieClip ("/button", "button" add i, i);
setProperty(eval ("card1" add i), _name , "thiscard" add rew);
duplicateMovieClip ("thiscard" add rew, eval ("card1" add i), "100" + rew);
setProperty("thiscard" add rew, _visible , "0");
rew = rew + "1";
setProperty("button" add i, _y , "370");
setProperty("button" add i, _x , baza + (shag * (i - "1")));
setProperty(eval ("card1" add i), _y , "370");
setProperty(eval ("card1" add i), _x , baza + (shag * (i - "1")));
i = i + "1";
}
pl1 = striker_num;
gotoAndPlay (7);
Frame 7
if (lastacted == otbiv_num) {
lastacted = (lastacted + "1") - (int(lastacted / numofpl) * numofpl);
shit = "yes";
}
i = "1";
players = numofpl;
while (numofpl >= i) {
if ((eval ("number_of_cards" add i) == "0") and ("36" < ttt)) {
Set("winner" add i, "1");
}
if (eval ("winner" add i) == "1") {
players = players - "1";
}
i = i + "1";
}
if (winner1 == "1") {
the_time = "0";
}
if ("1" >= players) {
gotoAndPlay (94);
} else if (begining == "1") {
begining = "0";
if ("36" < ttt) {
i = "1";
while (numofpl >= i) {
if (eval ("number_of_cards" add i) == "0") {
Set("winner" add i, "1");
message = eval ("name" add i) add " âûñêî÷èë";
}
i = i + "1";
}
}
}
if ((cards_on_table == "0") and (striked == "0")) {
en = striker_num;
gotoAndPlay("player" add en);
} else if (striked == "1") {
lastacted = en;
striked = "0";
gotoAndPlay(otbiv);
} else if (perevol == "1") {
ert = ert + "1";
if (num_of_karta == "1") {
num_of_karta = "2";
} else {
num_of_karta = num_of_karta + "1";
}
if (otbivat < podbr) {
thecard = eval ("card_on_table" add (otbivat + "1"));
setProperty("/mark", _y , "246");
setProperty("/mark", _x , getProperty(thecard, _x));
if (give_me_more == "1") {
while ("0" < otbivat) {
Set("number_of_cards" add otbiv_num, eval ("number_of_cards" add otbiv_num) + "1");
Set(("card" add otbiv_num) add eval ("number_of_cards" add otbiv_num), eval ("card_on_table" add cards_on_table));
setProperty(eval ("card_on_table" add cards_on_table), _y , -"500");
setProperty(eval ("card_on_table" add cards_on_table), _visible , "1");
Set("card_on_table" add cards_on_table, "");
cards_on_table = cards_on_table - "1";
otbivat = otbivat - "1";
}
perevol = "0";
gotoAndPlay(striker);
} else {
gotoAndPlay(otbiv);
}
} else {
Set("message" add otbiv_num, "Âñå ïîáèë!");
q = podbr;
while (cards_on_table >= q) {
setProperty(eval ("card_on_table" add q), _visible , "1");
q = q + "1";
}
perevol = "0";
gotoAndPlay(striker);
}
} else {
if (give_me_more == "1") {
kol_karts1 = eval ("number_of_cards" add otbiv_num) - (podbr - otbivat);
kol_karts2 = "6" - podbr;
if (kol_karts1 < kol_karts2) {
kol_karts = kol_karts1;
} else {
kol_karts = kol_karts2;
}
if (kol_karts == "0") {
end_of_turn = "1";
}
}
if (no_more == "1") {
no_more = "0";
enn = en;
en = (en + "1") - (int(en / numofpl) * numofpl);
en_history = (en_history add " ") add en;
while ((eval ("winner" add en) == "1") or (en == otbiv_num)) {
en = (en + "1") - (int(en / numofpl) * numofpl);
en_history = (en_history add " ") add en;
}
if (enn == en) {
end_of_turn = "1";
}
if (lastacted == en) {
end_of_turn = "1";
}
}
if ((num_of_bita == "0") and (cards_on_table == "10")) {
end_of_turn = "1";
}
if (((end_of_turn == "1") or (eval ("number_of_cards" add otbiv_num) == "0")) or (cards_on_table >= "12")) {
end_of_turn = "0";
gotoAndPlay (51);
} else {
gotoAndPlay("player" add en);
}
}
Frame 12
i = "1";
players = numofpl;
while (numofpl >= i) {
if (eval ("winner" add i) == "1") {
players = players - "1";
}
i = i + "1";
}
if ("1" >= players) {
gotoAndPlay (94);
} else {
no_more = "0";
if (cards_on_table == "0") {
thecard = eval (("card" add en) add "1");
number_of_card = "1";
i = "2";
while (eval ("number_of_cards" add en) >= i) {
karta = eval (("card" add en) add i);
karta_mast = int((karta - "1") / "9");
karta_nomin = karta - (karta_mast * "9");
if (karta_mast <> kozur) {
thecard_nomin = "thecard-int((thecard-1)/9)*9";
if (karta_nomin < thecard_nomin) {
thecard = eval (("card" add en) add i);
number_of_card = i;
} else if (int((thecard - "1") / "9") == kozur) {
thecard = eval (("card" add en) add i);
number_of_card = i;
}
}
i = i + "1";
}
} else if ((cards_on_table == "12") and (give_me_more == "0")) {
gotoAndPlay (51);
} else {
i = "1";
t = "1";
while (cards_on_table >= i) {
n = "1";
while (eval ("number_of_cards" add en) >= n) {
k1_nominal = eval ("card_on_table" add i) - (int((eval ("card_on_table" add i) - "1") / "9") * "9");
k2_nominal = eval (("card" add en) add n) - (int((eval (("card" add en) add n) - "1") / "9") * "9");
if (k1_nominal == k2_nominal) {
Set("vozm_karta" add t, eval (("card" add en) add n));
Set("vozm_kartas" add t, eval (("card" add en) add n));
Set("card_number" add t, n);
t = t + "1";
}
n = n + "1";
}
i = i + "1";
}
no_more = "1";
thecard = "9";
number_of_card = "0";
i = "1";
while (i < t) {
if (int((eval ("vozm_karta" add i) - "1") / "9") <> kozur) {
vk_nomin = eval ("vozm_karta" add i) - (int((eval ("vozm_karta" add i) - "1") / "9") * "9");
thecard_nomin = thecard - (int((thecard - "1") / "9") * "9");
if (thecard_nomin >= vk_nomin) {
thecard = eval ("vozm_karta" add i);
number_of_card = eval ("card_number" add i);
no_more = "0";
}
}
i = i + "1";
}
if ((ttt >= "33") and (no_more == "1")) {
i = "1";
while (i < t) {
vk_nomin = eval ("vozm_karta" add i) - (int((eval ("vozm_karta" add i) - "1") / "9") * "9");
thecard_nomin = thecard - (int((thecard - "1") / "9") * "9");
if (thecard_nomin >= vk_nomin) {
thecard = eval ("vozm_karta" add i);
number_of_card = eval ("card_number" add i);
no_more = "0";
}
i = i + "1";
}
}
}
_y = "0";
_x = "0";
go = "0";
if (no_more <> "1") {
striked = "1";
lastacted = en;
rest = en;
thecard_mast = int((thecard - "1") / "9");
thecard_nomin = thecard - (int((thecard - "1") / "9") * "9");
podbr = podbr + "1";
setProperty(thecard, _y , "246");
setProperty(thecard, _x , "250" + ((int(podbr / "2") * "72") * ((-"1") + ("2" * (podbr - (int(podbr / "2") * "2"))))));
setProperty("/mark", _y , "246");
setProperty("/mark", _x , getProperty(thecard, _x));
Set(("card" add en) add number_of_card, eval (("card" add en) add eval ("number_of_cards" add en)));
Set(("card" add en) add eval ("number_of_cards" add en), "");
Set("number_of_cards" add en, eval ("number_of_cards" add en) - "1");
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, thecard);
}
where = "core";
gotoAndPlay (86);
}
Frame 13
gotoAndPlay (12);
Frame 14
i = "1";
players = numofpl;
while (numofpl >= i) {
if (eval ("winner" add i) == "1") {
players = players - "1";
}
i = i + "1";
}
if ("1" >= players) {
gotoAndStop (94);
}
thecard_mast = int((thecard - "1") / "9");
if (cards_on_table == "1") {
Set("message" add en, "îòáèâàéñÿ, " add eval ("name" add otbiv_num));
}
thecard_nomin = thecard - (int((thecard - "1") / "9") * "9");
if (eval ("winner" add otbiv_num) == "1") {
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
gotoAndPlay(otbiv);
} else {
help = "îòáèâàéòåñü !";
if (give_me_more == "1") {
gotoAndPlay (7);
} else {
mast = "0";
n = "1";
while (number_of_cards1 >= n) {
i = n;
kard = "null";
while (number_of_cards1 >= i) {
the_mast = int((eval ("card1" add i) - "1") / "9");
if (the_mast == mast) {
if (kard == "null") {
kard = i;
} else if (eval ("card1" add kard) < eval ("card1" add i)) {
kard = i;
}
}
i = i + "1";
}
if (kard <> eval("null")) {
karta = eval ("card1" add n);
Set("card1" add n, eval ("card1" add kard));
Set("card1" add kard, karta);
n = n + "1";
} else {
mast = mast + "1";
}
}
i = "1";
if (number_of_cards1 < "9") {
baza = ("640" - (number_of_cards1 * "72")) / "2";
shag = "72";
} else {
baza = -"10";
shag = "640" / number_of_cards1;
}
i = "1";
while (number_of_cards1 >= i) {
duplicateMovieClip ("/button", "button" add i, i);
setProperty(eval ("card1" add i), _name , "thiscard" add rew);
duplicateMovieClip ("thiscard" add rew, eval ("card1" add i), "100" + rew);
removeMovieClip("thiscard" add rew);
rew = rew + "1";
setProperty("button" add i, _y , "370");
setProperty("button" add i, _x , baza + (shag * (i - "1")));
setProperty(eval ("card1" add i), _y , "370");
setProperty(eval ("card1" add i), _x , baza + (shag * (i - "1")));
i = i + "1";
}
i = "1";
can = "0";
nomin_of_thecard = thecard - (int((thecard - "1") / "9") * "9");
while (number_of_cards1 >= i) {
mast_of_card = int((eval ("card1" add i) - "1") / "9");
nomin_of_card = eval ("card1" add i) - (int((eval ("card1" add i) - "1") / "9") * "9");
if (((mast_of_card == thecard_mast) and (nomin_of_thecard < nomin_of_card)) or ((mast_of_card == kozur) and (thecard_mast <> kozur))) {
can = "1";
}
i = i + "1";
}
_y = "0";
_x = "0";
if (can == "0") {
give_me_more = "1";
}
}
}
Frame 17
if (thecard == "") {
setProperty("/mark", _y , "1000");
}
if (go == "1") {
go = "0";
gotoAndPlay (19);
}
Frame 18
gotoAndPlay (17);
Frame 19
next_player = "0";
i = "1";
while ((next_player == "0") and (i < "10")) {
next_player = (otbiv_num + i) - (int(((otbiv_num + i) - "1") / numofpl) * numofpl);
next_player = -(next_player * (eval ("winner" add next_player) - "1"));
i = i + "1";
}
pl_mast = int((eval ("card1" add plcard) - "1") / "9");
selected = eval ("card1" add plcard);
pl_nomin = selected - (int((selected - "1") / "9") * "9");
if ((((((perevod == "1") and (pl_nomin == thecard_nomin)) and (eval ("number_of_cards" add next_player) >= (cards_on_table + "1"))) and (pl_mast == kozur)) and (first_con == "0")) and (type == "1")) {
gotoAndPlay (80);
} else if (((((perevod == "1") and (pl_nomin == thecard_nomin)) and (eval ("number_of_cards" add next_player) >= (cards_on_table + "1"))) and (first_con == "0")) and (type == "1")) {
podbr = podbr + "1";
setProperty(selected, _y , "246");
setProperty(selected, _x , "250" + ((int(podbr / "2") * "72") * ((-"1") + ("2" * (podbr - (int(podbr / "2") * "2"))))));
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, selected);
Set("card1" add plcard, eval ("card1" add number_of_cards1));
removeMovieClip("button" add number_of_cards1);
number_of_cards1 = number_of_cards1 - "1";
_y = "0";
_x = "0";
striked = "1";
striker_num = otbiv_num;
striker = "player" add striker_num;
otbiv_num = next_player;
otbiv = "otb" add otbiv_num;
per_cards = cards_on_table;
num_of_karta = "0";
perevol = "1";
lastacted = "1";
en = "1";
gotoAndPlay (7);
} else if (((pl_mast == thecard_mast) and (thecard_nomin < pl_nomin)) or ((pl_mast == kozur) and (thecard_mast <> kozur))) {
otbivat = otbivat + "1";
setProperty(selected, _y , "150");
setProperty(selected, _x , "250" + ((int(otbivat / "2") * "72") * ((-"1") + ("2" * (otbivat - (int(otbivat / "2") * "2"))))));
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, selected);
Set("card1" add plcard, eval ("card1" add number_of_cards1));
removeMovieClip("button" add number_of_cards1);
number_of_cards1 = number_of_cards1 - "1";
_y = "0";
_x = "0";
perevod = "0";
striked = "0";
gotoAndPlay (7);
} else {
gotoAndPlay (14);
go = "0";
}
_y = "0";
_x = "0";
Frame 24
stop();
Frame 25
removeMovieClip("button" add number_of_cards1);
podbr = podbr + "1";
setProperty(eval ("card1" add plcard), _y , "246");
setProperty(eval ("card1" add plcard), _x , "250" + ((int(podbr / "2") * "72") * ((-"1") + ("2" * (podbr - (int(podbr / "2") * "2"))))));
setProperty("/mark", _y , "246");
setProperty("/mark", _x , getProperty(thecard, _x));
striked = "1";
lastacted = "1";
thecard_mast = int((thecard - "1") / "9");
thecard_nomin = thecard - (int((thecard - "1") / "9") * "9");
Set(("card" add en) add number_of_card, eval (("card" add en) add eval ("number_of_cards" add en)));
Set(("card" add en) add eval ("number_of_cards" add en), "");
Set("number_of_cards" add en, eval ("number_of_cards" add en) - "1");
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, thecard);
_y = "0";
_x = "0";
gotoAndPlay (7);
Frame 29
go = "0";
podbr = "0";
otbivat = "0";
i = "1";
while (cards_on_table >= i) {
num_of_bita = num_of_bita + "1";
Set("otbita" add num_of_bita, eval ("card_on_table" add i));
setProperty(eval ("card_on_table" add i), _y , "500");
Set("card_on_table" add i, "");
i = i + "1";
}
num_of_otbiv = otbiv_num;
striker_num = otbiv_num;
striker = "player" add striker_num;
otbiv_num = (striker_num + "1") - (int(striker_num / numofpl) * numofpl);
otbiv = "otb" add otbiv_num;
_y = "0";
_x = "0";
gotoAndPlay (34);
Frame 34
give_me_more = "0";
help = "";
setProperty("/mark", _y , "1000");
first_con = "0";
bito = "ÁÈÒÎ";
striked = "0";
end_of_turn = "0";
no_more = "0";
cards_on_table = "0";
perevod = "1";
perevol = "0";
podbr = "0";
otbivat = "0";
go = "0";
cards_on_table = "0";
lastacted = "0";
if (ttt == "37") {
i = "1";
while (number_of_cards2 >= i) {
setProperty(eval ("card2" add i), _y , "-300");
setProperty(eval ("card2" add i), _x , "10" + (i * "50"));
i = i + "1";
}
gotoAndPlay (7);
} else {
i = "1";
while (numofpl >= i) {
while ((eval ("number_of_cards" add pl1) < "6") and (ttt < "37")) {
Set("number_of_cards" add pl1, eval ("number_of_cards" add pl1) + "1");
vspom = eval ("number_of_cards" add pl1);
if (ttt == "36") {
card = kozur_karta;
setProperty(card, _y , "1000");
} else {
coloda = "37" - ttt;
card_num = random(coloda - "1") + "1";
numer = "0";
q = "1";
while ("36" >= q) {
card = q;
ncard = "1";
k = "1";
while (k < ttt) {
if ((card == eval ("cardingame" add k)) or (card == kozur_karta)) {
ncard = "0";
}
k = k + "1";
}
if (ncard == "1") {
numer = numer + "1";
}
if (numer == card_num) {
q = "37";
}
q = q + "1";
}
}
Set(("card" add pl1) add vspom, card);
Set("cardingame" add ttt, card);
ttt = ttt + "1";
}
i = i + "1";
pl1 = (pl1 + "1") - (int(pl1 / numofpl) * numofpl);
if (pl1 == num_of_otbiv) {
pl1 = (pl1 + "1") - (int(pl1 / numofpl) * numofpl);
}
}
pl1 = num_of_otbiv;
while ((eval ("number_of_cards" add pl1) < "6") and (ttt < "37")) {
Set("number_of_cards" add pl1, eval ("number_of_cards" add pl1) + "1");
vspom = eval ("number_of_cards" add pl1);
if (ttt == "36") {
card = kozur_karta;
setProperty(card, _y , "1000");
} else {
coloda = "37" - ttt;
card_num = random(coloda - "1") + "1";
numer = "0";
q = "1";
while ("36" >= q) {
card = q;
ncard = "1";
k = "1";
while (k < ttt) {
if ((card == eval ("cardingame" add k)) or (card == kozur_karta)) {
ncard = "0";
}
k = k + "1";
}
if (ncard == "1") {
numer = numer + "1";
}
if (numer == card_num) {
q = "37";
}
q = q + "1";
}
}
Set(("card" add pl1) add vspom, card);
Set("cardingame" add ttt, card);
ttt = ttt + "1";
}
coloda = "37" - ttt;
if (ttt >= "36") {
setProperty("/rub", _visible , "0");
coloda = " ";
}
i = "1";
while (number_of_cards2 >= i) {
setProperty(eval ("card2" add i), _y , "-300");
setProperty(eval ("card2" add i), _x , "10" + (i * "50"));
i = i + "1";
}
i = "1";
while (number_of_cards3 >= i) {
setProperty(eval ("card3" add i), _y , "500");
i = i + "1";
}
_y = "0";
_x = "0";
gotoAndPlay (7);
}
pl1 = striker_num;
Frame 39
podbr = "0";
otbivat = "0";
num_of_otbiv = (striker_num - "1") + (int(((numofpl - striker_num) + "1") / numofpl) * numofpl);
i = "1";
count = eval ("number_of_cards" add by);
while (cards_on_table >= i) {
Set(("card" add by) add (count + i), eval ("card_on_table" add i));
setProperty(eval ("card_on_table" add i), _y , -"500");
Set("card_on_table" add i, "");
Set("number_of_cards" add by, eval ("number_of_cards" add by) + "1");
i = i + "1";
}
striker_num = (otbiv_num + "1") - (int(otbiv_num / numofpl) * numofpl);
otbiv_num = (striker_num + "1") - (int(striker_num / numofpl) * numofpl);
striker = "player" add striker_num;
otbiv = "otb" add otbiv_num;
_y = "0";
_x = "0";
gotoAndPlay (34);
Frame 44
i = "1";
players = numofpl;
while (numofpl >= i) {
if (eval ("winner" add i) == "1") {
players = players - "1";
}
i = i + "1";
}
if ("1" >= players) {
gotoAndPlay (94);
} else if (eval ("winner" add en) == "1") {
if (cards_on_table == "0") {
striker_num = (striker_num + "1") - (int(striker_num / numofpl) * numofpl);
otbiv_num = (otbiv_num + "1") - (int(otbiv_num / numofpl) * numofpl);
otbiv = "otb" add otbiv_num;
striker = "player" add striker_num;
en = striker_num;
gotoAndPlay(striker);
} else {
en = (en + "1") - (int(en / numofpl) * numofpl);
if (en == otbiv_num) {
en = (en + "1") - (int(en / numofpl) * numofpl);
}
if (lastacted == en) {
end_of_turn = "1";
}
gotoAndPlay("player" add en);
}
} else {
if (cards_on_table == "0") {
help = "âàø õîä !";
} else {
help = "ìîæíî ÷òî-íèáóäü ïîäáðîñèòü...";
}
mast = "0";
n = "1";
while (number_of_cards1 >= n) {
i = n;
kard = "null";
while (number_of_cards1 >= i) {
the_mast = int((eval ("card1" add i) - "1") / "9");
if (the_mast == mast) {
if (kard == "null") {
kard = i;
} else if (eval ("card1" add kard) < eval ("card1" add i)) {
kard = i;
}
}
i = i + "1";
}
if (kard <> eval("null")) {
karta = eval ("card1" add n);
Set("card1" add n, eval ("card1" add kard));
Set("card1" add kard, karta);
n = n + "1";
} else {
mast = mast + "1";
}
}
if (number_of_cards1 < "9") {
baza = ("640" - (number_of_cards1 * "72")) / "2";
shag = "72";
} else {
baza = -"10";
shag = "640" / number_of_cards1;
}
i = "1";
while (number_of_cards1 >= i) {
duplicateMovieClip ("/button", "button" add i, i);
setProperty(eval ("card1" add i), _name , "thiscard" add rew);
duplicateMovieClip ("thiscard" add rew, eval ("card1" add i), "100" + rew);
removeMovieClip("thiscard" add rew);
rew = rew + "1";
setProperty("button" add i, _y , "370");
setProperty("button" add i, _x , baza + (shag * (i - "1")));
setProperty(eval ("card1" add i), _y , "370");
setProperty(eval ("card1" add i), _x , baza + (shag * (i - "1")));
i = i + "1";
}
_y = "0";
_x = "0";
gotoAndPlay (46);
}
Frame 46
if (thecard == "") {
setProperty("/mark", _y , "1000");
}
if (go == "1") {
gotoAndPlay (48);
go = "0";
}
Frame 47
gotoAndPlay (46);
Frame 48
en = "1";
_y = "0";
no_more = "0";
striked = "0";
can = "0";
thecard = eval ("card1" add plcard);
number_of_card = plcard;
qwe = thecard;
if (cards_on_table == "0") {
can = "1";
} else {
i = "1";
thecard_nomin = thecard - (int((thecard - "1") / "9") * "9");
while (cards_on_table >= i) {
card_nomin = eval ("card_on_table" add i) - (int((eval ("card_on_table" add i) - "1") / "9") * "9");
if (thecard_nomin == card_nomin) {
can = "1";
}
i = i + "1";
}
}
if (can == "1") {
gotoAndStop (25);
} else {
gotoAndPlay (42);
}
Frame 51
podbr = "0";
otbivat = "0";
go = "0";
i = "1";
players = numofpl;
while (numofpl >= i) {
if (eval ("winner" add i) == "1") {
players = players - "1";
}
i = i + "1";
}
if ("1" >= players) {
gotoAndStop (94);
} else {
i = "1";
while (numofpl >= i) {
Set("message" add i, " ");
i = i + "1";
}
begining = "1";
perevod = "1";
i = "1";
while ("36" >= i) {
setProperty(eval ("card_on_table" add i), _y , "6000");
i = i + "1";
}
if (give_me_more == "0") {
gotoAndPlay (29);
} else if (give_me_more == "1") {
by = otbiv_num;
gotoAndPlay (39);
}
}
Frame 54
if (eval ("winner" add otbiv_num) == "1") {
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
gotoAndPlay(otbiv);
} else {
gotoAndPlay (75);
}
Frame 59
if ("1" >= players) {
gotoAndPlay (94);
} else if (eval ("winner" add en) == "1") {
if (cards_on_table == "0") {
striker_num = striker_num + "1";
if (numofpl < striker_num) {
striker_num = "1";
}
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
striker = "player" add striker_num;
en = striker_num;
gotoAndPlay(striker);
} else {
en = (en + "1") - (int(en / numofpl) * numofpl);
if (en == otbiv_num) {
en = (en + "1") - (int(en / numofpl) * numofpl);
}
if (lastacted == en) {
end_of_turn = "1";
}
gotoAndPlay("player" add en);
}
} else {
en = "2";
gotoAndPlay (12);
}
Frame 65
if (eval ("winner" add otbiv_num) == "1") {
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
gotoAndPlay(otbiv);
} else {
gotoAndPlay (75);
}
Frame 70
if ("1" >= players) {
gotoAndPlay (94);
} else if (eval ("winner" add en) == "1") {
if (cards_on_table == "0") {
striker_num = striker_num + "1";
if (numofpl < striker_num) {
striker_num = "1";
}
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
striker = "player" add striker_num;
en = striker_num;
gotoAndPlay(striker);
} else {
en = (en + "1") - (int(en / numofpl) * numofpl);
if (en == otbiv_num) {
en = (en + "1") - (int(en / numofpl) * numofpl);
}
if (lastacted == en) {
end_of_turn = "1";
}
gotoAndPlay("player" add en);
}
} else {
en = "3";
gotoAndPlay (12);
}
Frame 75
i = "1";
players = numofpl;
while (numofpl >= i) {
if (eval ("winner" add i) == "1") {
players = players - "1";
}
i = i + "1";
}
if ("1" >= players) {
gotoAndPlay (94);
} else {
next_player = "0";
i = "1";
while ((next_player == "0") and (i < "10")) {
next_player = (otbiv_num + i) - (int(((otbiv_num + i) - "1") / numofpl) * numofpl);
next_player = -(next_player * (eval ("winner" add next_player) - "1"));
i = i + "1";
}
if (cards_on_table == "1") {
Set("message" add en, "îòáèâàéñÿ, " add eval ("name" add otbiv_num));
}
if (give_me_more == "1") {
} else {
i = "1";
n = "1";
k = "1";
thecard_mast = int((thecard - "1") / "9");
nomin_of_thecard = thecard - (int((thecard - "1") / "9") * "9");
while (eval ("number_of_cards" add otbiv_num) >= i) {
mast_of_card = int((eval (("card" add otbiv_num) add i) - "1") / "9");
nomin_of_card = eval (("card" add otbiv_num) add i) - (int((eval (("card" add otbiv_num) add i) - "1") / "9") * "9");
if (((mast_of_card == thecard_mast) and (nomin_of_thecard < nomin_of_card)) or ((mast_of_card == kozur) and (thecard_mast <> kozur))) {
Set("vozm_karta" add k, eval (("card" add otbiv_num) add i));
Set("card_number" add k, i);
k = k + "1";
}
if (((((perevod == "1") and (nomin_of_card == nomin_of_thecard)) and (eval ("number_of_cards" add next_player) >= (cards_on_table + "1"))) and (first_con == "0")) and (type == "1")) {
Set("per_karta" add n, eval (("card" add otbiv_num) add i));
Set("per_number" add n, i);
n = n + "1";
}
i = i + "1";
}
t = "1";
selected = vozm_karta1;
number_of_card = card_number1;
i = "1";
while (i < k) {
if (int((eval ("vozm_karta" add i) - "1") / "9") <> kozur) {
if ((eval ("vozm_karta" add i) - (int((eval ("vozm_karta" add i) - "1") / "9") * "9")) < (selected - (int((selected - "1") / "9") * "9"))) {
selected = eval ("vozm_karta" add i);
number_of_card = eval ("card_number" add i);
} else if (int((selected - "1") / "9") == kozur) {
selected = eval ("vozm_karta" add i);
number_of_card = eval ("card_number" add i);
}
}
i = i + "1";
}
rnd = random("2");
rnd = "0";
if (("1" < n) and (rnd == "0")) {
Set("message" add otbiv_num, "Ïîæàëóé ýòî íå ìíå. Îòáèâàéñÿ, " add eval ("name" add next_player));
selected = per_karta1;
number_of_card = per_number1;
podbr = podbr + "1";
setProperty(selected, _y , "246");
setProperty(selected, _x , "250" + ((int(podbr / "2") * "72") * ((-"1") + ("2" * (podbr - (int(podbr / "2") * "2"))))));
Set(("card" add otbiv_num) add number_of_card, eval (("card" add otbiv_num) add eval ("number_of_cards" add otbiv_num)));
Set(("card" add otbiv_num) add eval ("number_of_cards" add otbiv_num), "");
Set("number_of_cards" add otbiv_num, eval ("number_of_cards" add otbiv_num) - "1");
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, selected);
striker_num = otbiv_num;
striker = "player" add striker_num;
otbiv_num = next_player;
otbiv = "otb" add otbiv_num;
per_cards = cards_on_table;
num_of_karta = "0";
lastacted = striker_num;
perevol = "1";
en = otbiv_num;
where = "core";
} else if (k == "1") {
Set("message" add otbiv_num, "ÎÊ, áåðó, äàâàé åù¸.");
give_me_more = "1";
bito = "ÇÀÁÈÐÀÉ";
} else {
rnd = random("5");
Set("message" add otbiv_num, eval ("otb_speech" add rnd));
otbivat = otbivat + "1";
setProperty(selected, _y , "150");
setProperty(selected, _x , "250" + ((int(otbivat / "2") * "72") * ((-"1") + ("2" * (otbivat - (int(otbivat / "2") * "2"))))));
if (perevol == "1") {
setProperty(selected, _visible , "0");
Set("message" add otbiv_num, "");
}
Set(("card" add otbiv_num) add number_of_card, eval (("card" add otbiv_num) add eval ("number_of_cards" add otbiv_num)));
Set(("card" add otbiv_num) add eval ("number_of_cards" add otbiv_num), "");
Set("number_of_cards" add otbiv_num, eval ("number_of_cards" add otbiv_num) - "1");
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, selected);
striked = "0";
_y = "0";
_x = "0";
perevod = "0";
where = "core";
}
}
gotoAndPlay (86);
}
Frame 80
lastacted = "1";
stop();
Frame 86
time1 = getTimer();
mast = "0";
n = "1";
while (number_of_cards1 >= n) {
i = n;
kard = "null";
while (number_of_cards1 >= i) {
the_mast = int((eval ("card1" add i) - "1") / "9");
if (the_mast == mast) {
if (kard == "null") {
kard = i;
} else if (eval ("card1" add kard) < eval ("card1" add i)) {
kard = i;
}
}
i = i + "1";
}
if (kard <> eval("null")) {
karta = eval ("card1" add n);
Set("card1" add n, eval ("card1" add kard));
Set("card1" add kard, karta);
n = n + "1";
} else {
mast = mast + "1";
}
}
i = "1";
if (number_of_cards1 < "9") {
baza = ("640" - (number_of_cards1 * "72")) / "2";
shag = "72";
} else {
baza = -"10";
shag = "640" / number_of_cards1;
}
i = "1";
while (number_of_cards1 >= i) {
duplicateMovieClip ("/button", "button" add i, i);
setProperty(eval ("card1" add i), _name , "thiscard" add rew);
duplicateMovieClip ("thiscard" add rew, eval ("card1" add i), "100" + rew);
setProperty("thiscard" add rew, _visible , "0");
rew = rew + "1";
setProperty("button" add i, _y , "370");
setProperty("button" add i, _x , baza + (shag * (i - "1")));
setProperty(eval ("card1" add i), _y , "370");
setProperty(eval ("card1" add i), _x , baza + (shag * (i - "1")));
i = i + "1";
}
Frame 87
time2 = getTimer();
Frame 88
if (the_time < (time2 - time1)) {
gotoAndPlay(where);
} else {
gotoAndPlay (87);
}
Frame 90
if (eval ("winner" add otbiv_num) == "1") {
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
gotoAndPlay(otbiv);
} else {
gotoAndPlay (75);
}
Frame 91
if ("1" >= players) {
gotoAndPlay (94);
} else if (eval ("winner" add en) == "1") {
if (cards_on_table == "0") {
striker_num = striker_num + "1";
if (numofpl < striker_num) {
striker_num = "1";
}
otbiv_num = otbiv_num + "1";
if (numofpl < otbiv_num) {
otbiv_num = "1";
}
otbiv = "otb" add otbiv_num;
striker = "player" add striker_num;
en = striker_num;
gotoAndPlay(striker);
} else {
en = (en + "1") - (int(en / numofpl) * numofpl);
if (en == otbiv_num) {
en = (en + "1") - (int(en / numofpl) * numofpl);
}
if (lastacted == en) {
end_of_turn = "1";
}
gotoAndPlay("player" add en);
}
} else {
en = "4";
gotoAndPlay (12);
}
Frame 94
help = "";
bito = "ÁÈÒÎ";
setProperty("/mark", _y , "1000");
i = "1";
while (numofpl >= i) {
Set("message" add i, " ");
i = i + "1";
}
i = "1";
while ("36" >= i) {
removeMovieClip("button" add i);
setProperty(i, _y , -"500");
i = i + "1";
}
i = "1";
while (numofpl >= i) {
if (eval ("winner" add i) == "0") {
if (eval ("name" add i) eq "rabbitkiller") {
message = "rabbitkiller-óìíûé ïàðåíü, õîòÿ áû ïîòîìó, ÷òî ñäåëàë ýòó èãðó, íî â ýòîò ðàç ÿ, êàæåòñÿ, óìóäðèëñÿ ïðîèãðàòü... ";
} else {
message = eval ("name" add i) add " - ÄÓÐÀÊ !";
}
i = "10";
}
i = i + "1";
}
stop();
Symbol 9 Button
on (press) {
if ("2" < _level0:numofpl) {
Set("_level0:numofpl", _level0:numofpl - "1");
}
}
Symbol 10 Button
on (press) {
if (_level0:numofpl < "4") {
Set("_level0:numofpl", _level0:numofpl + "1");
}
}
Symbol 12 Button
on (release) {
gotoAndStop (2);
Set("_level0:the_time", "1000");
}
Symbol 15 Button
on (press) {
gotoAndStop (1);
Set("_level0:the_time", "0");
}
Symbol 17 MovieClip Frame 1
if (_level0:the_time <> "0") {
gotoAndStop (2);
}
stop();
Symbol 19 Button
on (press) {
gotoAndStop (2);
}
Symbol 25 Button
on (rollOver) {
gotoAndStop (3);
}
on (press) {
gotoAndStop (1);
str = "ïðîñòîé";
Set("_level0:type", "0");
}
Symbol 26 Button
on (rollOver) {
gotoAndStop (2);
}
on (press) {
gotoAndStop (1);
str = "ïåðåâîäíîé";
Set("_level0:type", "1");
}
Symbol 28 MovieClip Frame 1
type = _level0:type;
if (_level0:type == "1") {
str = "ïåðåâîäíîé";
Set("_level0:type", "1");
} else {
str = "ïðîñòîé";
Set("_level0:type", "0");
}
stop();
Symbol 28 MovieClip Frame 2
stop();
stop();
Symbol 28 MovieClip Frame 3
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 42 Button
on (press) {
Set("_level0:name1", name1);
Set("_level0:go", "1");
gotoAndStop (1);
}
Symbol 43 MovieClip Frame 1
name1 = _level0:name1;
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 21
if (opt == "1") {
setProperty("opt", _visible , "1");
} else {
setProperty("opt", _visible , "0");
}
if (begin == "1") {
setProperty("name", _visible , "1");
} else {
setProperty("name", _visible , "0");
}
txt1 = txt;
stop();
Symbol 47 MovieClip Frame 30
gotoAndPlay (2);
Symbol 49 MovieClip Frame 45
stop();
Symbol 55 MovieClip Frame 50
stop();
Symbol 55 MovieClip Frame 80
gotoAndPlay (51);
Symbol 63 MovieClip Frame 50
stop();
Symbol 63 MovieClip Frame 80
gotoAndPlay (51);
Symbol 71 MovieClip Frame 50
stop();
Symbol 71 MovieClip Frame 80
gotoAndPlay (51);
Symbol 72 Button
on (press) {
Set("/intro/window:begin", "1");
tellTarget ("window") {
play();
};
Set("/intro/window:txt", "");
Set("/intro/window:opt", "0");
}
on (rollOver) {
i = "0";
while ("3" >= i) {
tellTarget ("game" add i) {
gotoAndPlay (51);
};
i = i + "1";
}
}
on (rollOut) {
i = "0";
while ("3" >= i) {
tellTarget ("game" add i) {
gotoAndStop (50);
};
i = i + "1";
}
}
Symbol 79 MovieClip Frame 70
stop();
Symbol 79 MovieClip Frame 100
gotoAndPlay (71);
Symbol 80 Button
on (press) {
tellTarget ("window") {
play();
};
Set("/intro/window:begin", "0");
Set("/intro/window:opt", "0");
Set("/intro/window:txt", _level0:rules);
}
on (rollOver) {
i = "0";
while ("3" >= i) {
tellTarget ("rules" add i) {
gotoAndPlay (51);
};
i = i + "1";
}
}
on (rollOut) {
i = "0";
while ("3" >= i) {
tellTarget ("rules" add i) {
gotoAndStop (50);
};
i = i + "1";
}
}
Symbol 81 Button
on (press) {
tellTarget ("window") {
play();
};
Set("/intro/window:begin", "0");
Set("/intro/window:txt", "");
Set("/intro/window:opt", "1");
}
on (rollOver) {
i = "0";
while ("3" >= i) {
tellTarget ("opt" add i) {
gotoAndPlay (51);
};
i = i + "1";
}
}
on (rollOut) {
i = "0";
while ("3" >= i) {
tellTarget ("opt" add i) {
gotoAndStop (50);
};
i = i + "1";
}
}
Symbol 82 Button
on (press) {
tellTarget ("window") {
play();
};
Set("/intro/window:begin", "0");
Set("/intro/window:opt", "0");
Set("/intro/window:txt", _level0:about);
}
on (rollOver) {
i = "0";
while ("3" >= i) {
tellTarget ("about" add i) {
gotoAndPlay (71);
};
i = i + "1";
}
}
on (rollOut) {
i = "0";
while ("3" >= i) {
tellTarget ("about" add i) {
gotoAndStop (70);
};
i = i + "1";
}
}
Symbol 83 MovieClip Frame 1
loadVariablesNum ("info.txt", "0");
unloadMovieNum (1);
if (_level0:ttt == "37") {
gotoAndPlay (46);
} else {
numofpl = "3";
type = "1";
thetime = "0";
}
Symbol 83 MovieClip Frame 46
max = "3";
i = "1";
while (max >= i) {
duplicateMovieClip ("game0", "game" add i, i);
setProperty("game" add i, _xscale , "100" - ("20" * i));
setProperty("game" add i, _yscale , "100" - ("20" * i));
setProperty("game" add i, _alpha , "80" - ("20" * i));
i = i + "1";
}
Symbol 83 MovieClip Frame 66
i = "1";
while (max >= i) {
duplicateMovieClip ("rules0", "rules" add i, "10" + i);
setProperty("rules" add i, _xscale , "100" - ("20" * i));
setProperty("rules" add i, _yscale , "100" - ("20" * i));
setProperty("rules" add i, _alpha , "80" - ("20" * i));
i = i + "1";
}
Symbol 83 MovieClip Frame 86
i = "1";
while (max >= i) {
duplicateMovieClip ("opt0", "opt" add i, "20" + i);
setProperty("opt" add i, _xscale , "100" - ("20" * i));
setProperty("opt" add i, _yscale , "100" - ("20" * i));
setProperty("opt" add i, _alpha , "80" - ("20" * i));
i = i + "1";
}
Symbol 83 MovieClip Frame 106
i = "1";
while (max >= i) {
duplicateMovieClip ("about0", "about" add i, "30" + i);
setProperty("about" add i, _xscale , "100" - ("20" * i));
setProperty("about" add i, _yscale , "100" - ("20" * i));
setProperty("about" add i, _alpha , "80" - ("20" * i));
i = i + "1";
}
Symbol 83 MovieClip Frame 176
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 159 Button
on (press) {
Set("/:plcard", card);
Set("/:go", "1");
}
Symbol 160 MovieClip Frame 1
card = substring(getProperty(self, _name), "7", "2");
Symbol 160 MovieClip Frame 2
stop();
Symbol 257 Button
on (press) {
gotoAndStop (1);
}
Symbol 259 Button
on (press) {
give_me_more = "1";
gotoAndPlay (7);
}
Symbol 261 Button
on (press) {
no_more = "1";
gotoAndPlay (7);
}
Symbol 264 Button
on (press) {
podbr = podbr + "1";
setProperty(selected, _y , "246");
setProperty(selected, _x , "250" + ((int(podbr / "2") * "72") * ((-"1") + ("2" * (podbr - (int(podbr / "2") * "2"))))));
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, selected);
Set("card1" add plcard, eval ("card1" add number_of_cards1));
removeMovieClip("button" add number_of_cards1);
number_of_cards1 = number_of_cards1 - "1";
_y = "0";
_x = "0";
striked = "0";
striker_num = otbiv_num;
striker = "player" add striker_num;
otbiv_num = next_player;
otbiv = "otb" add otbiv_num;
per_cards = cards_on_table;
num_of_karta = "1";
perevol = "1";
en = "1";
gotoAndPlay (7);
}
Symbol 265 Button
on (press) {
otbivat = otbivat + "1";
setProperty(selected, _y , "150");
setProperty(selected, _x , "250" + ((int(otbivat / "2") * "72") * ((-"1") + ("2" * (otbivat - (int(otbivat / "2") * "2"))))));
cards_on_table = cards_on_table + "1";
Set("card_on_table" add cards_on_table, selected);
Set("card1" add plcard, eval ("card1" add number_of_cards1));
removeMovieClip("button" add number_of_cards1);
number_of_cards1 = number_of_cards1 - "1";
_y = "0";
_x = "0";
striked = "0";
perevod = "0";
gotoAndPlay (7);
}
Symbol 268 Button
on (press) {
go = "0";
gotoAndPlay (3);
}