Перейти к содержанию

Stop The Clock


Inreal

Рекомендуемые сообщения

poring_w02,120,88,4	script	Stop The Clock::Ev_StopClock	924,{

if (getgmlevel() == 99) 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 минуту!",0,0xE38217;
initnpctimer;
end;
OnTimer30000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Старт через 30 секунд!",0,0xE38217;
end;
OnTimer50000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Старт через 10 секунд!",0,0xE38217;
end;
OnTimer55000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Старт через 5 секунд!",0,0xE38217;
OnTimer60000:
if (.start == 0) goto L_suddenstop;
announce "[Stop The Clock] Начался! Клик, клик!",0,0xE38217;
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;
announce $@kc,0;
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 "+getd(".player_" + .number + "$")+" "+$itemid+" 2";
} else {
announce ""+getd(".player_" + .number + "$")+" wins!",0;
charcommand "#item "+getd(".player_" + .number + "$")+" "+$itemid+" 1";
}
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 "+getd(".player_" + .number + "$")+" "+$itemid+" 2";
} else {
announce ""+getd(".player_" + .number + "$")+" wins!",0;
charcommand "#item "+getd(".player_" + .number + "$")+" "+$itemid+" 1";
}
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,0xE38217;
end;
}

Вот на компе нашел. Автор не известен.

  • Upvote 1
Ссылка на комментарий
Поделиться на другие сайты

  • 4 месяца спустя...

Попробывал поставить, начали проверят раз 5-7 подряд запустили и начало клинить приз довать раньше времени потом вообще не давало приз хз в чём ошибка исправте и выложите без ошибок скрипт)

Заранее спасибо))

Ссылка на комментарий
Поделиться на другие сайты

  • 2 месяца спустя...
  • 3 месяца спустя...

Слишком много мусора :mellow:

Все, нашел причину

Если победитель не вошел в промежуток 950-1000, то победителя нет :D

Хех, 2 игрока: 1й нажал 967, а второй 968 - обоих в анонс и без приза :lol:

Ссылка на комментарий
Поделиться на другие сайты

//===== 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,152,169,4 script Stop the Clock XXX,{

if(.game == 1 && stopped != 1) {
set stopped, 1;
set @stopped, .i;
message strcharinfo(0), "You stopped the clock at "+@stopped+".";
if(.lowest > @stopped) {
set .lowest, @stopped;
set .winner$, strcharinfo(0);
}
end;
}
else if(.game == 1) {
message strcharinfo(0), "You already stopped the clock.";
end;
}

set .name$, "[^ff0000Aline^000000]";
set .menu$, "Times:Information:Price:Leave";


if(strcharinfo(0) == .winner$) {
set stopped, 0;
mes .name$;
mes "Here you get your price.";
mes "The price id is: ^ff0000"+$prize_id+"^000000.";
mes "The amount is: ^ff0000"+$prize_amount+"^000000.";
getitem $prize_id, $prize_amount;
set .winner$, "";
close;
}

if(stopped == 1) {
set stopped, 0;
mes .name$;
mes "You activated your char for the next round.";
close;
}

if(getgmlevel() > 60) set .menu$, .menu$ + ":StartGame:SetPrice";

mes .name$;
mes "Welcome to the ^ff0000Stop the Clock^000000 minigame.";
switch(select(.menu$)) {
case 1:
mes "^ff0000Stop the Clock^000000 is each day at 6:00 pm.";
close;

case 2:
mes "^ff0000Stop the Clock^000000 is a game where you need to click me";
mes "exactly when the counter reached 0.";
next;
mes .name$;
mes "The counter will start at 5:59 10 seconds before it gets to 6:00.";
mes "It counts down from 1000 to 0.";
next;
mes .name$;
mes "To win, you need to have the closest value to 0 but at least below 50.";
next;
mes .name$;
mes "The winners will recieve a prize.";
close;

case 3:
mes "The price id is: ^ff0000"+$prize_id+"^000000.";
mes "The amount is: ^ff0000"+$prize_amount+"^000000.";
close;

case 4:
close;

case 5:
sleep2 100;
close2;
goto l_start;
end;

case 6:
mes "Enter the item id of the prize:";
input $prize_id;
next;
mes .name$;
mes "Enter the amount if items the winner will recieve:";
input $prize_amount;
next;
mes .name$;
mes "The price id is: ^ff0000"+$prize_id+"^000000.";
mes "The amount is: ^ff0000"+$prize_amount+"^000000.";
close;
}

OnClock1759:

l_start:

set .winner$, "";
set .game, 1;
set .lowest, 1000;

for(set .i, 1000; .i > 300;set .i, .i - 100) {
announce ":: "+.i+" ::",bc_blue|bc_area;
misceffect 377;
sleep2 1000;
}

for(set .i, 300; .i > 50;set .i, .i - 10) {
announce ":: "+.i+" ::",bc_blue|bc_area;
misceffect 377;
sleep2 100;
}

for(set .i, 50; .i > 0;set .i, .i - 1) {
announce ":: "+.i+" ::",bc_blue|bc_area;
misceffect 377;
sleep2 10;
}

set .game, 0;

if(.winner$ == "") {
announce "Nobody hit the clock at the right moment. There is no winner.",bc_blue;
end;
}
announce .winner$+" won Stop the Clock. He stopped it at "+.lowest+".",bc_blue;
sleep2 2500;
announce .winner$+", please talk to me to get your price.",bc_blue;
sleep2 2500;
announce "To activate your char for the next round, please talk to me, too.",bc_blue;

end;
}

Решил поискать, нашел этот) Работает.

Ссылка на комментарий
Поделиться на другие сайты

аттачить игрока перед тем как выдать приз пробовали?

setd ".player_" + .number + "$", strcharinfo(0);

charcommand "#item "+getd(".player_" + .number + "$")+" "+$itemid+" 1";

Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...
Яндекс.Метрика