Advertisement
WYDTHOR

Untitled

Jun 8th, 2019
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.20 KB | None | 0 0
  1. // 0 TROCA DIA DOS NAMORADOS
  2.  
  3. #pragma region TROCA EVENTO THOR
  4. if (npc->Mob.Inventory[packet->sellSlot].Index == 5480) // ITEM NO INVENTARIO DO NPC
  5. {
  6. auto mob = GetMobFromIndex(client);
  7. auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 5480);//ITEM NECESSARIO PARA TROCA
  8.  
  9. if (Item == -1)
  10. {
  11. SendClientMessage(client, "Traga-me o chocolate do amor.");
  12. return true;
  13. }
  14.  
  15. srand(time(NULL));
  16.  
  17. static uint16_t premio[] = { 412, 413, 1774, 4026, 4055 };
  18.  
  19. STRUCT_ITEM itemPut;
  20. BASE_ClearItem(&itemPut);
  21.  
  22. int _rand = rand() % 100;
  23.  
  24. if (_rand < 20) // 20%
  25. itemPut.Index = premio[4]; // Presente Love
  26. else if (_rand < 40) // 20%
  27. itemPut.Index = premio[3]; // ITEM
  28. else if (_rand < 60) // 20%
  29. itemPut.Index = premio[2]; // ITEM
  30. else if (_rand < 80) // 20%
  31. itemPut.Index = premio[1]; // ITEM
  32. else if (_rand < 100) // 20%
  33. itemPut.Index = premio[0]; // ITEM
  34.  
  35. if (itemPut.Index == 412)
  36. {
  37. itemPut.Effect[0].Index = 61;
  38. itemPut.Effect[0].Value = 3;
  39. }
  40. if (itemPut.Index == 413)
  41. {
  42. itemPut.Effect[0].Index = 61;
  43. itemPut.Effect[0].Value = 1;
  44.  
  45. }
  46. if (itemPut.Index == 1774)
  47. {
  48. itemPut.Effect[0].Index = 61;
  49. itemPut.Effect[0].Value = 1;
  50. }
  51. if (itemPut.Index == 4026)
  52. {
  53. itemPut.Effect[0].Index = 61;
  54. itemPut.Effect[0].Value = 1;
  55. }
  56. if (itemPut.Index == 4055)
  57. {
  58. itemPut.Effect[0].Index = 61;
  59. itemPut.Effect[0].Value = 1;
  60. }
  61.  
  62. Func::AmountMinus(&mob->Mob.Inventory[Item]);
  63. SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
  64. PutItem(client, &itemPut);
  65. SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
  66. return true;
  67. }
  68. #pragma endregion
  69.  
  70. //1 TROCA EVENTO DIA DOS NAMORADOS
  71.  
  72. #pragma region TROCA EVENTO THOR
  73. if (npc->Mob.Inventory[packet->sellSlot].Index == 4055) // ITEM NO INVENTARIO DO NPC
  74. {
  75. auto mob = GetMobFromIndex(client);
  76. auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4055);//ITEM NECESSARIO PARA TROCA
  77.  
  78. if (Item == -1)
  79. {
  80. SendClientMessage(client, "Traga-me o Presente Love I");
  81. return true;
  82. }
  83.  
  84. srand(time(NULL));
  85.  
  86. static uint16_t premio[] ={412 , 413, 4019, 4020, 4054};
  87.  
  88. STRUCT_ITEM itemPut;
  89. BASE_ClearItem(&itemPut);
  90.  
  91. int _rand = rand() % 100;
  92.  
  93. if (_rand < 20) // 20%
  94. itemPut.Index = premio[4]; // Presente Love
  95. else if (_rand < 40) // 20%
  96. itemPut.Index = premio[3]; // ITEM
  97. else if (_rand < 60) // 20%
  98. itemPut.Index = premio[2]; // ITEM
  99. else if (_rand < 80) // 20%
  100. itemPut.Index = premio[1]; // ITEM
  101. else if (_rand < 100) // 20%
  102. itemPut.Index = premio[0]; // ITEM
  103.  
  104. if (itemPut.Index == 412)
  105. {
  106. itemPut.Effect[0].Index = 61;
  107. itemPut.Effect[0].Value = 7;
  108. }
  109. if (itemPut.Index == 413)
  110. {
  111. itemPut.Effect[0].Index = 61;
  112. itemPut.Effect[0].Value = 4;
  113.  
  114. }
  115. if (itemPut.Index == 4019)
  116. {
  117. itemPut.Effect[0].Index = 61;
  118. itemPut.Effect[0].Value = 10;
  119. }
  120. if (itemPut.Index == 4020)
  121. {
  122. itemPut.Effect[0].Index = 61;
  123. itemPut.Effect[0].Value = 5;
  124. }
  125. if (itemPut.Index == 4054)
  126. {
  127. itemPut.Effect[0].Index = 61;
  128. itemPut.Effect[0].Value = 1;
  129. }
  130.  
  131. Func::AmountMinus(&mob->Mob.Inventory[Item]);
  132. SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
  133. PutItem(client, &itemPut);
  134. SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
  135. return true;
  136. }
  137. #pragma endregion
  138.  
  139. //2 TROCA EVENTO DIA DOS NAMORADOS
  140.  
  141. #pragma region TROCA EVENTO THOR
  142. if (npc->Mob.Inventory[packet->sellSlot].Index == 4054) // ITEM NO INVENTARIO DO NPC
  143. {
  144. auto mob = GetMobFromIndex(client);
  145. auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4054);//ITEM NECESSARIO PARA TROCA
  146.  
  147. if (Item == -1)
  148. {
  149. SendClientMessage(client, "Traga-me o Presente Love II");
  150. return true;
  151. }
  152.  
  153. srand(time(NULL));
  154.  
  155. static uint16_t premio[] ={ 825, 900, 854, 870, 810, 4053 };
  156.  
  157. STRUCT_ITEM itemPut;
  158. BASE_ClearItem(&itemPut);
  159.  
  160. int _rand = rand() % 100;
  161.  
  162. if (_rand < 20) // 20%
  163. itemPut.Index = premio[5]; // presente
  164. else if (_rand < 40) // 20%
  165. itemPut.Index = premio[3]; // brincos
  166. else if (_rand < 60) // 20%
  167. itemPut.Index = premio[2]; // brincos
  168. else if (_rand < 80) // 20%
  169. itemPut.Index = premio[1]; // brincos
  170. else if (_rand < 90) // 10%
  171. itemPut.Index = premio[0]; // brincos
  172. else if (_rand < 100) // 10%
  173. itemPut.Index = premio[4]; // brincos
  174.  
  175. if (itemPut.Index == 825)
  176. {
  177. itemPut.Effect[0].Index = 2;
  178. itemPut.Effect[0].Value = 63;
  179. }
  180. if (itemPut.Index == 900)
  181. {
  182. itemPut.Effect[0].Index = 60;
  183. itemPut.Effect[0].Value = 28;
  184. }
  185. if (itemPut.Index == 854)
  186. {
  187. itemPut.Effect[0].Index = 60;
  188. itemPut.Effect[0].Value = 28;
  189. }
  190. if (itemPut.Index == 870)
  191. {
  192. itemPut.Effect[0].Index = 2;
  193. itemPut.Effect[0].Value = 63;
  194. }
  195. if (itemPut.Index == 810)
  196. {
  197. itemPut.Effect[0].Index = 2;
  198. itemPut.Effect[0].Value = 63;
  199. }
  200.  
  201. Func::AmountMinus(&mob->Mob.Inventory[Item]);
  202. SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
  203. PutItem(client, &itemPut);
  204. SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
  205. return true;
  206. }
  207. #pragma endregion
  208.  
  209. //3 TROCA EVENTO DIA DOS NAMORADOS
  210.  
  211. #pragma region TROCA EVENTO THOR
  212. if (npc->Mob.Inventory[packet->sellSlot].Index == 4053) // ITEM NO INVENTARIO DO NPC
  213. {
  214. auto mob = GetMobFromIndex(client);
  215. auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4053);//ITEM NECESSARIO PARA TROCA
  216.  
  217. if (Item == -1)
  218. {
  219. SendClientMessage(client, "Traga-me o Presente Love III");
  220. return true;
  221. }
  222.  
  223. srand(time(NULL));
  224.  
  225. static uint16_t premio[] ={ 4140, 3314, 2346, 2345, 4052 };
  226.  
  227. STRUCT_ITEM itemPut;
  228. BASE_ClearItem(&itemPut);
  229.  
  230. int _rand = rand() % 100;
  231.  
  232. if (_rand < 20) // 20%
  233. itemPut.Index = premio[4]; // Presente Love
  234. else if (_rand < 40) // 20%
  235. itemPut.Index = premio[3]; // ITEM
  236. else if (_rand < 60) // 20%
  237. itemPut.Index = premio[2]; // ITEM
  238. else if (_rand < 80) // 20%
  239. itemPut.Index = premio[1]; // ITEM
  240. else if (_rand < 100) // 20%
  241. itemPut.Index = premio[0]; // ITEM
  242.  
  243. if (itemPut.Index == 4140)
  244. {
  245. itemPut.Effect[0].Index = 61;
  246. itemPut.Effect[0].Value = 2;
  247. }
  248. if (itemPut.Index == 3314)
  249. {
  250. itemPut.Effect[0].Index = 61;
  251. itemPut.Effect[0].Value = 2;
  252. }
  253. if (itemPut.Index == 2346)
  254. {
  255. //itemPut.Effect[0].Index = 61;
  256. itemPut.Effect[0].Value = 20;
  257. //itemPut.Effect[1].Index = 61;
  258. itemPut.Effect[1].Value = 20;
  259. //itemPut.Effect[2].Index = 61;
  260. itemPut.Effect[2].Value = 20;
  261. }
  262. if (itemPut.Index == 2345)
  263. {
  264. //itemPut.Effect[0].Index = 61;
  265. itemPut.Effect[0].Value = 20;
  266. //itemPut.Effect[1].Index = 61;
  267. itemPut.Effect[1].Value = 20;
  268. //itemPut.Effect[2].Index = 61;
  269. itemPut.Effect[2].Value = 20;
  270. }
  271.  
  272. Func::AmountMinus(&mob->Mob.Inventory[Item]);
  273. SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
  274. PutItem(client, &itemPut);
  275. SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
  276. return true;
  277. }
  278. #pragma endregion
  279.  
  280. // 4 TROCA DIA DOS NAMORADOS
  281.  
  282. #pragma region TROCA EVENTO THOR
  283. if (npc->Mob.Inventory[packet->sellSlot].Index == 4052) // ITEM NO INVENTARIO DO NPC
  284. {
  285. auto mob = GetMobFromIndex(client);
  286. auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4052);//ITEM NECESSARIO PARA TROCA
  287.  
  288. if (Item == -1)
  289. {
  290. SendClientMessage(client, "Traga-me o Presente Love IV");
  291. return true;
  292. }
  293.  
  294. srand(time(NULL));
  295.  
  296. static uint16_t premio[] ={ 591, 592, 593, 594, 595, 4051 };
  297.  
  298. STRUCT_ITEM itemPut;
  299. BASE_ClearItem(&itemPut);
  300.  
  301. int _rand = rand() % 100;
  302.  
  303. if (_rand < 20) // 20%
  304. itemPut.Index = premio[4]; // presente
  305. else if (_rand < 40) // 20%
  306. itemPut.Index = premio[3]; // brincos
  307. else if (_rand < 60) // 20%
  308. itemPut.Index = premio[2]; // brincos
  309. else if (_rand < 80) // 20%
  310. itemPut.Index = premio[1]; // brincos
  311. else if (_rand < 90) // 10%
  312. itemPut.Index = premio[0]; // brincos
  313. else if (_rand < 100) // 10%
  314. itemPut.Index = premio[5]; // brincos
  315.  
  316. if (itemPut.Index == 591)
  317. {
  318. itemPut.Effect[0].Index = 43;
  319. itemPut.Effect[0].Value = 230;
  320. }
  321. if (itemPut.Index == 592)
  322. {
  323. itemPut.Effect[0].Index = 43;
  324. itemPut.Effect[0].Value = 230;
  325. }
  326. if (itemPut.Index == 593)
  327. {
  328. itemPut.Effect[0].Index = 43;
  329. itemPut.Effect[0].Value = 230;
  330. }
  331. if (itemPut.Index == 594)
  332. {
  333. itemPut.Effect[0].Index = 43;
  334. itemPut.Effect[0].Value = 230;
  335. }
  336. if (itemPut.Index == 595)
  337. {
  338. itemPut.Effect[0].Index = 43;
  339. itemPut.Effect[0].Value = 230;
  340. }
  341.  
  342. Func::AmountMinus(&mob->Mob.Inventory[Item]);
  343. SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
  344. PutItem(client, &itemPut);
  345. SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
  346. return true;
  347. }
  348. #pragma endregion
  349.  
  350. // 5 TROCA DIA DOS NAMORADOS
  351.  
  352. #pragma region TROCA EVENTO THOR
  353. if (npc->Mob.Inventory[packet->sellSlot].Index == 4051) // ITEM NO INVENTARIO DO NPC
  354. {
  355. auto mob = GetMobFromIndex(client);
  356. auto Item = Func::GetFirstSlot(client, SlotType::Inventory, 4051);//ITEM NECESSARIO PARA TROCA
  357.  
  358. if (Item == -1)
  359. {
  360. SendClientMessage(client, "Traga-me o Presente Love V");
  361. return true;
  362. }
  363.  
  364. srand(time(NULL));
  365.  
  366. static uint16_t premio[] ={ 4010, 3182, 4140, 567, 568, 569 };
  367.  
  368. STRUCT_ITEM itemPut;
  369. BASE_ClearItem(&itemPut);
  370.  
  371. int _rand = rand() % 100;
  372.  
  373. if (_rand < 20) // 20%
  374. itemPut.Index = premio[4]; // presente
  375. else if (_rand < 40) // 20%
  376. itemPut.Index = premio[3]; // brincos
  377. else if (_rand < 60) // 20%
  378. itemPut.Index = premio[2]; // brincos
  379. else if (_rand < 80) // 20%
  380. itemPut.Index = premio[1]; // brincos
  381. else if (_rand < 90) // 10%
  382. itemPut.Index = premio[0]; // brincos
  383. else if (_rand < 100) // 10%
  384. itemPut.Index = premio[5]; // brincos
  385.  
  386. if (itemPut.Index == 3182)
  387. {
  388. itemPut.Effect[0].Index = 61;
  389. itemPut.Effect[0].Value = 70;
  390. }
  391. if (itemPut.Index == 4140)
  392. {
  393. itemPut.Effect[0].Index = 61;
  394. itemPut.Effect[0].Value = 15;
  395. }
  396. if (itemPut.Index == 567)
  397. {
  398. itemPut.Effect[0].Index = 60;
  399. itemPut.Effect[0].Value = 24;
  400. }
  401. if (itemPut.Index == 568)
  402. {
  403. itemPut.Effect[0].Index = 69;
  404. itemPut.Effect[0].Value = 12;
  405. itemPut.Effect[1].Index = 69;
  406. itemPut.Effect[1].Value = 12;
  407.  
  408. }
  409. if (itemPut.Index == 569)
  410. {
  411. itemPut.Effect[0].Index = 2;
  412. itemPut.Effect[0].Value = 54;
  413. }
  414.  
  415. Func::AmountMinus(&mob->Mob.Inventory[Item]);
  416. SendItem(client, (uint16_t)SlotType::Inventory, Item, &mob->Mob.Inventory[Item]);
  417. PutItem(client, &itemPut);
  418. SendClientMessage(client, Func::strFmt("Seu premio[%s] Chegou ! ", Func::GetItemListItem(itemPut.Index)));
  419. return true;
  420. }
  421. #pragma endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement