Advertisement
BenArthur_7

Villager Turnip Probability

Dec 5th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. loc_74:
  2. pushInt. 0x0
  3. pushInt. 0x4000000 #refers to Group 16 parameter = 30
  4. sys. 0x2, 0x17
  5. floatVarSet 0x0, 0x2
  6. pushInt. 0x0
  7. pushInt. 0x4000001 #refers to Group 16 parameter = 30
  8. sys. 0x2, 0x17
  9. floatVarSet 0x0, 0x3
  10. pushInt. 0x0
  11. pushInt. 0x4000002 #refers to Group 16 parameter = 40
  12. sys. 0x2, 0x17
  13. floatVarSet 0x0, 0x4
  14. pushVar. 0x0, 0x2
  15. pushVar. 0x0, 0x3
  16. addf.
  17. pushVar. 0x0, 0x4
  18. addf.
  19. floatVarSet 0x0, 0x5 #equal to 30+30+40 = 100
  20. pushVar. 0x0, 0x2
  21. pushVar. 0x0, 0x5
  22. divf.
  23. floatVarSet 0x0, 0x2 #reset Var2 equal to 30/100 = 0.3
  24. pushVar. 0x0, 0x3
  25. pushVar. 0x0, 0x5
  26. divf.
  27. floatVarSet 0x0, 0x3 #reset Var3 equal to 30/100 = 0.3
  28. pushInt. 0x6
  29. sys. 0x1, 0xa #gets a random floating point number between 0 and 1
  30. floatVarSet 0x0, 0x6
  31. pushVar. 0x0, 0x6
  32. pushVar. 0x0, 0x2
  33. floatLess.
  34. if loc_FB
  35. pushInt. 0x1
  36. setVar 0x0, 0x1 #if RandF < 0.3, set Var1 = 1
  37. else loc_125
  38.  
  39. loc_FB:
  40. pushVar. 0x0, 0x6 #runs this loc if RandF is not < 0.3
  41. pushVar. 0x0, 0x2
  42. pushVar. 0x0, 0x3
  43. addf.
  44. floatLess.
  45. if loc_11C
  46. pushInt. 0x2
  47. setVar 0x0, 0x1 #if RandF < (0.3 + 0.3), set Var1 = 2
  48. else loc_125
  49.  
  50. loc_11C:
  51. pushInt. 0x3 #runs this loc if RandF is also not < (0.3 + 0.3)
  52. setVar 0x0, 0x1 #set Var1 to 3
  53.  
  54. loc_125:
  55. pushInt. 0x7
  56. pushVar. 0x0, 0x1
  57. pushInt. 0x11000004 #set basic variable 0x11000004 to Var1. This variable is referenced in the uair/dair ACMD scripts
  58. sys 0x3, 0x16
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement