Advertisement
Sharlikran

ocd script

Aug 31st, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.30 KB | None | 0 0
  1. .info
  2. .source "g:\\_F4\\Art\\Raw\\Scripts\\MagazineRackContainerScript.psc"
  3. .modifyTime 1438802482
  4. .compileTime 1444072426
  5. .user "builds"
  6. .computer "RKVBGSBUILD06"
  7. .endInfo
  8. .userFlagsRef
  9. .flag mandatory 5
  10. .flag collapsedonref 3
  11. .flag hidden 0
  12. .flag conditional 1
  13. .flag collapsedonbase 4
  14. .flag default 2
  15. .endUserFlagsRef
  16. .objectTable
  17. .object OCDispenserScript ObjectReference
  18. .userFlags 1
  19. .docString ""
  20. .autoState AllowActivate
  21. .structTable
  22. .struct DisplayPerkMagStruct
  23. .variable PerkMagDisplayRef ObjectReference
  24. .userFlags 0
  25. .initialValue None
  26. .docString "This will hold the currently displayed PerkMag reference."
  27. .endVariable
  28. .variable PerkMagDisplayNode String
  29. .userFlags 0
  30. .initialValue None
  31. .docString "The node the PerkMag should be placed at."
  32. .endVariable
  33. .endStruct
  34. .endStructTable
  35. .variableTable
  36. .variable ::PerkMagsInContainer_var form[]
  37. .userFlags 0
  38. .initialValue None
  39. .endVariable
  40. .variable ::IsSwivelRack_var Bool
  41. .userFlags 0
  42. .initialValue False
  43. .endVariable
  44. .variable ::BlockWorkshopInteractionKeyword_var keyword const
  45. .userFlags 0
  46. .initialValue None
  47. .endVariable
  48. .variable AlreadyLoaded Bool
  49. .userFlags 0
  50. .initialValue None
  51. .endVariable
  52. .variable ::PerkMagKeyword_var keyword const
  53. .userFlags 0
  54. .initialValue None
  55. .endVariable
  56. .variable ::FeaturedItem_var keyword const
  57. .userFlags 0
  58. .initialValue None
  59. .endVariable
  60. .variable ::MagazineRackContainerNotMagazineMessage_var message
  61. .userFlags 0
  62. .initialValue None
  63. .endVariable
  64. .variable ::DisplayPerkMagStructArray_var magazinerackcontainerscript#displayperkmagstruct[]
  65. .userFlags 0
  66. .initialValue None
  67. .endVariable
  68. .variable ::MagazineRackContainerFullMessage_var message
  69. .userFlags 0
  70. .initialValue None
  71. .endVariable
  72. .variable ::SwivelRackStage_var Int
  73. .userFlags 0
  74. .initialValue 1
  75. .endVariable
  76. .endVariableTable
  77. .propertyTable
  78. .property MagazineRackContainerFullMessage message auto
  79. .userFlags 0
  80. .docString ""
  81. .autoVar ::MagazineRackContainerFullMessage_var
  82. .endProperty
  83. .property PerkMagKeyword keyword auto
  84. .userFlags 0
  85. .docString ""
  86. .autoVar ::PerkMagKeyword_var
  87. .endProperty
  88. .property FeaturedItem keyword auto
  89. .userFlags 0
  90. .docString ""
  91. .autoVar ::FeaturedItem_var
  92. .endProperty
  93. .property IsSwivelRack Bool auto
  94. .userFlags 0
  95. .docString ""
  96. .autoVar ::IsSwivelRack_var
  97. .endProperty
  98. .property MagazineRackContainerNotMagazineMessage message auto
  99. .userFlags 0
  100. .docString ""
  101. .autoVar ::MagazineRackContainerNotMagazineMessage_var
  102. .endProperty
  103. .property SwivelRackStage Int auto
  104. .userFlags 0
  105. .docString ""
  106. .autoVar ::SwivelRackStage_var
  107. .endProperty
  108. .property DisplayPerkMagStructArray magazinerackcontainerscript#displayperkmagstruct[] auto
  109. .userFlags 0
  110. .docString "Struct Array of each display bobblehead ref, and the node it should go to."
  111. .autoVar ::DisplayPerkMagStructArray_var
  112. .endProperty
  113. .property BlockWorkshopInteractionKeyword keyword auto
  114. .userFlags 0
  115. .docString ""
  116. .autoVar ::BlockWorkshopInteractionKeyword_var
  117. .endProperty
  118. .property PerkMagsInContainer form[] auto
  119. .userFlags 0
  120. .docString "Array of current bobblheads that are in the container."
  121. .autoVar ::PerkMagsInContainer_var
  122. .endProperty
  123. .endPropertyTable
  124. .propertyGroupTable
  125. .endPropertyGroupTable
  126. .stateTable
  127. .state
  128. .function OnItemAdded
  129. .userFlags 0
  130. .docString ""
  131. .return None
  132. .paramTable
  133. .param akBaseItem form
  134. .param aiItemCount Int
  135. .param akItemReference ObjectReference
  136. .param akSourceContainer ObjectReference
  137. .endParamTable
  138. .localTable
  139. .local ::nonevar None
  140. .local ::temp15 Bool
  141. .local ::temp16 Int
  142. .local ::temp17 Int
  143. .local ::temp18 Bool
  144. .local ::temp19 actor
  145. .local ::temp20 ObjectReference
  146. .local ::temp21 Int
  147. .endLocalTable
  148. .code
  149. COMPAREGT ::temp18 aiItemCount 1 ;@line 78
  150. JUMPT ::temp18 label0 ;@line 79
  151. ARRAYADDELEMENTS ::PerkMagsInContainer_var akBaseItem 1 ;@line 80
  152. IS ::temp18 akBaseItem Weapon ;@line 80
  153. JUMPT ::temp18 label1 ;@line 81
  154. IS ::temp18 akBaseItem Armor ;@line 81
  155. JUMPF ::temp18 label2 ;@line 81
  156. label1:
  157. CALLMETHOD Show ::MagazineRackContainerFullMessage_var ::temp21 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ;@line 89
  158. label2:
  159. JUMP label3 ;@line 81
  160. label0:
  161. CALLSTATIC game GetPlayer ::temp19 ;@line 88
  162. CAST ::temp20 ::temp19 ;@line 88
  163. CALLMETHOD RemoveItem self ::nonevar akBaseItem aiItemCount False ::temp20 ;@line 88
  164. CALLMETHOD Show ::MagazineRackContainerNotMagazineMessage_var ::temp21 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ;@line 89
  165. label3:
  166. .endCode
  167. .endFunction
  168. .function OnWorkshopObjectMoved
  169. .userFlags 0
  170. .docString ""
  171. .return None
  172. .paramTable
  173. .param akReference ObjectReference
  174. .endParamTable
  175. .localTable
  176. .endLocalTable
  177. .code
  178. .endCode
  179. .endFunction
  180. .function OnLoad
  181. .userFlags 0
  182. .docString ""
  183. .return None
  184. .paramTable
  185. .endParamTable
  186. .localTable
  187. .local ::temp0 Bool
  188. .endLocalTable
  189. .code
  190. NOT ::temp0 AlreadyLoaded ;@line 31
  191. JUMPF ::temp0 label0 ;@line 31
  192. ASSIGN AlreadyLoaded True ;@line 32
  193. ARRAYCREATE ::PerkMagsInContainer_var 0 ;@line 33
  194. JUMP label0 ;@line 33
  195. label0:
  196. .endCode
  197. .endFunction
  198. .function DoThing
  199. .userFlags 0
  200. .docString ""
  201. .return None
  202. .paramTable
  203. .endParamTable
  204. .localTable
  205. .endLocalTable
  206. .code
  207. .endCode
  208. .endFunction
  209. .function OnWorkshopObjectGrabbed
  210. .userFlags 0
  211. .docString ""
  212. .return None
  213. .paramTable
  214. .param akReference ObjectReference
  215. .endParamTable
  216. .localTable
  217. .endLocalTable
  218. .code
  219. .endCode
  220. .endFunction
  221. .function DeletePerkMags
  222. .userFlags 0
  223. .docString ""
  224. .return None
  225. .paramTable
  226. .endParamTable
  227. .localTable
  228. .local ::nonevar None
  229. .local ::temp61 Bool
  230. .local MaxCount Int
  231. .local Count Int
  232. .local ::temp62 magazinerackcontainerscript#displayperkmagstruct
  233. .local ::temp63 ObjectReference
  234. .local ::temp74 magazinerackcontainerscript#displayperkmagstruct
  235. .local ::temp75 ObjectReference
  236. .endLocalTable
  237. .code
  238. JUMP label0 ;@line 162
  239. label0:
  240. .endCode
  241. .endFunction
  242. .function ::remote_ObjectReference_OnContainerChanged
  243. .userFlags 0
  244. .docString ""
  245. .return None
  246. .paramTable
  247. .param akSender ObjectReference
  248. .param akNewContainer ObjectReference
  249. .param akOldContainer ObjectReference
  250. .endParamTable
  251. .localTable
  252. .local ::temp32 ScriptObject
  253. .local ::nonevar None
  254. .local ::temp33 form
  255. .endLocalTable
  256. .code
  257. CAST ::temp32 akSender ;@line 110
  258. CALLMETHOD UnregisterForRemoteEvent self ::nonevar ::temp32 "OnContainerChanged" ;@line 110
  259. CALLMETHOD GetBaseObject akSender ::temp33 ;@line 111
  260. CALLMETHOD RemoveItem self ::nonevar ::temp33 1 False None ;@line 111
  261. CALLMETHOD RemoveKeyword akSender ::nonevar ::BlockWorkshopInteractionKeyword_var ;@line 112
  262. .endCode
  263. .endFunction
  264. .function DisplayPerkMags
  265. .userFlags 0
  266. .docString ""
  267. .return None
  268. .paramTable
  269. .endParamTable
  270. .localTable
  271. .local ::nonevar None
  272. .local ::temp37 Bool
  273. .local MaxCount Int
  274. .local ::temp38 Bool
  275. .local Count Int
  276. .local ::temp39 Int
  277. .local ::temp40 String
  278. .local ::temp46 form
  279. .local ::temp49 magazinerackcontainerscript#displayperkmagstruct
  280. .local ::temp50 ObjectReference
  281. .local ::temp51 magazinerackcontainerscript#displayperkmagstruct
  282. .local ::temp52 ObjectReference
  283. .local ::temp53 ScriptObject
  284. .local ::temp54 Bool
  285. .local ::temp55 Bool
  286. .local ::temp56 Bool
  287. .local ::temp57 Bool
  288. .endLocalTable
  289. .code
  290. ARRAYLENGTH MaxCount ::PerkMagsInContainer_var ;@line 119
  291. COMPAREGT ::temp37 MaxCount 0 ;@line 120
  292. JUMPF ::temp37 label0 ;@line 120
  293. ASSIGN Count 0 ;@line 121
  294. label2:
  295. COMPARELT ::temp38 Count MaxCount ;@line 122
  296. JUMPF ::temp38 label1 ;@line 122
  297. ARRAYGETELEMENT ::temp51 ::DisplayPerkMagStructArray_var Count ;@line 125
  298. STRUCTGET ::temp40 ::temp51 PerkMagDisplayNode ;@line 125
  299. ARRAYGETELEMENT ::temp46 ::PerkMagsInContainer_var Count ;@line 125
  300. CALLMETHOD PlaceAtNode self ::temp50 ::temp40 ::temp46 1 False False False True ;@line 125
  301. ARRAYGETELEMENT ::temp49 ::DisplayPerkMagStructArray_var Count ;@line 125
  302. STRUCTSET ::temp49 PerkMagDisplayRef ::temp50 ;@line 125
  303. ARRAYGETELEMENT ::temp49 ::DisplayPerkMagStructArray_var Count ;@line 127
  304. STRUCTGET ::temp50 ::temp49 PerkMagDisplayRef ;@line 127
  305. CAST ::temp53 ::temp50 ;@line 127
  306. CALLMETHOD RegisterForRemoteEvent self ::temp54 ::temp53 "OnContainerChanged" ;@line 127
  307. ARRAYGETELEMENT ::temp51 ::DisplayPerkMagStructArray_var Count ;@line 128
  308. STRUCTGET ::temp52 ::temp51 PerkMagDisplayRef ;@line 128
  309. PROPGET Motion_Keyframed self ::temp39 ;@line 128
  310. CALLMETHOD SetMotionType ::temp52 ::nonevar ::temp39 False ;@line 128
  311. ARRAYGETELEMENT ::temp49 ::DisplayPerkMagStructArray_var Count ;@line 129
  312. STRUCTGET ::temp50 ::temp49 PerkMagDisplayRef ;@line 129
  313. CALLMETHOD AddKeyword ::temp50 ::nonevar ::BlockWorkshopInteractionKeyword_var ;@line 129
  314. CALLMETHOD AddKeyword ::temp50 ::nonevar ::PerkMagKeyword_var ;@line 129
  315. ARRAYGETELEMENT ::temp51 ::DisplayPerkMagStructArray_var Count ;@line 130
  316. STRUCTGET ::temp52 ::temp51 PerkMagDisplayRef ;@line 130
  317. CALLMETHOD SetNoFavorAllowed ::temp52 ::nonevar True ;@line 130
  318. ARRAYGETELEMENT ::temp49 ::DisplayPerkMagStructArray_var Count ;@line 131
  319. STRUCTGET ::temp50 ::temp49 PerkMagDisplayRef ;@line 131
  320. CALLMETHOD SetPlayerHasTaken ::temp50 ::nonevar True ;@line 131
  321. IADD Count Count 1 ;@line 132
  322. JUMP label2 ;@line 132
  323. label1:
  324. ARRAYLENGTH MaxCount ::PerkMagsInContainer_var ;@line 133
  325. COMPAREGT ::temp37 MaxCount 0 ;@line 133
  326. JUMPF ::temp37 label0 ;@line 134
  327. ARRAYGETELEMENT ::temp46 ::PerkMagsInContainer_var 0 ;@line 134
  328. CALLMETHOD RemoveItem self ::nonevar ::temp46 1 False None ;@line 134
  329. JUMP label1 ;@line 134
  330. label0:
  331. JUMPF ::IsSwivelRack_var label3 ;@line 135
  332. COMPAREEQ ::temp54 ::SwivelRackStage_var 1 ;@line 136
  333. JUMPF ::temp54 label4 ;@line 136
  334. ASSIGN ::SwivelRackStage_var 2 ;@line 137
  335. CALLMETHOD PlayAnimation self ::temp38 "Stage2" ;@line 138
  336. JUMP label5 ;@line 138
  337. label4:
  338. COMPAREEQ ::temp37 ::SwivelRackStage_var 2 ;@line 139
  339. JUMPF ::temp37 label6 ;@line 139
  340. ASSIGN ::SwivelRackStage_var 3 ;@line 140
  341. CALLMETHOD PlayAnimation self ::temp55 "Stage3" ;@line 141
  342. JUMP label5 ;@line 141
  343. label6:
  344. COMPAREEQ ::temp55 ::SwivelRackStage_var 3 ;@line 142
  345. JUMPF ::temp55 label7 ;@line 142
  346. ASSIGN ::SwivelRackStage_var 4 ;@line 143
  347. CALLMETHOD PlayAnimation self ::temp56 "Stage4" ;@line 144
  348. JUMP label5 ;@line 144
  349. label7:
  350. COMPAREEQ ::temp56 ::SwivelRackStage_var 4 ;@line 145
  351. JUMPF ::temp56 label5 ;@line 145
  352. ASSIGN ::SwivelRackStage_var 1 ;@line 146
  353. CALLMETHOD PlayAnimation self ::temp57 "Reset" ;@line 147
  354. JUMP label5 ;@line 147
  355. label5:
  356. JUMP label3 ;@line 147
  357. label3:
  358. .endCode
  359. .endFunction
  360. .function OnItemRemoved
  361. .userFlags 0
  362. .docString ""
  363. .return None
  364. .paramTable
  365. .param akBaseItem form
  366. .param aiItemCount Int
  367. .param akItemReference ObjectReference
  368. .param akDestContainer ObjectReference
  369. .endParamTable
  370. .localTable
  371. .local ::nonevar None
  372. .local ::temp29 Bool
  373. .local ::temp31 Bool
  374. .local ItemIndex Int
  375. .endLocalTable
  376. .code
  377. ARRAYFINDELEMENT ::PerkMagsInContainer_var ItemIndex akBaseItem 0 ;@line 99
  378. COMPAREGTE ::temp31 ItemIndex 0 ;@line 100
  379. JUMPF ::temp31 label0 ;@line 100
  380. ARRAYREMOVEELEMENTS ::PerkMagsInContainer_var ItemIndex 1 ;@line 103
  381. JUMP label0 ;@line 103
  382. label0:
  383. JUMP label1 ;@line 103
  384. label1:
  385. .endCode
  386. .endFunction
  387. .function OnWorkshopObjectDestroyed
  388. .userFlags 0
  389. .docString ""
  390. .return None
  391. .paramTable
  392. .param akActionRef ObjectReference
  393. .endParamTable
  394. .localTable
  395. .local ::nonevar None
  396. .endLocalTable
  397. .code
  398. CALLMETHOD DeletePerkMags self ::nonevar ;@line 183
  399. .endCode
  400. .endFunction
  401. .endState
  402. .state Busy
  403. .endState
  404. .state AllowActivate
  405. .function OnActivate
  406. .userFlags 0
  407. .docString ""
  408. .return None
  409. .paramTable
  410. .param akActionRef ObjectReference
  411. .endParamTable
  412. .localTable
  413. .local ::nonevar None
  414. .local ::temp5 actor
  415. .local ::temp6 ObjectReference
  416. .local ::temp7 Bool
  417. .endLocalTable
  418. .code
  419. CALLMETHOD GoToState self ::nonevar "Busy" ;@line 44
  420. CALLMETHOD BlockActivation self ::nonevar True False ;@line 45
  421. CALLMETHOD AddInventoryEventFilter self ::nonevar None ;@line 46
  422. CALLSTATIC game GetPlayer ::temp5 ;@line 49
  423. CAST ::temp6 ::temp5 ;@line 49
  424. COMPAREEQ ::temp7 akActionRef ::temp6 ;@line 49
  425. JUMPF ::temp7 label0 ;@line 49
  426. CALLSTATIC utility Wait ::nonevar 0.100000 ;@line 51
  427. CALLMETHOD DisplayPerkMags self ::nonevar ;@line 52
  428. JUMP label0 ;@line 52
  429. label0:
  430. CALLMETHOD GoToState self ::nonevar "AllowActivate" ;@line 55
  431. CALLMETHOD BlockActivation self ::nonevar False False ;@line 56
  432. .endCode
  433. .endFunction
  434. .endState
  435. .endStateTable
  436. .endObject
  437. .endObjectTable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement