المشاركة الأصلية كتبت بواسطة hassan emprator
(المشاركة 19004)
اتفضل انبي سي دا الي معانا دلوقتي لائسف !
كود PHP:
#region ريالك
case 71718:
{
switch (npcrequest.optionid)
{
case 0:
{
dialog.text("hay bro iam ريالك seller how can i help u ?");
dialog.option("runes random .", 1);
// dialog.option("epic pirate .", 190);
dialog.option("#thnx .", 255);
break;
}
case 1:
{
if (client.entity.conquerpoints >= 10000)//السبس
{
client.entity.conquerpoints -= 10000;//السبس
byte[] type = new byte[0];
byte count = (byte)kernel.random.next(1, 6);
uint id = (uint)(kernel.random.next(1, 6) + 4100000);
byte vl1 = 0;
byte vl2 = 0;
byte vl3 = 0;
byte vl4 = 0;
byte vl5 = 0;
if (count >= 1)
{
vl1 = (byte)kernel.random.next(1, 14);
if (vl1 != 0)
type = new byte[] { (byte)vl1 };
}
if (count >= 2)
{
for (int x = 0; x < 1000; x++)
{
vl2 = (byte)kernel.random.next(1, 14);
if (vl2 != vl1)
{
type = new byte[] { (byte)vl1, (byte)vl2 };
break;
}
}
}
if (count >= 3)
{
for (int x = 0; x < 1000; x++)
{
vl3 = (byte)kernel.random.next(1, 14);
if (vl3 != vl1 && vl3 != vl2)
{
type = new byte[] { (byte)vl1, (byte)vl2, (byte)vl3 };
break;
}
}
}
if (count >= 4)
{
for (int x = 0; x < 1000; x++)
{
vl4 = (byte)kernel.random.next(1, 14);
if (vl4 != vl1 && vl4 != vl2 && vl4 != vl3)
{
type = new byte[] { (byte)vl1, (byte)vl2, (byte)vl3, (byte)vl4 };
break;
}
}
}
if (count >= 5)
{
for (int x = 0; x < 1000; x++)
{
vl5 = (byte)kernel.random.next(1, 14);
if (vl5 != vl1 && vl5 != vl2 && vl5 != vl3 && vl5 != vl4)
{
type = new byte[] { (byte)vl1, (byte)vl2, (byte)vl3, (byte)vl4, (byte)vl5 };
break;
}
}
}
uint[] typevl1, typevl2, typevl3, typevl4, typevl5;
uint random1, random2, random3, random4, random5;
uint super1 = 0, super2 = 0, super3 = 0, super4 = 0, super5 = 0;
uint[] runes = new uint[5] { 0, 0, 0, 0, 0 };
if (type.length >= 1)
{
typevl1 = runeitems.xuanbao_rand_attr(id, type[0]);
random1 = (uint)kernel.random.next((int)(typevl1[0]), (int)(typevl1[1]));
if (random1 >= typevl1[1] - (typevl1[1] * 10 / 100))
super1 = 100;
runes[0] = random1 * 1000 + super1 + type[0];
}
if (type.length >= 2)
{
typevl2 = runeitems.xuanbao_rand_attr(id, type[1]);
random2 = (uint)kernel.random.next((int)(typevl2[0]), (int)(typevl2[1]));
if (random2 >= typevl2[1] - (typevl2[1] * 10 / 100))
super2 = 100;
runes[1] = random2 * 1000 + super2 + type[1];
}
if (type.length >= 3)
{
typevl3 = runeitems.xuanbao_rand_attr(id, type[2]);
random3 = (uint)kernel.random.next((int)(typevl3[0]), (int)(typevl3[1]));
if (random3 >= typevl3[1] - (typevl3[1] * 10 / 100))
super3 = 100;
runes[2] = random3 * 1000 + super3 + type[2];
}
if (type.length >= 4)
{
typevl4 = runeitems.xuanbao_rand_attr(id, type[3]);
random4 = (uint)kernel.random.next((int)(typevl4[0]), (int)(typevl4[1]));
if (random4 >= typevl4[1] - (typevl4[1] * 10 / 100))
super4 = 100;
runes[3] = random4 * 1000 + super4 + type[3];
}
if (type.length >= 5)
{
typevl5 = runeitems.xuanbao_rand_attr(id, type[4]);
random5 = (uint)kernel.random.next((int)(typevl5[0]), (int)(typevl5[1]));
if (random5 >= typevl5[1] - (typevl5[1] * 10 / 100))
super5 = 100;
runes[4] = random5 * 1000 + super5 + type[4];
}
conqueritem itemrunes = new conqueritem(true);
itemrunes.id = id;
conqueriteminformation iteminfo = new conqueriteminformation(id, (byte)0);
itemrunes.bound = false;
itemrunes.runes = runes;
itemrunes.stacksize = (ushort)1;
itemrunes.durability = iteminfo.baseinformation.durability;
itemrunes.maximdurability = iteminfo.baseinformation.durability;
client.inventory.add(itemrunes, enums.itemuse.createandadd);
break;
}
else
{
dialog.text("i need 10k cps.");
dialog.option("ok.", 255);
dialog.avatar(116);
dialog.send();
}
break;
}
case 190://epic weapon
{
if (client.entity.conquerpoints >= 1)
{
if (client.inventory.count <= 32)
{
client.entity.conquerpoints -= 1;
client.inventory.addsoul(670439, 800810, 6, 12, 12, 1, true, false);//rapier
client.inventory.addsoul(671439, 800811, 6, 12, 12, 1, true, false);//pistol
}
else
dialog.text("please make more space in your inventory");
}
else
dialog.text("you don't have 1 cps");
break;
}
}
break;
}
#endregion
|