Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. if (item->GetVnum() >= 80003 && item->GetVnum() <= 80007)
  2. {
  3. int VnumLingouri[] = {80003, 80004, 80005, 80006, 80007};
  4. long SumaLingouri[] = {10000000, 50000000, 100000000, 500000000, 1000000000};
  5. long MaxiLingouri[] = {1989999999, 1949999999, 1899999999, 1499999999, 999999999};
  6.  
  7. for (int i = 0; i < _countof(VnumLingouri); i++)
  8. {
  9. if (item->GetVnum() == VnumLingouri[i])
  10. {
  11. if (GetExchange())
  12. {
  13. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti s? deschizi un lingou cat timp negociezi."));
  14. return false;
  15. }
  16. else
  17. {
  18. if (item->GetVnum() == VnumLingouri[i] && GetGold()>= MaxiLingouri[i])
  19. {
  20. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti deschide lingoul pentru ca ai prea mult yang in inventar !"));
  21. return false;
  22. }
  23. if (item->GetVnum() == VnumLingouri[i+1] && GetGold()>= MaxiLingouri[i+1])
  24. {
  25. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti deschide lingoul pentru ca ai prea mult yang in inventar !"));
  26. return false;
  27. }
  28. if (item->GetVnum() == VnumLingouri[i+2] && GetGold()>= MaxiLingouri[i+2])
  29. {
  30. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti deschide lingoul pentru ca ai prea mult yang in inventar !"));
  31. return false;
  32. }
  33. if (item->GetVnum() == VnumLingouri[i+3] && GetGold()>= MaxiLingouri[i+3])
  34. {
  35. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti deschide lingoul pentru ca ai prea mult yang in inventar !"));
  36. return false;
  37. }
  38. if (item->GetVnum() == VnumLingouri[i+4] && GetGold()>= MaxiLingouri[i+4])
  39. {
  40. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nu poti deschide lingoul pentru ca ai prea mult yang in inventar !"));
  41. return false;
  42. }
  43. else
  44. {
  45. item->SetCount(item->GetCount() - 1);
  46. PointChange(POINT_GOLD, SumaLingouri[i], true);
  47. return true;
  48. }
  49. }
  50. }
  51. }
  52. return false;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement