PDA

Просмотр полной версии : l2packethuck ошибка с SendMsg(msg:string);


Br1tva
26.07.2009, 00:39
Вот тут скрипт на заточку надыбал изменил под себя ( играю на серве Vlineage.ru) но вот в выводом соббщения проблема SendMsg(msg:string); - это как нить по другому можно написать?? Вот сам скрипт ...

var
x,i,OID,ItemID,ItemID1,ItemCount,ScrollID,j,k,l,m, temp1,temp2,ItemIDToEncant,MaxEnchant,
ItemOIDToEncant,ItemIDToEncant1,n,f,EnchantLevel,o :Integer;
z,Load,temp:word;
Scrolls:Array[0..299,0..1] of Integer;
procedure Init; //Aucuaaaony i?e aee??aiee ne?eioa
begin
ItemIDToEncant:=6379;
ScrollID:=960;
//6577-EWS
//6578-EAS
MaxEnchant:=180;
j:=0;
k:=0;
n:=0;
end;
procedure SendMsg(msg:string); <---------- :confused:
begin
buf:=#$4A;
WriteD(0);
WriteD(10);
WriteS('');
WriteS(msg);
SendToClient;
end;
Procedure Enchant(ScrolOID1,ItemOID1:Integer);
begin
buf:=#$14;
WriteD(ScrolOID1);
WriteD(0);
SendToServer;
delay(500);
buf:=#$58;
WriteD(ItemOID1);
SendToServer;
delay(30);
end;
begin
//Aey caionea ne?eioa nea?eoa "a" aac eaau?ae ia aiaeeeneie ?aneeaaea a iaoe-?ao
if FromClient and (pck=#$38#$31#$00#$00#$00#$03#$00#$00#$00) then
begin
SendMsg('I?ioann caoi?ee ia?aeny! Yoi ii?ao caiyou io ianeieueeo naeoia, ai 2-3 ieioo. Ii?aeoenoa, iiai?aeoa!');
SendMsg('A yoi a?aiy ii?ao caia?aouny caaenaiea eeeaioa, yoi ii?iaeuii.');
buf:=#$0F;
SendToServer;
n:=1;
o:=1;
end;
if FromServer and (pck[1]=#$1B) and (o=1) then
begin
i:=4;
l:=0;
o:=0;
Load:=ReadH(i);
For x:=1 to Load do
begin
temp:=ReadH(i);
OID:=ReadD(i);
ItemID:=ReadD(i);
ItemCount:=ReadD(i);
if ItemID=ScrollID then
begin
Scrolls[l,0]:=ItemID;
Scrolls[l,1]:=OID;
l:=l+1;
end;
if ItemID=ItemIDToEncant then
begin
ItemOIDToEncant:=OID;
ItemIDToEncant1:=ItemID;
end;
i:=i+22;
end;
buf:=#$14;
WriteD(ItemOIDToEncant);
WriteD(0);
SendToServer;
end;
if FromServer and (pck[1]=#$27) and (n=1) then
begin
f:=12;
ItemID1:=ReadD(f);
temp:=ReadH(f);
temp:=ReadH(f);
temp:=ReadH(f);
temp:=ReadH(f);
temp:=ReadH(f);
temp1:=ReadD(f);
EnchantLevel:=ReadH(f);
if (ItemID1=ItemIDToEncant1) and (EnchantLevel<MaxEnchant) then
begin
n:=0;
For m:=0 to 299 do
begin
temp1:=Scrolls[m,0]; //ItemID
temp2:=Scrolls[m,1]; //OID
if temp1 <> 0 then
begin
Enchant(temp2,ItemOIDToEncant);
end;
end;
end;
end;

end.

TAMBIK
26.07.2009, 01:35
procedure SendMsg2(msg:string);