Назад

Стоп клок проблема не видна цифр

Автор: SergeiX: Дата: 12.27.2009

//===== Athena Script =====================================
//= Stop the Clock
//===== By ================================================
//= Tom94
//===== Version ===========================================
//= 1.0
//=========================================================
//= 1.0 - First release
//===== Compatible With ===================================
//= TXT and SQL. No idea which revisions xP
//===== Description =======================================
//= A minigame
//=========================================================

prontera.gat,173,205,3 script Stop the Clock 81,{

if (getgmlevel() >=20) goto L_GM;
if ($@kc > 0 && @kcid != $@kcid) goto L_eventstarted;
mes "[Stop The Clock]";
mes "Здравствуй ^FF0000"+strcharinfo(0)+"^000000, чем могу помочь?";
menu "^FF0000[Stop The Clock]^000000 информация",L_info,"Выход",-;
close;

L_info:
next;
mes "[Stop The Clock]";
mes "^FF0000Stop the clock^000000 это игра, где нужно кликать на нпц";
next;
mes "[Stop The Clock]";
mes "Человек, который часы ближе к 1000 остановит, победит!";
mes "^FF0000[Note] Чтобы иметь шанс к победе нужно оставить часы от 950 до 1000^000000";
next;
mes "[Stop The Clock]";
mes "Приз: ^FF0000["+getitemname($itemid)+"]^000000";
close;

L_eventstarted:
set @kcid,$@kcid;
setd ".timing_" + .number, $@kc;
setd ".player_" + .number + "$", strcharinfo(0);
set .number, .number+1;
if ($@kc == 1000) {
announce "ДжекПот! "+strcharinfo(0)+" остановил часы на "+$@kc+".",0,0x00EEFF;
} else {
announce ""+strcharinfo(0)+" остановил часы на "+$@kc+".",0,0x00EEFF;
}
end;

L_GM:
mes "[Stop The Clock]";
mes "Дарова Администратор, что хотели?";
mes "Приз: ^FF0000["+getitemname($itemid)+"]^000000";
menu "Изменить приз",L_configure,"Начать эвент",-,"Остановить эвент",L_stop;
if (.start == 1) goto L_started;
next;
mes "[Stop The Clock]";
mes "Эвент стартовал";
close2;

L_startevent:
set .start, 1;
announce "[Stop The Clock] Старт через 1 минуту! (Prontera/Пронтера)",0,0xFF99FF;
initnpctimer;
end;
OnTimer30000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Старт через 30 секунд!",0,0xFF99FF;
end;
OnTimer50000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Старт через 10 секунд!",0,0xFF99FF;
end;
OnTimer55000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Старт через 5 секунд!",0,0xFF99FF;
OnTimer60000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Начался! Клик, клик!",0,0xFF99FF;
stopnpctimer;
set .number, 1;
set .count, 1000;
set .winner, 0;
set $@kc,0;
set $@kci,0;
set $@kcid,rand(100000,999999);
while ($@kc < 1100) {
set $@kc,$@kc+1;
set $@kci,$@kci+1;
if ($@kci == 100 || ($@kci == 10 && $@kc > 600) || ($@kci == 1 && $@kc >= 950 && $@kc < 1050)) {
if (.start == 0) goto L_suddenstop;
mapannounce "aldebaran",$@kc,bc_map|bc_yellow;
set $@kci,0;
specialeffect 18;
}
sleep 10;
}
set $@kc,0;
set .start, 0;
set .players, .number+1;

OnFinish:
sleep 1;
if (.count == 949) goto OnFinish3;
if (getd(".timing_" + .number) == .count) goto L_winner1;
set .number, .number-1;
if (.number != 0) goto OnFinish;
set .number, 1;
if (.winner == 1) goto OnFinish3;
set .count, .count-1;

OnFinish2:
sleep 1;
if (.count == 949) goto OnFinish3;
if (getd(".timing_" + .number) == .count) goto L_winner2;
set .number, .number+1;
if (.number != .players) goto OnFinish2;
set .number, .number-1;
if (.winner == 1) goto OnFinish3;
set .count, .count-1;
goto OnFinish;

L_winner1:
if (getd(".timing_" + .number) == 1000) {
announce ""+getd(".player_" + .number + "$")+" wins! (Prize x2 for stopping exactly on 1000)",0;
charcommand "#item " + $itemid + " 2 " + getd(".player_" + .number + "$");
} else {
announce ""+getd(".player_" + .number + "$")+" wins!",0;
charcommand "#item " + $itemid + " 1 " + getd(".player_" + .number + "$");
}
set .number, .number-1;
set .winner, 1;
goto OnFinish;

L_winner2:
if (getd(".timing_" + .number) == 1000) {
announce ""+getd(".player_" + .number + "$")+" wins! (Prize x2 for stopping exactly on 1000)",0;
charcommand "#item " + $itemid + " 2 " + getd(".player_" + .number + "$");
} else {
announce ""+getd(".player_" + .number + "$")+" wins!",0;
charcommand "#item " + $itemid + " 1 " + getd(".player_" + .number + "$");
}
set .number, .number+1;
set .winner, 1;
goto OnFinish2;

OnFinish3:
sleep 1;
set .number, .players-1;
while (.number != 0) {
set getd(".timing_" + .number), 0;
set .number, .number-1;
}
end;

L_started:
next;
mes "[Stop The Clock]";
mes "Эвент уже стартовал!";
close;

L_configure:
next;
mes "[Stop The Clock]";
mes "Пожалуйста введите id приза.";
input $itemid;
next;
mes "[Stop The Clock]";
mes "Уверены что хотите ^FF0000"+getitemname($itemid)+"^000000 изменить приз эвента?";
menu "Да",-,"Нет",L_no;
next;
mes "[Stop The Clock]";
mes "Приз изменен на ^FF0000["+getitemname($itemid)+"]^000000.";
next;
goto L_GM;

L_no:
goto L_configure;

L_stop:
next;
if (.start == 1) {
mes "[Stop The Clock]";
mes "Эвент стартовал, уверены что хотите остановить эвент?";
menu "Да",-,"Нет",-;

if (@menu == 1) {
next;
set .start, 0;
mes "[Stop The Clock]";
mes "Эвент остановлен";
next;
goto L_GM;
} else {
next;
goto L_GM;
}
} else {
mes "[Stop The Clock]";
mes "Эвент уже начался!";
close;
}

L_suddenstop:
announce "[Stop The Clock] Остановлен администрацией",0;
end;

OnClock1200:
goto L_startevent;
end;

OnClock1600:
goto L_startevent;
end;

OnClock1900:
goto L_startevent;
end;
}

Автор: : Дата: 01.01.1970