Advertisement
Leifur

Windward Command Check Mounted Equipment

Nov 20th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. string txtAdmin = "(SK) Leif (SK)";
  2. DataNode eq = MyPlayer.equipment;
  3. string typeEq = "";
  4. string Message = "";
  5. string Illegal = "";
  6. int summary = 0;
  7. int myLevel = 0;
  8. myLevel = Mathf.RoundToInt(MyPlayer.level) * 3;
  9. for (int i = 0; i < eq.children.size; ++i)
  10. {
  11. PlayerItem item = eq.children[i].Get<PlayerItem>();
  12. if (item != null)
  13. {
  14. typeEq = item.type.ToString();
  15. summary = item.level * 3;
  16. if (summary > myLevel + 3) Illegal = Illegal + " " + typeEq + ":" + summary + "/" + myLevel;
  17. if (summary > 0) Message = Message + " " + typeEq + ":" + summary + "/" + myLevel;
  18. }
  19. }
  20. if (Illegal == "") Illegal = "None";
  21. GameChat.SendPM(txtAdmin, "\n" + "My Equipment: " + Message + "\n" + "Illegal Equipment: " + Illegal);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement