Назад

Доска объявлений

Автор: MiRoTVoReZ: Дата: 06.11.2008

Доска объявлений: показывает скольно человек онлайн, а также на ней все игроки могу оставлять свои объявления о купле\продаже\обмене.

prontera.gat,145,161,6    script    Доска объявлений    857,{

set @time_wait,10;
set @waittimer,600000;
set @info_money,1500;
set $@npcnames$,"[^0000ffДоска объявлений^000000]";
mes $@npcnames$;
mes "Добро пожаловать " + strcharinfo(0) + "!";
mes "----------------------";
mes "Сейчас [^0000FF " + getusers(1) + "^000000 ] игроков онлайн.";
mes "----------------------";
mes "Что я могу для вас сделать?";
next;
menu "Читать сообщения",G_Readnews,"Написать сообщение",G_Leavenews,"Уйти...",G_Quit;


G_Readnews:
mes $@npcnames$;
mes "Подобные сообщения будут очищены в ^135445 06:00 ^000000 каждый день...";
mes "Пожалуйста, выберите тип сообщений, которые нужно прочитать.";
next;
menu "Читать сообщения о продаже",G_Read_Sell,"Читать сообщения о покупке",G_Read_Buy,"Читать другие сообщения",G_Read_Other,"Уйти...",G_Quit;
G_Read_Sell:
if($Sell_info_count<1) goto G_Nonews;
set @Sell_info_count1,$Sell_info_count;
set @Sell_temp1,$Sell_temp;
set @Sell_name_temp1,$Sell_name_temp;
set @Sell_time_temp1,$Sell_time_temp;
mes $@npcnames$;
mes "Сейчас ^135445"+$Sell_info_count+"^000000 новых сообщений.";


G_retype_sell:
mes "^0066FF"+$Sell_times$[@Sell_time_temp1]+"^000000 [^AA00FF"+$Sell_names$[@Sell_name_temp1]+"^000000]:";
mes "^AA0000"+$Sell_infos$[@Sell_temp1]+"^000000";
mes "^CCCCCC----------^000000";
set @Sell_time_temp1,@Sell_time_temp1-1;
set @Sell_name_temp1,@Sell_name_temp1-1;
set @Sell_temp1,@Sell_temp1-1;
set @Sell_info_count1,@Sell_info_count1-1;
if(@Sell_info_count1>0) goto G_retype_sell;
goto G_Quit;

G_Read_Buy:
if($Buy_info_count<1) goto G_Nonews;
set @Buy_info_count1,$Buy_info_count;
set @Buy_temp1,$Buy_temp;
set @Buy_name_temp1,$Buy_name_temp;
set @Buy_time_temp1,$Buy_time_temp;
mes $@npcnames$;
mes "Сейчас ^135445"+$Buy_info_count+"^000000 новых сообщений.";


G_retype_Buy:
mes "^0066FF"+$Buy_times$[@Buy_time_temp1]+"^000000 [^AA00FF"+$Buy_names$[@Buy_name_temp1]+"^000000]:";
mes "^AA0000"+$Buy_infos$[@Buy_temp1]+"^000000";
mes "^CCCCCC----------^000000";
set @Buy_time_temp1,@Buy_time_temp1-1;
set @Buy_name_temp1,@Buy_name_temp1-1;
set @Buy_temp1,@Buy_temp1-1;
set @Buy_info_count1,@Buy_info_count1-1;
if(@Buy_info_count1>0) goto G_retype_Buy;
goto G_Quit;

G_Read_Other:
if($Other_info_count<1) goto G_Nonews;
set @Other_info_count1,$Other_info_count;
set @Other_temp1,$Other_temp;
set @Other_name_temp1,$Other_name_temp;
set @Other_time_temp1,$Other_time_temp;
mes $@npcnames$;
mes "Сейчас ^135445"+$Other_info_count+"^000000 новых сообщений.";


G_retype_Other:
mes "^0066FF"+$Other_times$[@Other_time_temp1]+"^000000 [^AA00FF"+$Other_names$[@Other_name_temp1]+"^000000]:";
mes "^AA0000"+$Other_infos$[@Other_temp1]+"^000000";
mes "^CCCCCC----------^000000";
set @Other_time_temp1,@Other_time_temp1-1;
set @Other_name_temp1,@Other_name_temp1-1;
set @Other_temp1,@Other_temp1-1;
set @Other_info_count1,@Other_info_count1-1;
if(@Other_info_count1>0) goto G_retype_Other;
goto G_Quit;


G_Leavenews:
mes $@npcnames$;
mes "Пожалуйста выберите тип сообщения,в которые нужно написать.";
next;
menu "Сообщения о продаже",G_Leave_Sell,"Сообщения о покупке",G_Leave_Buy,"Остальные сообщения",G_Leave_Other,"Уйти...",G_Quit;
G_Leave_Sell:
if(@WaitingTime_Sell==1) goto G_Waiting;
if($Sell_info_count>29) goto G_Fullnews;
if(zeny<@info_money) goto G_notmoney;
mes $@npcnames$;
mes "Вы можете оставить сообщение. В следующий раз вы можете оставить сообщение через ^135445"+@time_wait+"^000000 минут..";
mes "Данная услуга будет стоить ^135445"+@info_money+"^000000 Zeny.";
next;
input @Sell_info_text$;
mes @Sell_info_text$;
set zeny,zeny-@info_money;


set $Sell_temp,$Sell_temp+1;
set $Sell_info_count,$Sell_temp;
set $Sell_infos$[$Sell_temp],@Sell_info_text$;


set @Sell_name$,strcharinfo(0);
set $Sell_name_temp,$Sell_name_temp+1;
set $Sell_names$[$Sell_name_temp],@Sell_name$;


set @Sell_time$,gettimestr("%m/%d/%H:%M",24);
set $Sell_time_temp,$Sell_time_temp+1;
set $Sell_times$[$Sell_time_temp],@Sell_time$;

set @WaitingTime_Sell,1;
//addtimer @waittimer,"ev_Waiting_Sell";
next;
mes $@npcnames$;
mes "Сообщение успешно добавлено!";
goto G_Quit;

G_Leave_Buy:
if(@WaitingTime_Buy==1) goto G_Waiting;
if($Buy_info_count>29) goto G_Fullnews;
if(zeny<@info_money) goto G_notmoney;
mes $@npcnames$;
mes "Вы можете оставить сообщение. В следующий раз вы можете оставить сообщение через  ^135445"+@time_wait+"^000000 минут..";
mes "Данная услуга будет стоить ^135445"+@info_money+"^000000 Zeny.";
next;
input @Buy_info_text$;
mes @Buy_info_text$;
set zeny,zeny-@info_money;


set $Buy_temp,$Buy_temp+1;
set $Buy_info_count,$Buy_temp;
set $Buy_infos$[$Buy_temp],@Buy_info_text$;


set @Buy_name$,strcharinfo(0);
set $Buy_name_temp,$Buy_name_temp+1;
set $Buy_names$[$Buy_name_temp],@Buy_name$;


set @Buy_time$,gettimestr("%m/%d/%H:%M?",24);
set $Buy_time_temp,$Sell_time_temp+1;
set $Buy_times$[$Buy_time_temp],@Buy_time$;

set @WaitingTime_Buy,1;
//addtimer @waittimer,"ev_Waiting_Buy";
next;
mes $@npcnames$;
mes "Сообщение успешно добавлено!";
goto G_Quit;

G_Leave_Other:
if(@WaitingTime_Other==1) goto G_Waiting;
if($Other_info_count>29) goto G_Fullnews;
if(zeny<@info_money) goto G_notmoney;
mes $@npcnames$;
mes "Вы можете оставить сообщение. В следующий раз вы можете оставить сообщение через  ^135445"+@time_wait+"^000000 минут..";
mes "Данная услуга будет стоить ^135445"+@info_money+"^000000 Zeny.";
next;
input @Other_info_text$;
mes @Other_info_text$;
set zeny,zeny-@info_money;


set $Other_temp,$Other_temp+1;
set $Other_info_count,$Other_temp;
set $Other_infos$[$Other_temp],@Other_info_text$;

set @Other_name$,strcharinfo(0);
set $Other_name_temp,$Other_name_temp+1;
set $Other_names$[$Other_name_temp],@Other_name$;

set @Other_time$,gettimestr("%m/%d/%H:%M",24);
set $Other_time_temp,$Sell_time_temp+1;
set $Other_times$[$Other_time_temp],@Other_time$;

set @WaitingTime_Other,1;
//addtimer @waittimer,"ev_Waiting_Other";
next;
mes $@npcnames$;
mes "Сообщение успешно добавлено!";
goto G_Quit;


G_notmoney:
mes $@npcnames$;
mes "Извините ... Услуга стоит ^135445"+@info_money+"^000000 Zeny";
mes "У вас нету столько денег";
goto G_Quit;


G_Fullnews:
mes $@npcnames$;
mes "Извините ... В почтовом ящике заполнен сообщениями ...";
mes "Вы не можете оставлять сообщения...";
goto G_Quit;


G_Waiting:
mes $@npcnames$;
mes "Вы оставили последнее сообщение.";
mes "пожалуйста подождите ^135445"+@time_wait+"^000000 минут до следующего сообщения.";
goto G_Quit;


G_Nonews:
mes $@npcnames$;
mes "Извините. Нет сообщений.";
mes "Хотите ли Вы оставить одно?";
next;
menu "Нет спасибо...",-,"Да, любыми средствами ...",G_Leavenews;
goto G_Quit;


G_Quit:
OnTimer600000:
set @WaitingTime_Sell,0;
setnpctimer 0;
close;
}


prontera.gat,158,187,4    script    ev_Waiting_Sell    -1,{
set @WaitingTime_Sell,0;
deltimer "ev_Waiting_Sell";
}

prontera.gat,158,187,4    script    ev_Waiting_Buy    -1,{
set @WaitingTime_Buy,0;
deltimer "ev_Waiting_Buy";
}
prontera.gat,158,187,4    script    ev_Waiting_Other    -1,{
set @WaitingTime_Other,0;
deltimer "ev_Waiting_Other";
}

prontera.gat,158,187,4    script    ev_Clearnews    -1,{
OnClock0600:
set $Sell_temp,0;
set $Sell_info_count,0;
set $Sell_name_temp,0;
set $Sell_time_temp,0;

set $Buy_temp,0;
set $Buy_info_count,0;
set $Buy_name_temp,0;
set $Buy_time_temp,0;

set $Other_temp,0;
set $Other_info_count,0;
set $Other_name_temp,0;
set $Other_time_temp,0;
Announce "[Доска объявлений] Все сообщения были удалены с доски объявлений ",8;
}


Скрипт by Freem

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