Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on define me, tsprite, tCount
- tWndObj = getWindow(getText("win_purse", "Habbo Purse"))
- pElement = tWndObj.getElement("fly_" & tCount)
- pElement.setProperty(#visible, 1)
- pFlyMember = 1
- pMyDir = 1
- pMyDir = [1, 3, 1, 4][tCount]
- pWinTop = 120
- pWinBottom = 185
- pWinLeft = 45
- pWinRight = 285
- pMyNum = tCount
- pWayCounter = 1
- return(1)
- end
- on animateFly me
- tList = getWindow(getText("win_purse", "Habbo Purse")).getProperty(#spriteList)
- tSpr = tList["fly_" & pMyNum]
- tFly = member(getmemnum("purse_fly" & pFlyMember))
- pElement.setProperty(#member, tFly)
- pElement.setProperty(#width, tFly.width)
- pElement.setProperty(#height, tFly.height)
- tLocX = pElement.getProperty(#locX)
- tLocY = pElement.getProperty(#locY)
- --PEEKFROMSTACK 0
- if 1 = tLocX < pWinLeft then -- jump 34
- if pMyDir = 2 then -- jump 17
- tSpr.flipH = 0
- pMyDir = 1
- -- jump 8
- end if -- jump 17 landing
- pWayCounter = 6
- end if -- jump 8 landing
- -- jump 130
- end if -- jump 34 landing
- --PEEKFROMSTACK 0
- if tLocX > pWinRight then -- jump 35
- if pMyDir = 1 then -- jump 18
- tSpr.flipH = 1
- pMyDir = 2
- -- jump 8
- end if -- jump 18 landing
- pWayCounter = 1
- end if -- jump 8 landing
- -- jump 86
- end if -- jump 35 landing
- --PEEKFROMSTACK 0
- if tLocY > pWinBottom then -- jump 34
- if pMyDir = 4 then -- jump 17
- tSpr.flipV = 0
- pMyDir = 3
- -- jump 8
- end if -- jump 17 landing
- pWayCounter = 11
- end if -- jump 8 landing
- -- jump 43
- end if -- jump 34 landing
- --PEEKFROMSTACK 0
- if tLocY < pWinTop then -- jump 31
- if pMyDir = 3 then -- jump 18
- tSpr.flipV = 1
- pMyDir = 4
- -- jump 7
- end if -- jump 18 landing
- pWayCounter = 0
- end if -- jump 7 landing
- end if -- jump 31 landing
- end if -- jump 43 landing
- end if -- jump 86 landing
- end if -- jump 130 landing
- --TRIMFROMSTACK 1
- if pMyDir < 3 then -- jump 84
- --PEEKFROMSTACK 0 if 1 = pWayCounter <= 10 then -- jump 10
- tY = 2
- -- jump 46
- end if -- jump 10 landing
- --PEEKFROMSTACK 0
- if pWayCounter > 10 and pWayCounter <= 20 then -- jump 11
- tY = -2
- -- jump 19
- end if -- jump 11 landing
- --PEEKFROMSTACK 0
- if pWayCounter > 20 then -- jump 7
- pWayCounter = 0
- end if -- jump 7 landing
- end if -- jump 19 landing
- end if -- jump 46 landing
- --TRIMFROMSTACK 1
- pFlyMember = 3 + pFlyMember = 3
- -- jump 81
- end if -- jump 84 landing
- --PEEKFROMSTACK 0 if 1 = pWayCounter <= 5 then -- jump 11
- tX = -5
- -- jump 45
- end if -- jump 11 landing
- --PEEKFROMSTACK 0
- --nil-- = pWayCounter > 5 and pWayCounter <= 10
- if --nil-- then -- jump 10
- tX = 5
- -- jump 19
- end if -- jump 10 landing
- --PEEKFROMSTACK 0
- --nil-- = pWayCounter > 10
- if --nil-- then -- jump 7
- pWayCounter = 0
- end if -- jump 7 landing
- end if -- jump 19 landing
- end if -- jump 45 landing
- --TRIMFROMSTACK 1
- pFlyMember = 1 + pFlyMember = 1
- end if -- jump 81 landing
- --PEEKFROMSTACK 0 if pMyDir = 1 then -- jump 24
- pElement.moveTo(tLocX + 7, tLocY + tY)
- -- jump 87
- end if -- jump 24 landing
- --PEEKFROMSTACK 0
- --nil-- = 2
- if --nil-- then -- jump 24
- pElement.moveTo(tLocX - 7, tLocY + tY)
- -- jump 58
- end if -- jump 24 landing
- --PEEKFROMSTACK 0
- --nil-- = 3
- if --nil-- then -- jump 24
- pElement.moveTo(tLocX + tX, tLocY - 3)
- -- jump 29
- end if -- jump 24 landing
- --PEEKFROMSTACK 0
- --nil-- = 4
- if --nil-- then -- jump 21
- pElement.moveTo(tLocX + tX, tLocY + 3)
- end if -- jump 21 landing
- end if -- jump 29 landing
- end if -- jump 58 landing
- end if -- jump 87 landing
- --TRIMFROMSTACK 1
- pWayCounter = pWayCounter + 1
- end
- on hideFlies me
- tWndObj = getWindow(getText("win_purse", "Habbo Purse"))
- pElement = tWndObj.getElement("fly_" & pMyNum)
- pElement.setProperty(#visible, 0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement