Тема: Script help
Показать сообщение отдельно
Старый 06.01.2009, 20:21   #3
Новичок
 
Регистрация: 06.01.2009
Сообщений: 3
Сказал Спасибо: 1
Имеет 0 спасибок в 0 сообщенях
sobapi пока неопределено
По умолчанию

Oh man, i owe you big time! It worked as a charm. Claps for you.

Now, and this is just for me to educate, i don't know why, but i had to change some tiny things. Maybe is my version of phx (3.1.8):

In green bolded the things i had to add:

delphi Код:
var BS:boolean;//----> i had to change bolean to boolean procedure INIT; begin bs:=false;//default - block charinfo is false; end; begin if (fromclient) and (pck=Hstr('38 2D 00 69 00 6E 00 73 00 69 00 64 00 65 00 00 00 00 00 00 00')) then bs:=true;//-----> I had to type that second close bracket. if (fromclient) and (pck=Hstr('38 2D 00 6F 00 75 00 74 00 73 00 69 00 64 00 65 00 00 00 00 00 00 00')) then bs:=false;//-----> I had to type that second close bracket. if (FromServer) and (bs) and (pck[1]=#$03) then  begin//------> i had to add that begin sentence.                             pck:='';                             end; end.

Let me break this down, and see if i understood:

You used that Boolean sentence as a on/off switch. You turn it on with the first package (-inside) and you turn it off with the second one (-outside).

And then you use that switch in the "if" to start the script.


Thanks you again man. I'm learning slow, but i'll get there
sobapi вне форума   Ответить с цитированием