gribbleshnibit8

Weight Change Stage Script

Aug 7th, 2011
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. short i
  2. short size
  3. short tempCount
  4. ref container
  5. ref item
  6. ref tempItem
  7. float contWeight
  8. float itemWeight
  9.  
  10. set container to PNxCUtilWeight.container
  11.  
  12. Label 210
  13.  
  14. if container != 0 && isFormValid container
  15.  
  16. set i to 0
  17. set size to container.getNumItems
  18.  
  19. Label 211
  20.  
  21. if i < size
  22. set item to container.getInventoryObject i
  23. set contWeight to container.GetWeight
  24. set itemWeight to item.GetWeight
  25.  
  26. if isFormValid item
  27.  
  28. if (contWeight > 0)
  29.  
  30. if (item != 0) && (listGetFormIndex PNxCWeightChangedList item == -1) && (listGetFormIndex PNxCWeightIgnoredList item == -1) && (isQuestitem item == 0)
  31.  
  32. if (itemWeight > contWeight)
  33. set tempCount to player.GetItemCount item
  34. player.RemoveItem item tempCount 1
  35. SetWeight contWeight item
  36. player.AddItem item tempCount 1
  37.  
  38. set tempItem to TempCloneForm item
  39. ListAddForm PNxCWeightTempFormList tempItem
  40. ListAddForm PNxCWeightOrigFormList item
  41.  
  42. endif
  43.  
  44. listAddForm PNxCWeightChangedList item
  45.  
  46. if (IsQuestItem item) && (item.GetWeight > 0)
  47. set tempCount to player.GetItemCount item
  48. player.RemoveItem item tempCount 1
  49. setWeight 0 item
  50. player.AddItem item tempCount 1
  51.  
  52. set tempItem to TempCloneForm item
  53. ListAddForm PNxCWeightTempFormList tempItem
  54. ListAddForm PNxCWeightOrigFormList item
  55.  
  56. endif
  57.  
  58. endif
  59.  
  60. endif
  61.  
  62. endif
  63.  
  64. set i to i + 1
  65. goto 211
  66. endif
  67.  
  68. set container to apple
  69. set container to getNextRef
  70. goto 210
  71. endif
Add Comment
Please, Sign In to add comment