Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. on define me, tsprite, tCount
  2. tWndObj = getWindow(getText("win_purse", "Habbo Purse"))
  3. pElement = tWndObj.getElement("fly_" & tCount)
  4. pElement.setProperty(#visible, 1)
  5. pFlyMember = 1
  6. pMyDir = 1
  7. pMyDir = [1, 3, 1, 4][tCount]
  8. pWinTop = 120
  9. pWinBottom = 185
  10. pWinLeft = 45
  11. pWinRight = 285
  12. pMyNum = tCount
  13. pWayCounter = 1
  14. return(1)
  15. end
  16.  
  17. on animateFly me
  18. tList = getWindow(getText("win_purse", "Habbo Purse")).getProperty(#spriteList)
  19. tSpr = tList["fly_" & pMyNum]
  20. tFly = member(getmemnum("purse_fly" & pFlyMember))
  21. pElement.setProperty(#member, tFly)
  22. pElement.setProperty(#width, tFly.width)
  23. pElement.setProperty(#height, tFly.height)
  24. tLocX = pElement.getProperty(#locX)
  25. tLocY = pElement.getProperty(#locY)
  26.  
  27. --PEEKFROMSTACK 0
  28. if 1 = tLocX < pWinLeft then -- jump 34
  29. if pMyDir = 2 then -- jump 17
  30. tSpr.flipH = 0
  31. pMyDir = 1
  32. -- jump 8
  33. end if -- jump 17 landing
  34. pWayCounter = 6
  35. end if -- jump 8 landing
  36. -- jump 130
  37. end if -- jump 34 landing
  38. --PEEKFROMSTACK 0
  39. if tLocX > pWinRight then -- jump 35
  40. if pMyDir = 1 then -- jump 18
  41. tSpr.flipH = 1
  42. pMyDir = 2
  43. -- jump 8
  44. end if -- jump 18 landing
  45. pWayCounter = 1
  46. end if -- jump 8 landing
  47. -- jump 86
  48. end if -- jump 35 landing
  49. --PEEKFROMSTACK 0
  50. if tLocY > pWinBottom then -- jump 34
  51. if pMyDir = 4 then -- jump 17
  52. tSpr.flipV = 0
  53. pMyDir = 3
  54. -- jump 8
  55. end if -- jump 17 landing
  56. pWayCounter = 11
  57. end if -- jump 8 landing
  58. -- jump 43
  59. end if -- jump 34 landing
  60. --PEEKFROMSTACK 0
  61. if tLocY < pWinTop then -- jump 31
  62. if pMyDir = 3 then -- jump 18
  63. tSpr.flipV = 1
  64. pMyDir = 4
  65. -- jump 7
  66. end if -- jump 18 landing
  67. pWayCounter = 0
  68. end if -- jump 7 landing
  69. end if -- jump 31 landing
  70. end if -- jump 43 landing
  71. end if -- jump 86 landing
  72. end if -- jump 130 landing
  73. --TRIMFROMSTACK 1
  74. if pMyDir < 3 then -- jump 84
  75. --PEEKFROMSTACK 0 if 1 = pWayCounter <= 10 then -- jump 10
  76. tY = 2
  77. -- jump 46
  78. end if -- jump 10 landing
  79. --PEEKFROMSTACK 0
  80. if pWayCounter > 10 and pWayCounter <= 20 then -- jump 11
  81. tY = -2
  82. -- jump 19
  83. end if -- jump 11 landing
  84. --PEEKFROMSTACK 0
  85. if pWayCounter > 20 then -- jump 7
  86. pWayCounter = 0
  87. end if -- jump 7 landing
  88. end if -- jump 19 landing
  89. end if -- jump 46 landing
  90. --TRIMFROMSTACK 1
  91. pFlyMember = 3 + pFlyMember = 3
  92. -- jump 81
  93. end if -- jump 84 landing
  94. --PEEKFROMSTACK 0 if 1 = pWayCounter <= 5 then -- jump 11
  95. tX = -5
  96. -- jump 45
  97. end if -- jump 11 landing
  98. --PEEKFROMSTACK 0
  99. --nil-- = pWayCounter > 5 and pWayCounter <= 10
  100. if --nil-- then -- jump 10
  101. tX = 5
  102. -- jump 19
  103. end if -- jump 10 landing
  104. --PEEKFROMSTACK 0
  105. --nil-- = pWayCounter > 10
  106. if --nil-- then -- jump 7
  107. pWayCounter = 0
  108. end if -- jump 7 landing
  109. end if -- jump 19 landing
  110. end if -- jump 45 landing
  111. --TRIMFROMSTACK 1
  112. pFlyMember = 1 + pFlyMember = 1
  113. end if -- jump 81 landing
  114. --PEEKFROMSTACK 0 if pMyDir = 1 then -- jump 24
  115. pElement.moveTo(tLocX + 7, tLocY + tY)
  116. -- jump 87
  117. end if -- jump 24 landing
  118. --PEEKFROMSTACK 0
  119. --nil-- = 2
  120. if --nil-- then -- jump 24
  121. pElement.moveTo(tLocX - 7, tLocY + tY)
  122. -- jump 58
  123. end if -- jump 24 landing
  124. --PEEKFROMSTACK 0
  125. --nil-- = 3
  126. if --nil-- then -- jump 24
  127. pElement.moveTo(tLocX + tX, tLocY - 3)
  128. -- jump 29
  129. end if -- jump 24 landing
  130. --PEEKFROMSTACK 0
  131. --nil-- = 4
  132. if --nil-- then -- jump 21
  133. pElement.moveTo(tLocX + tX, tLocY + 3)
  134. end if -- jump 21 landing
  135. end if -- jump 29 landing
  136. end if -- jump 58 landing
  137. end if -- jump 87 landing
  138. --TRIMFROMSTACK 1
  139. pWayCounter = pWayCounter + 1
  140. end
  141.  
  142. on hideFlies me
  143. tWndObj = getWindow(getText("win_purse", "Habbo Purse"))
  144. pElement = tWndObj.getElement("fly_" & pMyNum)
  145. pElement.setProperty(#visible, 0)
  146. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement