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

Подскажите где у меня ошибка.


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

Проблема заключается в то что не включается таймер. Соответственно повторно не не появляется диалог.

Буду рад если объясните, что у меня не так.

prontera,173,184,3 script Gold 868,{

mes "[Gold]";

mes "Хотите попасть в Gold Zona?";

next;

switch(select("Да:Нет"))

{

case 1:

callfunc "BOTS";

close;

case 2:

mes "[Gold]";

mes "Всего Хорошего!";

close;

}

OnInit:

waitingroom "Gold Zona",0;

end;

}

function script BOTS {

OnAntibot:

warp "yuno_fild08",0,0;

sleep2 2000;

pcblockmove getcharid(0),1;

set @chislo,rand(100,10000);

mes "[АнтиБОТ]";

initnpctimer "ONTIM341ERBOT"; ПОдскажи че нада поставить вместо initnpctimer/

mes "Введите число:";

mes "^66CC99"+@chislo+"^000000";

input @otv;

if(@otv==@chislo)

{

warp "yuno_fild08",0,0;

pcblockmove getcharid(0),0;

initnpctimer "ONTIM31ERBOT"; - ПОдскажи че нада поставить вместо initnpctimer/

set nepravilno,nepravilno-3;

close;

}

sleep2 1000;

mes "Не правильно!";

set nepravilno,nepravilno+1;

if(nepravilno < 4) goto OnAntibot;

if(nepravilno == 4)

atcommand "@jail "+strcharinfo(0);

end;

}

- script ONTIM341ERBOT -1,{

if(strcharinfo(3)=="yuno_fild08")

OnTimer120000:

atcommand "@jail "+strcharinfo(0);

stopnpctimer

end;

}

- script ONTIM31ERBOT -1,{

if(strcharinfo(3)=="yuno_fild08")

OnTimer1200000:

callfunc "BOTS";

stopnpctimer

end;

}

А вот что пишет эмуль:

750db8dfaa8b.jpg

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

Помимо кучи других ошибок и опечаток - у тебя не приаттачен персонаж никакой к скрипту. Грубо говоря - ни на кого скрипт не воздействует. Обычно скрипт запускается при клике на нпц, а здесь по таймеру, следовательно нужно приаттачить его ручками

* attachrid <RID>;

* detachrid;

A 'RID' is an ID of a character who caused the NPC script to run, as has been

explained above in the introduction section. Quite a bit of commands want a RID

to work, since they wouldn't know where to send information otherwise. And in

quite a few cases the script gets invoked with a RID of zero (like through

OnTime special labels). If an NPC script needs this, it can attach a specified

character's id to itself. by calling the 'attachrid' function.

'attachrid' returns 1 if the character was found online and 0 if it wasn't.

This could also be used, while running in a script invoked by a character

through talking to an NPC, to mess with other characters.

Detaching the RID will make the RID of the script zero.

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

callfunc("BOTS",getcharinfo(3));

ну и в функции уже вызываешь аргумент

attachrid(getarg(0));

Что-то типа такого.

callfunc "BOTS",strcharinfo(3);

почитай доки по аттачу и стрчаринфо

*strcharinfo(<type>)

This function will return either the name, party name or guild name for the
invoking character. Whatever it returns is determined by type.

0 - Character's name.
1 - The name of the party they're in if any.
2 - The name of the guild they're in if any.
3 - The name of the map the character is in.

*attachrid(<account ID>)

я настаиваю на getcharid(3)

*getcharid(<type>{,"<character name>"})

This function will return a unique ID number of the invoking character, or, if a
character name is specified, of that character.

Type is the kind of associated ID number required:

0 - Character ID number.
1 - Party ID number.
2 - Guild ID number.
3 - Account ID number.
4 - Battle ground ID

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

Инкубус прав х) Стрчаринфо возвращает строку, да там и намека на ID Нет х)

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

А кому оно надо? Пиши сам, спрашивай если что не понимаешь... Документация есть, ватага более-менее адекватных одминов есть, главное не спрашивай откровенную х@#ню, думай головой (:

А вместо тебя просто так здесь вряд ли кто-то что-то делать будет. Разве что кто-нибудь, кто учится-разбирается и ему в качестве самообразования х)

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

Так вот попробуй что ли

prontera,173,184,3	script	Gold	868,{
mes "[Gold]";
mes "Хотите попасть в Gold Zona?";
next;
switch(select("Да:Нет"))
{
case 1:
callfunc "BOTS";
close;

case 2:
mes "[Gold]";
mes "Всего Хорошего!";
close;

}
OnInit:
waitingroom "Gold Zona",0;
end;
}



function script BOTS {
OnAntibot:
warp "yuno_fild08",0,0;
sleep2 2000;
initnpctimer "ONTIM341ERBOT";
sleep2 1000;
pcblockmove getcharid(0),1;
set @chislo,rand(100,10000);
mes "[АнтиБОТ]";
mes "Введите число:";
mes "^66CC99"+@chislo+"^000000";
input @otv;
if(@otv==@chislo)
{
warp "yuno_fild08",0,0;
pcblockmove getcharid(0),0;
set @nnn,0;
close;
}

sleep2 1000;
mes "Не правильно!";
set @nnn+1;
if(@nnn < 4) goto OnAntibot;
if(@nnn == 4)
{
set @nnn,0;
atcommand "@jail "+strcharinfo(0);
}
end;

}


- script ONTIM341ERBOT -1,{
OnTimer120000:
if(strcharinfo(3)=="yuno_fild08")
{
atcommand "@jail "+strcharinfo(0);
stopnpctimer;
end;
}
end;
}

- script ONTIM31ERBOT -1,{
OnTimer1200000:
if(strcharinfo(3)=="yuno_fild08")
{
callfunc "BOTS";
stopnpctimer;
end;
}
end;
}

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

Так вот попробуй что ли

prontera,173,184,3	script	Gold	868,{
mes "[Gold]";
mes "Хотите попасть в Gold Zona?";
next;
switch(select("Да:Нет"))
{
case 1:
callfunc "BOTS";
close;

case 2:
mes "[Gold]";
mes "Всего Хорошего!";
close;

}
OnInit:
waitingroom "Gold Zona",0;
end;
}



function script BOTS {
OnAntibot:
warp "yuno_fild08",0,0;
sleep2 2000;
initnpctimer "ONTIM341ERBOT";
sleep2 1000;
pcblockmove getcharid(0),1;
set @chislo,rand(100,10000);
mes "[АнтиБОТ]";
mes "Введите число:";
mes "^66CC99"+@chislo+"^000000";
input @otv;
if(@otv==@chislo)
{
warp "yuno_fild08",0,0;
pcblockmove getcharid(0),0;
set @nnn,0;
close;
}

sleep2 1000;
mes "Не правильно!";
set @nnn+1;
if(@nnn < 4) goto OnAntibot;
if(@nnn == 4)
{
set @nnn,0;
atcommand "@jail "+strcharinfo(0);
}
end;

}


- script ONTIM341ERBOT -1,{
OnTimer120000:
if(strcharinfo(3)=="yuno_fild08")
{
atcommand "@jail "+strcharinfo(0);
stopnpctimer;
end;
}
end;
}

- script ONTIM31ERBOT -1,{
OnTimer1200000:
if(strcharinfo(3)=="yuno_fild08")
{
callfunc "BOTS";
stopnpctimer;
end;
}
end;
}

Последний кусок не будет работать

- script ONTIM31ERBOT -1,{

OnTimer1200000:

if(strcharinfo(3)=="yuno_fild08")

{

callfunc "BOTS";

stopnpctimer;

end;

}

end;

}

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

attachrid - как раз таки передает скрипту ID персонажа, с которым он будет работать. Диалог mes например без ID не вылезет никому. И так далее.

Используется так:

attachrid $char_id;

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

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