Advertisement
Guest User

Untitled

a guest
May 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. case USE_COSTUME_ADD_ATTRIBUTE1:
  2. {
  3. LPITEM item2;
  4. if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
  5. return false;
  6.  
  7. if (item2->IsExchanging())
  8. return false;
  9.  
  10. if (item2->IsEquipped())
  11. return false;
  12.  
  13. if (item2->GetSubType() != COSTUME_BODY)
  14. {
  15. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Mozna dodac tylko w kostiumie"));
  16. return false;
  17. }
  18.  
  19. if (item2->GetType() == ITEM_ARMOR)
  20. {
  21. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Mozna dodac tylko w kostiumie"));
  22. return false;
  23. }
  24.  
  25. if (item2->GetType() == ITEM_WEAPON)
  26. {
  27. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Mozna dodac tylko w kostiumie"));
  28. return false;
  29. }
  30.  
  31. if (item->GetVnum() == 76028)
  32. {
  33. if (item2->GetAttributeCount() > 0)
  34. {
  35. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Nie mozesz dodac wiecej bonusow"));
  36. return false;
  37. }
  38. if (number(1, 100) <= 80)
  39. {
  40. char buf[21];
  41. snprintf(buf, sizeof(buf), "%u", item2->GetID());
  42. item2->SetForceAttribute(0, APPLY_MAX_HP, 2000);
  43. item2->SetForceAttribute(1, APPLY_RESIST_MONSTER, 3);
  44. item2->SetForceAttribute(2, APPLY_ATTBONUS_MONSTER, 5);
  45. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Bon wszedl"));
  46. }
  47. else
  48. {
  49. ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Bon nie wszedl"));
  50. }
  51. item->SetCount(item->GetCount() - 1);
  52. }
  53. }
  54. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement