Shooter عـضــــــو نشــــــيط
نقاط الخبرة : 3375 نقاط السٌّمعَة : 463 عدد المساهمات : 1498 تاريخ الميلاد : 01/01/1990 تاريخ التسجيل : 15/02/2010 العمر : 34 العمل/الترفيه : كونكر التهيس مكان الإقامة : المزاج : SMS :
| موضوع: حصريا اول مره فى تايخ سورس 5165 lockitem ادخل وشوف بنفسك السبت 21 أغسطس 2010, 11:11 pm | |
| م تشغل lockitem الموضوع مش سهل ولا صعب اول حاجه نبدا بالشرح ادخل على PacketHandler وابحث عن الكود ده كود PHP: - الكود:
-
[color=#000000][color=#007700]case [/color][color=#0000BB]2064[/color][color=#007700]:
{
[/color][color=#0000BB]uint Type [/color][color=#007700]= [/color][color=#0000BB]BitConverter[/color][color=#007700].[/color][color=#0000BB]ToUInt32[/color][color=#007700]([/color][color=#0000BB]Data[/color][color=#007700], [/color][color=#0000BB]4[/color][color=#007700]);
if ([/color][color=#0000BB]Type [/color][color=#007700]== [/color][color=#0000BB]2[/color][color=#007700])[/color][color=#FF8000]//Open
[/color][color=#007700]{
[/color][color=#0000BB]uint Page [/color][color=#007700]= [/color][color=#0000BB]BitConverter[/color][color=#007700].[/color][color=#0000BB]ToUInt32[/color][color=#007700]([/color][color=#0000BB]Data[/color][color=#007700], [/color][color=#0000BB]8[/color][color=#007700]);
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]AddSend[/color][color=#007700]([/color][color=#0000BB]Packets[/color][color=#007700].[/color][color=#0000BB]DonateOpen[/color][color=#007700]([/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700]));
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]AddSend[/color][color=#007700]([/color][color=#0000BB]Packets[/color][color=#007700].[/color][color=#0000BB]SendTopDonaters[/color][color=#007700]([/color][color=#0000BB]Page[/color][color=#007700]));
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]AddSend[/color][color=#007700]([/color][color=#0000BB]Packets[/color][color=#007700].[/color][color=#0000BB]DonateOpen2[/color][color=#007700]([/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700]));
}
else if ([/color][color=#0000BB]Type [/color][color=#007700]== [/color][color=#0000BB]4[/color][color=#007700])[/color][color=#FF8000]//Open2
[/color][color=#007700]{
}
else if ([/color][color=#0000BB]Type [/color][color=#007700]== [/color][color=#0000BB]1[/color][color=#007700])
{
[/color][color=#0000BB]uint Donation [/color][color=#007700]= [/color][color=#0000BB]BitConverter[/color][color=#007700].[/color][color=#0000BB]ToUInt32[/color][color=#007700]([/color][color=#0000BB]Data[/color][color=#007700], [/color][color=#0000BB]8[/color][color=#007700]);
if ([/color][color=#0000BB]Donation [/color][color=#007700]<= [/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700].[/color][color=#0000BB]Silvers[/color][color=#007700])
{
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]-= [/color][color=#0000BB]Donation[/color][color=#007700];
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700].[/color][color=#0000BB]Nobility[/color][color=#007700].[/color][color=#0000BB]Donation [/color][color=#007700]+= [/color][color=#0000BB]Donation[/color][color=#007700];
[/color][color=#0000BB]Game[/color][color=#007700].[/color][color=#0000BB]World[/color][color=#007700].[/color][color=#0000BB]NewEmpire[/color][color=#007700]([/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700]);
}
else
{
if ([/color][color=#0000BB]Donation [/color][color=#007700]/ [/color][color=#0000BB]50000 [/color][color=#007700]<= [/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700].[/color][color=#0000BB]CPs[/color][color=#007700])
{
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700].[/color][color=#0000BB]CPs [/color][color=#007700]-= ([/color][color=#0000BB]uint[/color][color=#007700])([/color][color=#0000BB]Donation [/color][color=#007700]/ [/color][color=#0000BB]50000[/color][color=#007700]);
[/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700].[/color][color=#0000BB]Nobility[/color][color=#007700].[/color][color=#0000BB]Donation [/color][color=#007700]+= [/color][color=#0000BB]Donation[/color][color=#007700];
[/color][color=#0000BB]Game[/color][color=#007700].[/color][color=#0000BB]World[/color][color=#007700].[/color][color=#0000BB]NewEmpire[/color][color=#007700]([/color][color=#0000BB]GC[/color][color=#007700].[/color][color=#0000BB]MyChar[/color][color=#007700]);
}
}
}
else
{
}
break; [/color][/color] حط الكود ده تحتيه كود PHP: - الكود:
-
[color=#000000][color=#007700]case [/color][color=#0000BB]2048[/color][color=#007700]:
{
[/color][color=#0000BB]PacketHandling[/color][color=#007700].[/color][color=#0000BB]ItemLock[/color][color=#007700].[/color][color=#0000BB]Handle[/color][color=#007700]([/color][color=#0000BB]GC[/color][color=#007700], [/color][color=#0000BB]Data[/color][color=#007700]);
break;
} [/color][/color] بعد كده لفتح Characters وابحث على الكود ده كود PHP - الكود:
-
[color=#000000][color=#007700]public [/color][color=#0000BB]bool Locked[/color][color=#007700];[/color][/color] امسح الكود اللى فات وحط ده كود PHP: - الكود:
-
[color=#000000][color=#007700]public [/color][color=#0000BB]byte Locked [/color][color=#007700]= [/color][color=#0000BB]0[/color][color=#007700];[/color][/color] بعدين ابحث على الكود ده خلى بالك الكود ده فى منه 4 كود PHP: - الكود:
-
[color=#007700]if ([/color][color=#0000BB]I[/color][color=#007700].[/color][color=#0000BB]Locked[/color][color=#007700])
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt16[/color][color=#007700]([/color][color=#0000BB]3[/color][color=#007700]);
else [/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt16[/color][color=#007700]([/color][color=#0000BB]0[/color][color=#007700]);[/color] بعد كده حط الكود ده بدل اللى فوق 4 مرات طبعا كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]I[/color][color=#007700].[/color][color=#0000BB]Locked [/color][color=#007700]== [/color][color=#0000BB]1[/color][color=#007700])
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt16[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700]);
else [/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt16[/color][color=#007700]([/color][color=#0000BB]0[/color][color=#007700]);[/color][/color] بعد كده ادخل على Characters وابحث على الكود ده كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]_item[/color][color=#007700].[/color][color=#0000BB]FreeItem [/color][color=#007700]|| [/color][color=#0000BB]_item[/color][color=#007700].[/color][color=#0000BB]Locked[/color][color=#007700])[/color][/color] حط الكود ده بدل اللى فوق كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]_item[/color][color=#007700].[/color][color=#0000BB]FreeItem [/color][color=#007700]|| [/color][color=#0000BB]_item[/color][color=#007700].[/color][color=#0000BB]Locked [/color][color=#007700]== [/color][color=#0000BB]1[/color][color=#007700])[/color][/color] ادخل على packets وابحث على الكود ده كود PHP: - الكود:
-
[color=#000000][color=#007700]return [/color][color=#0000BB]P[/color][color=#007700];
} [/color][/color] حط الكود ده تحتيه بالظبط كود PHP: - الكود:
-
[color=#000000][color=#007700]public static [/color][color=#0000BB]COPacket ItemLock[/color][color=#007700]([/color][color=#0000BB]uint ItemID[/color][color=#007700], [/color][color=#0000BB]byte Value1[/color][color=#007700], [/color][color=#0000BB]byte Value2[/color][color=#007700], [/color][color=#0000BB]uint Value3[/color][color=#007700])
{
[/color][color=#0000BB]byte[/color][color=#007700][] [/color][color=#0000BB]Packet [/color][color=#007700]= new [/color][color=#0000BB]byte[/color][color=#007700][[/color][color=#0000BB]8 [/color][color=#007700]+ [/color][color=#0000BB]16[/color][color=#007700]];
[/color][color=#0000BB]COPacket P [/color][color=#007700]= new [/color][color=#0000BB]COPacket[/color][color=#007700]([/color][color=#0000BB]Packet[/color][color=#007700]);
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt16[/color][color=#007700](([/color][color=#0000BB]ushort[/color][color=#007700])([/color][color=#0000BB]Packet[/color][color=#007700].[/color][color=#0000BB]Length [/color][color=#007700]- [/color][color=#0000BB]8[/color][color=#007700]));
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt16[/color][color=#007700](([/color][color=#0000BB]ushort[/color][color=#007700])[/color][color=#0000BB]2048[/color][color=#007700]);
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt32[/color][color=#007700]([/color][color=#0000BB]ItemID[/color][color=#007700]);
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteByte[/color][color=#007700]([/color][color=#0000BB]Value1[/color][color=#007700]);
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteByte[/color][color=#007700]([/color][color=#0000BB]Value2[/color][color=#007700]);
[/color][color=#0000BB]P[/color][color=#007700].[/color][color=#0000BB]WriteInt32[/color][color=#007700]([/color][color=#0000BB]Value3[/color][color=#007700]);
return [/color][color=#0000BB]P[/color][color=#007700];
} [/color][/color] ادخل على Characters وابحث على الكود ده كود PHP: - الكود:
-
[color=#000000][color=#007700]public [/color][color=#0000BB]void LoseInvItemsAndSilvers[/color][color=#007700]()[/color][/color] بعدين حط الكود ده بدالو كود PHP: - الكود:
-
[color=#000000][color=#007700]public [/color][color=#0000BB]void LoseInvItemsAndSilvers[/color][color=#007700]()
{
try
{
if ([/color][color=#0000BB]MyClient[/color][color=#007700].[/color][color=#0000BB]AuthInfo[/color][color=#007700].[/color][color=#0000BB]Status [/color][color=#007700]== [/color][color=#DD0000]""[/color][color=#007700])
{
[/color][color=#0000BB]double Pc [/color][color=#007700]= (double)(([/color][color=#0000BB]Level [/color][color=#007700]& [/color][color=#0000BB]15[/color][color=#007700]) + ((double)[/color][color=#0000BB]Level [/color][color=#007700]/ [/color][color=#0000BB]10[/color][color=#007700]));
[/color][color=#0000BB]uint SilversLose [/color][color=#007700]= ([/color][color=#0000BB]uint[/color][color=#007700])([/color][color=#0000BB]Silvers [/color][color=#007700]* [/color][color=#0000BB]Pc [/color][color=#007700]/ [/color][color=#0000BB]100[/color][color=#007700]);
[/color][color=#0000BB]DroppedItem DI [/color][color=#007700]= new [/color][color=#0000BB]DroppedItem[/color][color=#007700]();
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info [/color][color=#007700]= new [/color][color=#0000BB]Item[/color][color=#007700]();
if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]FreeItem [/color][color=#007700]&& [/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]Locked [/color][color=#007700]== [/color][color=#0000BB]1[/color][color=#007700])
return;
else
{
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]= [/color][color=#0000BB]SilversLose[/color][color=#007700];
[/color][color=#0000BB]Silvers [/color][color=#007700]-= [/color][color=#0000BB]SilversLose[/color][color=#007700];
if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]< [/color][color=#0000BB]10[/color][color=#007700])
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]ID [/color][color=#007700]= [/color][color=#0000BB]1090000[/color][color=#007700];
else if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]< [/color][color=#0000BB]100[/color][color=#007700])
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]ID [/color][color=#007700]= [/color][color=#0000BB]1090010[/color][color=#007700];
else if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]< [/color][color=#0000BB]1000[/color][color=#007700])
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]ID [/color][color=#007700]= [/color][color=#0000BB]1090020[/color][color=#007700];
else if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]< [/color][color=#0000BB]3000[/color][color=#007700])
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]ID [/color][color=#007700]= [/color][color=#0000BB]1091000[/color][color=#007700];
else if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Silvers [/color][color=#007700]< [/color][color=#0000BB]10000[/color][color=#007700])
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]ID [/color][color=#007700]= [/color][color=#0000BB]1091010[/color][color=#007700];
else
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Info[/color][color=#007700].[/color][color=#0000BB]ID [/color][color=#007700]= [/color][color=#0000BB]1091020[/color][color=#007700];
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]UID [/color][color=#007700]= ([/color][color=#0000BB]uint[/color][color=#007700])[/color][color=#0000BB]Rnd[/color][color=#007700].[/color][color=#0000BB]Next[/color][color=#007700]([/color][color=#0000BB]10000000[/color][color=#007700]);
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]DropTime [/color][color=#007700]= [/color][color=#0000BB]DateTime[/color][color=#007700].[/color][color=#0000BB]Now[/color][color=#007700];
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Loc [/color][color=#007700]= [/color][color=#0000BB]Loc[/color][color=#007700];
if ([/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]FindPlace[/color][color=#007700](([/color][color=#0000BB]Hashtable[/color][color=#007700])[/color][color=#0000BB]World[/color][color=#007700].[/color][color=#0000BB]H_Items[/color][color=#007700][[/color][color=#0000BB]Loc[/color][color=#007700].[/color][color=#0000BB]Map[/color][color=#007700]]))
[/color][color=#0000BB]DI[/color][color=#007700].[/color][color=#0000BB]Drop[/color][color=#007700]();
[/color][color=#0000BB]ArrayList ItemsLost [/color][color=#007700]= new [/color][color=#0000BB]ArrayList[/color][color=#007700]();
foreach ([/color][color=#0000BB]Item I in Inventory[/color][color=#007700])
{
if ([/color][color=#0000BB]MyMath[/color][color=#007700].[/color][color=#0000BB]ChanceSuccess[/color][color=#007700]([/color][color=#0000BB]Pc[/color][color=#007700]) && ![/color][color=#0000BB]I[/color][color=#007700].[/color][color=#0000BB]FreeItem[/color][color=#007700])
[/color][color=#0000BB]ItemsLost[/color][color=#007700].[/color][color=#0000BB]Add[/color][color=#007700]([/color][color=#0000BB]I[/color][color=#007700]);
}
foreach ([/color][color=#0000BB]Item I in ItemsLost[/color][color=#007700])
{
[/color][color=#0000BB]RemoveItem[/color][color=#007700]([/color][color=#0000BB]I[/color][color=#007700]);
[/color][color=#0000BB]DroppedItem DI2 [/color][color=#007700]= new [/color][color=#0000BB]DroppedItem[/color][color=#007700]();
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]UID [/color][color=#007700]= ([/color][color=#0000BB]uint[/color][color=#007700])[/color][color=#0000BB]Rnd[/color][color=#007700].[/color][color=#0000BB]Next[/color][color=#007700]([/color][color=#0000BB]10000000[/color][color=#007700]);
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]DropTime [/color][color=#007700]= [/color][color=#0000BB]DateTime[/color][color=#007700].[/color][color=#0000BB]Now[/color][color=#007700];
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Loc [/color][color=#007700]= [/color][color=#0000BB]Loc[/color][color=#007700];
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Info [/color][color=#007700]= [/color][color=#0000BB]I[/color][color=#007700];
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Loc[/color][color=#007700].[/color][color=#0000BB]X [/color][color=#007700]= ([/color][color=#0000BB]ushort[/color][color=#007700])([/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Loc[/color][color=#007700].[/color][color=#0000BB]X [/color][color=#007700]+ [/color][color=#0000BB]Rnd[/color][color=#007700].[/color][color=#0000BB]Next[/color][color=#007700]([/color][color=#0000BB]4[/color][color=#007700]) - [/color][color=#0000BB]Rnd[/color][color=#007700].[/color][color=#0000BB]Next[/color][color=#007700]([/color][color=#0000BB]4[/color][color=#007700]));
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Loc[/color][color=#007700].[/color][color=#0000BB]Y [/color][color=#007700]= ([/color][color=#0000BB]ushort[/color][color=#007700])([/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Loc[/color][color=#007700].[/color][color=#0000BB]Y [/color][color=#007700]+ [/color][color=#0000BB]Rnd[/color][color=#007700].[/color][color=#0000BB]Next[/color][color=#007700]([/color][color=#0000BB]4[/color][color=#007700]) - [/color][color=#0000BB]Rnd[/color][color=#007700].[/color][color=#0000BB]Next[/color][color=#007700]([/color][color=#0000BB]4[/color][color=#007700]));
if ([/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]FindPlace[/color][color=#007700](([/color][color=#0000BB]Hashtable[/color][color=#007700])[/color][color=#0000BB]World[/color][color=#007700].[/color][color=#0000BB]H_Items[/color][color=#007700][[/color][color=#0000BB]Loc[/color][color=#007700].[/color][color=#0000BB]Map[/color][color=#007700]]))
[/color][color=#0000BB]DI2[/color][color=#007700].[/color][color=#0000BB]Drop[/color][color=#007700]();
}
}
}
}
catch ([/color][color=#0000BB]Exception Exc[/color][color=#007700]) { [/color][color=#0000BB]Program[/color][color=#007700].[/color][color=#0000BB]WriteLine[/color][color=#007700]([/color][color=#0000BB]Exc[/color][color=#007700]); }
} [/color][/color] ديه معلومه صغيره وسط الشرح علشان تخلى البنك 40 مكان بتاع الماركت وابحث على الكود ده فى Characters كود PHP: - الكود:
-
[color=#000000][color=#0000BB]MAWarehouse [/color][color=#007700]= new [/color][color=#0000BB]ArrayList[/color][color=#007700]([/color][color=#0000BB]20[/color][color=#007700]) [/color][/color] كل اللى هتعملو هتغير ال 20 الى 40 بصو لو فى حد جالو Error زى ده كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]Item[/color][color=#007700].[/color][color=#0000BB]Locked[/color][color=#007700]) [/color][/color] هيغيرو يخليه ده كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]Item[/color][color=#007700].[/color][color=#0000BB]Locked [/color][color=#007700]== [/color][color=#0000BB]1[/color][color=#007700]) [/color][/color] لو جالكم Error ده كمان كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]Item[/color][color=#007700].[/color][color=#0000BB]Locked [/color][color=#007700]== [/color][color=#0000BB]false[/color][color=#007700]) [/color][/color] هتغيرو هتخليه ده كود PHP: - الكود:
-
[color=#000000][color=#007700]if ([/color][color=#0000BB]Item[/color][color=#007700].[/color][color=#0000BB]Locked [/color][color=#007700]== [/color][color=#0000BB]0[/color][color=#007700])[/color][/color] حمل الملف ده وحطو فى المسار ده C:\rikardo updated\PacketHandling [ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]كده الموضوع خلص ارجو ان يكون الموضوع نال اعجابكم مستني ردودكم و متنسوش التقييم++ | |
|