Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 0 TROCA DIA DOS NAMORADOS
- #pragma region TROCA EVENTO THOR
- if (npc->Mob.Inventory[packet->sellSlot].Index == 5480) // ITEM NO INVENTARIO DO NPC
- {
- auto mob = GetMobFromIndex(client);
- auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 5480);//ITEM NECESSARIO PARA TROCA
- if (Item == -1)
- {
- SendClientMessage(client, "Traga-me o chocolate do amor.");
- return true;
- }
- srand(time(NULL));
- static uint16_t premio[] = { 412, 413, 1774, 4026, 4055 };
- STRUCT_ITEM itemPut;
- BASE_ClearItem(&itemPut);
- int _rand = rand() % 100;
- if (_rand < 20) // 20%
- itemPut.Index = premio[4]; // Presente Love
- else if (_rand < 40) // 20%
- itemPut.Index = premio[3]; // ITEM
- else if (_rand < 60) // 20%
- itemPut.Index = premio[2]; // ITEM
- else if (_rand < 80) // 20%
- itemPut.Index = premio[1]; // ITEM
- else if (_rand < 100) // 20%
- itemPut.Index = premio[0]; // ITEM
- if (itemPut.Index == 412)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 3;
- }
- if (itemPut.Index == 413)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 1;
- }
- if (itemPut.Index == 1774)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 1;
- }
- if (itemPut.Index == 4026)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 1;
- }
- if (itemPut.Index == 4055)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 1;
- }
- Func::AmountMinus(&mob->Mob.Inventory[Item]);
- SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
- PutItem(client, &itemPut);
- SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
- return true;
- }
- #pragma endregion
- //1 TROCA EVENTO DIA DOS NAMORADOS
- #pragma region TROCA EVENTO THOR
- if (npc->Mob.Inventory[packet->sellSlot].Index == 4055) // ITEM NO INVENTARIO DO NPC
- {
- auto mob = GetMobFromIndex(client);
- auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4055);//ITEM NECESSARIO PARA TROCA
- if (Item == -1)
- {
- SendClientMessage(client, "Traga-me o Presente Love I");
- return true;
- }
- srand(time(NULL));
- static uint16_t premio[] ={412 , 413, 4019, 4020, 4054};
- STRUCT_ITEM itemPut;
- BASE_ClearItem(&itemPut);
- int _rand = rand() % 100;
- if (_rand < 20) // 20%
- itemPut.Index = premio[4]; // Presente Love
- else if (_rand < 40) // 20%
- itemPut.Index = premio[3]; // ITEM
- else if (_rand < 60) // 20%
- itemPut.Index = premio[2]; // ITEM
- else if (_rand < 80) // 20%
- itemPut.Index = premio[1]; // ITEM
- else if (_rand < 100) // 20%
- itemPut.Index = premio[0]; // ITEM
- if (itemPut.Index == 412)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 7;
- }
- if (itemPut.Index == 413)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 4;
- }
- if (itemPut.Index == 4019)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 10;
- }
- if (itemPut.Index == 4020)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 5;
- }
- if (itemPut.Index == 4054)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 1;
- }
- Func::AmountMinus(&mob->Mob.Inventory[Item]);
- SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
- PutItem(client, &itemPut);
- SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
- return true;
- }
- #pragma endregion
- //2 TROCA EVENTO DIA DOS NAMORADOS
- #pragma region TROCA EVENTO THOR
- if (npc->Mob.Inventory[packet->sellSlot].Index == 4054) // ITEM NO INVENTARIO DO NPC
- {
- auto mob = GetMobFromIndex(client);
- auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4054);//ITEM NECESSARIO PARA TROCA
- if (Item == -1)
- {
- SendClientMessage(client, "Traga-me o Presente Love II");
- return true;
- }
- srand(time(NULL));
- static uint16_t premio[] ={ 825, 900, 854, 870, 810, 4053 };
- STRUCT_ITEM itemPut;
- BASE_ClearItem(&itemPut);
- int _rand = rand() % 100;
- if (_rand < 20) // 20%
- itemPut.Index = premio[5]; // presente
- else if (_rand < 40) // 20%
- itemPut.Index = premio[3]; // brincos
- else if (_rand < 60) // 20%
- itemPut.Index = premio[2]; // brincos
- else if (_rand < 80) // 20%
- itemPut.Index = premio[1]; // brincos
- else if (_rand < 90) // 10%
- itemPut.Index = premio[0]; // brincos
- else if (_rand < 100) // 10%
- itemPut.Index = premio[4]; // brincos
- if (itemPut.Index == 825)
- {
- itemPut.Effect[0].Index = 2;
- itemPut.Effect[0].Value = 63;
- }
- if (itemPut.Index == 900)
- {
- itemPut.Effect[0].Index = 60;
- itemPut.Effect[0].Value = 28;
- }
- if (itemPut.Index == 854)
- {
- itemPut.Effect[0].Index = 60;
- itemPut.Effect[0].Value = 28;
- }
- if (itemPut.Index == 870)
- {
- itemPut.Effect[0].Index = 2;
- itemPut.Effect[0].Value = 63;
- }
- if (itemPut.Index == 810)
- {
- itemPut.Effect[0].Index = 2;
- itemPut.Effect[0].Value = 63;
- }
- Func::AmountMinus(&mob->Mob.Inventory[Item]);
- SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
- PutItem(client, &itemPut);
- SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
- return true;
- }
- #pragma endregion
- //3 TROCA EVENTO DIA DOS NAMORADOS
- #pragma region TROCA EVENTO THOR
- if (npc->Mob.Inventory[packet->sellSlot].Index == 4053) // ITEM NO INVENTARIO DO NPC
- {
- auto mob = GetMobFromIndex(client);
- auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4053);//ITEM NECESSARIO PARA TROCA
- if (Item == -1)
- {
- SendClientMessage(client, "Traga-me o Presente Love III");
- return true;
- }
- srand(time(NULL));
- static uint16_t premio[] ={ 4140, 3314, 2346, 2345, 4052 };
- STRUCT_ITEM itemPut;
- BASE_ClearItem(&itemPut);
- int _rand = rand() % 100;
- if (_rand < 20) // 20%
- itemPut.Index = premio[4]; // Presente Love
- else if (_rand < 40) // 20%
- itemPut.Index = premio[3]; // ITEM
- else if (_rand < 60) // 20%
- itemPut.Index = premio[2]; // ITEM
- else if (_rand < 80) // 20%
- itemPut.Index = premio[1]; // ITEM
- else if (_rand < 100) // 20%
- itemPut.Index = premio[0]; // ITEM
- if (itemPut.Index == 4140)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 2;
- }
- if (itemPut.Index == 3314)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 2;
- }
- if (itemPut.Index == 2346)
- {
- //itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 20;
- //itemPut.Effect[1].Index = 61;
- itemPut.Effect[1].Value = 20;
- //itemPut.Effect[2].Index = 61;
- itemPut.Effect[2].Value = 20;
- }
- if (itemPut.Index == 2345)
- {
- //itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 20;
- //itemPut.Effect[1].Index = 61;
- itemPut.Effect[1].Value = 20;
- //itemPut.Effect[2].Index = 61;
- itemPut.Effect[2].Value = 20;
- }
- Func::AmountMinus(&mob->Mob.Inventory[Item]);
- SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
- PutItem(client, &itemPut);
- SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
- return true;
- }
- #pragma endregion
- // 4 TROCA DIA DOS NAMORADOS
- #pragma region TROCA EVENTO THOR
- if (npc->Mob.Inventory[packet->sellSlot].Index == 4052) // ITEM NO INVENTARIO DO NPC
- {
- auto mob = GetMobFromIndex(client);
- auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4052);//ITEM NECESSARIO PARA TROCA
- if (Item == -1)
- {
- SendClientMessage(client, "Traga-me o Presente Love IV");
- return true;
- }
- srand(time(NULL));
- static uint16_t premio[] ={ 591, 592, 593, 594, 595, 4051 };
- STRUCT_ITEM itemPut;
- BASE_ClearItem(&itemPut);
- int _rand = rand() % 100;
- if (_rand < 20) // 20%
- itemPut.Index = premio[4]; // presente
- else if (_rand < 40) // 20%
- itemPut.Index = premio[3]; // brincos
- else if (_rand < 60) // 20%
- itemPut.Index = premio[2]; // brincos
- else if (_rand < 80) // 20%
- itemPut.Index = premio[1]; // brincos
- else if (_rand < 90) // 10%
- itemPut.Index = premio[0]; // brincos
- else if (_rand < 100) // 10%
- itemPut.Index = premio[5]; // brincos
- if (itemPut.Index == 591)
- {
- itemPut.Effect[0].Index = 43;
- itemPut.Effect[0].Value = 230;
- }
- if (itemPut.Index == 592)
- {
- itemPut.Effect[0].Index = 43;
- itemPut.Effect[0].Value = 230;
- }
- if (itemPut.Index == 593)
- {
- itemPut.Effect[0].Index = 43;
- itemPut.Effect[0].Value = 230;
- }
- if (itemPut.Index == 594)
- {
- itemPut.Effect[0].Index = 43;
- itemPut.Effect[0].Value = 230;
- }
- if (itemPut.Index == 595)
- {
- itemPut.Effect[0].Index = 43;
- itemPut.Effect[0].Value = 230;
- }
- Func::AmountMinus(&mob->Mob.Inventory[Item]);
- SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
- PutItem(client, &itemPut);
- SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
- return true;
- }
- #pragma endregion
- // 5 TROCA DIA DOS NAMORADOS
- #pragma region TROCA EVENTO THOR
- if (npc->Mob.Inventory[packet->sellSlot].Index == 4051) // ITEM NO INVENTARIO DO NPC
- {
- auto mob = GetMobFromIndex(client);
- auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4051);//ITEM NECESSARIO PARA TROCA
- if (Item == -1)
- {
- SendClientMessage(client, "Traga-me o Presente Love V");
- return true;
- }
- srand(time(NULL));
- static uint16_t premio[] ={ 4010, 3182, 4140, 567, 568, 569 };
- STRUCT_ITEM itemPut;
- BASE_ClearItem(&itemPut);
- int _rand = rand() % 100;
- if (_rand < 20) // 20%
- itemPut.Index = premio[4]; // presente
- else if (_rand < 40) // 20%
- itemPut.Index = premio[3]; // brincos
- else if (_rand < 60) // 20%
- itemPut.Index = premio[2]; // brincos
- else if (_rand < 80) // 20%
- itemPut.Index = premio[1]; // brincos
- else if (_rand < 90) // 10%
- itemPut.Index = premio[0]; // brincos
- else if (_rand < 100) // 10%
- itemPut.Index = premio[5]; // brincos
- if (itemPut.Index == 3182)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 70;
- }
- if (itemPut.Index == 4140)
- {
- itemPut.Effect[0].Index = 61;
- itemPut.Effect[0].Value = 15;
- }
- if (itemPut.Index == 567)
- {
- itemPut.Effect[0].Index = 60;
- itemPut.Effect[0].Value = 24;
- }
- if (itemPut.Index == 568)
- {
- itemPut.Effect[0].Index = 69;
- itemPut.Effect[0].Value = 12;
- itemPut.Effect[1].Index = 69;
- itemPut.Effect[1].Value = 12;
- }
- if (itemPut.Index == 569)
- {
- itemPut.Effect[0].Index = 2;
- itemPut.Effect[0].Value = 54;
- }
- Func::AmountMinus(&mob->Mob.Inventory[Item]);
- SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
- PutItem(client, &itemPut);
- SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
- return true;
- }
- #pragma endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement