Txt = InputBox("enter number of alpha")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p"&ShockwaveFlash1.GetVariable("_level0.instance.shell.my_player.player_id")&"._alpha",Txt)
20 Comments:
end sub
be mod :
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.INT ERFACE.is_moderator", True)
change username: Call ShockwaveFlash1.SetVariable("_level0.instance.shell.INTERFACE.nicknames_mc.p"&ShockwaveFlash1.GetVariable("_level0.instance.shell.SHELL.my_player.player_id")&".name_txt.text",InputBox("Enter Your New Username"))
fill servers:
For ServerNumber = 0 To 999
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLO BAL_CRUMBS.servers." & ServerNumber & ".population", "552")
Next ServerNumber
edit coins:
Dim Txt
Txt = InputBox("Please Type Your Wanted Coin Amount")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.my _player.coins", Txt)
rename servers:
Txt = InputBox("pick a name for a server")
For serverid = 0 To 999
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLO BAL_CRUMBS.servers.142.name", Txt)
Next serverid
steel player:
MsgBox ("please open the player card you want")
Call Form1.ShockwaveFlash1.SetVariable("_level0.instance.shell.SHELL.my_player.player_id",ShockwaveFlash1.GetVariable("_level0.instance.shell.INTERFACE.active_player_object.player_id"))
stop triggers:
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.ENG INE.my_room_movieclips.triggers_mc", False)
Dim txt
txt = InputBox(“Please enter a name for your server name.”)
MsgBox (“Now scroll down till you see your sever you made”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.name”, txt)
End Sub
Private Sub alpha_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) &“._alpha”, InputBox(“Please Set Your Alpha [1 Is Invisible-100 Is Visible]“))
End Sub
Private Sub amiamem_Click()
MsgBox (“Member Status: ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.is_member”) & “.”)
End Sub
Private Sub amisafe_Click()
MsgBox (“Safe Chat Status: ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.is_safemode”) & “.”)
End Sub
Private Sub big_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”)& “._height”, 500)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 500)
End Sub
Private Sub bodyid_Click()
MsgBox (“Your Body Item ID Is ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.body”) & “.”)
End Sub
Private Sub changeyourage_Click()
Dim txt
txt = InputBox(“Please Type Your Wanted Age”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.my_player.created_date”, txt)
End Sub
Private Sub changeyourcoins_Click()
Dim txt
txt = InputBox(“Please Type Your Wanted Coin Amount”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.my_player.coins”, txt)
End Sub
Private Sub changeyourusername_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.INTERFACE.nicknames_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “.name_txt.text”, InputBox(“Enter The Name You Want ToHave.”))
End Sub
Private Sub custom_Click()
Dim txt
txt = InputBox(“Please Type How Long You Want To Be Idle For (Minutes)”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, txt)
End Sub
Private Sub customheight_Click()
txt = InputBox(“Please Enter Your Wanted Height.”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, txt)
End Sub
Private Sub customhowfull_Click
txt = InputBox(“Pelase Type What Population You Would Like For All THe Servers (Please don’t type 5 bars, Heres what to to for an example: Full is 9 and Empty is 0)”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.101.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.102.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.103.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.104.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.105.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.106.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.107.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.108.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.109.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.110.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.111.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.112.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.113.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.114.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.115.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.116.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.117.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.118.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.120.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.121.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.122.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.123.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.124.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.125.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.126.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.127.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.128.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.129.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.130.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.131.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.132.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.133.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.134.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.135.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.136.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.137.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.138.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.139.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.140.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.141.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.143.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.144.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.145.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.146.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.147.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.148.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.149.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.150.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.151.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.152.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.153.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.154.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.155.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.156.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.157.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.158.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.159.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.160.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.161.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.162.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.163.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.164.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.165.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.166.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.167.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.168.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.169.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.170.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.200.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.201.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.202.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.203.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.204.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.206.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.205.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.207.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.208.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.209.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.210.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.211.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.212.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.213.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.214.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.215.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.300.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.301.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.302.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.303.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.304.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.305.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.306.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.307.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.308.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.309.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.310.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.311.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.312.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.313.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.314.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.315.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.400.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.401.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.402.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.403.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.404.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.405.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.406.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.407.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.408.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.409.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.410.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.411.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.171.population”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.119.population”, txt)
End Sub
Private Sub customsize_Click()
Dim txt
txt = InputBox(“Please Enter Your Wanted Width.”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, txt)
End Sub
Private Sub customwidth_Click()
Dim txt
txt = InputBox(“Please Enter Your Wanted Height.”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, txt)
End Sub
Private Sub emptyservers_Click()
MsgBox (“All servers are now empty!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.101.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.102.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.103.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.104.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.105.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.106.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.107.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.108.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.109.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.110.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.111.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.112.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.113.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.114.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.115.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.116.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.117.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.118.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.120.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.121.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.122.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.123.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.124.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.125.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.126.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.127.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.128.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.129.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.130.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.131.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.132.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.133.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.134.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.135.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.136.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.137.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.138.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.139.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.140.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.141.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.143.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.144.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.145.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.146.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.147.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.148.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.149.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.150.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.151.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.152.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.153.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.154.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.155.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.156.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.157.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.158.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.159.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.160.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.161.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.162.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.163.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.164.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.165.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.166.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.167.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.168.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.169.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.170.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.200.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.201.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.202.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.203.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.204.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.206.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.205.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.207.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.208.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.209.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.210.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.211.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.212.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.213.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.214.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.215.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.300.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.301.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.302.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.303.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.304.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.305.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.306.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.307.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.308.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.309.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.310.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.311.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.312.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.313.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.314.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.315.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.400.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.401.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.402.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.403.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.404.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.405.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.406.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.407.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.408.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.409.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.410.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.411.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.171.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.119.population”, “0″)
End Sub
Private Sub english_Click()
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf”
ShockwaveFlash1.Play
End Sub
Private Sub fat_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, 50)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 700)
End Sub
Private Sub Form_Load()
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf”
ShockwaveFlash1.Play
End Sub
Private Sub french_Click()
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?aff=0&lang=fr”
ShockwaveFlash1.Play
End Sub
Private Sub fullservers_Click()
MsgBox (“All servers are now full!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.101.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.102.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.103.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.104.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.105.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.106.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.107.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.108.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.109.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.110.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.111.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.112.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.113.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.114.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.115.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.116.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.117.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.118.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.120.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.121.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.122.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.123.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.124.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.125.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.126.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.127.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.128.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.129.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.130.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.131.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.132.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.133.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.134.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.135.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.136.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.137.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.138.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.139.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.140.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.141.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.143.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.144.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.145.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.146.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.147.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.148.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.149.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.150.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.151.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.152.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.153.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.154.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.155.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.156.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.157.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.158.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.159.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.160.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.161.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.162.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.163.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.164.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.165.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.166.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.167.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.168.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.169.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.170.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.200.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.201.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.202.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.203.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.204.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.206.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.205.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.207.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.208.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.209.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.210.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.211.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.212.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.213.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.214.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.215.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.300.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.301.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.302.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.303.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.304.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.305.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.306.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.307.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.308.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.309.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.310.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.311.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.312.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.313.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.314.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.315.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.400.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.401.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.402.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.403.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.404.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.405.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.406.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.407.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.408.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.409.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.410.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.411.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.171.population”, “999999999″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.119.population”, “999999999″)
End Sub
Private Sub howmuchcoinsdoihave_Click()
MsgBox (“You Have ” & ShockwaveFlash1.GetVariable(“_level0.instance.my_player.coins”))
End Sub
Private Sub huge_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, 900)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 900)
End Sub
Private Sub icerinkmode_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.ease_method”, “easeInOutQuad”)
End Sub
Private Sub Idelfor3minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “3#”)
End Sub
Private Sub idlefor1_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “1#”)
End Sub
Private Sub idlefor2minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “2#”)
End Sub
Private Sub idlefor4minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “4#”)
End Sub
Private Sub idlefor5minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “5#”)
End Sub
Private Sub idlefor6minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “6#”)
End Sub
Private Sub idlefor7minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “7#”)
End Sub
Private Sub idlefor8minutes_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “8#”)
End Sub
Private Sub invisible_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, 0)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 0)
End Sub
Private Sub isrhonline_Click()
MsgBox (“Is Rockhopper Logged on Club Penguin Right Now?: ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.mascot_options.migrator_active”))
End Sub
Private Sub lastban_Click()
MsgBox (“Your Age Before Your Last Ban Was : ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.banned_age”) & “.”)
End Sub
Private Sub medium_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, 35)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 35)
End Sub
Private Sub never_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “9999999#”)
End Sub
Private Sub nomod_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.INTERFACE.is_moderator”, False)
End Sub
Private Sub nomemb_Click()
MsgBox (“Your Penguin Is Now Not A Member!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.my_player.is_member”, False)
End Sub
Private Sub normal_Click(Index As Integer)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.idle_timeout”, “10#”)
End Sub
Private Sub portuguese_Click()
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?aff=0&lang=pt”
ShockwaveFlash1.Play
End Sub
Private Sub renameallservers_Click()
Dim txt
txt = InputBox(“Please enter a name for all of the servers.”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.101.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.102.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.103.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.104.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.105.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.106.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.107.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.108.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.109.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.110.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.111.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.112.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.113.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.114.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.115.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.116.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.117.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.118.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.120.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.121.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.122.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.123.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.124.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.125.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.126.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.127.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.128.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.129.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.130.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.131.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.132.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.133.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.134.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.135.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.136.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.137.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.138.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.139.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.140.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.141.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.143.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.144.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.145.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.146.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.147.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.148.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.149.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.150.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.151.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.152.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.153.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.154.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.155.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.156.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.157.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.158.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.159.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.160.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.161.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.162.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.163.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.164.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.165.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.166.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.167.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.168.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.169.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.170.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.171.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.200.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.201.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.202.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.203.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.204.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.205.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.206.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.207.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.208.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.209.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.210.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.211.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.212.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.213.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.214.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.215.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.300.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.301.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.302.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.303.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.304.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.305.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.306.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.307.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.308.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.309.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.310.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.311.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.312.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.313.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.314.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.315.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.400.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.401.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.402.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.403.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.404.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.405.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.406.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.407.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.408.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.409.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.410.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.411.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.119.name”, txt)
End Sub
Private Sub ShockwaveFlash1_OnReadyStateChange(newState As Long)
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf”
ShockwaveFlash1.Play
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.analytics.sendToOmniture”, “cpsuck”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.LOCAL_CRUMBS.lang.please select a world”, “welcome welcome”)
End Sub
Private Sub showpenguinID_Click()
MsgBox (“This Penguin’s Id Is: ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.INTERFACE.active_player_object.player_id”) & “.”)
End Sub
Private Sub skinny_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, 500)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 50)
End Sub
Private Sub sowotherpenguinid_Click()
MsgBox (“Please note that you need to have their playercard open to do this”)
MsgBox (“This Penguin’s Id Is: ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.INTERFACE.active_player_object.player_id”) & “.”)
End Sub
Private Sub tiny_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, 5)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, 5)
End Sub
Private Sub walkonwalls_Click()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.block_mc._x”, -5000)
End Sub
Private Sub yesmemb_Click()
MsgBox (“Your Penguin Is Now A Member!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.my_player.is_member”, True)
end sub
Call ShockwaveFlash1.SetVariable(”_root.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(”_root.instance.shell.SHELL.my_player.player_id”) & “._rotation”, InputBox(”Please Set”))
Private Sub black_Click()
On Error Resume Next
Dim var_normalblack
var_normalblack = “0×333333″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_normalblack)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_normalblack)
End Sub
Private Sub blue_Click()
On Error Resume Next
Dim var_blue
var_blue = “0×003366″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_blue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_blue)
End Sub
Private Sub bodyid_Click()
On Error Resume Next
MsgBox (“Your Body Item ID Is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.body”) & (“.”)
MsgBox (“The name is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.body” & “.name”) & (“.”)
End Sub
Private Sub Boileranddancemusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://play.clubpenguin.com/v2/content/global/music/6.swf”
ShockwaveFlash2.Play
End Sub
Private Sub bonusgame_Click()
On Error Resume Next
Form2.Show
End Sub
Private Sub brown_Click()
On Error Resume Next
Dim var_brown
var_brown = “0×996600″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_brown)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_brown)
End Sub
Private Sub buybluemailbag_Click()
On Error Resume Next
Call ShockwaveFlash1.LoadMovie(2, App.Path & “/flash.swf?w=item&theid=317″)
End Sub
Private Sub CoffeeShopmusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://play.clubpenguin.com/v2/content/global/music/1.swf”
ShockwaveFlash2.Play
End Sub
Private Sub coinsinfo_Click()
On Error Resume Next
MsgBox (“You Have “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.coins”) & (“.”)
End Sub
Private Sub Command1_Click()
Call ShockwaveFlash1.SetVariable(“_level0.holder_mc.SHELL.my_player.is_member”, True)
End Sub
Private Sub Command2_Click()
Shell App.Path & “/” & App.Title & “.exe”
Form2.Hide
Form1.Hide
End
End Sub
Private Sub coololdmusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://clubpenguin.com/flash/500.swf”
ShockwaveFlash2.Play
End Sub
Private Sub copykat77website_Click()
On Error Resume Next
MsgBox (“You are now going to a website.”)
Call GoToWebsite(Me, “http://theonlybestcptrainerandcheats.wordpress.com”)
End Sub
Private Sub cpsite_Click()
On Error Resume Next
MsgBox (“You are now going to a website.”)
Call GoToWebsite(Me, “http://www.clubpenguin.com”)
End Sub
Private Sub dancemixmusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://play.clubpenguin.com/v2/content/global/music/2.swf”
ShockwaveFlash2.Play
End Sub
Private Sub darkblack_Click()
On Error Resume Next
Dim var_cdb1
var_cdb1 = “0×000000″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_cdb1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_cdb1)
End Sub
Private Sub darkgreen_Click()
On Error Resume Next
Dim var_darkgreen
var_darkgreen = “0×006600″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_darkgreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_darkgreen)
End Sub
Private Sub darkpurple_Click()
On Error Resume Next
Dim var_darkpurple
var_darkpurple = “0×660099″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_darkpurple)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_darkpurple)
End Sub
Private Sub emptyservers_Click()
On Error Resume Next
MsgBox (“This does not work with new servers made. Click ok to empty servers.”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.101.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.102.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.103.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.104.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.105.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.106.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.107.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.108.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.109.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.110.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.111.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.112.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.113.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.114.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.115.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.116.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.117.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.118.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.119.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.120.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.121.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.122.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.123.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.124.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.125.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.126.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.127.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.128.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.129.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.130.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.131.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.132.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.133.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.134.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.135.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.136.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.137.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.138.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.139.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.140.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.141.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.143.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.144.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.145.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.146.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.147.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.148.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.149.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.150.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.151.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.152.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.153.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.154.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.155.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.156.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.157.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.158.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.159.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.160.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.161.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.162.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.163.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.164.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.165.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.166.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.167.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.168.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.170.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.171.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.200.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.201.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.202.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.203.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.204.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.205.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.206.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.207.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.208.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.209.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.210.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.211.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.212.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.213.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.214.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.215.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.300.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.301.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.302.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.303.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.304.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.305.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.306.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.307.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.308.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.309.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.310.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.311.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.312.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.313.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.314.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.315.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.400.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.401.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.402.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.403.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.404.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.405.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.406.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.407.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.408.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.409.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.410.population”, “0″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.411.population”, “0″)
End Sub
Private Sub english_Click()
On Error GoTo ErrorHandler2
Dim methodswf1
methodswf1 = ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_room.name”)
If methodswf1 = “undefined” Then
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=en”
ShockwaveFlash1.Play
Else
MsgBox “You can only change the language BEFORE login, please close and re-open the trainer.”, vbExclamation
End If
ErrorHandler2:
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=en”
ShockwaveFlash1.Play
End Sub
Private Sub enterid_Click()
On Error Resume Next
Dim theidinput
theidinput = InputBox(“What is the item ID of the item you want? You may need to click Patched ID Breakout if a ban message comes up!”)
Call ShockwaveFlash1.LoadMovie(2, CurDir & “/flash.swf?w=item&theid=” & theidinput)
End Sub
Private Sub faceid_Click()
On Error Resume Next
MsgBox (“Your Face Item ID Is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.face”) & (“.”)
End Sub
Private Sub feetid_Click()
On Error Resume Next
MsgBox (“Your Feet Item ID Is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.feet”) & (“.”)
End Sub
Private Sub Form_Load()
On Error Resume Next
Form1.Caption = Form1.Caption & ” | Opened at ” & Time
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf”
ShockwaveFlash1.Play
ShockwaveFlash2.Movie = “http://clubpenguin.com/flash/500.swf”
ShockwaveFlash2.Play
End Sub
Public Sub GoToWebsite(window As Variant, URL As String)
‘Opens the default webbrowser with url url,
‘window is a reference to a form/window
Dim ret&
ret& = ShellExecute(window.hwnd, “Open”, URL, “”, App.Path, 1)
End Sub
Private Sub Form_Paint()
If (Online = True) Then
If FileExists(CurDir & “/flash.swf”) = True Then
‘do nothing
ElseIf FileExists(CurDir & “/flash.swf”) = False Then
MsgBox “Error: flash.swf is missing, try extracting the .zip and making sure there is a flash.swf file in the same folder as the trainer”, vbCritical
Form2.Hide
End
End If
ElseIf (Online = False) Then
MsgBox “Error: You are not connected to the internet!”, vbCritical
Form2.Hide
End
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form2.Hide
Form1.Hide
End
End Sub
Private Sub french_Click()
On Error GoTo ErrorHandler3
Dim methodswf1
methodswf1 = ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_room.name”)
If methodswf1 = “undefined” Then
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=fr”
ShockwaveFlash1.Play
Else
MsgBox “You can only change the language BEFORE login, please close and re-open the trainer.”, vbExclamation
End If
ErrorHandler3:
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=fr”
ShockwaveFlash1.Play
End Sub
Private Sub gold_Click()
On Error Resume Next
Dim var_cg1
var_cg1 = “0xD4AF37″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_cg1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_cg1)
End Sub
Private Sub handid_Click()
On Error Resume Next
MsgBox (“Your Hand Item ID Is ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.hand”) & (“.”))
End Sub
Private Sub headid_Click()
On Error Resume Next
MsgBox (“Your Head Item ID Is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.head”) & (“.”)
End Sub
Private Sub hideerror_Click()
On Error Resume Next
Call ShockwaveFlash1.LoadMovie(2, App.Path & “/flash.swf?w=hideerror”)
End Sub
Private Sub icerinkmode_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.ease_method”, “easeInOutQuad”)
End Sub
Private Sub igloolockedinfo_Click()
On Error Resume Next
MsgBox (“Igloo Locked Status: “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.is_igloo_locked”) & (“.”)
End Sub
Private Sub itemeditmyside_Click()
Dim i
For i = 0 To 150
Call ShockwaveFlash1.SetVariable(“_level0.holder_mc.SHELL.room_player_list.” & i & “.head”, 413)
Next i
End Sub
Private Sub ivebeendelayed_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://web.archive.org/web/20070112101750/play.clubpenguin.com/music/3.swf”
ShockwaveFlash2.Play
End Sub
Private Sub joinroom_Click()
On Error Resume Next
Dim RoomNameInput
RoomNameInput = InputBox(“What room would you like to join?”)
Call ShockwaveFlash1.LoadMovie(2, App.Path & “/flash.swf?w=room&roomname=” & RoomNameInput)
End Sub
Private Sub lightblue_Click()
On Error Resume Next
Dim var_lightblue
var_lightblue = “0x0099CC”
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_lightblue)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_lightblue)
End Sub
Private Sub limegreen_Click()
On Error Resume Next
Dim var_limegreen
var_limegreen = “0x8AE302″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_limegreen)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_limegreen)
End Sub
Private Sub makemember_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.my_player.is_member”, True)
End Sub
Private Sub markwebsite_Click()
On Error Resume Next
MsgBox (“You are now going to a website.”)
Call GoToWebsite(Me, “http://dacpcheats.blogspot.com”)
End Sub
Private Sub memberinfo_Click()
On Error Resume Next
MsgBox (“Member Status: “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.is_member”) & (“.”)
End Sub
Private Sub monemaker_Click()
On Error Resume Next
Dim iResponce As Integer
iResponce = MsgBox(“To use the money maker you must go to a game but stay on the main screen of it. If you are in a game just click ok to enter your amount of money.”, vbOKOnly)
If iResponce = vbOK Then
Dim scorehereinput
scorehereinput = InputBox(“How much money do you want?”)
Call ShockwaveFlash1.LoadMovie(2, App.Path & “/flash.swf?w=money&scorehere=” & scorehereinput)
Else
‘do nothing
End If
End Sub
Private Sub neckid_Click()
On Error Resume Next
MsgBox (“Your Neck Item ID Is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.neck”) & (“.”)
End Sub
Private Sub nightclubmusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://play.clubpenguin.com/v2/content/global/music/5.swf”
ShockwaveFlash2.Play
End Sub
Private Sub normalsize_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, “41.85″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, “37.55″)
End Sub
Private Sub orange_Click()
On Error Resume Next
Dim var_orange
var_orange = “0xFF6600″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_orange)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_orange)
End Sub
Private Sub patchedidbreakout_Click()
On Error Resume Next
Call ShockwaveFlash1.LoadMovie(2, App.Path & “/flash.swf?w=breakout”)
End Sub
Private Sub peach_Click()
On Error Resume Next
Dim var_peach
var_peach = “0xFF6666″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, var_peach)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, var_peach)
End Sub
Private Sub penguin50alpha_Click()
End Sub
Private Sub penguinmadeinfo_Click()
On Error Resume Next
MsgBox (“How old is my penguin ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.created_date”) & (“.”))
End Sub
Private Sub pink_Click()
On Error Resume Next
Dim VAR_PINK
VAR_PINK = “0xFF3399″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, VAR_PINK)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, VAR_PINK)
End Sub
Private Sub PizzaParlourmusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://play.clubpenguin.com/v2/content/global/music/20.swf”
ShockwaveFlash2.Play
End Sub
Private Sub playerid_Click()
On Error Resume Next
MsgBox (“Your Player ID Is ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & (“.”))
Private Sub portugues_Click()
On Error GoTo ErrorHandler1
Dim methodswf1
methodswf1 = ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_room.name”)
If methodswf1 = “undefined” Then
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=pt”
ShockwaveFlash1.Play
Else
MsgBox “You can only change the language BEFORE login, please close and re-open the trainer.”, vbExclamation
End If
ErrorHandler1:
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=pt”
ShockwaveFlash1.Play
End Sub
Private Sub pufflebath_Click()
On Error Resume Next
MsgBox (“Coming Soon!”)
End Sub
Private Sub pufflefood_Click()
On Error Resume Next
MsgBox (“Coming Soon!”)
End Sub
Private Sub puffleplay_Click()
On Error Resume Next
MsgBox (“Coming Soon!”)
End Sub
Private Sub pufflerest_Click()
On Error Resume Next
MsgBox (“Coming Soon!”)
End Sub
Private Sub renameservers_Click()
On Error Resume Next
Dim txt
txt = InputBox(“Please enter a name for all of the servers.”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.100.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.101.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.102.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.103.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.104.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.105.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.106.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.107.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.108.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.109.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.110.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.111.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.112.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.113.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.114.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.115.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.116.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.117.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.118.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.120.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.121.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.122.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.123.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.124.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.125.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.126.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.127.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.128.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.129.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.130.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.131.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.132.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.133.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.134.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.135.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.136.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.137.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.138.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.139.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.140.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.141.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.143.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.144.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.145.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.146.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.147.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.148.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.149.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.150.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.151.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.152.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.153.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.154.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.155.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.156.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.157.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.158.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.159.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.160.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.161.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.162.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.163.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.164.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.165.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.166.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.167.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.168.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.169.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.170.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.171.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.200.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.201.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.202.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.203.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.204.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.205.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.206.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.207.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.208.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.209.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.210.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.211.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.212.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.213.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.214.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.215.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.300.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.301.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.302.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.303.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.304.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.305.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.306.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.307.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.308.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.309.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.310.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.311.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.312.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.313.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.314.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.315.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.400.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.401.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.402.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.403.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.404.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.405.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.406.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.407.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.408.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.409.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.410.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.411.name”, txt)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.119.name”, txt)
End Sub
Private Sub rockhoppership_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.mascot_options.migrator_active”, “true”)
End Sub
Private Sub roomid_Click()
On Error Resume Next
MsgBox (“Room ID Is ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.current_crumb_room_id”) & (“.”)
End Sub
Private Sub roomname_Click()
On Error Resume Next
MsgBox (“This Room Name Is ” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_room.name”) & (“.”)
End Sub
Private Sub safechatinfo_Click()
On Error Resume Next
MsgBox (“Safe Chat Status: “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.is_safemode”) & (“.”)
End Sub
Private Sub silver_Click()
On Error Resume Next
Dim VAR_CS1
VAR_CS1 = “0xC0C0C0″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, VAR_CS1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, VAR_CS1)
End Sub
Private Sub spanish_Click()
On Error GoTo ErrorHandler2
Dim methodswf1
methodswf1 = ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_room.name”)
If methodswf1 = “undefined” Then
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=es”
ShockwaveFlash1.Play
Else
MsgBox “You can only change the language BEFORE login, please close and re-open the trainer.”, vbExclamation
End If
ErrorHandler2:
ShockwaveFlash1.Base = “http://play.clubpenguin.com/”
ShockwaveFlash1.Movie = “http://media1.clubpenguin.com/play/v2/client/load.swf?lang=es”
ShockwaveFlash1.Play
End Sub
Private Sub stopmusic_Click()
On Error Resume Next
ShockwaveFlash2.Movie = “http://clubpenguin.com/flash/0.swf”
ShockwaveFlash2.Play
End Sub
Private Sub sizesmall_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._height”, “19.92″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENDINE.my_room_movieclips.room_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “._width”, “5.25″)
End Sub
Private Sub stoptriggers_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.engine.my_room_movieclips.triggers_mc”, “true”)
End Sub
Private Sub Timer1_Timer()
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.analytics.sendToOmniture”, “hrhrehhrt45848″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.loading._alpha”, “50″)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.loading.message_txt.text”, “Penguin Air!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.LOGIN_HOLDER.SELECT_WORLD_TXT.text”, “Welcome To Penguin Air!!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.servers.142.name”, “Cy Cy’s Server”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.LOGIN_HOLDER.PASSWORD_TXT.text”, “Yo Password:”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.LOGIN_HOLDER.PENGUIN_NAME_TXT.text”, “Yo Username:”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.LOGIN_HOLDER.BACK_TXT.text”, “Yo Return”)
End Sub
Private Sub unchanger_Click()
Dim NameInput As String
NameInput = InputBox(“Enter your new name! (Note that this only works on the screen and not on your playercard!”)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.INTERFACE.nicknames_mc.p” & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.player_id”) & “.name_txt.text”, NameInput)
End Sub
Private Sub usernameinfo_Click()
On Error Resume Next
MsgBox (“Your Username Is “) & ShockwaveFlash1.GetVariable(“_level0.instance.shell.my_player.nickname”) & (“.”)
End Sub
Private Sub walkonwalls_Click()
On Error Resume Next
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.ENGINE.my_room_movieclips.block_mc._x”, “-5000″)
End Sub
Private Sub yellow_Click()
On Error Resume Next
Dim VAR_CYELLOW1
VAR_CYELLOW1 = “0xffcc00″
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.0″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.1″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.2″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.3″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.4″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.5″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.6″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.7″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.8″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.9″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.10″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.11″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.12″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.13″, VAR_CYELLOW1)
Call ShockwaveFlash1.SetVariable(“_level0.instance.shell.GLOBAL_CRUMBS.player_colours.14″, VAR_CYELLOW1)
End Sub
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.loading.message_txt.text", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.loading.message_txt.textColor", "0xFFFF555500000")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.loading.spinner_mc._height", 400)
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.loading.spinner_mc._width", 450)
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.loading._alpha", 40)
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Sign In", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Login", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.INTERFACE.PHONE_WIDGET.art_mc.teleport_txt.text", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.INTERFACE.PHONE_WIDGET.art_mc.hq_txt.text", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.map", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.agent_line1", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.agent_line2", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.agent_line3", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.agent_line4", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLOBAL_CRUMBS.servers.142.name", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLOBAL_CRUMBS.servers.102.name", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLOBAL_CRUMBS.servers.135.name", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLOBAL_CRUMBS.servers.162.name", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.GLOBAL_CRUMBS.servers.148.name", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Back", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Forgot your password?", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Don't have a penguin?", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Create a free account now", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Remember me on this computer", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Remember my password", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Login as a different penguin", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Forget my penguin", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Buddies online", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Amount of penguins online", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Ultimate safe chat", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Manage Account", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.help", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Mute Music", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Settings", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Your Suggested Servers", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Please Select a Server", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Login to Unlock Your Items", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Yes", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.No", "Text Here")
Call ShockwaveFlash1.SetVariable("_level0.instance.shell.LOCAL_CRUMBS.lang.Ok", "Text Here")function createResultLocalConection()
{
listen_local_connection = new LocalConnection();
listen_local_connection.methodToExecute = undefined;
listen_local_connection.connect("lc_name");
} // End of the function
function setPlayerObjectToSave(obj)
{
player_to_save = obj;
} // End of the function
function getPlayerObjectToSave()
{
return (player_to_save);
} // End of the function
function getSavedGame()
{
if (saved_game == undefined)
{
saved_game = SharedObject.getLocal(SAVED_GAME_NAME, SAVED_GAME_LOCATION);
} // end if
return (saved_game);
} // End of the function
function savePlayerPaperdoll(player_obj)
{
} // End of the function
function savePlayerObject()
{
var _loc2 = getPlayerObjectToSave();
var _loc3 = getMyPlayerObject();
var _loc5 = _loc2.isRememberUsername;
var _loc6 = _loc2.isRememberPassword;
var _loc4 = isPlayerCurrentlySaved(_loc2.Username.toLowerCase());
if (_loc5)
{
var _loc1 = new Object();
_loc1.Feet = _loc3.feet;
_loc1.Hand = _loc3.hand;
_loc1.Body = _loc3.body;
_loc1.Neck = _loc3.neck;
_loc1.Face = _loc3.face;
_loc1.Head = _loc3.head;
_loc1.Colour = _loc3.colour_id;
_loc1.LastSave = getLocalEpoch();
_loc1.Nickname = _loc3.nickname.toLowerCase();
_loc1.Username = _loc2.Username.toLowerCase();
_loc1.PassCode = undefined;
_loc1.LastWorldId = getLastWorldId();
dumpObject(_loc3);
dumpObject(_loc2);
var _loc7 = _loc2.Username.toLowerCase();
if (_loc6)
{
_loc1.PassCode = freezeCode(_loc7, _loc2.Password);
} // end if
_loc1.LastNewspaper = undefined;
_loc1.so_version = SAVED_GAME_VERSION;
if (_loc4)
{
removeFromSavedPlayersByUsername(_loc2.Username);
} // end if
addPlayerToSavedPlayers(_loc1);
var _loc8 = getSavedPlayers().length;
if (_loc8 > MAX_SAVED_PLAYERS)
{
removeOldSavedPlayers();
} // end if
}
else if (_loc4)
{
removeFromSavedPlayersByUsername(_loc2.Username);
} // end else if
} // End of the function
function saveRoomPlayerObject(room_player_obj)
{
var _loc2 = getPlayerObjectToSave();
var _loc5 = getMyPlayerObject();
var _loc6 = _loc2.isRememberUsername;
var _loc7 = _loc2.isRememberPassword;
var _loc4 = isPlayerCurrentlySaved(_loc2.Username.toLowerCase());
if (_loc6)
{
var _loc1 = new Object();
_loc1.Feet = room_player_obj.feet;
_loc1.Hand = room_player_obj.hand;
_loc1.Body = room_player_obj.body;
_loc1.Neck = room_player_obj.neck;
_loc1.Face = room_player_obj.face;
_loc1.Head = room_player_obj.head;
_loc1.Colour = room_player_obj.colour_id;
_loc1.LastSave = getLocalEpoch();
_loc1.Nickname = _loc5.nickname.toLowerCase();
_loc1.Username = _loc2.Username.toLowerCase();
_loc1.PassCode = undefined;
_loc1.LastWorldId = getLastWorldId();
var _loc8 = _loc2.Username.toLowerCase();
if (_loc7)
{
_loc1.PassCode = freezeCode(_loc8, _loc2.Password);
} // end if
_loc1.LastNewspaper = undefined;
_loc1.so_version = SAVED_GAME_VERSION;
if (_loc4)
{
removeFromSavedPlayersByUsername(_loc2.Username);
} // end if
addPlayerToSavedPlayers(_loc1);
var _loc9 = getSavedPlayers().length;
if (_loc9 > MAX_SAVED_PLAYERS)
{
removeOldSavedPlayers();
} // end if
}
else if (_loc4)
{
removeFromSavedPlayersByUsername(_loc2.Username);
} // end else if
} // End of the function
function removeOldSavedPlayers()
{
var _loc1 = getSavedPlayers();
_loc1.sortOn("LastSave");
_loc1.splice(MAX_SAVED_PLAYERS);
} // End of the function
function addPlayerToSavedPlayers(player_obj)
{
getSavedPlayers().push(player_obj);
} // End of the function
function isPlayerCurrentlySaved(username)
{
var _loc2 = getSavedPlayers();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].Username.toLowerCase() == username.toLowerCase())
{
return (true);
} // end if
} // end of for
$e("[shell] isPlayerCurrentlySaved() -> Player not found in saved player object. player_obj: " + debugObject(player_object));
return (false);
} // End of the function
function removeFromSavedPlayersByUsername(username)
{
var _loc2 = getSavedPlayers();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].Username.toLowerCase() == username.toLowerCase())
{
_loc2.splice(_loc1, 1);
return (true);
} // end if
} // end of for
$e("[shell] removePlayerFromSavedPlayers() -> Player not found in saved player object. player_obj: " + debugObject(player_object));
return (false);
} // End of the function
function getSavedPlayerByUsername(username)
{
var _loc2 = getSavedPlayers();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].Username.toLowerCase() == username.toLowerCase())
{
return (_loc2[_loc1]);
} // end if
} // end of for
$e("[shell] getSavedPlayerByUsername() -> Not able to find player in the saved player list: username: " + username);
return;
} // End of the function
function getSavedPlayers()
{
var _loc3 = getSavedGame();
if (_loc3.data.playerlist == undefined)
{
_loc3.data.playerlist = new Array();
} // end if
var _loc2 = _loc3.data.playerlist;
for (var _loc1 = 0; _loc1 < _loc2.length; ++_loc1)
{
dumpObject(_loc2[_loc1]);
} // end of for
return (_loc3.data.playerlist.sortOn(["Nickname"], [Array.CASEINSENSITIVE]));
} // End of the function
function setSavedPlayers(players)
{
getSavedGame().data.playerlist = players;
} // End of the function
function getLastWorldIdForActivePlayer()
{
var _loc1 = getPlayerObjectToSave().Username;
var _loc2 = getSavedPlayerByUsername(_loc1);
return (_loc2.LastWorldId);
} // End of the function
function getLastWorldId()
{
return (last_world_id);
} // End of the function
function setLastWorldId(id)
{
last_world_id = id;
} // End of the function
function getDomainName()
{
var _loc2 = this._url.toLowerCase();
var _loc4 = _loc2.split("/");
var _loc3 = _loc4[2].split(".");
return (_loc3);
} // End of the function
function getMediaServerPath()
{
if (isRunningLocal())
{
return ("");
} // end if
if (domain_name[0] == "stage")
{
return (MEDIA_SERVER_STAGE);
} // end if
if (domain_name[0] == "sandbox03")
{
return (MEDIA_SERVER_SANDBOX03);
} // end if
return (MEDIA_SERVER_ONE);
} // End of the function
function isRunningLocal()
{
if (is_running_local != undefined)
{
return (is_running_local);
} // end if
is_running_local = false;
if (this._url.indexOf("file") == 0)
{
is_running_local = true;
} // end if
return (is_running_local);
} // End of the function
function setAffilateId(id)
{
affilate_id = id;
} // End of the function
function getAffilateId()
{
return (affilate_id);
} // End of the function
function setAirtowerVersion(v)
{
airtower_version = v;
} // End of the function
function getAirtowerVersion()
{
return (airtower_version);
} // End of the function
function setEngineVersion(v)
{
engine_version = v;
} // End of the function
function getEngineVersion()
{
return (engine_version);
} // End of the function
function setGridviewVersion(v)
{
gridview_version = v;
} // End of the function
function getGridviewVersion()
{
return (gridview_version);
} // End of the function
function setIglooVersion(v)
{
igloo_version = v;
} // End of the function
function getIglooVersion()
{
return (igloo_version);
} // End of the function
function setInterfaceVersion(v)
{
interface_version = v;
} // End of the function
function getInterfaceVersion()
{
return (interface_version);
} // End of the function
function setLoginVersion(v)
{
login_version = v;
} // End of the function
function getLoginVersion()
{
return (login_version);
} // End of the function
function setMailVersion(v)
{
mail_version = v;
} // End of the function
function getMailVersion()
{
return (mail_version);
} // End of the function
function setPostcardsVersion(v)
{
postcards_version = v;
} // End of the function
function getPostcardsVersion()
{
return (postcards_version);
} // End of the function
function setMusicVersion(v)
{
music_version = v;
} // End of the function
function getMusicVersion()
{
return (music_version);
} // End of the function
function getGlobalContentPath()
{
return (getRootPath() + "content/global");
} // End of the function
function getGameContentPath()
{
return (getRootPath() + "games");
} // End of the function
function getMissionContentPath()
{
return (getRootPath() + "missions");
} // End of the function
function getLocalPathsObject()
{
return (local_paths_object);
} // End of the function
function setLocalPathsObject(obj)
{
local_paths_object = obj;
} // End of the function
function getGlobalPathsObject()
{
return (global_paths_object);
} // End of the function
function setGlobalPathsObject(obj)
{
global_paths_object = obj;
} // End of the function
function getPath(id)
{
var _loc2 = getLocalPathsObject();
if (_loc2[id] != undefined)
{
return (_loc2[id]);
} // end if
var _loc3 = getGlobalPathsObject();
if (_loc3[id] != undefined)
{
return (_loc3[id]);
} // end if
$e("getPath() -> \"" + id + "\" does not exist!");
return ("(path not found -> " + id + " )");
} // End of the function
function setRootPath()
{
adjusted_root_path = getMediaServerPath();
} // End of the function
function getLocalizedFolder()
{
return (localized_folder);
} // End of the function
function setLocalizedFolder(folder)
{
localized_folder = folder;
} // End of the function
function getRootPath()
{
return (adjusted_root_path);
} // End of the function
function setLocalCrumbsVersion(v)
{
local_crumbs_version = v;
} // End of the function
function getLocalCrumbsVersion()
{
return (local_crumbs_version);
} // End of the function
function setGlobalCrumbsVersion(v)
{
global_crumbs_version = v;
} // End of the function
function getGlobalCrumbsVersion()
{
return (global_crumbs_version);
} // End of the function
function getLanguageObject()
{
return (language_obj);
} // End of the function
function setLanguageObject(obj)
{
language_obj = obj;
} // End of the function
function setJokeArray(arr)
{
joke_arr = arr;
} // End of the function
function getJokeArray()
{
return (joke_arr);
} // End of the function
function getJokeById(id)
{
var _loc2 = getJokeArray();
var _loc1 = _loc2[id];
if (isValidString(_loc1))
{
return (_loc1);
} // end if
return;
} // End of the function
function getRandomJokeId()
{
return (randBetween(0, getJokeArray().length - 1));
} // End of the function
function setSafeMessageArray(arr)
{
safe_message_arr = arr;
} // End of the function
function getSafeMessageArray()
{
return (safe_message_arr);
} // End of the function
function setTreveresdSafeMessageObject(obj)
{
treveresed_safe_message_obj = obj;
} // End of the function
function getTreveresdSafeMessageObject()
{
return (treveresed_safe_message_obj);
} // End of the function
function getSafeMessageById(id)
{
var _loc2;
var _loc1 = getTreveresdSafeMessageObject();
if (_loc1[id].name != undefined)
{
_loc2 = _loc1[id].name;
} // end if
if (_loc1[id].message != undefined)
{
_loc2 = _loc1[id].message;
} // end if
if (isValidString(_loc2))
{
return (_loc2);
} // end if
return;
} // End of the function
function setLineMessageArray(arr)
{
line_message_arr = arr;
} // End of the function
function getLineMessageArray()
{
return (line_message_arr);
} // End of the function
function getLineMessageById(id)
{
var _loc2 = getLineMessageArray();
var _loc1 = _loc2[id].message;
if (isValidString(_loc1))
{
return (_loc1);
} // end if
return;
} // End of the function
function setQuickMessageArray(arr)
{
quick_message_arr = arr;
} // End of the function
function getQuickMessageArray()
{
return (quick_message_arr);
} // End of the function
function getQuickMessageById(id)
{
var _loc2 = getQuickMessageArray();
var _loc1 = _loc2[id];
if (isValidString(_loc1))
{
return (_loc1);
} // end if
return;
} // End of the function
function getTourGuideMessageById(id)
{
var _loc2 = getTourGuideMessageArray();
var _loc1 = _loc2[id];
if (isValidString(_loc1))
{
return (_loc1);
} // end if
return;
} // End of the function
function setTourGuideMessageArray(arr)
{
tour_guide_message_arr = arr;
} // End of the function
function getTourGuideMessageArray()
{
return (tour_guide_message_arr);
} // End of the function
function getLocalizedString(str)
{
var _loc1 = getLanguageObject()[str];
if (isValidString(_loc1))
{
return (_loc1);
} // end if
$e("getLocalizedString() -> There is no localized string for: " + str);
return (str);
} // End of the function
function replace(what, _with, input_string)
{
return (input_string.split(what).join(_with));
} // End of the function
function replace_m(search, replacements)
{
var _loc3 = replacements.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
search = search.split("%" + _loc1).join(replacements[_loc1]);
} // end of for
return (search);
} // End of the function
function getLocalizedFrame()
{
return (en);
} // End of the function
function e_default(obj)
{
$d("[UNDEFINED ERROR] e_default() -> There has been an undefined error!");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(DEFAULT_ERROR);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(DEFAULT_ERROR_TYPE, DEFAULT_ERROR);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_noConnection(obj)
{
$d("[" + obj.type + "] e_noConnection() -> No connection");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NO_CONNECTION);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, NO_CONNECTION);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("cant_connect_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_connectionLost(obj)
{
$d("[" + obj.type + " ] e_connectionLost() -> Lost Connection");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(CONNECTION_LOST);
var _loc4 = getLocalizedString("Learn More");
var _loc5 = buildErrorCodeString(obj.type, CONNECTION_LOST);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_timeOut(obj)
{
$d("[" + obj.type + "] e_timeout() -> Client has timed out!");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(TIME_OUT);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, TIME_OUT);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_multiConnections(obj)
{
$d("[" + obj.type + "] e_multiConnections() -> Multiple Connections detected");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(MULTI_CONNECTIONS);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, MULTI_CONNECTIONS);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_disconnect(obj)
{
$d("[" + obj.type + "] e_disconnect() -> Socket Timeout");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(DISCONNECT);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, DISCONNECT);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_kick(obj)
{
$d("[" + obj.type + "] e_kick() -> You have been kicked");
var _loc3 = window_size[WINDOW_EXTRA_LARGE];
var _loc1 = getLocalizedErrorStringById(KICK);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, KICK);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_nameNotFound(obj)
{
$d("[" + obj.type + "] e_nameNotFound() -> Name not found");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NAME_NOT_FOUND);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, NAME_NOT_FOUND);
AIRTOWER.disconnect();
var _loc2 = function ()
{
LOGIN_HOLDER.gotoNewPlayer();
Selection.setFocus("LOGIN_HOLDER.NP_USERNAME_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_passwordWrong(obj)
{
$d("[" + obj.type + "] e_passwordWrong() -> Password wrong");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PASSWORD_WRONG);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, PASSWORD_WRONG);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_PASSWORD_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_serverFull(obj)
{
$d("[" + obj.type + "] e_serverFull() -> Password wrong");
var _loc4 = window_size[WINDOW_SMALL];
var _loc2 = getLocalizedErrorStringById(SERVER_FULL);
var _loc5 = getLocalizedString("Okay");
var _loc6 = buildErrorCodeString(obj.type, SERVER_FULL);
if (obj.type == SOCKET_ERROR || obj.type == DEFAULT_ERROR_TYPE)
{
var _loc3 = function ()
{
getURL(getPath("client_web"), "_self");
};
showLoading();
AIRTOWER.disconnect();
}
else
{
_loc3 = function ()
{
LOGIN_HOLDER.gotoWorldSelection();
hideLoading();
closeErrorPrompt();
};
} // end else if
showErrorPrompt(_loc4, _loc2, _loc5, _loc3, _loc6);
} // End of the function
function e_passwordRequired(obj)
{
$d("[" + obj.type + "] e_passwordRequired() -> Password required");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PASSWORD_REQUIRED);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, PASSWORD_REQUIRED);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_PASSWORD_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_passwordShort(obj)
{
$d("[" + obj.type + "] e_passwordShort() -> Password too short");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PASSWORD_SHORT);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, PASSWORD_SHORT);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_PASSWORD_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_passwordLong(obj)
{
$d("[" + obj.type + "] e_passwordLong() -> Password too short");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PASSWORD_LONG);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, PASSWORD_LONG);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_PASSWORD_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_nameRequired(obj)
{
$d("[" + obj.type + "] e_nameRequired() -> Name required");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NAME_REQUIRED);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, NAME_REQUIRED);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_USERNAME_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_nameShort(obj)
{
$d("[" + obj.type + "] e_nameShort() -> Name too short");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NAME_SHORT);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, NAME_SHORT);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_USERNAME_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_nameLong(obj)
{
$d("[" + obj.type + "] e_nameLong() -> Name too short");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NAME_LONG);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, NAME_LONG);
AIRTOWER.disconnect();
var _loc2 = function ()
{
Selection.setFocus("LOGIN_HOLDER.NP_USERNAME_INPUT");
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_loginFlooding(obj)
{
$d("[SOCKET ERROR - " + LOGIN_FLOODING + "] e_loginFlooding() -> Login flooding limit reached");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(LOGIN_FLOODING);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, LOGIN_FLOODING);
AIRTOWER.disconnect();
var _loc2 = function ()
{
LOGIN_HOLDER.gotoNewPlayer();
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_playerInRoom(obj)
{
$d("[" + obj.type + "] e_playerInRoom() -> Player in room");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PLAYER_IN_ROOM);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, PLAYER_IN_ROOM);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_roomFull(obj)
{
$d("[" + obj.type + "] e_roomFull() -> Room is full");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(ROOM_FULL);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, ROOM_FULL);
var _loc2 = function ()
{
sendJoinLastRoom();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_itemInHouse(obj)
{
$d("[" + obj.type + "] e_itemInHouse() -> Already own this item");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(ITEM_IN_HOUSE);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, ITEM_IN_HOUSE);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_notEnoughCoins(obj)
{
$d("[" + obj.type + "] e_notEnoughCoins() -> Not enough coins");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NOT_ENOUGH_COINS);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, NOT_ENOUGH_COINS);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_itemNotExist(obj)
{
$d("[" + obj.type + "] e_itemNotExist() -> Item does not exist");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(ITEM_NOT_EXIST);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, ITEM_NOT_EXIST);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_nameNotAllowed(obj)
{
$d("[" + obj.type + "] e_nameNotAllowed() -> Name is not allowed");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NAME_NOT_ALLOWED);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, NAME_NOT_ALLOWED);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
updateListeners(ADOPT_PUFFLE, {success: false});
} // End of the function
function e_puffleLimitMember(obj)
{
$d("[" + obj.type + "] e_puffleLimitMember() -> Member puffle limit reached");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PUFFLE_LIMIT_M);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, PUFFLE_LIMIT_M);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
updateListeners(ADOPT_PUFFLE, {success: false});
} // End of the function
function e_puffleLimitNonMember(obj)
{
$d("[" + obj.type + "] e_puffleLimitNonMember() -> Non member puffle limit reached");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(PUFFLE_LIMIT_NM);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, PUFFLE_LIMIT_NM);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
updateListeners(ADOPT_PUFFLE, {success: false});
} // End of the function
function e_banDuration(obj)
{
$d("[" + obj.type + "] e_banDuration() -> Still have time left in ban");
debugObject(obj, true);
var _loc3 = Number(obj[1]);
var _loc4 = getLocalizedString("hours");
if (_loc3 == 1)
{
_loc4 = getLocalizedString("hour");
} // end if
var _loc1 = getLocalizedErrorStringById(BAN_DURATION);
_loc1 = replace_m(_loc1, [_loc3, _loc4]);
AIRTOWER.disconnect();
var _loc5 = function ()
{
getURL(getPath("main_web"), "_self");
};
var _loc6 = window_size[WINDOW_SMALL];
var _loc7 = getLocalizedString("Okay");
var _loc8 = buildErrorCodeString(obj.type, BAN_DURATION);
showErrorPrompt(_loc6, _loc1, _loc7, _loc5, _loc8);
} // End of the function
function e_banAnHour(obj)
{
$d("[" + obj.type + "] e_banAnHour() -> Still banned, but only minutes left");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(BAN_AN_HOUR);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, BAN_AN_HOUR);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("main_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_banForever(obj)
{
$d("[" + obj.type + "] e_banForever() -> Player is banned forever");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(BAN_FOREVER);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, BAN_FOREVER);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("main_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_autoBan(obj)
{
$d("[" + obj.type + "] e_autoBan() -> Auto banned");
var _loc7 = obj[1];
var _loc1 = getLocalizedErrorStringById(AUTO_BAN);
_loc1 = replace("%badword%", _loc7, _loc1);
var _loc4 = window_size[WINDOW_LARGE];
var _loc5 = getLocalizedString("Okay");
var _loc6 = buildErrorCodeString(obj.type, AUTO_BAN);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("main_web"), "_self");
};
showErrorPrompt(_loc4, _loc1, _loc5, _loc2, _loc6);
} // End of the function
function e_gameCheat(obj)
{
$d("[" + obj.type + "] e_gameCheat() -> Game cheating detected");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(GAME_CHEAT);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, GAME_CHEAT);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_accountNotActive(obj)
{
$d("[" + obj.type + "] e_accountNotActive() -> Account is not active");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(ACCOUNT_NOT_ACTIVATE);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, ACCOUNT_NOT_ACTIVATE);
AIRTOWER.disconnect();
var _loc2 = function ()
{
LOGIN_HOLDER.gotoNewPlayer();
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_buddyLimit(obj)
{
$d("[" + obj.type + "] e_buddy_limit() -> Buddy limit reached");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(BUDDY_LIMIT);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, BUDDY_LIMIT);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_noPlayTime(obj)
{
$d("[" + obj.type + "] e_noPlayTime() -> No playtime left for today");
var _loc7 = "";
var _loc3 = "";
var _loc1 = getLocalizedErrorStringById(NO_PLAY_TIME);
_loc1 = replace_m(_loc1, [_loc7, _loc3]);
var _loc4 = window_size[WINDOW_LARGE];
var _loc5 = getLocalizedString("Okay");
var _loc6 = buildErrorCodeString(obj.type, NO_PLAY_TIME);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("community_web"), "_self");
};
showErrorPrompt(_loc4, _loc1, _loc5, _loc2, _loc6);
} // End of the function
function e_outPlayTime(obj)
{
$d("[" + obj.type + "] e_outPlayTime() -> Trying to play outside allowed hours");
var _loc7 = convertToStandardTime(obj[1], ":", true);
var _loc8 = convertToStandardTime(obj[2], ":", true);
var _loc1 = getLocalizedErrorStringById(OUT_PLAY_TIME);
_loc1 = replace_m(_loc1, [_loc7, _loc8]);
var _loc4 = window_size[WINDOW_SMALL];
var _loc5 = getLocalizedString("Okay");
var _loc6 = buildErrorCodeString(obj.type, OUT_PLAY_TIME);
AIRTOWER.disconnect();
var _loc3 = function ()
{
getURL(getPath("community_web"), "_self");
};
showErrorPrompt(_loc4, _loc1, _loc5, _loc3, _loc6);
} // End of the function
function e_grounded(obj)
{
$d("[" + obj.type + "] e_grounded() -> Trying to play while grounded");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(GROUNDED);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, GROUNDED);
AIRTOWER.disconnect();
var _loc2 = function ()
{
getURL(getPath("guide_web"), "_self");
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_playTimeOver(obj)
{
$d("[" + obj.type + "] e_noPlayTime() -> No playtime left for today");
var _loc4 = getPath("community_web");
var _loc8 = "";
var _loc3 = "";
var _loc1 = getLocalizedErrorStringById(PLAY_TIME_OVER);
_loc1 = replace_m(_loc1, [_loc8, _loc3]);
AIRTOWER.disconnect();
var _loc5 = window_size[WINDOW_LARGE];
var _loc6 = getLocalizedString("Okay");
var _loc7 = buildErrorCodeString(obj.type, PLAY_TIME_OVER);
var _loc2 = function ()
{
getURL(getPath("guide_web"), "_self");
};
showErrorPrompt(_loc5, _loc1, _loc6, _loc2, _loc7);
} // End of the function
function e_systemReboot(obj)
{
$d("[" + obj.type + "] e_systemReboot() -> System is going to reboot in five minutes");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(SYSTEM_REBOOT);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, SYSTEM_REBOOT);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_notMember(obj)
{
$d("[" + obj.type + "] e_notMember() -> You must be a member to complete this action");
var _loc2 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NOT_MEMBER);
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, NOT_MEMBER);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_noDatabaseConnection(obj)
{
$d("[" + obj.type + "] e_noDatabaseConnection() -> Could not establish a database connection");
var _loc3 = window_size[WINDOW_SMALL];
var _loc1 = getLocalizedErrorStringById(NO_DATABASE_CONNECTION);
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, NO_DATABASE_CONNECTION);
AIRTOWER.disconnect();
var _loc2 = function ()
{
LOGIN_HOLDER.gotoStart();
hideLoading();
closeErrorPrompt();
};
showErrorPrompt(_loc3, _loc1, _loc4, _loc2, _loc5);
} // End of the function
function e_timeWarning(obj)
{
$d("[" + obj.type + "] e_fiveMinuteWarning() -> Time warning: " + obj.minutes_left + " minutes left!");
var _loc1 = getLocalizedErrorStringById(TIME_WARNING);
_loc1 = replace("%number%", String(obj.minutes_left), _loc1);
var _loc3 = window_size[WINDOW_SMALL];
var _loc4 = getLocalizedString("Okay");
var _loc5 = buildErrorCodeString(obj.type, TIME_WARNING);
showErrorPrompt(_loc3, _loc1, _loc4, button_action, _loc5);
} // End of the function
function e_passwordSavePrompt(obj)
{
$d("[" + obj.type + "] e_passwordSavePrompt() -> Telling the user about the problems with saving their password");
var _loc1 = getLocalizedErrorStringById(PASSWORD_SAVE_PROMPT);
var _loc2 = window_size[WINDOW_EXTRA_LARGE];
var _loc3 = getLocalizedString("Okay");
var _loc4 = buildErrorCodeString(obj.type, PASSWORD_SAVE_PROMPT);
showErrorPrompt(_loc2, _loc1, _loc3, button_action, _loc4);
} // End of the function
function e_loadError(obj)
{
$d("[" + obj.type + "] e_loadError() -> Can not load file!");
var _loc1 = obj.file_path;
var _loc9 = _loc1.lastIndexOf("/");
_loc1 = _loc1.substring(_loc9 + 1, _loc1.length);
var _loc2 = _loc1.lastIndexOf(".swf");
_loc1 = "-" + _loc1.substring(0, _loc2);
var _loc3 = getLocalizedErrorStringById(LOAD_ERROR);
var _loc6 = window_size[WINDOW_SMALL];
var _loc7 = getLocalizedString("Okay");
var _loc8 = buildErrorCodeString(obj.type, LOAD_ERROR, _loc1);
AIRTOWER.disconnect();
var _loc4 = function ()
{
getURL(getPath("client_web"), "_self");
};
showErrorPrompt(_loc6, _loc3, _loc7, _loc4, _loc8);
} // End of the function
function e_maxFurniture(obj)
{
$d("[" + obj.type + "] e_maxFurniture() -> Max furniture!");
var _loc1 = obj.file_path;
var _loc8 = _loc1.lastIndexOf("/");
_loc1 = _loc1.substring(_loc8 + 1, _loc1.length);
var _loc3 = _loc1.lastIndexOf(".swf");
_loc1 = "-" + _loc1.substring(0, _loc3);
var _loc2 = getLocalizedErrorStringById(MAX_IGLOO_FURNITURE_ERROR);
_loc2 = replace("%number%", MAX_IGLOO_ITEMS.toString(), _loc2);
var _loc5 = window_size[WINDOW_SMALL];
var _loc6 = getLocalizedString("Okay");
var _loc7 = buildErrorCodeString(obj.type, MAX_IGLOO_FURNITURE_ERROR);
showErrorPrompt(_loc5, _loc2, _loc6, button_action, _loc7);
} // End of the function
function getErrorActionById(id)
{
if (e_actions[id] != undefined)
{
return (e_actions[id]);
} // end if
return (e_actions[DEFAULT_ERROR]);
} // End of the function
function getErrorFunctionByErrorCode(error_code)
{
var _loc1 = getErrorFunctionObject();
if (!isNaN(error_code))
{
var _loc2 = _loc1[error_code];
if (_loc2 != undefined)
{
return (_loc2);
} // end if
return (_loc1[DEFAULT_ERROR]);
}
else
{
$d("[shell] getErrorFunctionByErrorCode() -> Error Code is not a real number. error_code: " + error_code + " returning default error");
return (_loc1[DEFAULT_ERROR]);
} // end else if
} // End of the function
function getErrorFunctionObject()
{
return (e_func);
} // End of the function
function buildErrorCodeString(type, error_code, additional_txt)
{
if (isValidString(type))
{
if (!isNaN(error_code))
{
var _loc2;
switch (type)
{
case SOCKET_ERROR:
{
_loc2 = SOCKET_ERROR.substr(0, 1).toLowerCase();
break;
}
case CLIENT_ERROR:
{
_loc2 = CLIENT_ERROR.substr(0, 1).toLowerCase();
break;
}
default:
{
_loc2 = DEFAULT_ERROR_TYPE;
break;
}
} // End of switch
var _loc1 = "";
if (isValidString(additional_txt))
{
_loc1 = additional_txt;
} // end if
return (_loc2 + "" + error_code + "" + _loc1);
}
else
{
$e("buildErrorCodeString() -> Error code is not a valid number! error_code: " + error_code + " Defaulting to default error");
return (DEFAULT_ERROR_TYPE + "" + DEFAULT_ERROR_CODE + "" + _loc1);
} // end else if
}
else
{
$e("buildErrorCodeString() -> Error type is not a valid string! error_type: " + _loc2 + " Defaulting to default error");
return (DEFAULT_ERROR_TYPE + "" + DEFAULT_ERROR_CODE + "" + _loc1);
} // end else if
} // End of the function
function $e(message, error_obj)
{
if (DEBUG_MODE)
{
} // end if
if (error_obj != undefined)
{
initErrorByObj(error_obj);
} // end if
} // End of the function
function handleServerError(obj)
{
var _loc3 = obj.shift();
var _loc2 = Number(obj[0]);
obj.type = SOCKET_ERROR;
initErrorByCode(_loc2, obj);
} // End of the function
function handleConnectionLost()
{
var _loc1 = new Object();
_loc1.type = SOCKET_ERROR;
_loc1.error_code = SOCKET_LOST_CONNECTION;
} // End of the function
function initErrorByCode(error_code, error_obj)
{
if (!isNaN(error_code))
{
var _loc2 = getErrorFunctionByErrorCode(error_code);
_loc2(error_obj);
}
else
{
$e("[shell] initErrorByCode() -> Not a real number passed for error code. error_code: " + error_code);
} // end else if
} // End of the function
function initErrorByObj(error_obj)
{
error_obj.type = CLIENT_ERROR;
initErrorByCode(error_obj.error_code, error_obj);
} // End of the function
function showErrorPrompt(window_size, message, button_lable, button_action, error_code)
{
var _loc1 = ERROR_WINDOW;
_loc1._visible = false;
_loc1.bg._height = window_size.h;
_loc1.bg._width = window_size.w;
_loc1._x = 380 - _loc1.bg._width / 2;
_loc1._y = 240 - _loc1.bg._height / 2;
var _loc2 = 25;
_loc1.message_txt._height = _loc2;
_loc1.message_txt.htmlText = message;
var _loc3 = _loc1.message_txt.maxscroll;
_loc1.message_txt._height = _loc2 * _loc3;
_loc1.message_txt._width = _loc1.bg._width - 40;
_loc1.message_txt._x = _loc1.bg._width / 2 - _loc1.message_txt._width / 2;
_loc1.message_txt._y = (_loc1.bg._height - _loc1.error_btn._height) / 2 - _loc1.message_txt._height / 2;
_loc1.error_txt.text = error_code;
_loc1.error_txt._x = _loc1.bg._width - 12 - _loc1.error_txt._width;
_loc1.error_txt._y = _loc1.bg._height - 28;
_loc1.error_btn.label_txt.text = button_lable;
_loc1.error_btn.onRelease = closeErrorPrompt;
if (button_action != undefined)
{
_loc1.error_btn.onRelease = button_action;
} // end if
_loc1.error_btn._x = _loc1.bg._width / 2 - _loc1.error_btn._width / 2;
_loc1.error_btn._y = _loc1.bg._height - 80;
ERROR_COVER._visible = true;
ERROR_COVER.onRelease = function ()
{
};
ERROR_COVER.useHandCursor = false;
_loc1._visible = true;
} // End of the function
function closeErrorPrompt()
{
hideErrorPrompt();
} // End of the function
function hideErrorPrompt()
{
ERROR_WINDOW._visible = false;
ERROR_COVER._visible = false;
ERROR_COVER.onRelease = null;
delete ERROR_COVER.onRelease;
hideLightbox();
} // End of the function
function getLocalizedErrorStringById(id)
{
var _loc1 = getLocalizedErrorObject();
if (!isNaN(id))
{
var _loc2 = _loc1[id];
if (isValidString(_loc2))
{
return (_loc2);
}
else
{
$e("[shell] getLocalizedErrorStringById() -> Was not able to find a valid string for error id \"" + id + "\" returning default error string instead.");
return (_loc1[DEFAULT_ERROR]);
} // end else if
}
else
{
$e("[shell] getLocalizedErrorStringById() -> Not a real number passed for id! id: " + id + " Returning default error string.");
return (_loc1[DEFAULT_ERROR]);
} // end else if
} // End of the function
function getLocalizedErrorObject()
{
return (local_error_obj);
} // End of the function
function setLocalizedErrorObject(obj)
{
local_error_obj = obj;
} // End of the function
function checkIfPlayerIsIdle()
{
if (getLocalEpoch() - last_update >= idle_timeout)
{
$e("[shell] checkIfPlayerIsIdle() -> Penguin has been idle for " + idle_timeout + "ms", {error_code: TIME_OUT});
stopPlayerIdleCheck();
AIRTOWER.disconnect();
} // end if
} // End of the function
function startPlayerIdleCheck()
{
attachIdleListeners();
idle_interval = setInterval(checkIfPlayerIsIdle, idle_timeout);
} // End of the function
function stopPlayerIdleCheck()
{
removeIdleListeners();
clearInterval(idle_interval);
} // End of the function
function attachIdleListeners()
{
key_listener = new Object();
key_listener.onKeyDown = setLastUpdate;
Key.addListener(key_listener);
mouse_listener = new Object();
mouse_listener.onMouseDown = mouseClicked;
Mouse.addListener(mouse_listener);
} // End of the function
function removeIdleListeners()
{
Key.removeListener(key_listener);
Mouse.removeListener(mouse_listener);
} // End of the function
function mouseClicked()
{
if (SHELL.bg_mc.hitTest(_xmouse, _ymouse, false))
{
setLastUpdate();
} // end if
} // End of the function
function setLastUpdate()
{
last_update = getLocalEpoch();
} // End of the function
function sendHeartbeat()
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.HEARTBEAT, "", "str", getCurrentServerRoomId());
startTimeout();
} // End of the function
function handleSendHeartbeat(obj)
{
stopTimeout();
} // End of the function
function startHeartbeat()
{
heart_interval = setInterval(sendHeartbeat, heart_interval_freq);
} // End of the function
function stopHeartbeat()
{
clearInterval(heart_interval);
} // End of the function
function handleTimeout()
{
$e("[shell] handleTimeout() -> Client has timed out! Heartbeat request was not responded to fast enough.", {error_code: CONNECTION_LOST});
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.TIMEOUT, "", "str", getCurrentServerRoomId());
stopHeartbeat();
stopTimeout();
stopPlayerIdleCheck();
} // End of the function
function startTimeout()
{
timeout_interval = setTimeout(handleTimeout, timeout_interval_freq);
} // End of the function
function stopTimeout()
{
clearTimeout(timeout_interval);
} // End of the function
function setLastHeartUpdate()
{
last_heart_update = getLocalEpoch();
} // End of the function
function getLastHeartUpdate()
{
return (last_heart_update);
} // End of the function
function $d(message)
{
if (DEBUG_MODE)
{
} // end if
} // End of the function
function debugObject(obj, verbose)
{
if (DEBUG_MODE)
{
dumpObject(obj);
} // end if
return ("");
} // End of the function
function dumpObject(obj, depth, out)
{
if (depth == undefined)
{
depth = 0;
} // end if
if (depth == 0)
{
} // end if
var _loc8 = "";
if (out != undefined)
{
_loc8 = out + ": ";
} // end if
var _loc1;
var _loc5 = "";
var _loc7 = "\t";
var _loc4;
for (var _loc3 = 0; _loc3 < depth; ++_loc3)
{
_loc5 = _loc5 + _loc7;
} // end of for
for (var _loc1 in obj)
{
_loc4 = typeof(obj[_loc1]);
if (_loc4 != "object")
{
continue;
} // end if
dumpObject(obj[_loc1], depth + 1, _loc1);
} // end of for...in
if (obj == undefined)
{
} // end if
} // End of the function
function showLoading(message, listener)
{
LOADING.loader_outline_mc._visible = false;
LOADING.progress_bar._visible = false;
if (!loading_screen_visible)
{
LOADING.spinner_mc.gotoAndPlay("load");
} // end if
if (listener != undefined)
{
LOADING.loader_outline_mc._visible = true;
LOADING.progress_bar._visible = true;
listener.onLoadProgress = loadingScreenLoadProgress;
} // end if
LOADING.message_txt.text = "";
if (message != undefined)
{
LOADING.message_txt.text = message;
} // end if
LOADING._visible = true;
loading_screen_visible = true;
} // End of the function
function hideLoading()
{
LOADING.spinner_mc.gotoAndStop("park");
LOADING._visible = false;
LOADING.message_txt.text = "";
loading_screen_visible = false;
} // End of the function
function loadingScreenLoadProgress(target_mc, bytes_loaded, bytes_total)
{
LOADING.progress_bar._xscale = Math.floor(bytes_loaded / bytes_total * 100);
} // End of the function
function showLightbox()
{
LIGHTBOX._visible = true;
LIGHTBOX.onRelease = function ()
{
};
LIGHTBOX.useHandCursor = false;
} // End of the function
function hideLightbox()
{
LIGHTBOX._visible = false;
delete LIGHTBOX.onRelease;
} // End of the function
function closeGridView()
{
close_func_holder();
} // End of the function
function startGridview(in_array, file_path, on_release, user_options)
{
close_func_holder = user_options.on_close;
user_options.on_close = closeGridView;
GRIDVIEW.startGridview(in_array, file_path, on_release, user_options);
} // End of the function
function getAirtowerListeners()
{
SEND_MESSAGE = AIRTOWER.SEND_MESSAGE;
SEND_BLOCKED_MESSAGE = AIRTOWER.SEND_BLOCKED_MESSAGE;
SEND_SAFE_MESSAGE = AIRTOWER.SEND_SAFE_MESSAGE;
SEND_LINE_MESSAGE = AIRTOWER.SEND_LINE_MESSAGE;
SEND_QUICK_MESSAGE = AIRTOWER.SEND_QUICK_MESSAGE;
SEND_TOUR_GUIDE_MESSAGE = AIRTOWER.SEND_TOUR_GUIDE_MESSAGE;
SEND_EMOTE = AIRTOWER.SEND_EMOTE;
SEND_JOKE = AIRTOWER.SEND_JOKE;
GAME_OVER = AIRTOWER.GAME_OVER;
BUY_INVENTORY = AIRTOWER.BUY_INVENTORY;
GET_INVENTORY_LIST = AIRTOWER.GET_INVENTORY_LIST;
ADD_PLAYER = AIRTOWER.ADD_PLAYER;
REMOVE_PLAYER = AIRTOWER.REMOVE_PLAYER;
UPDATE_PLAYER = AIRTOWER.UPDATE_PLAYER;
PLAYER_MOVE = AIRTOWER.PLAYER_MOVE;
PLAYER_FRAME = AIRTOWER.PLAYER_FRAME;
PLAYER_ACTION = AIRTOWER.PLAYER_ACTION;
OPEN_BOOK = AIRTOWER.OPEN_BOOK;
CLOSE_BOOK = AIRTOWER.CLOSE_BOOK;
THROW_BALL = AIRTOWER.THROW_BALL;
JOIN_ROOM = AIRTOWER.JOIN_ROOM;
JOIN_GAME = AIRTOWER.JOIN_GAME;
} // End of the function
function addListener(type, func)
{
if (type == undefined || func == undefined)
{
$e("[shell] addListener() -> You must pass a valid listener type and function! type: \"" + type + "\" func: " + func);
return (false);
} // end if
$d("[shell] Adding listener to: \"" + type + "\"");
var _loc2 = getListenersArray(type);
var _loc4 = getListenerIndex(_loc2, func);
if (_loc4 == -1)
{
_loc2.push(func);
return (true);
} // end if
$d("[shell] Tried to add a duplicate listener to: \"" + type + "\"");
return (false);
} // End of the function
function removeListener(type, func)
{
$d("[shell] Removing listener from: \"" + type + "\"");
var _loc1 = getListenersArray(type);
var _loc2 = getListenerIndex(_loc1, func);
if (_loc2 != -1)
{
_loc1.splice(_loc2, 1);
return (true);
} // end if
$d("[shell] Tried to remove a listener which did not exist");
return (false);
} // End of the function
function getListenerIndex(array, func)
{
var _loc2 = array.length;
for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
{
if (array[_loc1] == func)
{
return (_loc1);
} // end if
} // end of for
return (-1);
} // End of the function
function updateListeners(type, obj)
{
var _loc3 = getListenersArray(type);
var _loc2 = _loc3.length;
if (_loc2 < 1)
{
$d("[shell] No listeners currently attached to: \"" + type + "\"");
return (false);
} // end if
if (_loc2 == 1)
{
_loc3[0](obj);
return (true);
} // end if
for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
{
_loc3[_loc1](obj);
} // end of for
return (true);
} // End of the function
function getListenersArray(type)
{
if (shell_listener_container[type] == undefined)
{
shell_listener_container[type] = new Array();
} // end if
return (shell_listener_container[type]);
} // End of the function
function fetchFileContents(path, on_response)
{
$d("fetchFileContents() -> path: " + path);
var _loc1 = new LoadVars();
_loc1.onLoad = on_response;
_loc1.load(path);
} // End of the function
function loadSWF(mc, path, initFunction, startFunction, errorFunction, progressFunction)
{
currently_loading_path = path;
var _loc3 = new MovieClipLoader();
var _loc1 = new Object();
_loc1.onLoadStart = startFunction;
_loc1.onLoadProgress = progressFunction;
_loc1.onLoadInit = initFunction;
_loc1.onLoadError = errorFunction;
if (startFunction == undefined)
{
_loc1.onLoadStart = defaultLoadStart;
} // end if
if (progressFunction == undefined)
{
_loc1.onLoadProgress = loadingScreenLoadProgress;
} // end if
if (initFunction == undefined)
{
_loc1.onLoadInit = defaultLoadInit;
} // end if
if (errorFunction == undefined)
{
_loc1.onLoadError = defaultLoadError;
} // end if
if (!isValidString(path))
{
_loc1.onLoadError(mc, "URLNotFound", 0);
return (_loc1);
} // end if
if (mc == undefined)
{
_loc1.onLoadError(mc, "INVALID MOVIECLIP", 0);
return (_loc1);
} // end if
_loc3.addListener(_loc1);
_loc3.loadClip(path, mc);
return (_loc1);
} // End of the function
function defaultLoadError(target_mc, errorCode, httpStatus)
{
$e("[shell] defaultLoadError() -> \n\terror code: " + error_code + " \n\thttp_status: " + http_status + " \n\tpath: " + currently_loading_path, {error_code: LOAD_ERROR, file_path: currently_loading_path});
} // End of the function
function addToQueue(mc, id)
{
load_queue.push(Array(mc, id));
} // End of the function
function startLoadQueue(on_init, on_error)
{
var _loc1 = 0;
var _loc2 = load_queue.length;
while (_loc1 < _loc2)
{
loadSWF(load_queue[_loc1][0], load_queue[_loc1][1] + ".swf", on_init, null, on_error);
++_loc1;
} // end while
clearLoadQueue();
} // End of the function
function clearLoadQueue()
{
load_queue = new Array();
} // End of the function
function setColourFromHex(mc, hex)
{
var _loc1 = new Color(mc);
_loc1.setRGB(hex);
} // End of the function
function fadeIn(mc, start_alpha, end_alpha, step, on_finish)
{
mc._alpha = start_alpha;
mc.onEnterFrame = function ()
{
mc._alpha = mc._alpha + step;
if (mc._alpha >= end_alpha)
{
delete mc.onEnterFrame;
if (on_finish != undefined)
{
on_finish(mc);
} // end if
} // end if
};
} // End of the function
function isValidString(txt)
{
if (txt.length < 1)
{
return (false);
} // end if
if (txt == "")
{
return (false);
} // end if
if (txt == undefined)
{
return (false);
} // end if
if (txt == null)
{
return (false);
} // end if
if (txt == "undefined")
{
return (false);
} // end if
return (true);
} // End of the function
function getRandomFromArray(how_many, in_array)
{
var _loc4 = new Array();
var _loc6 = in_array.length;
var _loc1 = in_array.slice();
if (how_many > _loc6)
{
how_many = _loc6;
$d("getRandomFromArray() - Asking for more elements than what exist! how_many reset to the length of the array");
} // end if
var _loc3 = 0;
var _loc2 = 0;
while (_loc3 < how_many)
{
_loc2 = randBetween(0, _loc1.length - 1);
_loc4.push(_loc1[_loc2]);
_loc1.splice(_loc2, 1);
_loc1.reverse();
++_loc3;
} // end while
return (_loc4);
} // End of the function
function randBetween(from, to)
{
return (Math.round(Math.random() * (to - from)) + from);
} // End of the function
function ucFirst(str)
{
return (str.substr(0, 1).toUpperCase() + str.substr(1, str.length));
} // End of the function
function paginateArray(in_array, page, items_on_page)
{
var _loc2 = page * items_on_page;
var _loc1 = _loc2 + items_on_page;
if (_loc1 > in_array.length)
{
_loc1 = in_array.length;
} // end if
return (in_array.slice(_loc2, _loc1));
} // End of the function
function getCleanURL(url, target, disconnect)
{
if (isValidString(url))
{
if (disconnect == undefined || disconnect == true)
{
AIRTOWER.disconnect();
} // end if
getURL(url, target);
}
else
{
$d("getCleanURL() - Not a valid url passed! url: " + url);
} // end else if
} // End of the function
function freezeCode(m1, m2)
{
m1 = m1 + FREEZE_CODE_HASH;
var _loc2 = new Array();
var _loc3 = m2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
_loc2[_loc1] = m2.charCodeAt(_loc1) + m1.charCodeAt(_loc1);
} // end of for
return (_loc2);
} // End of the function
function meltCode(m1, c)
{
m1 = m1 + FREEZE_CODE_HASH;
var _loc2 = "";
for (var _loc1 = 0; _loc1 < c.length; ++_loc1)
{
_loc2 = _loc2 + String.fromCharCode(c[_loc1] - m1.charCodeAt(_loc1));
} // end of for
return (_loc2);
} // End of the function
function duplicateObject(obj)
{
var _loc3 = new Object();
var _loc1;
for (var _loc1 in obj)
{
_loc3[_loc1] = obj[_loc1];
} // end of for...in
return (_loc3);
} // End of the function
function getPenguinStandardTime()
{
local_time = new Date();
local_time.setHours(local_time.getHours() - calculated_timezone_offset);
local_time.setTime(local_time.valueOf() - calculated_time_difference);
return (local_time);
} // End of the function
function setupPenguinStandardTime(server_epoch)
{
server_time = new Date(server_epoch);
local_time = new Date();
calculated_time_difference = local_time.valueOf() - server_time.valueOf();
var _loc1 = local_time.getTimezoneOffset() / 60;
calculated_timezone_offset = SERVER_TIMEZONE_OFFSET - _loc1;
} // End of the function
function getLocalEpoch()
{
var _loc1 = new Date();
return (_loc1.valueOf());
} // End of the function
function convertToStandardTime(military_time, delimiter, with_am_pm)
{
if (isValidString(military_time))
{
if (isValidString(delimiter))
{
var _loc2 = military_time.split(delimiter);
var _loc1 = Number(_loc2[0]);
var _loc6 = String(_loc2[1]);
var _loc3 = "";
if (with_am_pm)
{
_loc3 = getLocalizedString("am");
if (_loc1 > 12)
{
_loc3 = getLocalizedString("pm");
} // end if
} // end if
if (_loc1 > 12)
{
_loc1 = _loc1 - 12;
} // end if
if (_loc1 != 0)
{
if (String(_loc1).indexOf("0") == 0)
{
_loc1 = Number(String(_loc1).substr(1, 1));
} // end if
}
else
{
_loc1 = 12;
} // end else if
_loc2[0] = _loc1;
_loc2[1] = _loc6;
_loc2.splice(2);
return (_loc2.join(delimiter) + _loc3);
}
else
{
$d("[shell] convertToStandardTime() -> Not a valid string passed for delimiter! delimeter: " + delimiter);
} // end else if
}
else
{
$d("[shell] convertToStandardTime() -> Not a valid string passed for time! time: " + military_time);
} // end else if
return (military_time);
} // End of the function
function convertMinutesToMilliseconds(min)
{
return (Math.round(min * ONE_MINUTE_IN_MILLISECONDS));
} // End of the function
function convertMillisecondsToMinutes(mill)
{
return (Math.round(mill / ONE_MINUTE_IN_MILLISECONDS));
} // End of the function
function convertMillisecondsToSeconds(mill)
{
return (Math.round(mill * ONE_SECOND_IN_MILLISECONDS));
} // End of the function
function convertMillisecondsToDays(mill)
{
return (Math.round(mill / ONE_DAY_IN_MILLISECONDS));
} // End of the function
function checkDelay(delay_obj)
{
var _loc1 = delay_obj.last_timestamp;
var _loc2 = delay_obj.interval;
if (!isNaN(_loc1))
{
if (!isNaN(_loc2))
{
var _loc3 = getLocalEpoch();
var _loc4 = _loc3 - _loc1;
if (_loc4 > _loc2)
{
delay_obj.last_timestamp = _loc3;
return (true);
} // end if
return (false);
}
else
{
$e("[shell] checkDelay() -> wait time is not a real number! wait_time: " + _loc2);
} // end else if
}
else
{
$e("[shell] checkDelay() -> last timestamp is not a real number! last_timestamp: " + _loc1);
} // end else if
} // End of the function
function startEggTimer()
{
if (getEggTimerMinutesRemaining() == MINUTES_IN_DAY)
{
setIsEggTimerActive(false);
return;
} // end if
setIsEggTimerActive(true);
egg_timer_interval = setInterval(calculateEggTimer, ONE_MINUTE_IN_MILLISECONDS);
} // End of the function
function calculateEggTimer()
{
egg_timer_milliseconds_remaining = egg_timer_milliseconds_remaining - ONE_MINUTE_IN_MILLISECONDS;
if (egg_timer_milliseconds_remaining == FIVE_MINUTES_IN_MILLISECONDS)
{
$e("[shell] calculateEggTimer() -> Egg timer five minute warning!", {error_code: TIME_WARNING, minutes_left: 5});
} // end if
if (egg_timer_milliseconds_remaining <= 0)
{
clearInterval(egg_timer_interval);
AIRTOWER.disconnect();
$e("[shell] calculateEggTimer() -> Egg timer out of time.", {error_code: NO_PLAY_TIME});
} // end if
var _loc1 = Object();
_loc1.minutes_remaining = convertMillisecondsToMinutes(egg_timer_milliseconds_remaining);
updateListeners(UPDATE_EGG_TIMER, _loc1);
} // End of the function
function isEggTimerActive()
{
return (is_egg_timer_active);
} // End of the function
function setIsEggTimerActive(is_active)
{
is_egg_timer_active = is_active;
} // End of the function
function getEggTimerMinutesRemaining()
{
return (convertMillisecondsToMinutes(egg_timer_milliseconds_remaining));
} // End of the function
function setEggTimerMinutesRemaining(min)
{
egg_timer_milliseconds_remaining = convertMinutesToMilliseconds(min);
} // End of the function
function sendJoinGame(game_name)
{
if (getCurrentGameRoomId() == undefined)
{
var _loc1 = getGameCrumbsByName();
if (_loc1.room_id != getCurrentRoomId())
{
_loc1 = getGameCrumbsByName(game_name);
var _loc3 = 0;
var _loc2 = 0;
if (_loc1 != undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.NAVIGATION + "#" + AIRTOWER.JOIN_ROOM, [_loc1.room_id, _loc3, _loc2], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendJoinGame() -> Tried to join a game which did not exist. game_name: " + game_name);
} // end else if
}
else
{
$e("[shell] sendJoinGame() -> Tried to join a game you are currently in. game_name: " + game_name);
} // end else if
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room while in a game room!", {error_code: PLAYER_IN_ROOM});
} // end else if
} // End of the function
function handleJoinGame(obj)
{
if (getCurrentGameRoomId() == undefined)
{
var _loc2 = Number(obj.shift());
var _loc1 = Number(obj.shift());
if (getCurrentRoomId() != _loc1)
{
setCurrentServerRoomId(_loc2);
my_game = getGameCrumbsById(_loc1);
my_game.smart_room_id = _loc2;
setLastRoomId(getCurrentRoomId());
setCurrentRoomId(_loc1);
setIsRoomIgloo(false);
if (my_game != undefined)
{
updateListeners(JOIN_GAME, null);
}
else
{
$e("[shell] handleJoinGame() -> Tried to join an invalid game: " + obj);
} // end else if
}
else
{
$e("[shell] handleJoinGame() -> Tried to join a room while your already in it! room_id: " + _loc1);
} // end else if
}
else
{
$e("[shell] handleJoinGame() -> Tried to join a room while in a game room!", {error_code: PLAYER_IN_ROOM});
} // end else if
} // End of the function
function getGameNameById(id)
{
var _loc1 = getGameCrumbs();
for (var _loc3 in _loc1)
{
if (_loc1[_loc3].room_id == id)
{
return (_loc1[_loc3].name);
} // end if
} // end of for...in
$e("[shell] getGameNameById() -> Could not find the game in the crumbs. id: " + id);
return;
} // End of the function
function getGameCrumbsById(id)
{
var _loc1 = getGameCrumbs();
for (var _loc3 in _loc1)
{
if (_loc1[_loc3].room_id == id)
{
return (_loc1[_loc3]);
} // end if
} // end of for...in
$e("[shell] getGameCrumbsById() -> Could not find the game in the crumbs. id: " + id);
return;
} // End of the function
function getGameCrumbsByName(name)
{
var _loc1 = getGameCrumbs();
for (var _loc3 in _loc1)
{
if (_loc3 == name)
{
return (_loc1[_loc3]);
} // end if
} // end of for...in
$e("[shell] getGameCrumbsByName() -> Could not find the game in the crumbs. name: " + name);
return;
} // End of the function
function sendGameOver(score)
{
if (!isNaN(score))
{
if (score > 0 && score < MAX_GAME_SCORE)
{
AIRTOWER.send(AIRTOWER.GAME_EXT, AIRTOWER.GAME_OVER, [score], "str", getCurrentServerRoomId());
}
else
{
var _loc3 = getMyPlayerTotalCoins();
var _loc1 = new Object();
_loc1.total = _loc3;
_loc1.earned = 0;
_loc1.is_table = false;
updateListeners(GAME_OVER, _loc1);
} // end else if
}
else
{
$e("[game] sendGameOver() -> Score is not a valid number");
} // end else if
} // End of the function
function handleGameOver(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc4 = getMyPlayerTotalCoins();
var _loc3 = _loc2 - _loc4;
obj = new Object();
obj.total = _loc2;
obj.earned = _loc3;
obj.is_table = false;
if (getCurrentGameRoomId() != undefined)
{
obj.is_table = true;
} // end if
setMyPlayerTotalCoins(_loc2);
updateListeners(GAME_OVER, obj);
} // End of the function
function startGameMusic()
{
var _loc2 = getCurrentRoomId();
var _loc1 = getGameCrumbsById(_loc2);
if (_loc1.music_id != undefined)
{
MUSIC.playMusic(_loc1.music_id);
}
else
{
$e("[shell] startGamemMusic() -> Could not find the music ID in the game crumbs. music_id: " + room.music_id);
} // end else if
} // End of the function
function getGameObject()
{
return (my_game);
} // End of the function
function getGameCrumbs()
{
return (game_crumbs);
} // End of the function
function setGameCrumbs(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].file_path = getPath(_loc1);
obj[_loc1].name = _loc1;
} // end of for...in
game_crumbs = obj;
} // End of the function
function handleUpdateTableById(obj)
{
var _loc3 = obj.shift();
var _loc1 = new Object();
_loc1.table_id = Number(obj[0]);
_loc1.num_players = Number(obj[1]);
updateListeners(UPDATE_TABLE, _loc1);
} // End of the function
function getTablesPopulationById(arr)
{
if (arr.length > 0)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.TABLE_HANDLER + "#" + AIRTOWER.GET_TABLE_POPULATION, arr, "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getTablesPopulationById()");
} // end else if
} // End of the function
function handleGetTablesPopulationById(obj)
{
var _loc7 = obj.shift();
var _loc3;
var _loc1;
for (var _loc3 in obj)
{
_loc1 = obj[_loc3].split("|");
handleUpdateTableById({smart_id: _loc7, table_id: _loc1[0], num_players: _loc1[1]});
} // end of for...in
} // End of the function
function sendJoinTableById(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.TABLE_HANDLER + "#" + AIRTOWER.JOIN_TABLE, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] joinTableById() -> Id was not a real number: " + id);
} // end else if
} // End of the function
function handleSendJoinTableById(obj)
{
var _loc3 = obj.shift();
setCurrentGameRoomId(_loc3);
var _loc1 = new Object();
_loc1.table_id = Number(obj[0]);
_loc1.seat_id = Number(obj[1]);
updateListeners(JOIN_TABLE, _loc1);
} // End of the function
function sendLeaveTable()
{
if (getCurrentGameRoomId() != undefined)
{
setCurrentGameRoomId(undefined);
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.TABLE_HANDLER + "#" + AIRTOWER.LEAVE_TABLE, "", "str", getCurrentServerRoomId());
}
else
{
$e("[shell] joinTableById() -> Id was not a real number: " + id);
} // end else if
} // End of the function
function handleLeaveTable()
{
updateListeners(LEAVE_TABLE, undefined);
} // End of the function
function setCurrentGameRoomId(id)
{
game_room_smart_id = id;
} // End of the function
function getCurrentGameRoomId()
{
return (game_room_smart_id);
} // End of the function
function updateWaddleList(waddle_id, seat, nickname)
{
if (!isNaN(waddle_id))
{
if (!isValidString(nickname))
{
nickname = undefined;
} // end if
var _loc2 = getWaddleById(waddle_id);
if (_loc2 == undefined)
{
var _loc6 = getWaddleList();
_loc6[waddle_id] = new Object();
_loc2 = getWaddleById(waddle_id);
_loc2.player_list = new Array();
} // end if
if (_loc2 != undefined)
{
_loc2.waddle_id = Number(waddle_id);
if (!isNaN(seat))
{
_loc2.player_list[seat] = nickname;
}
else
{
var _loc3 = _loc2.player_list.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
_loc2.player_list[_loc1] = undefined;
} // end of for
} // end else if
}
else
{
$e("[shell] updateWaddleList() -> Could not get Waddle. It is undefined! waddle_id: " + waddle_id);
} // end else if
}
else
{
$e("[shell] updateWaddleList() -> Waddle id is not a real number! waddle_id: " + waddle_id);
} // end else if
} // End of the function
function startWaddle(obj)
{
var _loc3 = obj.shift();
var _loc1 = new Array();
_loc1.push(Number(obj[0]));
_loc1.push(Number(obj[1]));
_loc1.push(Number(obj[2]));
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.WADDLE + "#" + AIRTOWER.SEND_WADDLE, _loc1, "str", getCurrentServerRoomId());
} // End of the function
function handleJoinWaddle(obj)
{
handleJoinGame(obj);
} // End of the function
function getWaddlePopulationById(arr)
{
if (arr.length > 0)
{
AIRTOWER.send(AIRTOWER.GAME_EXT, AIRTOWER.GET_WADDLE_POPULATION, arr, "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getWaddlePopulationById()");
} // end else if
} // End of the function
function handleGetWaddlesPopulationById(obj)
{
var _loc8 = obj.shift();
var _loc5;
var _loc3;
var _loc6;
var _loc1;
var _loc2;
for (var _loc5 in obj)
{
_loc1 = 0;
_loc3 = obj[_loc5].split("|");
_loc6 = _loc3[1].split(",");
_loc2 = _loc6.length;
while (_loc1 < _loc2)
{
if (!isValidString(_loc6[_loc1]))
{
_loc6[_loc1] = undefined;
} // end if
++_loc1;
} // end while
handleUpdateWaddlePopulationById({waddle_id: _loc3[0], player_list: _loc6});
} // end of for...in
} // End of the function
function handleUpdateWaddlePopulationById(obj)
{
var _loc3 = obj.player_list.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
updateWaddleList(obj.waddle_id, _loc1, obj.player_list[_loc1]);
} // end of for
updateListeners(UPDATE_WADDLE, obj);
} // End of the function
function handleUpdateWaddle(obj)
{
var _loc6 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc5 = Number(obj[1]);
var _loc4 = obj[2];
updateWaddleList(_loc2, _loc5, _loc4);
var _loc3 = getWaddleById(_loc2);
updateListeners(UPDATE_WADDLE, _loc3);
} // End of the function
function sendJoinWaddleById(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.GAME_EXT, AIRTOWER.JOIN_WADDLE, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendJoinWaddleById() -> Id was not a real number: " + id);
} // end else if
} // End of the function
function handleSendJoinWaddleById(obj)
{
var _loc2 = obj.shift();
var _loc1 = Number(obj[0]);
updateListeners(JOIN_WADDLE, {seat_id: _loc1});
} // End of the function
function sendLeaveWaddle()
{
AIRTOWER.send(AIRTOWER.GAME_EXT, AIRTOWER.LEAVE_WADDLE, "", "str", getCurrentServerRoomId());
} // End of the function
function handleLeaveWaddle()
{
updateListeners(LEAVE_WADDLE, undefined);
} // End of the function
function getWaddleList()
{
return (waddle_list);
} // End of the function
function setWaddleList(arr)
{
waddle_list = arr;
} // End of the function
function getWaddleById(id)
{
if (!isNaN(id))
{
var _loc2 = getWaddleList();
if (_loc2[id] != undefined)
{
return (_loc2[id]);
} // end if
$e("[shell] getWaddleById() -> Waddle is undefined: waddle_id: " + id);
return;
}
else
{
$e("[shell] getWaddleById() -> Id was not a real number: " + id);
} // end else if
return;
} // End of the function
function setCurrentServerRoomId(id)
{
current_server_room_id = id;
} // End of the function
function getCurrentServerRoomId()
{
if (current_server_room_id != undefined)
{
return (current_server_room_id);
} // end if
return (-1);
} // End of the function
function setCurrentCrumbRoomId(id)
{
current_crumb_room_id = id;
} // End of the function
function getCurrentCrumbRoomId()
{
if (current_crumb_room_id != undefined)
{
return (current_crumb_room_id);
} // end if
return (-1);
} // End of the function
function getRoomCrumbsById(id)
{
var _loc1 = getRoomCrumbs();
for (var _loc3 in _loc1)
{
if (_loc1[_loc3].room_id == id)
{
return (_loc1[_loc3]);
} // end if
} // end of for...in
$e("[shell] getRoomCrumbsById() -> Could not find the room in the crumbs. id: " + id);
return;
} // End of the function
function isPlayerMemberById(id)
{
var _loc4 = playerIndexInRoom(player_id);
var _loc2 = getPlayerList();
if (_loc4 != -1)
{
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc2[_loc1].is_member);
} // end if
} // end of for
}
else
{
$e("[shell] isPlayerMemberById() -> Player id not found in room. player_id: " + player_id);
} // end else if
} // End of the function
function getNicknameById(player_id)
{
var _loc5 = playerIndexInRoom(player_id);
var _loc2 = getPlayerList();
if (_loc5 != -1)
{
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc2[_loc1].nickname);
} // end if
} // end of for
}
else
{
$e("[shell] getPlayerNameFromId() -> Player id not found in room. player_id: " + player_id);
} // end else if
} // End of the function
function getRoomCrumbsByName(name)
{
var _loc1 = getRoomCrumbs();
for (var _loc3 in _loc1)
{
if (_loc3 == name)
{
return (_loc1[_loc3]);
} // end if
} // end of for...in
$e("[shell] getRoomCrumbsByName() -> Could not find the room in the crumbs. name: " + name);
return;
} // End of the function
function getRoomNameById(id)
{
var _loc1 = getRoomCrumbs();
for (var _loc3 in _loc1)
{
if (_loc1[_loc3].room_id == id)
{
return (_loc3);
} // end if
} // end of for...in
$e("[shell] getRoomNameById() -> Could not find the room in the crumbs. id: " + id);
return;
} // End of the function
function sendJoinRoom(room_name, xpos, ypos)
{
if (getCurrentGameRoomId() == undefined)
{
var _loc1 = getRoomCrumbsByName(room_name);
if (getCurrentRoomId() != _loc1.room_id)
{
if (_loc1 != undefined)
{
last_known_xpos = getMyPlayer().x;
last_known_ypos = getMyPlayer().y;
showLoading(getLocalizedString("Joining") + " " + getLocalizedString(room_name));
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.NAVIGATION + "#" + AIRTOWER.JOIN_ROOM, [_loc1.room_id, xpos, ypos], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room which did not exist in crumbs. room_name: " + room_name);
} // end else if
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room which your already in!: room_id: " + _loc1.room_id);
} // end else if
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room while in a game room!", {error_code: PLAYER_IN_ROOM});
} // end else if
} // End of the function
function handleJoinRoom(obj)
{
if (getCurrentGameRoomId() == undefined)
{
var _loc2 = obj[1];
stopMyPuffleBrains();
if (_loc2 < PLAYER_ROOM_SMART_ID_CUTOFF)
{
handleJoinWorldRoom(obj);
}
else
{
handleJoinPlayerIgloo(obj);
} // end else if
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room while in a game room!", {error_code: PLAYER_IN_ROOM});
} // end else if
} // End of the function
function handleJoinWorldRoom(obj)
{
if (getCurrentGameRoomId() == undefined)
{
var _loc5 = obj.shift();
var _loc4 = obj.shift();
setCurrentServerRoomId(_loc5);
my_room = getRoomCrumbsById(_loc4);
if (my_room != undefined)
{
var _loc3 = new Array();
var _loc2;
setCurrentCrumbRoomId(my_room.room_id);
for (var _loc2 in obj)
{
_loc3.push(makePlayerObjectFromString(obj[_loc2]));
} // end of for...in
if (getCurrentRoomId() == undefined)
{
setCurrentRoomId(_loc4);
} // end if
setLastRoomId(getCurrentRoomId());
setCurrentRoomId(_loc4);
setPlayerList(_loc3);
startChatLog();
setIsRoomIgloo(false);
updateListeners(JOIN_ROOM, null);
}
else
{
$e("[shell] handleJoinRoom() -> Tried to join a room which did not exist in crumbs. Obj: " + obj);
} // end else if
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room while in a game room!", {error_code: PLAYER_IN_ROOM});
} // end else if
} // End of the function
function startRoomMusic()
{
if (getIsRoomIgloo())
{
return;
} // end if
var _loc2 = getCurrentCrumbRoomId();
var _loc1 = getRoomCrumbsById(_loc2);
if (_loc1.music_id != undefined)
{
MUSIC.playMusic(_loc1.music_id);
}
else
{
$e("[shell] startRoomMusic() -> Could not find the music ID in the room crumbs. music_id: " + _loc1.music_id);
} // end else if
} // End of the function
function startMusicById(music_id)
{
if (!isNaN(music_id))
{
MUSIC.playMusic(music_id);
}
else
{
$e("[shell] startMusicById() -> Music id is not a real number!. music_id: " + music_id);
} // end else if
} // End of the function
function setCurrentRoomId(room_id)
{
current_room_id = room_id;
} // End of the function
function getLastRoomId()
{
return (last_room_id);
} // End of the function
function setLastRoomId(room_id)
{
last_room_id = room_id;
} // End of the function
function getCurrentRoomId()
{
return (current_room_id);
} // End of the function
function sendJoinLastRoom()
{
if (getCurrentGameRoomId() == undefined)
{
var _loc2 = 0;
var _loc1 = 0;
if (getLastRoomId() != undefined)
{
if (!isNaN(last_known_xpos))
{
_loc2 = last_known_xpos;
} // end if
if (!isNaN(last_known_ypos))
{
_loc1 = last_known_ypos;
} // end if
var _loc4 = getLastRoomId();
var _loc3 = getRoomNameById(_loc4);
sendJoinRoom(_loc3, _loc2, _loc1);
}
else
{
$e("[shell] sendJoinLastRoom() -> Last room is undefined.");
} // end else if
}
else
{
$e("[shell] sendJoinRoom() -> Tried to join a room while in a game room!", {error_code: PLAYER_IN_ROOM});
} // end else if
} // End of the function
function getRoomObject()
{
var _loc1 = getCurrentRoomId();
return (getRoomCrumbsById(_loc1));
} // End of the function
function getPlayerObjectFromRoomById(player_id)
{
var _loc1 = playerIndexInRoom(player_id);
var _loc2 = getPlayerList();
if (_loc1 != -1)
{
return (_loc2[_loc1]);
} // end if
return;
} // End of the function
function handleAddPlayerToRoom(obj)
{
var _loc4 = getRoomObject();
var _loc3 = obj.shift();
if (_loc3 == getCurrentServerRoomId())
{
var _loc2 = makePlayerObjectFromString(obj[0]);
var _loc1 = _loc2.player_id;
if (playerIndexInRoom(_loc1) == -1)
{
getPlayerList().push(_loc2);
removePlayerFromCacheById(_loc1);
updateListeners(ADD_PLAYER, _loc2);
if (isPlayerBuddyById(_loc1))
{
setBuddyAsOnlineById(_loc1);
} // end if
}
else if (_loc1 != getMyPlayerId())
{
$d("handleAddPlayerToRoom() -> Adding a duplicate player to the room. PlayerId: " + _loc1);
} // end else if
}
else
{
$d("handleAddPlayerToRoom() -> Adding a player to the same room id we are currently in");
} // end else if
} // End of the function
function handleRemovePlayerFromRoom(obj)
{
var _loc5 = obj.shift();
var _loc1 = Number(obj[0]);
var _loc2 = playerIndexInRoom(_loc1);
var _loc3 = getPlayerList();
if (_loc2 != -1)
{
_loc3.splice(_loc2, 1);
updateListeners(REMOVE_PLAYER, _loc1);
} // end if
} // End of the function
function sendUpdatePlayerColour(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_COLOUR, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerColour() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerColour(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.colour_id = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerColour() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerColour() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerHead(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_HEAD, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerHead() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerHead(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.head = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerHead() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerHead() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerFace(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_FACE, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerFace() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerFace(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.face = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerFace() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerFace() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerNeck(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_NECK, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerNeck() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerNeck(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.neck = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerNeck() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerBody() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerBody(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_BODY, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerBody() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerBody(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.body = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerBody() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerBody() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerHand(id)
{
$d("[shell] sendUpdatePlayerHand() -> id: " + id);
if (!isNaN(id))
{
if (id < 750 || id > 760)
{
sendStopPuffleWalk();
} // end if
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_HAND, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerHand() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerHand(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
debugObject(_loc1, true);
_loc1.hand = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerFeet(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_FEET, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerFeet() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerFeet(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.feet = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerFlag(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_FLAG, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerFlag() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerFlag(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.flag_id = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendUpdatePlayerPhoto(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_PHOTO, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayerPhoto() -> Not a real number passed for id! id:" + id);
} // end else if
} // End of the function
function handleSendUpdatePlayerPhoto(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (!isNaN(_loc2))
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.photo_id = _loc3;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendUpdatePlayerHand() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function sendClearPaperdoll()
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.SETTING_HANDLER + "#" + AIRTOWER.UPDATE_PLAYER_REMOVE, "", "str", getCurrentServerRoomId());
} // End of the function
function handleSendClearPaperdoll(obj)
{
var _loc5 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc3 = Boolean(Number(obj[1]));
if (!isNaN(_loc2))
{
if (_loc3)
{
var _loc1 = getPlayerObjectFromRoomById(_loc2);
if (_loc1 != undefined)
{
_loc1.photo_id = 0;
_loc1.flag_id = 0;
_loc1.feet = 0;
_loc1.head = 0;
_loc1.neck = 0;
_loc1.face = 0;
_loc1.hand = 0;
_loc1.body = 0;
_loc1.frame_hack = buildFrameHacksString(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
if (isMyPlayer(_loc2))
{
saveRoomPlayerObject(_loc1);
} // end if
}
else
{
$e("[shell] handleSendClearPaperdoll() -> Could not find player in room! player_id:" + _loc2);
} // end else if
}
else
{
$e("[shell] handleSendClearPaperdoll() -> Player was not successfully cleared!");
} // end else if
}
else
{
$e("[shell] handleSendClearPaperdoll() -> Not a real number passed for player id! player_id:" + _loc2);
} // end else if
} // End of the function
function handleUpdatePlayerInRoom(obj)
{
var _loc6 = getRoomObject();
var _loc5 = obj.shift();
if (_loc5 == getCurrentServerRoomId())
{
var _loc1 = makePlayerObjectFromString(obj[0]);
var _loc4 = _loc1.player_id;
var _loc3 = playerIndexInRoom(_loc4);
var _loc2 = getPlayerList();
if (_loc3 != -1)
{
_loc2.splice(_loc3, 1);
_loc2.push(_loc1);
updateListeners(UPDATE_PLAYER, _loc1);
} // end if
}
else
{
$d("handleAddPlayerToRoom() -> Updating a player in the incorrect room id");
} // end else if
} // End of the function
function addPuffleToHand(obj)
{
var _loc1 = obj.type_id;
var _loc2 = PUFFLE_INVENTORY_ID + _loc1;
sendUpdatePlayerHand(_loc2);
} // End of the function
function removePufflesFromHand()
{
} // End of the function
function sendPlayerMove(xpos, ypos)
{
if (!isNaN(xpos) && !isNaN(ypos))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.PLAYER_MOVE, [xpos, ypos], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPlayerMove() -> NaN - xpos: " + xpos + " ypos: " + ypos);
} // end else if
} // End of the function
function handleSendPlayerMove(obj)
{
var _loc8 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc5 = Number(obj[1]);
var _loc4 = Number(obj[2]);
var _loc7 = playerIndexInRoom(_loc2);
var _loc3 = getPlayerList();
if (penguin_index != -1)
{
_loc3[_loc7].x = _loc5;
_loc3[_loc7].y = _loc4;
var _loc1 = new Object();
_loc1.player_id = _loc2;
_loc1.x = _loc5;
_loc1.y = _loc4;
updateListeners(PLAYER_MOVE, _loc1);
}
else
{
$d("[shell] Trying to move a penguin who was not found in the room. player_id: " + _loc2);
} // end else if
} // End of the function
function sendPlayerFrame(frame_num)
{
if (!isNaN(frame_num))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.PLAYER_FRAME, [frame_num], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPlayerFrame() -> NaN - frame_number: " + frame_num);
} // end else if
} // End of the function
function handleSendPlayerFrame(obj)
{
var _loc5 = obj.shift();
var _loc1 = new Object();
_loc1.player_id = Number(obj[0]);
_loc1.frame = Number(obj[1]);
var _loc4 = playerIndexInRoom(_loc1.player_id);
var _loc2 = getPlayerList();
if (penguin_index != -1)
{
_loc2[_loc4].frame = _loc1.frame;
updateListeners(PLAYER_FRAME, _loc1);
}
else
{
$d("[shell] updatePlayerAction() -> Trying to update a penguin frame who was not found in the room. player_id: " + player_id);
} // end else if
} // End of the function
function sendPlayerAction(frame_num)
{
if (!isNaN(frame_num))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.PLAYER_ACTION, [frame_num], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendUpdatePlayer() -> NaN - frame_number: " + frame_num);
} // end else if
} // End of the function
function handleUpdatePlayerAction(obj)
{
var _loc5 = obj.shift();
var _loc1 = new Object();
_loc1.player_id = Number(obj[0]);
_loc1.frame = Number(obj[1]);
var _loc4 = playerIndexInRoom(_loc1.player_id);
var _loc3 = getPlayerList();
if (penguin_index != -1)
{
updateListeners(PLAYER_ACTION, _loc1);
}
else
{
$d("[shell] updatePlayerAction() -> Trying to update a penguin action who was not found in the room");
} // end else if
} // End of the function
function getPlayersInRoomCount()
{
return (room_player_list.length);
} // End of the function
function getPlayerList()
{
return (room_player_list);
} // End of the function
function setPlayerList(arr)
{
room_player_list = arr;
} // End of the function
function getSortedPlayerList()
{
return (getPlayerList().sortOn(["nickname"], [Array.CASEINSENSITIVE]));
} // End of the function
function playerIndexInRoom(player_id)
{
var _loc2 = getPlayerList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc1);
} // end if
} // end of for
return (-1);
} // End of the function
function setRoomCrumbs(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].file_path = getPath(_loc1);
obj[_loc1].name = _loc1;
} // end of for...in
room_crumbs = obj;
} // End of the function
function getRoomCrumbs()
{
return (room_crumbs);
} // End of the function
function setNewsCrumbs(arr)
{
news_crumbs = arr;
} // End of the function
function getNewsCrumbs()
{
return (news_crumbs);
} // End of the function
function getPostcardById()
{
} // End of the function
function getPostcardCrumbs()
{
return (postcard_crumbs);
} // End of the function
function getPostcardsByCategory(category)
{
if (isValidString(category))
{
var _loc1 = getPostcardCrumbs()[category];
if (_loc1 != undefined)
{
var _loc3 = new Array();
var _loc2;
for (var _loc2 in _loc1)
{
if (_loc1[_loc2].in_catalog)
{
_loc3.push(_loc1[_loc2]);
} // end if
} // end of for...in
_loc3.reverse();
return (_loc3);
}
else
{
$e("getPostcardsByCategory() -> No postcards found in that category! category: " + category);
} // end else if
}
else
{
$e("getPostcardsByCategory() -> Not a valid string passed for category type! category: " + category);
} // end else if
return;
} // End of the function
function getPostcardCategoryList()
{
return (postcard_category_list);
} // End of the function
function setPostcardCategoryList(obj)
{
var _loc2 = new Array();
var _loc1;
for (var _loc1 in obj)
{
_loc2.push(_loc1);
} // end of for...in
_loc2.reverse();
postcard_category_list = _loc2;
} // End of the function
function setPostcardsCategory(obj)
{
var _loc1;
var _loc2;
for (var _loc1 in obj)
{
for (var _loc2 in obj[_loc1])
{
obj[_loc1][_loc2].category = _loc1;
obj[_loc1][_loc2].id = _loc2;
} // end of for...in
} // end of for...in
} // End of the function
function setPostcardCount(obj)
{
var _loc3 = 0;
var _loc1;
var _loc4;
for (var _loc1 in obj)
{
for (var _loc4 in obj[_loc1])
{
++_loc3;
} // end of for...in
} // end of for...in
postcard_count = _loc3;
} // End of the function
function buildPostcardFlatArray(obj)
{
var _loc4 = new Array();
var _loc1;
var _loc3;
for (var _loc1 in obj)
{
for (var _loc3 in obj[_loc1])
{
_loc4.push(obj[_loc1][_loc3]);
} // end of for...in
} // end of for...in
setPostcardFlatArray(_loc4);
} // End of the function
function setPostcardFlatArray(arr)
{
postcard_flat_arr = arr;
} // End of the function
function getPostcardFlatArray()
{
return (postcard_flat_arr);
} // End of the function
function getPostcardMaxPages(pcs_per_page)
{
var _loc2 = getPostcardCategoryList();
var _loc4 = _loc2.length;
var _loc1 = 0;
var _loc3 = 0;
while (_loc1 < _loc4)
{
_loc3 = _loc3 + getPagesPerCategory(_loc2[_loc1], pcs_per_page);
++_loc1;
} // end while
return (_loc3);
} // End of the function
function getPagesPerCategory(cat, pcs_per_page)
{
var _loc1 = getPostcardsByCategory(cat);
return (Math.ceil(_loc1.length / pcs_per_page));
} // End of the function
function getPostcardCategoryMaxPages(category_name, pcs_per_page)
{
var _loc1 = getPostcardsByCategory(category_name);
return (Math.ceil(_loc1.length / pcs_per_page));
} // End of the function
function getPostcardCount()
{
return (postcard_count);
} // End of the function
function setPostcardCrumbs(obj)
{
postcard_crumbs = obj;
setPostcardsCategory(postcard_crumbs);
setPostcardCount(postcard_crumbs);
buildPostcardFlatArray(postcard_crumbs);
setPostcardCategoryList(postcard_crumbs);
} // End of the function
function getMyPlayerHex()
{
var _loc2 = getMyPlayerObject();
var _loc1 = getPlayerColoursObject();
if (_loc1[_loc2.colour_id] != undefined)
{
return (_loc1[_loc2.colour_id]);
} // end if
return (_loc1[0]);
} // End of the function
function setMyPlayerHexById(id)
{
if (!isNaN(id))
{
var _loc1 = getMyPlayerObject();
var _loc3 = _loc1.colour_id;
if (_loc3 != id)
{
_loc1.colour_id = id;
} // end if
if (player_colours[_loc1.colour_id] != undefined)
{
return (player_colours[_loc1.colour_id]);
} // end if
}
else
{
$e("setMyPlayerHexById() -> Player color ");
} // end else if
} // End of the function
function setMyPlayerId(id)
{
my_player.player_id = id;
} // End of the function
function getMyPlayerId()
{
return (my_player.player_id);
} // End of the function
function handleLoadPlayer(obj)
{
var _loc2 = obj.shift();
makeMyPlayerObjectFromString(obj[0]);
setMyPlayerTotalCoins(obj[1]);
setMyPlayerSafemode(Boolean(Number(obj[2])));
setEggTimerMinutesRemaining(Number(obj[3]));
startEggTimer();
setupPenguinStandardTime(Number(obj[4]));
setMyPlayerDaysOld(Number(obj[5]));
setMyPlayerBannedAge(Number(obj[6]));
savePlayerObject();
} // End of the function
function sendOpenBook()
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.TOY_HANDLER + "#" + AIRTOWER.OPEN_BOOK, [1, 1], "str", getCurrentServerRoomId());
} // End of the function
function handleOpenPlayerBook(obj)
{
var _loc2 = obj.shift();
var _loc1 = Number(obj[0]);
if (!isNaN(_loc2) && !isNaN(_loc1))
{
updateListeners(OPEN_BOOK, _loc1);
}
else
{
$e("[shell] handleOpenPlayerBook() -> Did not receive a valid player id or smart room id. player_id: " + _loc1 + " smart_room_id: " + _loc2);
} // end else if
} // End of the function
function sendCloseBook()
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.TOY_HANDLER + "#" + AIRTOWER.CLOSE_BOOK, [1], "str", getCurrentServerRoomId());
} // End of the function
function handleClosePlayerBook(obj)
{
var _loc2 = obj.shift();
var _loc1 = Number(obj[0]);
if (!isNaN(_loc2) && !isNaN(_loc1))
{
updateListeners(CLOSE_BOOK, _loc1);
}
else
{
$e("[shell] handleClosePlayerBook() -> Did not receive a valid player id or smart room id. player_id: " + _loc1 + " smart_room_id: " + _loc2);
} // end else if
} // End of the function
function sendThrowBall(xpos, ypos)
{
if (!isNaN(xpos) && !isNaN(ypos))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.THROW_BALL, [xpos, ypos], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendThrowBall() -> NaN - xpos: " + xpos + " ypos: " + ypos);
} // end else if
} // End of the function
function handlePlayerThrowBall(obj)
{
var _loc6 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc5 = Number(obj[1]);
var _loc4 = Number(obj[2]);
if (!isNaN(_loc6) && !isNaN(_loc2))
{
if (!isNaN(_loc5) && !isNaN(_loc4))
{
var _loc1 = new Object();
_loc1.player_id = _loc2;
_loc1.x = _loc5;
_loc1.y = _loc4;
updateListeners(THROW_BALL, _loc1);
}
else
{
$e("[shell] handlePlayerThrowBall() -> The snowballs xpos or ypos was NaN. xpos: " + xpos + " ypos: " + ypos);
} // end else if
}
else
{
$e("[shell] handlePlayerThrowBall() -> Did not receive a valid player id or smart room id. player_id: " + _loc2 + " smart_room_id: " + _loc6);
} // end else if
} // End of the function
function getMyPlayerObject()
{
return (my_player);
} // End of the function
function isMyPlayer(player_id)
{
if (getMyPlayerId() == player_id)
{
return (true);
} // end if
return (false);
} // End of the function
function makeMyPlayerObjectFromString(player_string)
{
var _loc1 = player_string.split("|");
var _loc2 = getMyPlayerObject();
_loc2.player_id = Number(_loc1[0]);
_loc2.nickname = String(_loc1[1]);
for (var _loc3 in _loc1)
{
if (isNaN(_loc1[_loc3]))
{
_loc1[_loc3] = 0;
} // end if
} // end of for...in
_loc2.colour_id = Number(_loc1[2]);
_loc2.head = Number(_loc1[3]);
_loc2.face = Number(_loc1[4]);
_loc2.neck = Number(_loc1[5]);
_loc2.body = Number(_loc1[6]);
_loc2.hand = Number(_loc1[7]);
_loc2.feet = Number(_loc1[8]);
_loc2.flag_id = Number(_loc1[9]);
_loc2.photo_id = Number(_loc1[10]);
_loc2.x = Number(_loc1[11]);
_loc2.y = Number(_loc1[12]);
_loc2.frame = Number(_loc1[13]);
_loc2.is_member = false;
if (_loc1[14] != undefined)
{
_loc2.is_member = Boolean(_loc1[14]);
} // end if
return (_loc2);
} // End of the function
function makePlayerObjectFromString(player_string)
{
var _loc1 = player_string.split("|");
var _loc3 = new Object();
_loc3.player_id = Number(_loc1[0]);
_loc3.nickname = String(_loc1[1]);
var _loc2;
for (var _loc2 in _loc1)
{
if (isNaN(_loc1[_loc2]))
{
_loc1[_loc2] = 0;
} // end if
} // end of for...in
_loc3.colour_id = Number(_loc1[2]);
_loc3.head = Number(_loc1[3]);
_loc3.face = Number(_loc1[4]);
_loc3.neck = Number(_loc1[5]);
_loc3.body = Number(_loc1[6]);
_loc3.hand = Number(_loc1[7]);
_loc3.feet = Number(_loc1[8]);
_loc3.flag_id = Number(_loc1[9]);
_loc3.photo_id = Number(_loc1[10]);
_loc3.x = Number(_loc1[11]);
_loc3.y = Number(_loc1[12]);
_loc3.frame = Number(_loc1[13]);
_loc3.frame_hack = buildFrameHacksString(_loc3);
return (_loc3);
} // End of the function
function getPlayerObjectById(player_id)
{
if (!isNaN(player_id))
{
var _loc1;
_loc1 = getPlayerObjectFromRoomById(player_id);
if (_loc1 != undefined)
{
return (_loc1);
} // end if
_loc1 = getPlayerObjectFromCacheById(player_id);
if (_loc1 != undefined)
{
addPlayerToCache(_loc1);
return (_loc1);
} // end if
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.GET_PLAYER_OBJECT, [player_id], "str", getCurrentServerRoomId());
return;
}
else
{
$e("[shell] getPlayerObjectById() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function getPlayerLocationById(player_id)
{
if (!isNaN(player_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.BUDDY_HANDLER + "#" + AIRTOWER.FIND_BUDDY, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getPlayerLocationById() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function handleGetPlayerLocationById(obj)
{
var _loc2 = obj.shift();
var _loc1 = new Object();
_loc1.room_id = Number(obj[0]);
debugObject(_loc1, true);
updateListeners(GET_PLAYER_LOCATION, _loc1);
} // End of the function
function handleLoadPlayerObject(obj)
{
var _loc3 = obj.shift();
var _loc1 = obj[0];
if (isValidString(_loc1))
{
var _loc2 = makePlayerObjectFromString(_loc1);
addPlayerToCache(_loc2);
updateListeners(LOAD_PLAYER_OBJECT, _loc2);
}
else
{
$e("[shell] handleLoadPlayerObject() -> A valid player string was not returned: " + _loc1);
} // end else if
} // End of the function
function addPlayerToCache(player_obj)
{
var _loc1 = player_obj.player_id;
if (!isNaN(_loc1))
{
if (_loc1 != getMyPlayerId())
{
var _loc2 = getPlayerCache();
var _loc4;
var _loc3 = getPlayerIndexInCacheById(_loc1);
if (_loc3 != -1)
{
_loc2.splice(_loc3, 1);
} // end if
_loc2.unshift(player_obj);
_loc4 = _loc2.length;
if (_loc4 > MAX_PLAYERS_IN_CACHE)
{
_loc2.splice(MAX_PLAYERS_IN_CACHE);
} // end if
}
else
{
$d("[shell] addPlayerToCache() -> Local player not added to cache");
} // end else if
}
else
{
$e("[shell] addPlayerToCache() -> Player id is not a real number. player_id: " + _loc1);
} // end else if
} // End of the function
function removePlayerFromCacheById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getPlayerIndexInCacheById(player_id);
if (_loc2 != -1)
{
player_cache.splice(_loc2, 1);
}
else
{
$d("[shell] removePlayerFromCacheById() -> Player was not found in the cache, could not remove. player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] removePlayerFromCacheById() -> Player id is not a valid id. player_id: " + player_id);
} // end else if
} // End of the function
function getPlayerObjectFromCacheById(player_id)
{
var _loc2 = getPlayerCache();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc2[_loc1]);
} // end if
} // end of for
return;
} // End of the function
function getPlayerIndexInCacheById(player_id)
{
var _loc2 = getPlayerCache();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc1);
} // end if
} // end of for
return (-1);
} // End of the function
function isItemOnMyPlayer(item_id)
{
if (!isNaN(item_id))
{
var _loc2 = getPlayerObjectFromRoomById(getMyPlayerId());
var _loc1;
for (var _loc1 in _loc2)
{
switch (_loc1)
{
case "head":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "face":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "neck":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "body":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "hand":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "feet":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "flag_id":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
case "photo_id":
{
if (_loc2[_loc1] == item_id)
{
return (true);
} // end if
}
} // End of switch
} // end of for...in
}
else
{
$e("[shell] isItemOnMyPlayer() -> item id is not a real number! item_id: " + item_id);
} // end else if
return (false);
} // End of the function
function sendSpyPhoneRequest()
{
if (!spy_requested)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.ITEM_HANDLER + "#" + AIRTOWER.BUY_INVENTORY, [800], "str", getCurrentServerRoomId());
spy_requested = true;
}
else
{
$d("[shell] sendSpyPhoneRequest() -> Not sending request for spyphone as its already been sent");
} // end else if
} // End of the function
function getPlayerCache()
{
return (player_cache);
} // End of the function
function isMyPlayerMember()
{
return (my_player.is_member);
} // End of the function
function setMyPlayerTotalCoins(amount)
{
if (!isNaN(amount))
{
my_player.coins = amount;
var _loc1 = new Object();
_loc1.coins = my_player.coins;
updateListeners(UPDATE_COINS, _loc1);
}
else
{
$e("[shell] setMyPlayerCoins() -> Amount is not a real number: " + amount);
} // end else if
} // End of the function
function getMyPlayerTotalCoins()
{
return (my_player.coins);
} // End of the function
function setMyPlayerSafemode(is_safemode)
{
my_player.is_safemode = is_safemode;
} // End of the function
function isMyPlayerSafeMode()
{
return (my_player.is_safemode);
} // End of the function
function getMyPlayerNickname()
{
return (my_player.nickname);
} // End of the function
function setMyPlayerDaysOld(days_old)
{
my_player.created_date = days_old;
} // End of the function
function getMyPlayerDaysOld()
{
return (my_player.created_date);
} // End of the function
function setMyPlayerBannedAge(date_epoch)
{
my_player.banned_age = date_epoch;
} // End of the function
function getMyPlayerBannedAge()
{
return (my_player.banned_age);
} // End of the function
function getMyInventoryList()
{
showLoading(getLocalizedString("Loading Your Inventory"));
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.ITEM_HANDLER + "#" + AIRTOWER.GET_INVENTORY_LIST, [], "str", getCurrentServerRoomId());
} // End of the function
function handleMyGetInventoryList(obj)
{
var _loc5 = obj.shift();
var _loc4 = new Array();
var _loc2;
$d("[shell] handleMyGetInventoryList() -> Parsing player inventory");
for (var _loc2 in obj)
{
var _loc1 = getInventoryObjectById(Number(obj[_loc2]));
if (_loc1 != undefined)
{
_loc4.push(_loc1);
continue;
} // end if
$e("[shell] handleGetInventoryList() -> Trying to add a inventory item which did not exist in crumbs. id: " + obj[_loc2]);
} // end of for...in
setMyInventoryArray(_loc4);
updateListeners(UPDATE_INVENTORY, undefined);
} // End of the function
function getInventoryObjectById(id)
{
var _loc1 = getInventoryCrumbsObject();
if (_loc1[id] != undefined)
{
return (_loc1[id]);
} // end if
$e("[shell] getInventoryObjectById() -> Inventory id was not found in the crumbs, so it was not added to player inventory. Inventory Id: " + id);
return;
} // End of the function
function getInventoryTypeById(id)
{
if (isInventoryInCrumbs(id))
{
var _loc1 = getInventoryCrumbsObject();
return (_loc1[id].type);
}
else
{
$e("[shell] getInventoryTypeById() -> Inventory id was not found in the crumbs. Inventory Id: " + id);
return;
} // end else if
} // End of the function
function isInventoryInCrumbs(id)
{
var _loc1 = getInventoryCrumbsObject();
var _loc4 = _loc1[id];
var _loc2;
for (var _loc2 in _loc1)
{
if (_loc1[_loc2].id == id)
{
return (true);
} // end if
} // end of for...in
return (false);
} // End of the function
function isInventoryMemberOnly(id)
{
if (!isNaN(id))
{
if (isInventoryInCrumbs(id))
{
var _loc2 = getInventoryCrumbsObject();
var _loc3 = _loc2[id];
return (_loc3.is_member);
}
else
{
$e("[shell] isInventoryMemberOnly() -> Inventory id was not found in the crumbs. Inventory Id: " + id);
} // end else if
}
else
{
$e("[shell] isInventoryMemberOnly() -> Id was not a valid number: " + id);
} // end else if
} // End of the function
function isMyPlayerTourGuide()
{
var _loc2 = getMyInventoryArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].make_tour_guide == true)
{
return (true);
} // end if
} // end of for
return (false);
} // End of the function
function isMyPlayerSecretAgent()
{
var _loc2 = getMyInventoryArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].make_secret_agent == true)
{
return (true);
} // end if
} // end of for
return (false);
} // End of the function
function isItemInMyInventory(id)
{
if (!isNaN(id))
{
var _loc2 = getMyInventoryArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].id == id)
{
return (true);
} // end if
} // end of for
return (false);
}
else
{
$e("[shell] isItemInMyInventory() -> Id was not a valid number: " + id);
} // end else if
} // End of the function
function sendBuyInventory(id)
{
if (!isNaN(id))
{
if (isInventoryInCrumbs(id))
{
var _loc3 = getInventoryCrumbsObject();
var _loc4 = _loc3[id];
if (_loc4.is_member && !isMyPlayerMember())
{
var _loc2 = new Object();
_loc2.item_id = id;
_loc2.success = false;
updateListeners(BUY_INVENTORY, _loc2);
$d("[shell] sendBuyInventory() -> Trying to buy a member item when not a member. Item id: " + id);
}
else
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.ITEM_HANDLER + "#" + AIRTOWER.BUY_INVENTORY, [id], "str", getCurrentServerRoomId());
} // end else if
}
else
{
$e("[shell] sendBuyInventory() -> Inventory id was not found in the crumbs. Inventory Id: " + id);
} // end else if
}
else
{
$e("[shell] sendBuyInventory() -> Id was not a real number: " + id);
} // end else if
} // End of the function
function handleBuyInventory(obj)
{
var _loc6 = obj.shift();
var _loc1 = Number(obj[0]);
var _loc3 = Number(obj[1]);
if (isNaN(_loc3))
{
_loc3 = 0;
} // end if
setMyPlayerTotalCoins(_loc3);
var _loc5 = getInventoryObjectById(_loc1);
var _loc4 = getMyInventoryArray();
if (!isItemInMyInventory(_loc1))
{
obj = new Object();
obj.item_id = _loc1;
obj.success = true;
updateListeners(BUY_INVENTORY, obj);
_loc4.push(_loc5);
}
else
{
obj = new Object();
obj.item_id = _loc1;
obj.success = false;
updateListeners(BUY_INVENTORY, obj);
$d("[shell] handleBuyInventory() -> trying to add a duplicate item to player inventory");
} // end else if
} // End of the function
function setInventoryCrumbsObject(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].id = Number(_loc1);
} // end of for...in
inventory_crumbs = obj;
} // End of the function
function getInventoryCrumbsObject()
{
return (inventory_crumbs);
} // End of the function
function getMyInventoryArray()
{
return (inventory_arr);
} // End of the function
function setMyInventoryArray(arr)
{
inventory_arr = arr;
} // End of the function
function getMySortedInventoryArray()
{
return (inventory_arr.sortOn(["type", "id"], [Array.CASEINSENSITIVE, Array.DESCENDING]));
} // End of the function
function setPlayerColoursObject(obj)
{
player_colours = obj;
} // End of the function
function getPlayerColoursObject()
{
return (player_colours);
} // End of the function
function getPlayerHexFromId(id)
{
var _loc1 = getPlayerColoursObject();
if (_loc1[id] != undefined)
{
return (_loc1[id]);
} // end if
return (_loc1[0]);
} // End of the function
function setFrameHackCrumbs(obj)
{
frame_hacks = new Object();
var _loc1;
var _loc3;
var _loc6;
var _loc5;
for (var _loc1 in obj)
{
frame_hacks[_loc1] = new Object();
var _loc4;
for (var _loc4 in obj[_loc1])
{
_loc3 = obj[_loc1][_loc4];
_loc5 = buildFrameHacksString(_loc3);
frame_hacks[_loc1][_loc5] = _loc3.secret_frame;
} // end of for...in
} // end of for...in
for (i in obj)
{
delete obj[i];
} // end of for...in
} // End of the function
function buildFrameHacksString(obj)
{
var _loc2 = new Array();
for (n in obj)
{
if (isNaN(obj[n]))
{
crumb[n] = 0;
} // end if
} // end of for...in
_loc2.push(obj.head);
_loc2.push(obj.face);
_loc2.push(obj.neck);
_loc2.push(obj.body);
_loc2.push(obj.hand);
_loc2.push(obj.feet);
return (_loc2.join("|"));
} // End of the function
function getSecretFrame(player_id, frame)
{
if (!isNaN(player_id))
{
if (!isNaN(frame))
{
var _loc4 = getPlayerObjectById(player_id);
var _loc3 = getFrameHackCrumbs()[frame];
if (_loc3[_loc4.frame_hack] != undefined)
{
return (_loc3[_loc4.frame_hack]);
} // end if
}
else
{
$e("[shell] getSecretFrame() -> Not a real number passed for frame! frame: " + frame);
} // end else if
}
else
{
$e("[shell] getSecretFrame() -> Not a real number passed for player_id! player_id: " + player_id);
} // end else if
$d("[shell] getSecretFrame() -> Could not find a frame hack! player_id: " + player_id + " frame: " + frame);
return (frame);
} // End of the function
function getFrameHackCrumbs()
{
return (frame_hacks);
} // End of the function
function getFurnitureListFromServer()
{
var _loc1 = getFurnitureList();
if (_loc1 == undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.GET_FURNITURE_LIST, "", "str", getCurrentServerRoomId());
}
else
{
updateListeners(GET_FURNITURE_LIST, _loc1);
} // end else if
} // End of the function
function handleGetFurnitureListFromServer(obj)
{
var _loc8 = obj.shift();
var _loc7 = new Array();
var _loc1;
var _loc2;
var _loc4;
var _loc3;
var _loc6;
for (var _loc6 in obj)
{
_loc2 = obj[_loc6].split("|");
_loc4 = Number(_loc2[0]);
_loc3 = Number(_loc2[1]);
_loc1 = getFurnitureFromCrumbsById(_loc4);
if (_loc1 != undefined)
{
_loc1.total = _loc3;
_loc1.available = _loc3;
_loc1.frame_1 = 1;
_loc1.frame_2 = 1;
_loc7.push(_loc1);
continue;
} // end if
$e("[shell] handleGetFurnitureListFromServer() -> Could not find the furniture in the crumbs!");
} // end of for...in
setFurnitureList(_loc7);
setAvailableCounts();
updateListeners(GET_FURNITURE_LIST, undefined);
AIRTOWER.removeListener(AIRTOWER.GET_FURNITURE_LIST, handleGetFurnitureListFromServer);
} // End of the function
function setAvailableCounts()
{
var _loc3 = getFurnitureList();
var _loc4 = getPlayerIglooFurniture();
var _loc6 = _loc3.length;
var _loc5 = _loc4.length;
var _loc2 = 0;
var _loc1 = 0;
while (_loc2 < _loc6)
{
for (var _loc1 = 0; _loc1 < _loc5; ++_loc1)
{
if (_loc3[_loc2].item_id == _loc4[_loc1].item_id)
{
--_loc3[_loc2].available;
} // end if
} // end of for
++_loc2;
} // end while
} // End of the function
function sendBuyFurniture(id)
{
if (!isNaN(id))
{
if (isFurnitureInCrumbs(id))
{
var _loc3 = getFurnitureCrumbsObject();
var _loc4 = _loc3[id];
if (!isMyPlayerMember())
{
var _loc2 = new Object();
_loc2.item_id = id;
_loc2.success = false;
updateListeners(BUY_FURNITURE, _loc2);
$d("[shell] sendBuyFurniture() -> You have to be a member to buy furniture!");
}
else
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.BUY_FURNITURE, [id], "str", getCurrentServerRoomId());
} // end else if
}
else
{
$e("[shell] sendBuyFurniture() -> Inventory id was not found in the crumbs. Inventory Id: " + id);
} // end else if
}
else
{
$e("[shell] sendBuyFurniture() -> Id was not a real number: " + id);
} // end else if
} // End of the function
function handleSendBuyFurniture(obj)
{
var _loc10 = Number(obj.shift());
var _loc2 = Number(obj[0]);
var _loc9 = Number(obj[1]);
setMyPlayerTotalCoins(_loc9);
var _loc6 = getFurnitureFromCrumbsById(_loc2);
if (_loc6 != undefined)
{
++_loc6.available;
var _loc3 = getFurnitureList();
var _loc4 = false;
var _loc5 = _loc3.length;
for (var _loc1 = 0; _loc1 < _loc5; ++_loc1)
{
if (_loc3[_loc1].item_id == _loc2)
{
_loc4 = true;
break;
} // end if
} // end of for
if (!_loc4)
{
_loc6.available = 1;
_loc6.total = 1;
_loc3.push(_loc6);
} // end if
var _loc7 = new Object();
_loc7.item_id = _loc2;
_loc7.success = true;
updateListeners(BUY_FURNITURE, _loc7);
}
else
{
$e("[shell] handleSendBuyFurniture() -> Furniture was not found in the crumbs! item_id: " + _loc2);
} // end else if
} // End of the function
function getFurnitureTypeById(id)
{
if (!isNaN(id))
{
var _loc1 = getFurnitureFromCrumbsById(id);
if (_loc1 != undefined)
{
return (_loc1.type);
}
else
{
$e("[shell] getFurnitureTypeById() -> Furniture object is undefined! item_id: " + id);
return;
} // end else if
}
else
{
$e("[shell] getFurnitureTypeById() -> Not a real number for furniture ");
} // end else if
} // End of the function
function getFurnitureByType(type)
{
if (!isNaN(type))
{
var _loc2 = getSortedFurnitureList();
var _loc3 = new Array();
var _loc4 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc4; ++_loc1)
{
if (_loc2[_loc1].sort == type)
{
_loc3.push(_loc2[_loc1]);
} // end if
} // end of for
return (_loc3);
}
else
{
$e("[shell] getFurnitureByType() -> Not a real number for type! type: " + type);
} // end else if
} // End of the function
function getFurnitureFromCrumbsById(id)
{
if (!isNaN(id))
{
var _loc3 = getFurnitureCrumbsObject();
var _loc1 = _loc3[id];
if (_loc1 != undefined)
{
return (_loc1);
}
else
{
$e("[shell] getFurnitureFromCrumbsById() -> Could not find item in crumbs! item_id: " + id);
return;
} // end else if
}
else
{
$e("[shell] getFurnitureFromCrumbsById() -> Id is not a real number. item_id: " + id);
} // end else if
} // End of the function
function getFurnitureObjectById(id)
{
if (!isNaN(id))
{
var _loc3 = getFurnitureCrumbsObject();
var _loc1 = _loc3[id];
if (_loc1 != undefined)
{
return (_loc1);
}
else
{
$e("[shell] getFurnitureObjectById() -> Could not find item in crumbs! item_id: " + id);
return;
} // end else if
}
else
{
$e("[shell] getFurnitureObjectById() -> Id is not a real number. item_id: " + id);
} // end else if
} // End of the function
function isFurnitureInCrumbs(id)
{
var _loc1 = getFurnitureCrumbsObject();
var _loc4 = _loc1[id];
var _loc2;
for (var _loc2 in _loc1)
{
if (_loc1[_loc2].item_id == id)
{
return (true);
} // end if
} // end of for...in
return (false);
} // End of the function
function setFurnitureCrumbsObject(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].item_id = Number(_loc1);
obj[_loc1].id = Number(_loc1);
} // end of for...in
furniture_crumbs = obj;
} // End of the function
function getFurnitureCrumbsObject(obj)
{
return (furniture_crumbs);
} // End of the function
function getSortedFurnitureList()
{
return (getFurnitureList().sortOn(["type", "id"], [Array.CASEINSENSITIVE, Array.DESCENDING]));
} // End of the function
function getFurnitureList()
{
return (furniture_list);
} // End of the function
function setFurnitureList(arr)
{
furniture_list = arr;
} // End of the function
function getMyPuffles()
{
if (!my_puffles_fetched)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.GET_MY_PLAYER_PUFFLES, "", "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getMyPuffles() -> Puffles already fetched! cant get them again");
} // end else if
} // End of the function
function handleGetMyPuffles(obj)
{
var _loc6 = obj.shift();
var _loc5 = new Array();
var _loc3;
var _loc1;
var _loc4;
for (var _loc4 in obj)
{
_loc3 = obj[_loc4].split("|");
_loc1 = makeMyPuffleFromCrumb(_loc3);
_loc5.push(_loc1);
} // end of for...in
my_puffles_fetched = true;
setMyPuffleArray(_loc5);
startGlobalPuffleStats();
} // End of the function
function getPufflesByPlayerId(player_id)
{
if (!isNaN(player_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.GET_PLAYER_PUFFLES, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getPufflesByPlayerId() -> player id is not a valid number! player_id: " + player_id);
} // end else if
} // End of the function
function handleGetPufflesByPlayerId(obj)
{
var _loc6 = obj.shift();
var _loc5 = new Array();
var _loc3;
var _loc1;
var _loc4;
for (var _loc4 in obj)
{
_loc3 = obj[_loc4].split("|");
_loc1 = makePlayerPuffleFromCrumb(_loc3);
_loc5.push(_loc1);
} // end of for...in
setRoomPuffleArray(_loc5);
updateListeners(GET_IGLOO_DETAILS, null);
} // End of the function
function addPufflesToRoom()
{
var _loc2 = getRoomPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
updateListeners(ADD_PUFFLE, _loc2[_loc1]);
} // end of for
} // End of the function
function startMyPuffleBrains()
{
var _loc2 = getRoomPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
startPuffleBrain(_loc2[_loc1]);
} // end of for
} // End of the function
function stopMyPuffleBrains()
{
var _loc2 = getRoomPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
stopPuffleBrain(_loc2[_loc1]);
} // end of for
} // End of the function
function stopPuffleBrain(puffle)
{
clearInterval(puffle.update_interval);
delete puffle.update_interval;
delete puffle.brain;
} // End of the function
function sendPuffleFrame(puffle_id, frame)
{
if (!isNaN(puffle_id))
{
if (!isNaN(frame))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.PUFFLE_FRAME, [puffle_id, frame], "str", getCurrentServerRoomId());
} // end if
}
else
{
$e("[shell] sendPuffleFrame() -> Puffle id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function handleSendPuffleFrame(obj)
{
var _loc5 = obj.shift();
var _loc3 = Number(obj[0]);
var _loc1 = Number(obj[1]);
if (!isNaN(_loc3))
{
if (!isNaN(_loc1))
{
var _loc2 = getPuffleObjectById(_loc3);
_loc2.frame = _loc1;
restartPuffleBrain(_loc2);
updateListeners(PUFFLE_FRAME, _loc2);
}
else
{
$e("[shell] handleSendPuffleFrame() -> Puffle frame is not a real number. puffle_frame: " + _loc1);
} // end else if
}
else
{
$e("[shell] handleSendPuffleFrame() -> Puffle Id is not a real number. puffle_id: " + _loc3);
} // end else if
} // End of the function
function setPuffleHappyLevel(puffle)
{
var _loc2 = puffle.health + puffle.hunger + puffle.rest;
var _loc3 = puffle.max_health + puffle.max_hunger + puffle.max_rest;
return (Math.round(_loc2 / _loc3 * 100));
} // End of the function
function startPuffleBrain(puffle)
{
if (puffle.brain != undefined)
{
var _loc2 = convertMillisecondsToSeconds(randBetween(0, PUFFLE_UPDATE_MODIFIER));
puffle.update_interval = setInterval(puffle, "brain", PUFFLE_UPDATE_BASE + _loc2);
} // end if
} // End of the function
function runPuffleBrain()
{
clearInterval(this.update_interval);
if (this.last_action == PUFFLE_MOVE_ACTION)
{
if (this.hunger < 20 && this.notify_hunger)
{
sendPuffleFrame(this.puffle_id, PUFFLE_HUNGER_FRAME);
this.notify_hunger = false;
}
else if (this.health < 20 && this.notify_health)
{
sendPuffleFrame(this.puffle_id, PUFFLE_HEALTH_FRAME);
this.notify_health = false;
}
else if (this.rest < 20 && this.notify_rest)
{
sendPuffleFrame(this.puffle_id, PUFFLE_REST_FRAME);
this.notify_rest = false;
}
else
{
this.notify_hunger = true;
this.notify_health = true;
this.notify_rest = true;
} // end else if
this.last_action = PUFFLE_PLAY_ACTION;
}
else
{
updateListeners(REQUEST_PUFFLE_MOVE, this);
this.last_action = PUFFLE_MOVE_ACTION;
} // end else if
startPuffleBrain(this);
} // End of the function
function restartPuffleBrain(puffle)
{
stopPuffleBrain(puffle);
startPuffleBrain(puffle);
} // End of the function
function sendPuffleMove(puffle_id, xpos, ypos)
{
if (getPlayersInRoomCount() > 1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.PUFFLE_MOVE, [puffle_id, xpos, ypos], "str", getCurrentServerRoomId());
}
else
{
var _loc1 = getPuffleObjectById(puffle_id);
_loc1.x = xpos;
_loc1.y = ypos;
updateListeners(PUFFLE_MOVE, _loc1);
} // end else if
} // End of the function
function handleSendPuffleMove(obj)
{
var _loc7 = obj.shift();
var _loc2 = Number(obj[0]);
var _loc5 = Number(obj[1]);
var _loc4 = Number(obj[2]);
var _loc6 = getPuffleIndexInRoom(_loc2);
if (_loc6 != -1)
{
var _loc1 = getPuffleObjectById(_loc2);
_loc1.x = _loc5;
_loc1.y = _loc4;
updateListeners(PUFFLE_MOVE, _loc1);
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + _loc2);
} // end else if
} // End of the function
function sendStartPuffleWalk(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.WALK_PUFFLE, [puffle_id, 1], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPuffleWalk() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPuffleWalk() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendStopPuffleWalk()
{
var _loc2 = getRoomPuffleArray();
var _loc4 = _loc2.length;
var _loc1 = 0;
var _loc3;
while (_loc1 < _loc4)
{
if (_loc2[_loc1].is_walking)
{
_loc3 = _loc2[_loc1].puffle_id;
break;
} // end if
++_loc1;
} // end while
if (!isNaN(_loc3))
{
var _loc5 = getPuffleIndexInRoom(_loc3);
if (_loc5 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.WALK_PUFFLE, [_loc3, 0], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendStopPuffleWalk() -> Puffle was not found in the room! puffle_id: " + _loc3);
} // end else if
}
else
{
$e("[shell] sendStopPuffleWalk() -> Puffle Id is not a real number. puffle_id: " + _loc3);
} // end else if
} // End of the function
function handleSendPuffleWalk(obj)
{
var _loc8 = obj.shift();
var _loc3 = obj.shift();
var _loc5 = obj[0].split("|");
var _loc1 = makePlayerPuffleFromCrumb(_loc5);
var _loc7 = getPuffleIndexInRoom(_loc1.puffle_id);
if (_loc7 != -1)
{
var _loc4 = removePuffleById(_loc1.puffle_id);
if (_loc4)
{
removePufflesFromHand();
stopAllPufflesWalking();
if (!_loc1.is_walking)
{
startPuffleBrain(_loc1);
}
else if (isMyPlayer(_loc3))
{
addPuffleToHand(_loc1);
} // end else if
var _loc2 = getRoomPuffleArray();
_loc2.push(_loc1);
updateListeners(PUFFLE_WALK, _loc1);
} // end if
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
} // End of the function
function stopAllPufflesWalking()
{
var _loc2 = getRoomPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
_loc2[_loc1].is_walking = false;
updateListeners(PUFFLE_WALK, _loc2[_loc1]);
} // end of for
} // End of the function
function sendPufflePlay(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.PLAY_PUFFLE, [puffle_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPufflePlay() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function handleSendPufflePlay(obj)
{
var _loc8 = obj.shift();
var _loc5 = obj[0].split("|");
var _loc2 = obj[1];
var _loc9;
var _loc1 = makePlayerPuffleFromCrumb(_loc5);
var _loc7 = getPuffleIndexInRoom(_loc1.puffle_id);
if (_loc7 != -1)
{
var _loc4 = removePuffleById(_loc1.puffle_id);
if (_loc4)
{
restartPuffleBrain(puffle);
if (_loc2 == 1)
{
_loc1.frame = SUPER_PLAY_FRAME;
}
else if (_loc2 > 1)
{
_loc1.frame = GREAT_PLAY_FRAME;
}
else
{
_loc1.frame = NORMAL_PLAY_FRAME;
} // end else if
var _loc3 = getRoomPuffleArray();
_loc3.push(_loc1);
updateListeners(PUFFLE_FRAME, _loc1);
} // end if
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendPuffleRest(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.REST_PUFFLE, [puffle_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPuffleRest() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPuffleRest() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function handleSendPuffleRest(obj)
{
var _loc6 = obj.shift();
var _loc4 = obj[0].split("|");
var _loc1 = makePlayerPuffleFromCrumb(_loc4);
var _loc5 = getPuffleIndexInRoom(_loc1.puffle_id);
if (_loc5 != -1)
{
var _loc3 = removePuffleById(_loc1.puffle_id);
if (_loc3)
{
restartPuffleBrain(puffle);
_loc1.frame = REST_FRAME;
var _loc2 = getRoomPuffleArray();
_loc2.push(_loc1);
updateListeners(PUFFLE_FRAME, _loc1);
} // end if
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendPuffleBath(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.BATH_PUFFLE, [puffle_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPuffleBath() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPuffleBath() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function handleSendPuffleBath(obj)
{
var _loc8 = obj.shift();
var _loc3 = Number(obj.shift());
setMyPlayerTotalCoins(_loc3);
var _loc5 = obj[0].split("|");
var _loc1 = makePlayerPuffleFromCrumb(_loc5);
var _loc7 = getPuffleIndexInRoom(_loc1.puffle_id);
if (_loc7 != -1)
{
var _loc4 = removePuffleById(_loc1.puffle_id);
if (_loc4)
{
restartPuffleBrain(puffle);
_loc1.frame = BATH_FRAME;
var _loc2 = getRoomPuffleArray();
_loc2.push(_loc1);
updateListeners(PUFFLE_FRAME, _loc1);
} // end if
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendPuffleFood(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.FEED_PUFFLE, [puffle_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPuffleFeed() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPuffleFeed() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function handleSendPuffleFood(obj)
{
var _loc8 = obj.shift();
var _loc3 = Number(obj.shift());
setMyPlayerTotalCoins(_loc3);
var _loc5 = obj[0].split("|");
var _loc1 = makePlayerPuffleFromCrumb(_loc5);
var _loc7 = getPuffleIndexInRoom(_loc1.puffle_id);
if (_loc7 != -1)
{
var _loc4 = removePuffleById(_loc1.puffle_id);
if (_loc4)
{
restartPuffleBrain(puffle);
_loc1.frame = FEED_FRAME;
var _loc2 = getRoomPuffleArray();
_loc2.push(_loc1);
updateListeners(PUFFLE_FRAME, _loc1);
} // end if
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendPuffleCookie(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.TREAT_PUFFLE, [puffle_id, TREAT_COOKIE], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPuffleTreat() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPuffleTreat() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendPuffleGum(puffle_id)
{
if (!isNaN(puffle_id))
{
var _loc2 = getPuffleIndexInRoom(puffle_id);
if (_loc2 != -1)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.TREAT_PUFFLE, [puffle_id, TREAT_GUM], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendPuffleTreat() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
}
else
{
$e("[shell] sendPuffleTreat() -> Puffle Id is not a real number. puffle_id: " + puffle_id);
} // end else if
} // End of the function
function handleSendPuffleTreat(obj)
{
var _loc9 = obj.shift();
var _loc5 = Number(obj.shift());
setMyPlayerTotalCoins(_loc5);
var _loc7 = obj[0].split("|");
var _loc2 = obj[1];
var _loc10;
var _loc1 = makePlayerPuffleFromCrumb(_loc7);
var _loc8 = getPuffleIndexInRoom(_loc1.puffle_id);
if (_loc8 != -1)
{
var _loc6 = removePuffleById(_loc1.puffle_id);
if (_loc6)
{
restartPuffleBrain(puffle);
if (_loc2 == 0)
{
_loc1.frame = ANGRY_TREAT_FRAME;
}
else if (_loc2 == 1)
{
_loc1.frame = COOKIE_TREAT_FRAME;
}
else
{
_loc1.frame = GUM_TREAT_FRAME;
} // end else if
var _loc4 = getRoomPuffleArray();
_loc4.push(_loc1);
updateListeners(PUFFLE_FRAME, _loc1);
} // end if
}
else
{
$e("[shell] handleSendPufflePlay() -> Puffle was not found in the room! puffle_id: " + puffle_id);
} // end else if
} // End of the function
function sendAdoptPuffle(type_id, puffle_name)
{
var _loc3 = getMyPuffleArray();
if (_loc3.length >= MAX_PUFFLES)
{
updateListeners(ADOPT_PUFFLE, {success: false});
return (false);
} // end if
if (!isNaN(type_id))
{
if (isValidString(puffle_name))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PET_HANDLER + "#" + AIRTOWER.ADOPT_PUFFLE, [type_id, puffle_name], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendAdoptPuffle() -> Puffle name was not a real string! puffle_name: " + puffle_name);
} // end else if
}
else
{
$e("[shell] sendAdoptPuffle() -> Puffle type was not a real number! puffle_type: " + type_id);
} // end else if
} // End of the function
function handleSendAdoptPuffle(obj)
{
var _loc7 = obj.shift();
var _loc1 = Number(obj.shift());
setMyPlayerTotalCoins(_loc1);
var _loc2 = obj.split("|");
var _loc4 = makeMyPuffleFromCrumb(_loc2);
var _loc5 = getMyPuffleArray();
_loc5.push(_loc4);
updateListeners(ADOPT_PUFFLE, {success: true});
} // End of the function
function makePlayerPuffleFromCrumb(arr)
{
var _loc1 = new Object();
_loc1.puffle_id = Number(arr[0]);
_loc1.name = String(arr[1]);
_loc1.type_id = Number(arr[2]);
_loc1.health = Number(arr[3]);
_loc1.hunger = Number(arr[4]);
_loc1.rest = Number(arr[5]);
_loc1.max_health = Number(arr[6]);
_loc1.max_hunger = Number(arr[7]);
_loc1.max_rest = Number(arr[8]);
_loc1.happy = Number(arr[9]);
_loc1.x = Number(arr[10]);
_loc1.y = Number(arr[11]);
_loc1.is_walking = Boolean(Number(arr[12]));
_loc1.brain = runPuffleBrain;
_loc1.last_action = PUFFLE_PLAY_ACTION;
_loc1.notify_hunger = true;
_loc1.notify_health = true;
_loc1.notify_rest = true;
return (_loc1);
} // End of the function
function makeMyPuffleFromCrumb(arr)
{
var _loc1 = new Object();
_loc1.puffle_id = Number(arr[0]);
_loc1.name = String(arr[1]);
_loc1.type_id = Number(arr[2]);
_loc1.health = Number(arr[3]);
_loc1.hunger = Number(arr[4]);
_loc1.rest = Number(arr[5]);
var _loc3 = getPuffleCrumbs();
_loc1.max_health = _loc3[_loc1.type_id].max_health;
_loc1.max_hunger = _loc3[_loc1.type_id].max_hunger;
_loc1.max_rest = _loc3[_loc1.type_id].max_rest;
_loc1.happy = setPuffleHappyLevel(_loc1);
_loc1.x = 0;
_loc1.y = 0;
_loc1.is_walking = false;
return (_loc1);
} // End of the function
function startGlobalPuffleStats()
{
global_puffle_stats_interval = setInterval(runGlobalPuffleStats, GLOBAL_PUFFLE_STATS_FREQUENCY);
} // End of the function
function stopGlobalPuffleStats()
{
clearInterval(global_puffle_stats_interval);
} // End of the function
function runGlobalPuffleStats()
{
var _loc2 = getMyPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
_loc2[_loc1].health = _loc2[_loc1].health - 1;
_loc2[_loc1].hunger = _loc2[_loc1].hunger - 1;
_loc2[_loc1].rest = _loc2[_loc1].rest - 1;
if (_loc2[_loc1].health <= 0)
{
_loc2[_loc1].health = 0;
} // end if
if (_loc2[_loc1].hunger <= 0)
{
_loc2[_loc1].hunger = 0;
} // end if
if (_loc2[_loc1].rest <= 0)
{
_loc2[_loc1].rest = 0;
} // end if
_loc2[_loc1].happy = setPuffleHappyLevel(_loc2[_loc1]);
} // end of for
} // End of the function
function getPuffleObjectById(id)
{
var _loc5 = getPuffleIndexInRoom(id);
if (_loc5 != -1)
{
var _loc2 = getRoomPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].puffle_id == id)
{
return (_loc2[_loc1]);
} // end if
} // end of for
}
else
{
$e("[shell] getPuffleObjectById() -> Could not find puffle in room! puffle_id: " + id);
return;
} // end else if
} // End of the function
function removePuffleById(id)
{
if (!isNaN(id))
{
var _loc3 = getPuffleIndexInRoom(id);
if (_loc3 != -1)
{
var _loc1 = getPuffleObjectById(id);
clearInterval(_loc1.update_interval);
delete _loc1.update_interval;
delete _loc1.brain;
var _loc4 = getRoomPuffleArray();
_loc4.splice(_loc3, 1);
return (true);
}
else
{
$e("[shell] removePuffleById() -> Could not find this puffle in the room! puffle_id: " + id);
} // end else if
}
else
{
$e("[shell] removePuffleById() -> Not a valid number passed for the puffle id! puffle_id" + id);
} // end else if
return (false);
} // End of the function
function getPuffleIndexInRoom(id)
{
var _loc2 = getRoomPuffleArray();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].puffle_id == id)
{
return (_loc1);
} // end if
} // end of for
return (-1);
} // End of the function
function setRoomPuffleArray(arr)
{
room_puffle_array = arr;
} // End of the function
function getRoomPuffleArray(arr)
{
return (room_puffle_array);
} // End of the function
function setMyPuffleArray(arr)
{
my_puffle_array = arr;
} // End of the function
function getMyPuffleArray()
{
return (my_puffle_array);
} // End of the function
function setPuffleCrumbs(obj)
{
puffle_crumbs = obj;
} // End of the function
function getPuffleCrumbs()
{
return (puffle_crumbs);
} // End of the function
function updateIglooFurniture(arr)
{
$e("[shell] updateIglooFurniture() -> arr: " + arr);
} // End of the function
function sendBuyIglooFloor(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.UPDATE_FLOOR, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] saveRoomFloor() -> The floor id was not a valid number. floor_id: " + id);
} // end else if
} // End of the function
function handleSendBuyIglooFloor(obj)
{
var _loc5 = obj.shift();
var _loc1 = Number(obj[0]);
var _loc4 = Number(obj[1]);
if (!isNaN(_loc1))
{
setMyPlayerTotalCoins(_loc4);
setCurrentIglooFloorId(_loc1);
var _loc2 = new Object();
_loc2.success = true;
_loc2.floor_id = _loc1;
updateListeners(BUY_IGLOO_FLOOR, _loc2);
}
else
{
$e("[shell] handleSendBuyIglooFloor() -> Floor id is not a real number. floor_id: " + _loc1);
_loc2 = new Object();
_loc2.success = false;
updateListeners(BUY_IGLOO_FLOOR, _loc2);
} // end else if
} // End of the function
function sendBuyIglooType(id)
{
if (!isNaN(id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.UPDATE_IGLOO_TYPE, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] updateRoomUpgrade() -> Not a real number passed for id. id: " + id);
} // end else if
} // End of the function
function handleSendBuyIglooType(obj)
{
var _loc5 = obj.shift();
var _loc1 = Number(obj[0]);
var _loc4 = Number(obj[1]);
if (!isNaN(_loc1))
{
setMyPlayerTotalCoins(_loc4);
setCurrentIglooType(_loc1);
setCurrentIglooFloorId(0);
var _loc2 = new Object();
_loc2.success = true;
_loc2.type_id = _loc1;
updateListeners(BUY_IGLOO_TYPE, _loc2);
}
else
{
$e("[shell] handleSendBuyIglooType() -> Type id is not a real number! type_id: " + _loc1);
_loc2 = new Object();
_loc2.success = false;
updateListeners(BUY_IGLOO_TYPE, _loc2);
} // end else if
} // End of the function
function unlockIgloo()
{
if (isIglooLocked())
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.UNLOCK_IGLOO, [getMyPlayerId(), getMyPlayerNickname()], "str", getCurrentServerRoomId());
setIglooAsUnLocked();
updateListeners(IGLOO_LOCK_STATUS, {is_locked: false});
}
else
{
$d("[shell] unlockIgloo() -> Trying to unlock an igloo which is already unlocked!");
} // end else if
} // End of the function
function lockIgloo()
{
if (!isIglooLocked())
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.LOCK_IGLOO, [getMyPlayerId()], "str", getCurrentServerRoomId());
setIglooAsLocked();
updateListeners(IGLOO_LOCK_STATUS, {is_locked: true});
}
else
{
$d("[shell] lockIgloo() -> Trying to lock an igloo which is already locked!");
} // end else if
} // End of the function
function setIglooMusicById(music_id)
{
if (!isNaN(music_id))
{
var _loc2 = getPlayerIglooObject();
_loc2.music_id = music_id;
startMusicById(music_id);
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.UPDATE_IGLOO_MUSIC, [music_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] updatePlayerMusic() -> music id is not a real number. music_id: " + music_id);
} // end else if
} // End of the function
function sendJoinPlayerIgloo(player_id)
{
$d("[shell] sendJoinPlayerIgloo(" + player_id + ")");
if (!isNaN(player_id))
{
if (getCurrentRoomId() != player_id + 1000)
{
igloo_player_id = player_id;
getPlayerIglooDetails(player_id);
addListener(GET_IGLOO_DETAILS, joinPlayerIgloo);
}
else
{
$e("[shell] sendJoinPlayerIgloo() -> Your trying to join a room your already in! room_id: " + getCurrentRoomId());
} // end else if
}
else
{
$e("[shell] sendJoinPlayerIgloo() -> Player id is not a real number. player_id: " + player_id);
} // end else if
} // End of the function
function getPlayerIglooDetails()
{
if (!isNaN(igloo_player_id))
{
showLoading("Getting Player\'s Igloo");
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.GET_IGLOO_DETAILS, [igloo_player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getPlayerIgloo() -> Not a real number passed for player id. player_id: " + igloo_player_id);
} // end else if
} // End of the function
function handleGetPlayerIgloo(obj)
{
var _loc10 = obj.shift();
if (Number(obj[0]) == 0)
{
removeListener(GET_IGLOO_DETAILS, joinPlayerIgloo);
hideLoading();
return;
} // end if
var _loc6 = new Object();
var _loc9 = Number(obj[0]);
_loc6.player_id = _loc9;
_loc6.name = "igloo";
setCurrentIglooType(Number(obj[1]));
_loc6.music_id = Number(obj[2]);
startMusicById(_loc6.music_id);
setCurrentIglooFloorId(Number(obj[3]));
_loc6.file_path = getRootPath() + "" + IGLOO_PATH + "" + getIglooVersion() + ".swf";
var _loc4 = new Array();
var _loc5 = obj[4].split(",");
var _loc7 = _loc5.length;
var _loc3 = 0;
var _loc2;
var _loc1;
while (_loc3 < _loc7)
{
_loc2 = _loc5[_loc3].split("|");
if (_loc2.length > 1)
{
_loc1 = new Object();
_loc1 = duplicateObject(getFurnitureFromCrumbsById(Number(_loc2[0])));
_loc1.x = Number(_loc2[1]);
_loc1.y = Number(_loc2[2]);
_loc1.frame_1 = Number(_loc2[3]);
_loc1.frame_2 = Number(_loc2[4]);
_loc1.type = getFurnitureTypeById(_loc1.item_id);
if (isNaN(_loc1.frame_1))
{
_loc1.frame_1 = 1;
} // end if
if (isNaN(_loc1.frame_2))
{
_loc1.frame_2 = 1;
} // end if
if (isFurnitureInCrumbs(_loc1.item_id))
{
_loc4.push(_loc1);
} // end if
} // end if
++_loc3;
} // end while
setPlayerIglooFurniture(_loc4);
setPlayerIglooObject(_loc6);
getPufflesByPlayerId(_loc9);
} // End of the function
function joinPlayerIgloo()
{
var _loc1 = igloo_player_id + 1000;
if (!isNaN(_loc1))
{
if (_loc1 != getPlayerIglooObject().player_id)
{
showLoading("Joining Player\'s Igloo");
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.NAVIGATION + "#" + AIRTOWER.JOIN_PLAYER_IGLOO, [_loc1], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] joinPlayerIgloo() -> Trying to join an igloo youre already in! player_id: " + _loc1);
} // end else if
}
else
{
$e("[shell] joinPlayerIgloo() -> Not a real number passed for player id. player_id: " + _loc1);
} // end else if
removeListener(GET_IGLOO_DETAILS, joinPlayerIgloo);
} // End of the function
function handleJoinPlayerIgloo(obj)
{
var _loc5 = Number(obj.shift());
var _loc4 = Number(obj.shift());
if (my_room != undefined)
{
last_known_room_name = getRoomNameById(my_room.room_id);
} // end if
setCurrentServerRoomId(_loc5);
var _loc3 = new Array();
var _loc2;
for (var _loc2 in obj)
{
_loc3.push(makePlayerObjectFromString(obj[_loc2]));
} // end of for...in
setLastRoomId(getCurrentRoomId());
setCurrentRoomId(_loc4 - 1000);
setPlayerList(_loc3);
startChatLog();
setIsRoomIgloo(true);
updateListeners(JOIN_PLAYER_IGLOO, null);
} // End of the function
function saveIglooFurniture(arr)
{
if (arr != undefined)
{
var _loc4 = new Object();
var _loc3 = arr.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
_loc4[_loc1] = arr[_loc1];
} // end of for
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.SAVE_IGLOO_FURNITURE, arr, "str", getCurrentServerRoomId());
}
else
{
$e("[shell] saveIglooFurniture() furniture array is undefined! furniture_arr: " + arr);
} // end else if
} // End of the function
function loadPlayerIglooList()
{
$d("[shell] loadPlayerIglooList()");
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGLOO_HANDLER + "#" + AIRTOWER.GET_IGLOO_LIST, [], "str", getCurrentServerRoomId());
} // End of the function
function handleLoadPlayerIglooList(obj)
{
var _loc6 = obj.shift();
var _loc5 = new Array();
$d("[shell] handleLoadPlayerIglooList() -> " + debugObject(obj));
var _loc4;
var _loc1;
var _loc2;
for (var _loc4 in obj)
{
_loc2 = obj[_loc4].split("|");
_loc1 = new Object();
_loc1.player_id = Number(_loc2[0]);
_loc1.nickname = _loc2[1];
_loc1.igloo_id = 0;
_loc5.push(_loc1);
} // end of for...in
updateListeners(LOAD_PLAYER_IGLOO_LIST, _loc5);
} // End of the function
function getIglooFurnitureObjectById(id)
{
var _loc2 = getFurnitureList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].item_id == id)
{
return (_loc2[_loc1]);
} // end if
} // end of for
$e("[shell] getIglooFurnitureObjectById() -> Could not find furniture object! id: " + id);
return;
} // End of the function
function isMyIgloo()
{
if (getPlayerIglooObject().player_id == getMyPlayerId())
{
return (true);
} // end if
return (false);
} // End of the function
function setIsRoomIgloo(is_igloo)
{
is_room_igloo = is_igloo;
} // End of the function
function getIsRoomIgloo()
{
return (is_room_igloo);
} // End of the function
function getCurrentIglooType()
{
return (current_igloo_type);
} // End of the function
function setCurrentIglooType(id)
{
current_igloo_type = id;
} // End of the function
function getCurrentIglooFloorId()
{
return (current_igloo_floor_id);
} // End of the function
function setCurrentIglooFloorId(id)
{
current_igloo_floor_id = id;
} // End of the function
function setIglooAsLocked()
{
is_igloo_locked = true;
} // End of the function
function setIglooAsUnLocked()
{
is_igloo_locked = false;
} // End of the function
function isIglooLocked()
{
return (is_igloo_locked);
} // End of the function
function setPlayerIglooObject(obj)
{
player_igloo = obj;
} // End of the function
function getPlayerIglooObject()
{
return (player_igloo);
} // End of the function
function getPlayerIglooFurniture()
{
return (player_igloo_furniture);
} // End of the function
function setPlayerIglooFurniture(arr)
{
player_igloo_furniture = arr;
} // End of the function
function setIglooCrumbs(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].id = Number(_loc1);
} // end of for...in
igloo_crumbs = obj;
} // End of the function
function getIglooCrumbs()
{
return (igloo_crumbs);
} // End of the function
function getIglooCrumbById(id)
{
if (!isNaN(id))
{
var _loc1 = getIglooCrumbs();
var _loc2 = new String();
for (var _loc2 in _loc1)
{
if (_loc1[_loc2].id == id)
{
return (_loc1[_loc2]);
} // end if
} // end of for...in
$e("[shell] getIglooCrumbById() -> Could not find igloo in the crumbs file! id: " + id);
return;
}
else
{
$e("[shell] getIglooCrumbById() -> ID is not a real number! id: " + id);
} // end else if
return;
} // End of the function
function setFloorCrumbs(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].id = Number(_loc1);
} // end of for...in
floor_crumbs = obj;
} // End of the function
function getFloorCrumbs()
{
return (floor_crumbs);
} // End of the function
function getFloorCrumbById(id)
{
if (!isNaN(id))
{
var _loc1 = getFloorCrumbs();
var _loc2 = new String();
for (var _loc2 in _loc1)
{
if (_loc1[_loc2].id == id)
{
return (_loc1[_loc2]);
} // end if
} // end of for...in
$e("[shell] getFloorCrumbById() -> Could not find floor in the crumbs file! id: " + id);
return;
}
else
{
$e("[shell] getFloorCrumbById() -> ID is not a real number! id: " + id);
} // end else if
return;
} // End of the function
function sendMessage(txt)
{
if (txt != undefined && txt != "")
{
addToChatLog({player_id: getMyPlayerId(), nickname: getMyPlayerNickname(), message: txt, type: SEND_MESSAGE});
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MESSAGE_HANDLER + "#" + AIRTOWER.SEND_MESSAGE, [getMyPlayerId(), txt], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendMessage() -> Trying to send a undefined or blank message. text: " + txt);
} // end else if
} // End of the function
function handleSendMessage(obj)
{
var _loc2 = obj[0];
if (_loc2 == getCurrentServerRoomId())
{
var _loc1 = new Object();
_loc1.player_id = Number(obj[1]);
_loc1.nickname = getNicknameById(_loc1.player_id);
_loc1.message = obj[2];
_loc1.type = SEND_MESSAGE;
if (!isPlayerIgnoredById(_loc1.player_id))
{
if (isValidString(_loc1.message))
{
if (!isMyPlayerSafeMode())
{
if (!isMyPlayer(_loc1.player_id))
{
addToChatLog(_loc1);
} // end if
updateListeners(SEND_MESSAGE, _loc1);
} // end if
}
else
{
$e("[shell] handleSendMessage() -> Received an improperly formated message: " + _loc1.message);
} // end if
} // end else if
}
else
{
$e("[shell] handleSendMessage() -> Recieved a message from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc2);
} // end else if
} // End of the function
function handleBlockedMessage(obj)
{
var _loc2 = obj[0];
if (_loc2 == getCurrentServerRoomId())
{
var _loc1 = new Object();
_loc1.message = obj[1];
_loc1.player_id = Number(obj[2]);
_loc1.nickname = getNicknameById(_loc1.player_id);
_loc1.type = SEND_BLOCKED_MESSAGE;
if (!isPlayerIgnoredById(_loc1.player_id))
{
if (isValidString(_loc1.message))
{
addToChatLog(_loc1);
updateListeners(SEND_BLOCKED_MESSAGE, _loc1);
}
else
{
$e("[shell] handleBlockedMessage() -> Received an improperly formated message: " + _loc1.message);
} // end if
} // end else if
}
else
{
$e("[shell] handleBlockedMessage() -> Recieved a message from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc2);
} // end else if
} // End of the function
function sendEmote(emote_id)
{
if (getPlayersInRoomCount() > 1)
{
if (!isNaN(emote_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.SEND_EMOTE, [emote_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendEmote() -> Trying to send a invalid emote id. emote_id: " + emote_id);
} // end if
} // end else if
} // End of the function
function handleSendEmote(obj)
{
var _loc2 = obj[0];
if (_loc2 == getCurrentServerRoomId())
{
var _loc1 = new Object();
_loc1.player_id = Number(obj[1]);
_loc1.emote_id = Number(obj[2]);
if (!isPlayerIgnoredById(_loc1.player_id))
{
if (!isNaN(_loc1.emote_id))
{
updateListeners(SEND_EMOTE, _loc1);
}
else
{
$e("[shell] handleSendEmote() -> received an invalid id for a emote: emote_id: " + _loc1.emote_id);
} // end if
} // end else if
}
else
{
$e("[shell] handleSendEmote() -> Recieved an emote from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc2);
} // end else if
} // End of the function
function sendJoke(joke_id)
{
if (getPlayersInRoomCount() > 1)
{
if (!isNaN(joke_id))
{
if (getJokeById(joke_id) != undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.SEND_JOKE, [joke_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendJokeMessage() -> Joke message was not found. joke_id: " + joke_id);
} // end else if
}
else
{
$e("[shell] sendJokeMessage() -> Trying to send a invalid joke id. joke_id: " + joke_id);
} // end if
} // end else if
} // End of the function
function handleSendJoke(obj)
{
var _loc2 = obj[0];
if (_loc2 == getCurrentServerRoomId())
{
var _loc1 = new Object();
_loc1.player_id = Number(obj[1]);
_loc1.joke_id = Number(obj[2]);
if (!isPlayerIgnoredById(_loc1.player_id))
{
if (!isNaN(_loc1.joke_id))
{
if (getJokeById(_loc1.joke_id) != undefined)
{
updateListeners(SEND_JOKE, _loc1);
}
else
{
$e("[shell] handleSendJoke() -> Received a joke id which was not found: " + _loc1.joke_id);
} // end else if
}
else
{
$e("[shell] handleSendJoke() -> Received a joke id which is not a valid number. joke_id: " + _loc1.joke_id);
} // end if
} // end else if
}
else
{
$e("[shell] handleSendJoke() -> Recieved an joke from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc2);
} // end else if
} // End of the function
function sendQuickMessage(quick_id)
{
if (getPlayersInRoomCount() > 1)
{
if (!isNaN(quick_id))
{
if (getQuickMessageById(quick_id) != undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.SEND_QUICK_MESSAGE, [quick_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendQuickMessage() -> Quick message was not found. quick_id: " + quick_id);
} // end else if
}
else
{
$e("[shell] sendQuickMessage() -> Trying to send a invalid quick id. quick_id: " + quick_id);
} // end if
} // end else if
} // End of the function
function handleSendQuickMessage(obj)
{
var _loc5 = obj[0];
if (_loc5 == getCurrentServerRoomId())
{
var _loc2 = Number(obj[1]);
var _loc4 = Number(obj[2]);
if (!isPlayerIgnoredById(_loc2))
{
if (!isNaN(quick_obj.quick_id))
{
var _loc6 = getQuickMessageById(quick_obj.quick_id);
if (isValidString(_loc6))
{
var _loc1 = new Object();
_loc1.player_id = _loc2;
_loc1.nickname = getNicknameById(_loc2);
_loc1.message = _loc6;
_loc1.type = SEND_QUICK_MESSAGE;
addToChatLog(_loc1);
var _loc3 = new Object();
_loc3.player_id = _loc2;
_loc3.safe_id = _loc4;
updateListeners(SEND_QUICK_MESSAGE, _loc3);
}
else
{
$e("[shell] handleSendQuickMessage() -> Quick message was not found in quick message list. quick_id: " + _loc4);
} // end else if
}
else
{
$e("[shell] handleSendQuickMessage() -> Quick ID was not a real number. quick_id: " + _loc4);
} // end if
} // end else if
}
else
{
$e("[shell] handleSendQuickMessage() -> Received a quick message from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc5);
} // end else if
} // End of the function
function sendSafeMessage(safe_id)
{
if (getPlayersInRoomCount() > 1)
{
if (!isNaN(safe_id))
{
if (getSafeMessageById(safe_id) != undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.SEND_SAFE_MESSAGE, [safe_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendSafeMessage() -> Safe message was not found. safe_id: " + safe_id);
} // end else if
}
else
{
$e("[shell] sendSafeMessage() -> Trying to send a invalid safe id. safe_id: " + safe_id);
} // end if
} // end else if
} // End of the function
function handleSafeMessage(obj)
{
var _loc5 = obj[0];
if (_loc5 == getCurrentServerRoomId())
{
var _loc3 = Number(obj[1]);
var _loc2 = Number(obj[2]);
if (getSafeMessageById(_loc2) != undefined)
{
var _loc1 = new Object();
_loc1.player_id = _loc3;
_loc1.nickname = getNicknameById(_loc3);
_loc1.type = SEND_SAFE_MESSAGE;
_loc1.message = getSafeMessageById(_loc2);
if (!isPlayerIgnoredById(_loc1.player_id))
{
if (isValidString(_loc1.message))
{
addToChatLog(_loc1);
var _loc4 = new Object();
_loc4.player_id = _loc3;
_loc4.safe_id = _loc2;
updateListeners(SEND_SAFE_MESSAGE, _loc4);
}
else
{
$e("[shell] handleSafeMessage() -> Invalid safe message text: safe_message_id: " + _loc2 + " safe_message_text: " + _loc1.message);
} // end if
} // end else if
}
else
{
$e("[shell] handleSafeMessage() -> Received a safe message id which did not exist in the safe message list. safe_id: " + _loc2);
} // end else if
}
else
{
$e("[shell] handleSafeMessage() -> Received a safe message from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc5);
} // end else if
} // End of the function
function sendLineMessage(line_id)
{
if (getPlayersInRoomCount() > 1)
{
if (!isNaN(line_id))
{
if (getLineMessageById(line_id) != undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.SEND_LINE_MESSAGE, [line_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendLineMessage() -> Line message was not found. line_id: " + line_id);
} // end else if
}
else
{
$e("[shell] sendLineMessage() -> Trying to send a invalid line id. line_id: " + line_id);
} // end if
} // end else if
} // End of the function
function handleLineMessage(obj)
{
var _loc6 = obj[0];
if (_loc6 == getCurrentServerRoomId())
{
var _loc3 = Number(obj[1]);
var _loc2 = Number(obj[2]);
var _loc5 = getLineMessageById(_loc2);
if (!isPlayerIgnoredById(_loc3))
{
if (!isNaN(_loc2))
{
if (isValidString(_loc5))
{
var _loc1 = new Object();
_loc1.player_id = _loc3;
_loc1.nickname = getNicknameById(_loc3);
_loc1.type = SEND_LINE_MESSAGE;
_loc1.message = _loc5;
addToChatLog(_loc1);
var _loc4 = new Object();
_loc4.player_id = _loc3;
_loc4.line_id = _loc2;
updateListeners(SEND_LINE_MESSAGE, _loc4);
}
else
{
$e("[shell] handleLineMessage() -> Received an invalid line message text. message text: " + _loc5 + " line_message_id: " + _loc2);
} // end else if
}
else
{
$e("[shell] handleLineMessage() -> Received an invalid line id. line_message_id: " + _loc2);
} // end if
} // end else if
}
else
{
$e("[shell] handleLineMessage() -> Received a line message from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc6);
} // end else if
} // End of the function
function sendTourGuideMessage(room_id)
{
if (getPlayersInRoomCount() > 1)
{
if (!isNaN(room_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.SEND_TOUR_GUIDE_MESSAGE, [room_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendTourGuideMessage() -> Not a real number passed for room id! room id: " + room_id);
} // end if
} // end else if
} // End of the function
function handleTourGuideMessage(obj)
{
var _loc4 = obj[0];
if (_loc4 == getCurrentServerRoomId())
{
var _loc3 = Number(obj[1]);
var _loc2 = Number(obj[2]);
if (!isPlayerIgnoredById(_loc3))
{
if (!isNaN(_loc2))
{
var _loc1 = new Object();
_loc1.player_id = _loc3;
_loc1.room_id = _loc2;
updateListeners(SEND_TOUR_GUIDE_MESSAGE, _loc1);
}
else
{
$e("[shell] handleTourGuideMessage() -> Received an invalid room id. room_id: " + _loc2);
} // end if
} // end else if
}
else
{
$e("[shell] handleTourGuideMessage() -> Received a tour guide message from the wrong server room id: current room id: " + getCurrentServerRoomId() + " received room id: " + _loc4);
} // end else if
} // End of the function
function getBuddyListFromServer()
{
if (buddy_list == undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.BUDDY_HANDLER + "#" + AIRTOWER.GET_BUDDY_LIST, [], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getBuddyList() -> Buddy list already fetched!");
} // end else if
} // End of the function
function handleGetBuddyListFromServer(obj)
{
var _loc7 = obj.shift();
buddy_list = new Array();
var _loc1;
var _loc2;
var _loc4;
var _loc5;
var _loc6;
for (var _loc6 in obj)
{
_loc1 = obj[_loc6].split("|");
_loc2 = Number(_loc1[0]);
_loc4 = _loc1[1];
_loc5 = Boolean(Number(_loc1[2]));
if (isNaN(_loc2))
{
continue;
} // end if
addPlayerToBuddyList(_loc2, _loc4, _loc5);
} // end of for...in
AIRTOWER.removeListener(AIRTOWER.GET_BUDDY_LIST, handleGetBuddyListFromServer);
} // End of the function
function handleBuddyOnline(obj)
{
var _loc3 = obj.shift();
var _loc1 = Number(obj[0]);
if (!isNaN(_loc1))
{
setBuddyAsOnlineById(_loc1);
var _loc2 = new Object();
_loc2.player_id = _loc1;
_loc2.nickname = getBuddyNicknameById(_loc1);
updateListeners(BUDDY_ONLINE, _loc2);
updateListeners(UPDATE_BUDDY_LIST, getSortedBuddyList());
}
else
{
$e("[shell] handleBuddyOnline() -> Not a real number received for player_id! player_id: " + _loc1);
} // end else if
} // End of the function
function handleBuddyOffline(obj)
{
var _loc2 = obj.shift();
var _loc1 = Number(obj[0]);
if (!isNaN(_loc1))
{
setBuddyAsOfflineById(_loc1);
updateListeners(UPDATE_BUDDY_LIST, getSortedBuddyList());
}
else
{
$e("[shell] handleBuddyOffline() -> Not a real number received for player_id! player_id: " + _loc1);
} // end else if
} // End of the function
function sendBuddyRequest(player_id)
{
if (!isNaN(player_id))
{
if (!isPlayerBuddyById(player_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.BUDDY_HANDLER + "#" + AIRTOWER.REQUEST_BUDDY, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendBuddyRequest() -> Player is already our buddy! player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] sendBuddyRequest() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function handleBuddyRequest(obj)
{
var _loc3 = obj.shift();
var _loc1 = new Object();
_loc1.player_id = Number(obj[0]);
_loc1.nickname = obj[1];
if (!isNaN(_loc1.player_id))
{
if (!isPlayerBuddyById(player_id))
{
setCurrentBuddyRequestObject(_loc1);
updateListeners(SEND_BUDDY_REQUEST, _loc1);
}
else
{
$e("[shell] handleBuddyRequest() -> Player is already our buddy! player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] handleBuddyRequest() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function sendBuddyAccept(player_id)
{
if (!isNaN(player_id))
{
if (!isPlayerBuddyById(player_id))
{
var _loc2 = getCurrentBuddyRequestObject();
debugObject(_loc2, true);
addPlayerToBuddyList(_loc2.player_id, _loc2.nickname, true);
clearCurrentBuddyRequestObject();
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.BUDDY_HANDLER + "#" + AIRTOWER.ACCEPT_BUDDY, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendBuddyRequest() -> Player is already our buddy! player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] sendBuddyRequest() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function handleBuddyAccept(obj)
{
var _loc3 = obj.shift();
var _loc1 = new Object();
_loc1.player_id = Number(obj[0]);
_loc1.nickname = obj[1];
if (!isNaN(_loc1.player_id))
{
if (!isPlayerBuddyById(_loc1.player_id))
{
addPlayerToBuddyList(_loc1.player_id, _loc1.nickname, true);
updateListeners(SEND_BUDDY_ACCEPT, _loc1);
}
else
{
$e("[shell] handleBuddyAccept() -> Player is already a buddy! player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] handleBuddyAccept() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function sendRemoveBuddyPlayer(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = removePlayerFromBuddyList(player_id);
if (_loc2)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.BUDDY_HANDLER + "#" + AIRTOWER.REMOVE_BUDDY, [player_id], "str", getCurrentServerRoomId());
updateListeners(UPDATE_BUDDY_LIST, getSortedBuddyList());
}
else
{
$e("[shell] sendRemoveBuddyPlayer() -> Player was not successfully removed from the local list");
} // end else if
}
else
{
$e("[shell] sendRemoveBuddyPlayer() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function handleRemoveBuddyPlayer(obj)
{
var _loc4 = obj.shift();
var _loc1 = Number(obj[0]);
var _loc5 = obj[1];
var _loc2 = removePlayerFromBuddyList(_loc1);
if (_loc2)
{
$d("[shell] handleRemoveBuddyPlayer() -> Successfully removed buddy from list. player_id: " + _loc1);
updateListeners(UPDATE_BUDDY_LIST, getSortedBuddyList());
}
else
{
$e("[shell] handleRemoveBuddyPlayer() -> Player was not successfully removed from the buddy list");
} // end else if
} // End of the function
function isOnlineBuddyListExpired()
{
var _loc1 = Math.ceil(new Date().valueOf());
if (_loc1 - online_last_updated > online_update_frequency * 60000)
{
online_last_updated = _loc1;
return (true);
} // end if
return (false);
} // End of the function
function isBuddyOnlineById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getBuddyList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc2[_loc1].is_online);
} // end if
} // end of for
}
else
{
$e("[shell] isBuddyOnlineById() -> Invalid player id: " + player_id);
} // end else if
} // End of the function
function addPlayerToBuddyList(player_id, nickname, is_online)
{
if (!isNaN(player_id))
{
var _loc1 = new Object();
_loc1.player_id = player_id;
_loc1.nickname = nickname;
_loc1.is_online = is_online;
getBuddyList().push(_loc1);
}
else
{
$e("[shell] addToBuddyList() -> Invalid player id: " + player_id);
} // end else if
} // End of the function
function removePlayerFromBuddyList(player_id)
{
if (!isNaN(player_id))
{
if (isPlayerBuddyById(player_id))
{
var _loc2 = getBuddyList();
var _loc4 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc4; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
_loc2.splice(_loc1, 1);
return (true);
} // end if
} // end of for
}
else
{
$e("[shell] removePlayerFromBuddyList() -> Trying to remove a player from our buddy list who doesnt exist: player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] removePlayerFromBuddyList() -> Invalid player id: " + player_id);
} // end else if
return (false);
} // End of the function
function isPlayerBuddyById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getBuddyList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (true);
} // end if
} // end of for
}
else
{
$e("[shell] isPlayerBuddyById() -> Invalid player id: " + player_id);
} // end else if
return (false);
} // End of the function
function setBuddyAsOnlineById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getBuddyList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
_loc2[_loc1].is_online = true;
} // end if
} // end of for
}
else
{
$e("[shell] setBuddyAsOnline() -> Invalid player id: " + player_id);
} // end else if
} // End of the function
function setBuddyAsOfflineById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getBuddyList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
_loc2[_loc1].is_online = false;
} // end if
} // end of for
}
else
{
$e("[shell] setBuddyAsOfflineById() -> Invalid player id: " + player_id);
} // end else if
} // End of the function
function getBuddyNicknameById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getBuddyList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (_loc2[_loc1].nickname);
} // end if
} // end of for
}
else
{
$e("[shell] getBuddyNicknameById() -> Invalid player id: " + player_id);
} // end else if
return;
} // End of the function
function setCurrentBuddyRequestObject(obj)
{
buddy_request = obj;
} // End of the function
function getCurrentBuddyRequestObject()
{
return (buddy_request);
} // End of the function
function clearCurrentBuddyRequestObject()
{
buddy_request = undefined;
} // End of the function
function getBuddyList()
{
return (buddy_list);
} // End of the function
function getSortedBuddyList()
{
return (buddy_list.sortOn(["is_online", "nickname"], [Array.DESCENDING, Array.CASEINSENSITIVE]));
} // End of the function
function getIgnoreListFromServer()
{
if (ignore_list == undefined)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGNORE_HANDLER + "#" + AIRTOWER.GET_IGNORE_LIST, [], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] getIgnoreListFromServer() -> Ignore list already fetched!");
} // end else if
} // End of the function
function handleGetIgnoreListFromServer(obj)
{
var _loc6 = obj.shift();
ignore_list = new Array();
var _loc1;
var _loc2;
var _loc4;
var _loc5;
for (var _loc5 in obj)
{
_loc1 = obj[_loc5].split("|");
_loc2 = Number(_loc1[0]);
_loc4 = _loc1[1];
addPlayerToIgnoreList(_loc2, _loc4);
} // end of for...in
AIRTOWER.removeListener(AIRTOWER.GET_IGNORE_LIST, handleGetIgnoreListFromServer);
} // End of the function
function addPlayerToIgnoreList(player_id, nickname)
{
if (!isNaN(player_id))
{
if (!isPlayerIgnoredById(player_id))
{
var _loc2 = new Object();
_loc2.player_id = Number(player_id);
_loc2.nickname = nickname;
getIgnoreList().push(_loc2);
return (true);
}
else
{
$e("[shell] addPlayerToIgnoreList() -> Trying to add a duplicate player to our ignore list. player_id: " + player_id + " nickname: " + nickname);
} // end else if
}
else
{
$e("[shell] addPlayerToIgnoreList() -> Invalid player id: " + player_id);
} // end else if
return (false);
} // End of the function
function removePlayerFromIgnoreList(player_id)
{
if (!isNaN(player_id))
{
if (isPlayerIgnoredById(player_id))
{
var _loc2 = getIgnoreList();
var _loc4 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc4; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
_loc2.splice(_loc1, 1);
return (true);
} // end if
} // end of for
}
else
{
$e("[shell] removePlayerFromIgnoreList() -> Trying to remove a player from our ignore list who doesnt exist: player_id: " + player_id);
} // end else if
}
else
{
$e("[shell] removePlayerFromIgnoreList() -> Invalid player id: " + player_id);
} // end else if
return (false);
} // End of the function
function isPlayerIgnoredById(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = getIgnoreList();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (true);
} // end if
} // end of for
}
else
{
$e("[shell] isPlayerIgnoredById() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
return (false);
} // End of the function
function sendAddIgnorePlayer(player_id, nickname)
{
if (!isNaN(player_id))
{
if (isValidString(nickname))
{
var _loc3 = addPlayerToIgnoreList(player_id, nickname);
if (_loc3)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGNORE_HANDLER + "#" + AIRTOWER.ADD_IGNORE, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendAddIgnorePlayer() -> Player was not successfully ignored in the local list");
} // end else if
}
else
{
$e("[shell] sendAddIgnorePlayer() -> Invalid nickname: " + nickname);
} // end else if
}
else
{
$e("[shell] sendAddIgnorePlayer() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function sendRemoveIgnorePlayer(player_id)
{
if (!isNaN(player_id))
{
var _loc2 = removePlayerFromIgnoreList(player_id);
if (_loc2)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.IGNORE_HANDLER + "#" + AIRTOWER.REMOVE_IGNORE, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] sendRemoveIgnorePlayer() -> Player was not successfully removed from the local list");
} // end else if
}
else
{
$e("[shell] sendRemoveIgnorePlayer() -> Not a real number passed for player id. player_id: " + player_id);
} // end else if
} // End of the function
function getSortedIgnoreList()
{
return (getIgnoreList().sortOn("nickname", Array.CASEINSENSITIVE));
} // End of the function
function getIgnoreList()
{
return (ignore_list);
} // End of the function
function sendReportPlayer(player_id, reason_id, nickname)
{
if (isNaN(player_id))
{
$e("[shell] sendReportPlayer() -> Player ID is not a real number. player_id: " + player_id);
return (false);
} // end if
if (isNaN(reason_id))
{
$e("[shell] sendReportPlayer() -> Reason ID is not a real number. reason_id: " + reason_id);
return (false);
} // end if
if (!isValidString(nickname))
{
$e("[shell] sendReportPlayer() -> Nickname is not a valid string. nickname: " + nickname);
return (false);
} // end if
if (reason_id == REPORT_BAD_PENGUIN_NAME)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MESSAGE_HANDLER + "#" + AIRTOWER.REPORT_PLAYER, [player_id, reason_id, nickname], "str", getCurrentServerRoomId());
}
else if (isPlayerInChatLog(player_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MESSAGE_HANDLER + "#" + AIRTOWER.REPORT_PLAYER, [player_id], "str", getCurrentServerRoomId());
}
else
{
$d("[shell] sendReportPlayer() -> Player not reported because they were not in the chatlog");
} // end else if
} // End of the function
function mutePlayerById(player_id)
{
if (!isNaN(player_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MODERATION_HANDLER + "#" + AIRTOWER.MUTE, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] mutePlayerById() -> Not a real number passed for player_id: " + player_id);
} // end else if
} // End of the function
function kickPlayerById(player_id)
{
if (!isNaN(player_id))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MODERATION_HANDLER + "#" + AIRTOWER.KICK, [player_id], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] kickPlayerById() -> Not a real number passed for player_id: " + player_id);
} // end else if
} // End of the function
function banPlayerById(player_id, ban_reason)
{
if (!isNaN(player_id))
{
if (isValidString(ban_reason))
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MODERATION_HANDLER + "#" + AIRTOWER.BAN, [player_id, ban_reason], "str", getCurrentServerRoomId());
}
else
{
$e("[shell] banPlayerById() -> Ban reason isnt a valid string: ban_reason: " + ban_reason);
} // end else if
}
else
{
$e("[shell] banPlayerById() -> Not a real number passed for player_id: " + player_id);
} // end else if
} // End of the function
function handleModeratorAction(obj)
{
var _loc7 = obj[0];
var _loc2 = obj[1];
var _loc5 = Number(obj[2]);
var _loc3 = obj[3];
if (_loc2 == AIRTOWER.BAN)
{
var _loc6 = getLocalizedString("ban_player_hint") + ": " + _loc3;
} // end if
if (_loc2 == AIRTOWER.KICK)
{
_loc6 = getLocalizedString("kick_player_hint") + ": " + _loc3;
} // end if
if (_loc2 == AIRTOWER.MUTE)
{
_loc6 = getLocalizedString("mute_player_hint") + ": " + _loc3;
} // end if
var _loc1 = new Object();
_loc1.message = _loc6;
_loc1.player_id = _loc5;
_loc1.nickname = "SERVER";
_loc1.type = SEND_BLOCKED_MESSAGE;
addToChatLog(_loc1);
} // End of the function
function setAffilateLinks(ob)
{
debugObject(ob, true);
var _loc4 = getAffilateId();
var _loc1 = ob[_loc4];
debugObject(_loc1, true);
var _loc2 = getLocalPathsObject();
for (var _loc3 in _loc1)
{
_loc2[_loc3] = _loc1[_loc3];
} // end of for...in
setLocalPathsObject(_loc2);
} // End of the function
function setupMailEngine()
{
if (mail_engine == undefined)
{
$d("[mail] *** Mail Engine Initiated ***");
mail_engine = new Object();
mail_engine.mail = undefined;
mail_engine.has_fetched = false;
mail_engine.has_messages = false;
mail_engine.on_response = undefined;
mail_engine.on_details_response = undefined;
mail_engine.on_next_set_response = undefined;
mail_engine.on_delete_user_mail_response = undefined;
mail_engine.total_mail = undefined;
mail_engine.total_mail_listeners = undefined;
mail_engine.new_mail_count = 0;
mail_engine.new_mail_queue = undefined;
mail_engine.new_mail_count_on_server = 0;
mail_engine.new_mail_listeners = undefined;
mail_engine.mail_recieved_listeners = undefined;
mail_engine.messages_per_set = 12;
mail_engine.last_set_fetched = 0;
mail_engine.total_sets = undefined;
mail_engine.last_recieved_id = 0;
} // end if
} // End of the function
function showMail()
{
if (getNewMailCount() > 0)
{
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.MAIL_CHECKED, "", "str", getCurrentServerRoomId());
} // end if
MAIL.showInbox();
gotoState(EDIT_STATE);
} // End of the function
function hideMail()
{
gotoState(PLAY_STATE);
} // End of the function
function closeMail()
{
MAIL.closeInbox();
gotoState(PLAY_STATE);
} // End of the function
function sendMailToUserById(player_id, nickname)
{
if (!isNaN(player_id))
{
if (isValidString(nickname))
{
POSTCARDS.sendPostcardToPlayerById(player_id, nickname);
}
else
{
$e("[mail engine] sendMailToUserById() -> Invalid nickname! nickname: " + nickname);
} // end else if
}
else
{
$e("[mail engine] sendMailToUserById() -> Invalid player id: " + player_id);
} // end else if
} // End of the function
function attachMailListenersToAirtower()
{
AIRTOWER.addListener(AIRTOWER.MAIL_START_ENGINE, handleStartMailEngine);
AIRTOWER.addListener(AIRTOWER.GET_MAIL, handleGetMail);
AIRTOWER.addListener(AIRTOWER.RECEIVE_MAIL, handleRecieveMailItem);
AIRTOWER.addListener(AIRTOWER.SEND_MAIL, handleSendMailItem);
AIRTOWER.addListener(AIRTOWER.DELETE_MAIL_FROM_PLAYER, handleDeleteMailFromUser);
} // End of the function
function startMailEngine()
{
$d("[mail engine] startMailEngine()");
setupMailEngine();
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.MAIL_START_ENGINE, "", "str", getCurrentServerRoomId());
} // End of the function
function handleStartMailEngine(obj)
{
var _loc4 = obj.shift();
$d("[mail engine] handleStartMailEngine() -> " + obj);
var _loc2 = Number(obj[0]);
var _loc1 = Number(obj[1]);
setTotalMessages(_loc1);
setTotalSets(_loc1);
if (_loc2 > 0)
{
setNewMailCountOnServer(_loc2);
updateListeners(NEW_MAIL, getNewMailCount());
} // end if
if (_loc1 > 0)
{
setHasMessages(true);
} // end if
} // End of the function
function showInbox()
{
$d("[shell] showInbox();");
} // End of the function
function getNewMailCount()
{
var _loc2;
var _loc1;
mail_engine.new_mail_count = 0;
if (mail_engine.has_fetched == true)
{
_loc2 = mail_engine.mail.length;
for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
{
if (mail_engine.mail[_loc1].read == 0)
{
++mail_engine.new_mail_count;
} // end if
} // end of for
return (mail_engine.new_mail_count);
} // end if
if (mail_engine.new_mail_queue != undefined)
{
_loc2 = mail_engine.new_mail_queue.length;
for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
{
if (mail_engine.new_mail_queue[_loc1].read == 0)
{
++mail_engine.new_mail_count;
} // end if
} // end of for
return (mail_engine.new_mail_count + getNewMailCountOnServer());
} // end if
if (mail_engine.mail.length > 0 && getNewMailCountOnServer() == 0)
{
return (mail_engine.mail.length);
} // end if
return (getNewMailCountOnServer());
} // End of the function
function setAsRead(id)
{
if (!isNaN(id))
{
$d("[mail engine] setAsRead(id) -> " + id);
var _loc1 = 0;
var _loc3 = mail_engine.mail.length;
while (_loc1 < _loc3)
{
if (mail_engine.mail[_loc1].unq_id == id)
{
mail_engine.mail[_loc1].read = 1;
break;
} // end if
++_loc1;
} // end while
updateListeners(NEW_MAIL, getNewMailCount());
}
else
{
$e("[mail engine] setAsRead() -> Invalid id: " + id);
} // end else if
} // End of the function
function deleteMailItem(id)
{
if (!isNaN(id))
{
$d("[mail engine] deleteMailItem(id) -> " + id);
var _loc1 = 0;
var _loc4 = mail_engine.mail.length;
var _loc3;
while (_loc1 < _loc4)
{
if (mail_engine.mail[_loc1].unq_id == id)
{
_loc3 = _loc1;
break;
} // end if
++_loc1;
} // end while
if (!isNaN(_loc3))
{
mail_engine.mail.splice(_loc3, 1);
--mail_engine.total_mail;
updateListeners(TOTAL_MAIL, mail_engine.total_mail);
updateListeners(NEW_MAIL, getNewMailCount());
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.DELETE_MAIL, [id], "str", getCurrentServerRoomId());
return (true);
}
else
{
$e("[mail engine] deleteMailItem(id) -> " + id + " Trying to delete a mail item which did not exist.");
} // end else if
}
else
{
$e("[mail engine] deleteMailItem(id) -> " + id);
} // end else if
return (false);
} // End of the function
function deleteMailFromUser(user_to_delete, on_response)
{
if (!isNaN(user_to_delete))
{
$d("[mail engine] deleteMailFromUser(user_to_delete, on_response) -> " + user_to_delete + " " + on_response);
var _loc1 = 0;
var _loc3 = mail_engine.mail.length;
while (_loc1 < _loc3)
{
if (mail_engine.mail[_loc1].user_id == user_to_delete)
{
mail_engine.mail.splice(_loc1, 1);
continue;
} // end if
++_loc1;
} // end while
debugMailList();
if (on_response != undefined)
{
mail_engine.on_delete_user_mail_response = on_response;
} // end if
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.DELETE_MAIL_FROM_PLAYER, [user_to_delete], "str", getCurrentServerRoomId());
}
else
{
$e("[mail engine] deleteMailFromUser(user_to_delete, on_response) user to delete is " + user_to_delete);
} // end else if
} // End of the function
function debugMailList()
{
var _loc2 = mail_engine.mail;
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
debugObject(_loc2[_loc1], true);
} // end of for
} // End of the function
function handleDeleteMailFromUser(obj)
{
var _loc1 = obj.shift();
mail_engine.total_mail = Number(obj[0]);
if (mail_engine.mail.length < getMessagesPerSet())
{
if (nextSetAvailable())
{
getNextSet(debugMailList);
} // end if
} // end if
updateListeners(TOTAL_MAIL, mail_engine.total_mail);
updateListeners(NEW_MAIL, getNewMailCount());
mail_engine.on_delete_user_mail_response();
mail_engine.on_delete_user_mail_response = undefined;
} // End of the function
function sendMail(recipient_id, postcard_id)
{
if (getMyPlayerTotalCoins() >= POSTCARD_COST)
{
if (!isNaN(recipient_id) && !isNaN(postcard_id))
{
$d("[mail engine] sendMail(" + recipient_id + "," + postcard_id + ")");
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.SEND_MAIL, [recipient_id, postcard_id], "str", getCurrentServerRoomId());
++total_sent_messages;
}
else
{
$e("[mail engine] sendMail() -> " + recipient_id + " " + postcard_id);
var _loc2 = new Object();
_loc2.status_code = MAIL_SUCCESSFULLY_SENT;
updateListeners(MAIL_SEND_STATUS, _loc2);
} // end else if
}
else
{
$e("[mail engine] sendMail() -> Not enough coins to send message!");
_loc2 = new Object();
_loc2.status_code = MAIL_NOT_ENOUGH_COINS;
updateListeners(MAIL_SEND_STATUS, _loc2);
} // end else if
} // End of the function
function handleSendMailItem(obj)
{
var _loc5 = Number(obj[0]);
var _loc3 = Number(obj[1]);
var _loc2 = Number(obj[2]);
var _loc1 = new Object();
switch (_loc2)
{
case MAIL_SUCCESSFULLY_SENT:
{
_loc1.status_code = MAIL_SUCCESSFULLY_SENT;
break;
}
case MAIL_NOT_ENOUGH_COINS:
{
_loc1.status_code = MAIL_NOT_ENOUGH_COINS;
break;
}
case MAIL_INBOX_FULL:
{
_loc1.status_code = MAIL_INBOX_FULL;
break;
}
default:
{
_loc1.status_code = MAIL_SUCCESSFULLY_SENT;
break;
}
} // End of switch
updateListeners(MAIL_SEND_STATUS, _loc1);
setMyPlayerTotalCoins(_loc3);
} // End of the function
function handleRecieveMailItem(obj)
{
var _loc5 = obj.shift();
if (obj[0] == undefined || obj[1] == undefined || obj[2] == undefined || obj[3] == undefined)
{
$e("[mail engine] handleRecieveMailItem() We received a malformed mail item.");
return (false);
} // end if
$d("[mail engine] handleRecieveMailItem() -> " + obj);
++mail_engine.new_mail_count;
var _loc2 = {from: obj[0], user_id: Number(obj[1]), pc_id: Number(obj[2]), details: obj[3], unq_id: Number(obj[4]), read: 0};
if (mail_engine.has_fetched == true)
{
mail_engine.mail.splice(0, 0, _loc2);
}
else if (getHasMessages())
{
if (mail_engine.new_mail_queue == undefined)
{
mail_engine.new_mail_queue = new Array();
} // end if
mail_engine.new_mail_queue.splice(0, 0, _loc2);
}
else
{
if (mail_engine.mail == undefined)
{
mail_engine.mail = new Array();
} // end if
mail_engine.mail.splice(0, 0, _loc2);
} // end else if
setLastRecievedId(_loc2.unq_id);
mail_engine.total_mail = mail_engine.total_mail + 1;
updateListeners(RECIEVE_MAIL, getNewMailCount());
updateListeners(TOTAL_MAIL, mail_engine.total_mail);
updateListeners(NEW_MAIL, getNewMailCount());
} // End of the function
function getMailFromEngine(on_response)
{
if (on_response != undefined)
{
setMailResponseFunc(on_response);
} // end if
if (mail_engine.has_fetched == false && getHasMessages())
{
$d("[mail engine] getMailFromEngine() -> from SmartFox");
var _loc2 = new Object();
var _loc1 = getLastRecievedId();
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.GET_MAIL, [_loc1], "str", getCurrentServerRoomId());
}
else
{
$d("[mail engine] getMailFromEngine() -> from Engine");
getMailResponseFunc()(mail_engine.mail);
} // end else if
} // End of the function
function handleGetMail(obj)
{
var _loc2 = obj.shift();
if (!mail_engine.has_fetched)
{
handleGetFirstMail(obj);
}
else
{
handleGetNextSet(obj);
} // end else if
} // End of the function
function handleGetFirstMail(obj)
{
var _loc5 = new Array();
if (obj.length > 0)
{
var _loc1;
var _loc12 = obj.length;
var _loc3 = 0;
var _loc2 = 0;
var _loc4 = getNewMailCountOnServer();
while (_loc3 < _loc12)
{
_loc2 = 1;
if (_loc4 > 0)
{
_loc2 = 0;
--_loc4;
} // end if
_loc1 = obj[_loc3].split("|");
_loc5.push({from: _loc1[0], user_id: Number(_loc1[1]), pc_id: Number(_loc1[2]), details: _loc1[3], unq_id: Number(_loc1[4]), read: _loc2});
++_loc3;
} // end while
if (mail_engine.new_mail_queue.length > 0)
{
_loc5 = mail_engine.new_mail_queue.concat(_loc5);
mail_engine.new_mail_queue = undefined;
}
else
{
setLastRecievedId(_loc5[_loc5.length - 1].unq_id);
} // end else if
mail_engine.mail = _loc5;
if (getNewMailCountOnServer() > 0)
{
setNewMailCountOnServer(_loc4);
} // end if
} // end if
mail_engine.has_fetched = true;
getMailResponseFunc()(mail_engine.mail);
} // End of the function
function setTotalSets(total)
{
mail_engine.total_sets = Math.ceil(total / mail_engine.messages_per_set - 1);
} // End of the function
function getTotalSets()
{
return (mail_engine.total_sets);
} // End of the function
function setCurrentSet(last_fetched)
{
mail_engine.last_set_fetched = last_fetched;
} // End of the function
function getCurrentSet()
{
return (mail_engine.last_set_fetched);
} // End of the function
function nextSetAvailable()
{
if (getCurrentSet() + 1 <= getTotalSets())
{
return (true);
} // end if
return (false);
} // End of the function
function getNextSet(on_response)
{
$d("[mail engine] getNextSet(on_response) -> " + on_response);
if (on_response != undefined)
{
mail_engine.on_next_set_response = on_response;
var _loc2 = getLastRecievedId();
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.GET_MAIL, [_loc2], "str", getCurrentServerRoomId());
setCurrentSet(getCurrentSet() + 1);
}
else
{
$e("[mail engine] getNextSet(on_response) -> " + on_response + " You must pass a onResponse function");
} // end else if
} // End of the function
function handleGetNextSet(obj)
{
$d("[mail engine] onNextSetResponse() -> " + obj);
if (obj.length > 0)
{
var _loc11 = new Array();
if (obj.length > 0)
{
var _loc1;
var _loc13 = obj.length;
var _loc2 = 0;
var _loc4 = getNewMailCountOnServer();
var _loc3;
var _loc14 = 12;
var _loc15 = getCurrentSet() * _loc14;
while (_loc2 < _loc13)
{
_loc3 = 1;
if (_loc4 > 0)
{
_loc3 = 0;
--_loc4;
} // end if
_loc1 = obj[_loc2].split("|");
_loc11.push({from: _loc1[0], user_id: Number(_loc1[1]), pc_id: Number(_loc1[2]), details: _loc1[3], unq_id: Number(_loc1[4]), read: _loc3});
++_loc2;
} // end while
mail_engine.mail = mail_engine.mail.concat(_loc11);
if (getNewMailCountOnServer() > 0)
{
setNewMailCountOnServer(_loc4);
} // end if
} // end if
setLastRecievedId(_loc11[_loc11.length - 1].unq_id);
mail_engine.on_next_set_response(mail_engine.mail);
} // end if
} // End of the function
function setMailResponseFunc(func)
{
mail_engine.on_response = func;
} // End of the function
function getMailResponseFunc()
{
return (mail_engine.on_response);
} // End of the function
function getMailDetails(id, func)
{
$d("[mail engine] getMailDetails(id, func) -> " + id + " " + func);
if (!isNaN(id))
{
setOnDetailsFunc(func);
AIRTOWER.send(AIRTOWER.PLAY_EXT, AIRTOWER.MAIL_HANDLER + "#" + AIRTOWER.GET_MAIL_DETAILS, [id], "str", getCurrentServerRoomId());
}
else
{
$e("[mail engine] getMailDetails() -> id is " + id + " You must have a valid ID");
} // end else if
} // End of the function
function onMailDetails(csl)
{
var _loc1 = csl.split("|");
getOnDetailsFunc()(_loc1);
} // End of the function
function getOnDetailsFunc()
{
return (mail_engine.on_details_response);
} // End of the function
function setOnDetailsFunc(func)
{
mail_engine.on_details_response = func;
} // End of the function
function setActivePostcard(obj)
{
active_postcard = obj;
} // End of the function
function getActivePostcard()
{
return (active_postcard);
} // End of the function
function getMailArray()
{
return (mail_engine.mail);
} // End of the function
function getMessagesPerSet()
{
return (mail_engine.messages_per_set);
} // End of the function
function setHasMessages(has_messages)
{
mail_engine.has_messages = has_messages;
} // End of the function
function getHasMessages()
{
return (mail_engine.has_messages);
} // End of the function
function getTotalMessages()
{
return (mail_engine.total_mail);
} // End of the function
function getLastRecievedId()
{
return (mail_engine.last_recieved_id);
} // End of the function
function setLastRecievedId(id)
{
mail_engine.last_recieved_id = id;
} // End of the function
function setTotalMessages(tot)
{
mail_engine.total_mail = tot;
} // End of the function
function setNewMailCountOnServer(new_count)
{
mail_engine.new_mail_count_on_server = new_count;
} // End of the function
function getNewMailCountOnServer()
{
return (mail_engine.new_mail_count_on_server);
} // End of the function
function checkIfAllWorldDependenciesLoaded()
{
if (world_dependency_loaded_count == world_dependency_count)
{
updateListeners(START_ENGINE, null);
updateListeners(START_INTERFACE, null);
connectToWorld();
} // end if
} // End of the function
function updateWorldPopulations(pop_list)
{
var _loc6 = pop_list.split("|");
var _loc1 = 0;
var _loc7 = _loc6.length;
var _loc3;
var _loc2;
var _loc4;
var _loc5;
while (_loc1 < _loc7)
{
_loc3 = _loc6[_loc1].split(",");
_loc4 = Number(_loc3[0]);
_loc5 = Number(_loc3[1]);
_loc2 = getWorldById(_loc4);
_loc2.population = _loc5;
_loc2.has_buddies = false;
_loc2.rank = _loc1;
++_loc1;
} // end while
} // End of the function
function setWorldsWithBuddies(buddy_list)
{
if (!isValidString(buddy_list))
{
return (false);
} // end if
var _loc4 = buddy_list.split("|");
var _loc3 = 0;
var _loc6 = _loc4.length;
var _loc2 = getWorldList();
var _loc1 = 0;
var _loc5 = _loc2.length;
while (_loc3 < _loc6)
{
for (var _loc1 = 0; _loc1 < _loc5; ++_loc1)
{
if (_loc4[_loc3] == _loc2[_loc1].id)
{
_loc2[_loc1].has_buddies = true;
break;
} // end if
} // end of for
++_loc3;
} // end while
} // End of the function
function getWorldById(id)
{
if (!isNaN(id))
{
var _loc2 = getWorldCrumbs();
if (_loc2[id] != undefined)
{
return (_loc2[id]);
} // end if
$e("getWorldById() -> No world with the id of " + id + " has been defined!");
}
else
{
$e("getWorldById() -> Not a real number passed for id! id: " + id);
} // end else if
return;
} // End of the function
function addWorld(world_id, world_name, world_ip, world_port, is_safe)
{
var _loc1 = getWorldById(world_id);
if (_loc1 == undefined)
{
_loc1 = new Object();
_loc1.name = world_name;
_loc1.ip = world_ip;
_loc1.port = world_port;
_loc1.is_safe = is_safe;
_loc1.id = world_id;
_loc1.buddies = 0;
_loc1.population = -1;
getWorldByIdList().push(_loc1);
}
else
{
$e("addWorld() -> World with the id of " + id + " has been already been added!");
} // end else if
} // End of the function
function setWorldForConnection(world_id)
{
world_id_holder = world_id;
var _loc1 = getWorldById(world_id);
if (_loc1.ip != undefined && _loc1.port != undefined)
{
gotoState(PLAY_STATE);
}
else
{
$e("setWorldForConnection() -> Invalid IP or Port. IP: " + _loc1.ip + " Port: " + _loc1.port);
} // end else if
} // End of the function
function connectToWorld()
{
var _loc1 = getWorldById(world_id_holder);
showLoading(getLocalizedString("Joining") + " " + _loc1.name);
AIRTOWER.connectToWorld(_loc1.ip, _loc1.port, connectToWorldResponse);
} // End of the function
function connectToWorldResponse(success)
{
if (success)
{
LOGIN_HOLDER.unloadMovie();
getMyInventoryList();
getBuddyListFromServer();
getIgnoreListFromServer();
startMailEngine();
getMyPuffles();
setLastWorldId(world_id_holder);
startPlayerIdleCheck();
startHeartbeat();
var _loc1 = getWorldById(world_id_holder);
setWorldSafe(_loc1.is_safe);
cleanupWorlds();
}
else
{
$e("[shell] connectToWorldResponse() -> Connection to world failed. Sending user back to login.", {error_code: LOGIN_ERROR});
gotoState(LOGIN_STATE);
} // end else if
} // End of the function
function cleanupWorlds()
{
world_id_holder = undefined;
world_response_holder = undefined;
} // End of the function
function setWorldCrumbs(obj)
{
var _loc1;
for (var _loc1 in obj)
{
obj[_loc1].id = _loc1;
} // end of for...in
world_crumbs = obj;
} // End of the function
function getWorldCrumbs()
{
return (world_crumbs);
} // End of the function
function getSortedWorldList()
{
var _loc1 = getWorldCrumbs();
var _loc3 = new Array();
var _loc2;
for (var _loc2 in _loc1)
{
_loc3.push(_loc1[_loc2]);
} // end of for...in
_loc3.sortOn("rank", Array.NUMERIC);
return (_loc3);
} // End of the function
function setWorldSafe(is_safe)
{
is_world_safe = is_safe;
} // End of the function
function isWorldSafe()
{
return (is_world_safe);
} // End of the function
function getWorldList()
{
var _loc1 = getWorldCrumbs();
var _loc3 = new Array();
var _loc2;
for (var _loc2 in _loc1)
{
_loc3.push(_loc1[_loc2]);
} // end of for...in
return (_loc3);
} // End of the function
function addState(state_type, show, hide)
{
var _loc2 = getStateIndex(state_type);
if (_loc2 == -1)
{
getStates().push({type: state_type, hideFunc: hide, showFunc: show});
$d("addState() -> Type: " + state_type + " show func: " + show + " hide func: " + hide);
}
else
{
$d("addState() -> State already exists!");
} // end else if
} // End of the function
function gotoState(state_type, options)
{
var _loc1 = getStateIndex(state_type);
if (_loc1 != -1)
{
hideAllStates();
var _loc2 = getStates();
_loc2[_loc1].showFunc(options);
updateListeners(UPDATE_SHELL_STATE, {state: state_type});
}
else
{
$d("gotoState() -> Tried to goto a state which did not exist!");
} // end else if
} // End of the function
function hideAllStates()
{
var _loc2 = getStates();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
_loc2[_loc1].hideFunc();
} // end of for
} // End of the function
function getStateIndex(state_type)
{
var _loc2 = getStates();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].type == state_type)
{
return (_loc1);
} // end if
} // end of for
return (-1);
} // End of the function
function removeState(state_type)
{
var _loc1 = getStateIndex(state_type);
if (_loc1 != -1)
{
getStates().splice(_loc1, 1);
return (true);
} // end if
$d("removeState() -> Tried to remove a state which did not exist!");
return (false);
} // End of the function
function getStates()
{
return (states_holder);
} // End of the function
function showSetup()
{
getLocalCrumbsFile();
} // End of the function
function getLocalCrumbsFile()
{
var _loc1 = loadSWF(LOCAL_CRUMBS, getRootPath() + "" + LOCAL_CRUMBS_PATH + "" + getLocalizedFolder() + "/crumbs/" + LOCAL_CRUMBS_FILE + "" + getLocalCrumbsVersion() + ".swf", parseLocalCrumbsFile);
showLoading("", _loc1);
} // End of the function
function parseLocalCrumbsFile()
{
$d("shellOnLocalAssetResponse() -> Parsing the Local Assets file");
setLocalPathsObject(LOCAL_CRUMBS.local_paths);
setAffilateLinks(LOCAL_CRUMBS.link_paths);
setLanguageObject(LOCAL_CRUMBS.lang);
setLocalizedErrorObject(LOCAL_CRUMBS.error_lang);
setJokeArray(LOCAL_CRUMBS.jokes);
setSafeMessageArray(LOCAL_CRUMBS.safe_messages);
setTreveresdSafeMessageObject(LOCAL_CRUMBS.treveresed_safe_message_obj);
setLineMessageArray(LOCAL_CRUMBS.script_messages);
setQuickMessageArray(LOCAL_CRUMBS.quick_messages);
setNewsCrumbs(LOCAL_CRUMBS.news_crumbs);
setTourGuideMessageArray(LOCAL_CRUMBS.tour_guide_messages);
setPostcardCrumbs(LOCAL_CRUMBS.pc_crumbs);
getGlobalCrumbsFile();
} // End of the function
function getGlobalCrumbsFile()
{
var _loc1 = loadSWF(GLOBAL_CRUMBS, getRootPath() + "" + GLOBAL_CRUMBS_PATH + "" + GLOBAL_CRUMBS_FILE + "" + getGlobalCrumbsVersion() + ".swf", parseGlobalCrumbsFile);
showLoading(getLocalizedString("Loading Global Files"), _loc1);
} // End of the function
function parseGlobalCrumbsFile()
{
$d("parseGlobalCrumbsFile() -> Parsing the Global Crumbs File");
setGlobalPathsObject(GLOBAL_CRUMBS.global_path);
setFurnitureCrumbsObject(GLOBAL_CRUMBS.furniture_crumbs);
setInventoryCrumbsObject(GLOBAL_CRUMBS.paper_crumbs);
setPlayerColoursObject(GLOBAL_CRUMBS.player_colours);
setRoomCrumbs(GLOBAL_CRUMBS.room_crumbs);
setGameCrumbs(GLOBAL_CRUMBS.game_crumbs);
setPuffleCrumbs(GLOBAL_CRUMBS.puffle_crumbs);
setFrameHackCrumbs(GLOBAL_CRUMBS.frame_hacks);
setWorldCrumbs(GLOBAL_CRUMBS.servers);
setIglooCrumbs(GLOBAL_CRUMBS.igloo_crumbs);
setFloorCrumbs(GLOBAL_CRUMBS.floor_crumbs);
getAirtowerFile();
} // End of the function
function getAirtowerFile()
{
var _loc1 = loadSWF(AIRTOWER, getRootPath() + "" + AIRTOWER_PATH + "" + getAirtowerVersion() + ".swf", parseAirtowerFile);
showLoading(getLocalizedString("Loading Communication"), _loc1);
} // End of the function
function parseAirtowerFile()
{
AIRTOWER.addListener(AIRTOWER.HANDLE_ERROR, handleServerError);
AIRTOWER.addListener(AIRTOWER.CONNECTION_LOST, handleConnectionLost);
getGridviewFile();
} // End of the function
function getGridviewFile()
{
var _loc1 = loadSWF(GRIDVIEW, getRootPath() + "" + GRIDVIEW_PATH + "" + getGridviewVersion() + ".swf", parseGridviewFile);
showLoading(getLocalizedString("Loading Gridview"), _loc1);
} // End of the function
function parseGridviewFile()
{
getMailFile();
} // End of the function
function getMailFile()
{
var _loc1 = loadSWF(MAIL, getRootPath() + "" + MAIL_PATH + "" + getMailVersion() + ".swf", parseMailFile, undefined, getMailFileError);
showLoading(getLocalizedString("Loading Mail"), _loc1);
} // End of the function
function parseMailFile()
{
getPostcardsFile();
} // End of the function
function getPostcardsFile()
{
var _loc1 = loadSWF(POSTCARDS, getRootPath() + "" + POSTCARDS_PATH + "" + getPostcardsVersion() + ".swf", parsePostcardFile, undefined, parsePostcardFile);
showLoading(getLocalizedString("Loading Mail"), _loc1);
} // End of the function
function parsePostcardFile()
{
getMusicFile();
} // End of the function
function getMusicFile()
{
var _loc1 = loadSWF(MUSIC, getRootPath() + "" + MUSIC_PATH + "" + getMusicVersion() + ".swf", parseMusicFile, undefined, undefined);
showLoading(getLocalizedString("Loading Music"), _loc1);
} // End of the function
function parseMusicFile()
{
checkLocalConnection();
gotoState(LOGIN_STATE);
} // End of the function
function showLogin()
{
var _loc1 = loadSWF(LOGIN_HOLDER, getRootPath() + "" + LOGIN_PATH + "" + getLoginVersion() + ".swf", loginLoadComplete, undefined, loginLoadError);
showLoading(getLocalizedString("Loading Login Screen"), _loc1);
} // End of the function
function loginLoadComplete()
{
hideLoading();
} // End of the function
function loginLoadError(target_mc, errorCode, httpStatus)
{
debugObject(target_mc, true);
$e("[shell] loginLoadError() -> Error loading the login swf", {error_code: LOAD_ERROR});
} // End of the function
function sendLogin(username, pass, on_response)
{
AIRTOWER.connectToLogin(username, pass, on_response);
} // End of the function
function startChatLog()
{
chat_log = new Array();
updateListeners(UPDATE_CHAT_LOG, getChatLog());
} // End of the function
function addToChatLog(obj)
{
var _loc1 = getChatLog();
var _loc2 = _loc1.length;
if (_loc2 > MAX_CHAT_LOG_ENTRIES)
{
delete _loc1[_loc2];
_loc1.shift();
} // end if
_loc1.push(obj);
updateListeners(UPDATE_CHAT_LOG, getChatLog());
} // End of the function
function isPlayerInChatLog(player_id)
{
var _loc2 = getChatLog();
var _loc3 = _loc2.length;
for (var _loc1 = 0; _loc1 < _loc3; ++_loc1)
{
if (_loc2[_loc1].player_id == player_id)
{
return (true);
} // end if
} // end of for
return (false);
} // End of the function
function getChatLog()
{
return (chat_log);
} // End of the function
function showEngine()
{
ENGINE._visible = true;
} // End of the function
function hideEngine()
{
ENGINE._visible = false;
} // End of the function
function setupEngine(on_response)
{
on_engine_included_response = on_response;
showLoading(getLocalizedString("Loading Engine"));
AIRTOWER.addListener(AIRTOWER.LOAD_PLAYER, handleLoadPlayer);
AIRTOWER.addListener(AIRTOWER.JOIN_ROOM, handleJoinRoom);
AIRTOWER.addListener(AIRTOWER.JOIN_GAME, handleJoinGame);
AIRTOWER.addListener(AIRTOWER.ADD_PLAYER, handleAddPlayerToRoom);
AIRTOWER.addListener(AIRTOWER.REMOVE_PLAYER, handleRemovePlayerFromRoom);
AIRTOWER.addListener(AIRTOWER.PLAYER_MOVE, handleSendPlayerMove);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_COLOUR, handleSendUpdatePlayerColour);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_HEAD, handleSendUpdatePlayerHead);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_FACE, handleSendUpdatePlayerFace);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_NECK, handleSendUpdatePlayerNeck);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_BODY, handleSendUpdatePlayerBody);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_HAND, handleSendUpdatePlayerHand);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_FEET, handleSendUpdatePlayerFeet);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_FLAG, handleSendUpdatePlayerFlag);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_PHOTO, handleSendUpdatePlayerPhoto);
AIRTOWER.addListener(AIRTOWER.UPDATE_PLAYER_REMOVE, handleSendClearPaperdoll);
AIRTOWER.addListener(AIRTOWER.PLAYER_FRAME, handleSendPlayerFrame);
AIRTOWER.addListener(AIRTOWER.PLAYER_ACTION, handleUpdatePlayerAction);
AIRTOWER.addListener(AIRTOWER.OPEN_BOOK, handleOpenPlayerBook);
AIRTOWER.addListener(AIRTOWER.CLOSE_BOOK, handleClosePlayerBook);
AIRTOWER.addListener(AIRTOWER.THROW_BALL, handlePlayerThrowBall);
AIRTOWER.addListener(AIRTOWER.UPDATE_TABLE, handleUpdateTableById);
AIRTOWER.addListener(AIRTOWER.GET_TABLE_POPULATION, handleGetTablesPopulationById);
AIRTOWER.addListener(AIRTOWER.JOIN_TABLE, handleSendJoinTableById);
AIRTOWER.addListener(AIRTOWER.LEAVE_TABLE, handleLeaveTable);
AIRTOWER.addListener(AIRTOWER.UPDATE_WADDLE, handleUpdateWaddle);
AIRTOWER.addListener(AIRTOWER.GET_WADDLE_POPULATION, handleGetWaddlesPopulationById);
AIRTOWER.addListener(AIRTOWER.JOIN_WADDLE, handleSendJoinWaddleById);
AIRTOWER.addListener(AIRTOWER.LEAVE_WADDLE, handleLeaveWaddle);
AIRTOWER.addListener(AIRTOWER.START_WADDLE, startWaddle);
AIRTOWER.addListener(AIRTOWER.SEND_WADDLE, handleJoinWaddle);
AIRTOWER.addListener(AIRTOWER.HEARTBEAT, handleSendHeartbeat);
attachMailListenersToAirtower();
loadSWF(ENGINE, getRootPath() + "" + ENGINE_PATH + "" + getEngineVersion() + ".swf", engineLoadComplete, undefined, engineLoadFailed);
} // End of the function
function engineLoadComplete(success)
{
setCurrentEngine(ENGINE);
} // End of the function
function engineLoadFailed()
{
$e("[shell] engineLoadComplete() -> Engine did not load successfully", {error_code: LOAD_ERROR});
on_engine_included_response(false);
} // End of the function
function setCurrentEngine(mc)
{
if (mc != undefined)
{
current_engine = mc;
on_engine_included_response(true);
}
else
{
$e("[shell] setCurrentEngine() -> Engine is undefined! engine: " + mc);
} // end else if
} // End of the function
function getCurrentEngine()
{
return (current_engine);
} // End of the function
function setupInterface(on_response)
{
on_interface_included_response = on_response;
AIRTOWER.addListener(AIRTOWER.SEND_MESSAGE, handleSendMessage);
AIRTOWER.addListener(AIRTOWER.SEND_BLOCKED_MESSAGE, handleBlockedMessage);
AIRTOWER.addListener(AIRTOWER.SEND_SAFE_MESSAGE, handleSafeMessage);
AIRTOWER.addListener(AIRTOWER.SEND_LINE_MESSAGE, handleLineMessage);
AIRTOWER.addListener(AIRTOWER.SEND_QUICK_MESSAGE, handleSendQuickMessage);
AIRTOWER.addListener(AIRTOWER.SEND_TOUR_GUIDE_MESSAGE, handleTourGuideMessage);
AIRTOWER.addListener(AIRTOWER.SEND_EMOTE, handleSendEmote);
AIRTOWER.addListener(AIRTOWER.SEND_JOKE, handleSendJoke);
AIRTOWER.addListener(AIRTOWER.GET_INVENTORY_LIST, handleMyGetInventoryList);
AIRTOWER.addListener(AIRTOWER.GET_BUDDY_LIST, handleGetBuddyListFromServer);
AIRTOWER.addListener(AIRTOWER.GET_BUDDY_ONLINE_LIST, handleGetOnlineBuddyListFromServer);
AIRTOWER.addListener(AIRTOWER.GET_IGNORE_LIST, handleGetIgnoreListFromServer);
AIRTOWER.addListener(AIRTOWER.REMOVE_BUDDY, handleRemoveBuddyPlayer);
AIRTOWER.addListener(AIRTOWER.REQUEST_BUDDY, handleBuddyRequest);
AIRTOWER.addListener(AIRTOWER.ACCEPT_BUDDY, handleBuddyAccept);
AIRTOWER.addListener(AIRTOWER.BUDDY_ONLINE, handleBuddyOnline);
AIRTOWER.addListener(AIRTOWER.BUDDY_OFFLINE, handleBuddyOffline);
AIRTOWER.addListener(AIRTOWER.FIND_BUDDY, handleGetPlayerLocationById);
AIRTOWER.addListener(AIRTOWER.GAME_OVER, handleGameOver);
AIRTOWER.addListener(AIRTOWER.BUY_INVENTORY, handleBuyInventory);
AIRTOWER.addListener(AIRTOWER.GET_PLAYER_OBJECT, handleLoadPlayerObject);
AIRTOWER.addListener(AIRTOWER.GET_FURNITURE_LIST, handleGetFurnitureListFromServer);
AIRTOWER.addListener(AIRTOWER.UPDATE_FLOOR, updateIglooFloor);
AIRTOWER.addListener(AIRTOWER.UPDATE_IGLOO_TYPE, updateIglooType);
AIRTOWER.addListener(AIRTOWER.GET_IGLOO_DETAILS, handleGetPlayerIgloo);
AIRTOWER.addListener(AIRTOWER.GET_IGLOO_LIST, handleLoadPlayerIglooList);
AIRTOWER.addListener(AIRTOWER.BUY_FURNITURE, handleSendBuyFurniture);
AIRTOWER.addListener(AIRTOWER.UPDATE_FLOOR, handleSendBuyIglooFloor);
AIRTOWER.addListener(AIRTOWER.UPDATE_IGLOO_TYPE, handleSendBuyIglooType);
AIRTOWER.addListener(AIRTOWER.GET_MY_PLAYER_PUFFLES, handleGetMyPuffles);
AIRTOWER.addListener(AIRTOWER.GET_PLAYER_PUFFLES, handleGetPufflesByPlayerId);
AIRTOWER.addListener(AIRTOWER.PUFFLE_FRAME, handleSendPuffleFrame);
AIRTOWER.addListener(AIRTOWER.PUFFLE_MOVE, handleSendPuffleMove);
AIRTOWER.addListener(AIRTOWER.ADOPT_PUFFLE, handleSendAdoptPuffle);
AIRTOWER.addListener(AIRTOWER.PLAY_PUFFLE, handleSendPufflePlay);
AIRTOWER.addListener(AIRTOWER.REST_PUFFLE, handleSendPuffleRest);
AIRTOWER.addListener(AIRTOWER.BATH_PUFFLE, handleSendPuffleBath);
AIRTOWER.addListener(AIRTOWER.FEED_PUFFLE, handleSendPuffleFood);
AIRTOWER.addListener(AIRTOWER.TREAT_PUFFLE, handleSendPuffleTreat);
AIRTOWER.addListener(AIRTOWER.WALK_PUFFLE, handleSendPuffleWalk);
AIRTOWER.addListener(AIRTOWER.MODERATOR_ACTION, handleModeratorAction);
var _loc1 = loadSWF(INTERFACE, getRootPath() + "" + INTERFACE_PATH + "" + getInterfaceVersion() + ".swf", interfaceLoadComplete, undefined, interfaceLoadError);
showLoading(getLocalizedString("Loading Interface"), _loc1);
} // End of the function
function interfaceLoadComplete(success)
{
setCurrentInterface(INTERFACE);
} // End of the function
function interfaceLoadError()
{
$e("[shell] engineLoadComplete() -> Interface did not load successfully", {error_code: LOAD_ERROR});
on_interface_included_response(false);
} // End of the function
function setCurrentInterface(mc)
{
if (mc != undefined)
{
current_interface = mc;
on_interface_included_response(true);
}
else
{
$e("[shell] setCurrentInterface() -> Interface is undefined! mc: " + mc);
} // end else if
} // End of the function
function getCurrentInterface()
{
return (current_interface);
} // End of the function
function setupPlay()
{
if (!play_state_setup)
{
getAirtowerListeners();
startPlayState();
play_state_setup = true;
} // end if
} // End of the function
function startPlayState()
{
startInterface();
} // End of the function
function startEngine()
{
setupEngine(engineIncluded);
} // End of the function
function engineIncluded(success)
{
if (success)
{
startConnection();
} // end if
} // End of the function
function startInterface()
{
setupInterface(interfaceIncluded);
} // End of the function
function interfaceIncluded(success)
{
if (success)
{
startEngine();
} // end if
} // End of the function
function startConnection()
{
updateListeners(START_INTERFACE, null);
updateListeners(START_ENGINE, null);
connectToWorld();
} // End of the function
function setupEdit()
{
$d("[edit state] -> Setup edit state");
} // End of the function
function hideEdit()
{
$d("[edit state] -> hide edit state");
} // End of the function
function runProtect()
{
if (isRunningLocal())
{
$e("[shell] runProtect() -> Protecting swf!");
} // end if
} // End of the function
function startShell()
{
gotoState(SETUP_STATE);
} // End of the function
System.security.allowDomain("play.clubpenguin.com");
System.security.allowDomain("media.clubpenguin.com");
System.security.allowDomain("media1.clubpenguin.com");
System.security.allowDomain("media2.clubpenguin.com");
System.security.allowDomain("stage.play.clubpenguin.com");
System.security.allowDomain("stage.media.clubpenguin.com");
System.security.allowDomain("stage.media1.clubpenguin.com");
System.security.allowDomain("stage.media2.clubpenguin.com");
System.security.allowDomain("sandbox01.play.clubpenguin.com");
System.security.allowDomain("sandbox01.media.clubpenguin.com");
System.security.allowDomain("sandbox01.media1.clubpenguin.com");
System.security.allowDomain("sandbox01.media2.clubpenguin.com");
System.security.allowDomain("sandbox02.play.clubpenguin.com");
System.security.allowDomain("sandbox02.media.clubpenguin.com");
System.security.allowDomain("sandbox02.media1.clubpenguin.com");
System.security.allowDomain("sandbox02.media2.clubpenguin.com");
System.security.allowDomain("sandbox03.play.clubpenguin.com");
System.security.allowDomain("sandbox03.media.clubpenguin.com");
System.security.allowDomain("sandbox03.media1.clubpenguin.com");
System.security.allowDomain("sandbox03.media2.clubpenguin.com");
System.security.allowDomain("sandbox04.play.clubpenguin.com");
System.security.allowDomain("sandbox04.media.clubpenguin.com");
System.security.allowDomain("sandbox04.media1.clubpenguin.com");
System.security.allowDomain("sandbox04.media2.clubpenguin.com");
System.security.allowDomain("sandbox05.play.clubpenguin.com");
System.security.allowDomain("sandbox05.media.clubpenguin.com");
System.security.allowDomain("sandbox05.media1.clubpenguin.com");
System.security.allowDomain("sandbox05.media2.clubpenguin.com");
checkDomain();
var send_local_connection;
var listen_local_connection;
var saved_game;
var SAVED_GAME_LOCATION = "/";
var SAVED_GAME_NAME = "SaveGame";
var SAVED_GAME_VERSION = 1;
var MAX_SAVED_PLAYERS = 6;
var player_to_save;
var last_world_id;
var SETUP_STATE = 0;
var LOGIN_STATE = 1;
var PLAY_STATE = 2;
var GAME_STATE = 3;
var EDIT_STATE = 4;
var SHELL = this;
var POSTCARDS = postcards_mc;
var MAIL = mail_mc;
var LOGIN_HOLDER = login_mc;
var ENGINE = application_mc;
var INTERFACE = interface_mc;
var IGLOO = igloo_mc;
var LANGUAGE = language_mc;
var AIRTOWER = airtower_mc;
var GRIDVIEW = gridview_mc;
var PAPER_CRUMBS_HOLDER = paper_crumbs_mc;
var LIGHTBOX = lightbox_mc;
var LOCAL_CRUMBS = local_crumbs_mc;
var GLOBAL_CRUMBS = global_crumbs_mc;
var ROOMS = rooms_mc;
var GAMES = games_mc;
var MUSIC = music_mc;
var DEBUG = debug_mc;
var INVENTORY_TYPE_COLOUR = 0;
var INVENTORY_TYPE_HEAD = 1;
var INVENTORY_TYPE_FACE = 2;
var INVENTORY_TYPE_NECK = 3;
var INVENTORY_TYPE_BODY = 4;
var INVENTORY_TYPE_HAND = 5;
var INVENTORY_TYPE_FEET = 6;
var INVENTORY_TYPE_FLAG = 7;
var INVENTORY_TYPE_PHOTO = 8;
var INVENTORY_TYPE_OTHER = 9;
var FURNITURE_TYPE_ROOM = 0;
var FURNITURE_TYPE_WALL = 1;
var FURNITURE_TYPE_FLOOR = 2;
var FURNITURE_SORT_ROOM = 0;
var FURNITURE_SORT_WALL = 1;
var FURNITURE_SORT_FLOOR = 2;
var FURNITURE_SORT_PET = 3;
var PLAYER_ROOM_SMART_ID_CUTOFF = 1000;
_global.getCurrentShell = function ()
{
return (SHELL);
};
_global.getCurrentEngine = function ()
{
return (ENGINE);
};
_global.getCurrentInterface = function ()
{
return (INTERFACE);
};
_global.getCurrentAirtower = function ()
{
return (AIRTOWER);
};
var is_running_local = undefined;
var MEDIA_SERVER_ONE = "http://media1.clubpenguin.com/play/v2/";
var MEDIA_SERVER_TWO = "http://media2.clubpenguin.com/play/v2/";
var MEDIA_SERVER_SANDBOX01 = "http://sandbox01.media.clubpenguin.com/play/v2/";
var MEDIA_SERVER_SANDBOX02 = "http://sandbox02.media.clubpenguin.com/play/v2/";
var MEDIA_SERVER_SANDBOX03 = "http://sandbox03.media.clubpenguin.com/play/v2/";
var MEDIA_SERVER_STAGE = "http://stage.media.clubpenguin.com/play/v2/";
var server_switch = false;
var domain_name = getDomainName();
var adjusted_root_path;
var localized_folder;
var local_paths_object;
var global_paths_object;
var local_crumbs_version;
var global_crumbs_version;
var LOCAL_CRUMBS_PATH = "content/local/";
var GLOBAL_CRUMBS_PATH = "content/global/crumbs/";
var LOCAL_CRUMBS_FILE = "local_crumbs";
var GLOBAL_CRUMBS_FILE = "global_crumbs";
var airtower_version;
var engine_version;
var gridview_version;
var igloo_version;
var interface_version;
var login_version;
var mail_version;
var postcards_version;
var music_version;
var AIRTOWER_PATH = "airtower/airtower";
var ENGINE_PATH = "engine/engine";
var GRIDVIEW_PATH = "gridview/gridview";
var IGLOO_PATH = "igloo/igloo";
var INTERFACE_PATH = "interface/interface";
var LOGIN_PATH = "login/login";
var MAIL_PATH = "mail/inbox/mail";
var POSTCARDS_PATH = "mail/book/book";
var MUSIC_PATH = "music/music";
setRootPath();
var language_obj = new Object();
var joke_arr = new Array();
var safe_message_arr = new Array();
var line_message_arr = new Array();
var quick_message_arr = new Array();
var tour_guide_message_arr = new Array();
var treveresed_safe_message_obj = new Object();
var en = 1;
var errors = new Array();
var e_func = new Object();
var window_size = new Object();
var WINDOW_SMALL = 1;
var WINDOW_MEDIUM = 2;
var WINDOW_LARGE = 3;
var WINDOW_EXTRA_LARGE = 4;
window_size[WINDOW_SMALL] = {w: 354, h: 200};
window_size[WINDOW_MEDIUM] = {w: 354, h: 240};
window_size[WINDOW_LARGE] = {w: 354, h: 260};
window_size[WINDOW_EXTRA_LARGE] = {w: 460, h: 280};
var DEFAULT_ERROR_TYPE = "d";
var DEFAULT_ERROR_CODE = -1;
var NO_CONNECTION = 0;
var CONNECTION_LOST = 1;
var TIME_OUT = 2;
var MULTI_CONNECTIONS = 3;
var DISCONNECT = 4;
var KICK = 5;
var NAME_NOT_FOUND = 100;
var PASSWORD_WRONG = 101;
var SERVER_FULL = 103;
var PASSWORD_REQUIRED = 130;
var PASSWORD_SHORT = 131;
var PASSWORD_LONG = 132;
var NAME_REQUIRED = 140;
var NAME_SHORT = 141;
var NAME_LONG = 142;
var LOGIN_FLOODING = 150;
var PLAYER_IN_ROOM = 200;
var ROOM_FULL = 210;
var ITEM_IN_HOUSE = 400;
var NOT_ENOUGH_COINS = 401;
var ITEM_NOT_EXIST = 402;
var NAME_NOT_ALLOWED = 441;
var PUFFLE_LIMIT_M = 440;
var PUFFLE_LIMIT_NM = 442;
var BAN_DURATION = 601;
var BAN_AN_HOUR = 602;
var BAN_FOREVER = 603;
var AUTO_BAN = 610;
var GAME_CHEAT = 800;
var ACCOUNT_NOT_ACTIVATE = 900;
var BUDDY_LIMIT = 901;
var NO_PLAY_TIME = 910;
var OUT_PLAY_TIME = 911;
var GROUNDED = 913;
var PLAY_TIME_OVER = 914;
var SYSTEM_REBOOT = 990;
var NOT_MEMBER = 999;
var NO_DB_CONNECTION = 1000;
var TIME_WARNING = 10001;
var TIMEOUT = 10002;
var PASSWORD_SAVE_PROMPT = 10003;
var SOCKET_LOST_CONNECTION = 10004;
var LOAD_ERROR = 10005;
var MAX_IGLOO_FURNITURE_ERROR = 10006;
var MULTIPLE_CONNECTIONS = 10007;
e_func[DEFAULT_ERROR] = e_default;
e_func[NO_CONNECTION] = e_noConnection;
e_func[CONNECTION_LOST] = e_connectionLost;
e_func[TIME_OUT] = e_timeOut;
e_func[MULTI_CONNECTIONS] = e_multiConnections;
e_func[DISCONNECT] = e_disconnect;
e_func[KICK] = e_kick;
e_func[NAME_NOT_FOUND] = e_nameNotFound;
e_func[PASSWORD_WRONG] = e_passwordWrong;
e_func[SERVER_FULL] = e_serverFull;
e_func[PASSWORD_REQUIRED] = e_passwordRequired;
e_func[PASSWORD_SHORT] = e_passwordShort;
e_func[PASSWORD_LONG] = e_passwordLong;
e_func[NAME_REQUIRED] = e_nameRequired;
e_func[NAME_SHORT] = e_nameShort;
e_func[NAME_LONG] = e_nameLong;
e_func[LOGIN_FLOODING] = e_loginFlooding;
e_func[PLAYER_IN_ROOM] = e_playerInRoom;
e_func[ROOM_FULL] = e_roomFull;
e_func[ITEM_IN_HOUSE] = e_itemInHouse;
e_func[NOT_ENOUGH_COINS] = e_notEnoughCoins;
e_func[ITEM_NOT_EXIST] = e_itemNotExist;
e_func[NAME_NOT_ALLOWED] = e_nameNotAllowed;
e_func[PUFFLE_LIMIT_M] = e_puffleLimitMember;
e_func[PUFFLE_LIMIT_NM] = e_puffleLimitNonMember;
e_func[BAN_DURATION] = e_banDuration;
e_func[BAN_AN_HOUR] = e_banAnHour;
e_func[BAN_FOREVER] = e_banForever;
e_func[AUTO_BAN] = e_autoBan;
e_func[GAME_CHEAT] = e_gameCheat;
e_func[ACCOUNT_NOT_ACTIVATE] = e_accountNotActive;
e_func[BUDDY_LIMIT] = e_buddyLimit;
e_func[NO_PLAY_TIME] = e_noPlayTime;
e_func[OUT_PLAY_TIME] = e_outPlayTime;
e_func[GROUNDED] = e_grounded;
e_func[PLAY_TIME_OVER] = e_playTimeOver;
e_func[SYSTEM_REBOOT] = e_systemReboot;
e_func[NOT_MEMBER] = e_notMember;
e_func[NO_DB_CONNECTION] = e_noDatabaseConnection;
e_func[TIME_WARNING] = e_timeWarning;
e_func[TIMEOUT] = e_timeout;
e_func[PASSWORD_SAVE_PROMPT] = e_passwordSavePrompt;
e_func[SOCKET_LOST_CONNECTION] = e_connectionLost;
e_func[LOAD_ERROR] = e_loadError;
e_func[MAX_IGLOO_FURNITURE_ERROR] = e_maxFurniture;
var ERROR_WINDOW = error_prompt_mc;
var ERROR_COVER = error_cover_mc;
var error_window_on_close;
var local_error_obj = new Object();
var SOCKET_ERROR = "SOCKET ERROR";
var CLIENT_ERROR = "CLIENT ERROR";
hideErrorPrompt();
var idle_interval = 0;
var last_update = getLocalEpoch();
var idle_timeout = 600000;
var key_listener;
var mouse_listener;
var heart_interval;
var heart_interval_freq = TWO_MINUTES_IN_MILLISECONDS;
var timeout_interval;
var timeout_interval_freq = TWO_SECONDS_IN_MILLISECONDS;
var last_heart_update = getLocalEpoch();
var DEBUG_MODE = false;
var LOADING = load_mc;
var loading_screen_visible = false;
hideLightbox();
var close_func_holder;
var shell_listener_container = new Object();
var ADD_PLAYER;
var REMOVE_PLAYER;
var UPDATE_PLAYER;
var PLAYER_MOVE;
var UPDATE_PLAYER_FRAME;
var OPEN_BOOK;
var CLOSE_BOOK;
var THROW_BALL;
var SEND_MESSAGE;
var SEND_QUICK_MESSAGE;
var SEND_TOUR_GUIDE_MESSAGE;
var JOIN_ROOM;
var GET_PLAYER_INVENTORY = "gpi";
var UPDATE_CHAT_LOG = "ucl";
var START_ENGINE = "sten";
var START_INTERFACE = "stin";
var NEW_MAIL = "nm";
var TOTAL_MAIL = "tm";
var RECIEVE_MAIL = "rm";
var GAME_OVER;
var BUY_INVENTORY;
var UPDATE_COINS = "upc";
var UPDATE_INVENTORY = "upi";
var UPDATE_BUDDY_LIST = "ubl";
var SEND_BUDDY_REQUEST = "sbr";
var SEND_BUDDY_ACCEPT = "abr";
var BUDDY_ONLINE = "buo";
var LOAD_PLAYER_OBJECT = "spo";
var UPDATE_EGG_TIMER = "uet";
var GET_PLAYER_LOCATION = "gpl";
var GET_FURNITURE_LIST = "gfl";
var UPDATE_IGLOO_FLOOR = "uif";
var UPDATE_IGLOO_TYPE = "uit";
var IGLOO_LOCK_STATUS = "ils";
var GET_IGLOO_DETAILS = "gid";
var JOIN_PLAYER_IGLOO = "jpi";
var LOAD_PLAYER_IGLOO_LIST = "lpil";
var BUY_IGLOO_FLOOR = "bif";
var BUY_IGLOO_TYPE = "bit";
var BUY_FURNITURE = "bf";
var ADD_PUFFLE = "apu";
var REQUEST_PUFFLE_MOVE = "rpm";
var PUFFLE_MOVE = "pm";
var PUFFLE_FRAME = "ps";
var PUFFLE_WALK = "pw";
var ADOPT_PUFFLE = "adp";
var UPDATE_TABLE = "upt";
var JOIN_TABLE = "jt";
var LEAVE_TABLE = "lt";
var UPDATE_WADDLE = "uw";
var JOIN_WADDLE = "jw";
var LEAVE_WADDLE = "lw";
var START_WADDLE = "sw";
var MAIL_SEND_STATUS = "mss";
var currently_loading_path;
var current_load_attempt;
var load_queue = new Array();
var FREEZE_CODE_HASH = "theultimatesupermonkeycomicbooks";
var MAX_LOAD_ATTEMPS = 3;
var server_time;
var SERVER_TIMEZONE_OFFSET = 7;
var local_time;
var calculated_time_difference;
var calculated_timezone_offset;
var MINUTES_IN_DAY = 1440;
var ONE_MINUTE_IN_MILLISECONDS = 60000;
var TWO_MINUTES_IN_MILLISECONDS = 120000;
var THREE_MINUTES_IN_MILLISECONDS = 180000;
var FOUR_MINUTES_IN_MILLISECONDS = 240000;
var FIVE_MINUTES_IN_MILLISECONDS = 300000;
var ONE_SECOND_IN_MILLISECONDS = 1000;
var TWO_SECONDS_IN_MILLISECONDS = 2000;
var ONE_DAY_IN_MILLISECONDS = 86400000;
var is_egg_timer_active = false;
var egg_timer_milliseconds_remaining = 0;
var egg_timer_interval;
var my_game = new Object();
var MAX_GAME_SCORE = 999999999;
var game_crumbs = new Object();
var game_room_smart_id = undefined;
var waddle_list = new Object();
var my_room;
var room_player_list;
var last_known_room_name;
var last_known_xpos;
var last_known_ypos;
var current_server_room_id = undefined;
var current_crumb_room_id = undefined;
var room_crumbs = new Object();
var current_room_id;
var last_room_id;
var news_crumbs;
var postcard_flat_arr;
var postcard_category_list;
var postcard_crumbs;
var postcard_count;
var my_player = new Object();
var spy_requested = false;
var player_cache = new Array();
var MAX_PLAYERS_IN_CACHE = 20;
var inventory_crumbs = undefined;
var inventory_arr = undefined;
var player_colours = new Object();
var frame_hacks;
var furniture_crumbs = new Object();
var furniture_list;
var my_puffle_array = new Array();
var room_puffle_array;
var puffle_crumbs;
var my_puffles_fetched = false;
var global_puffle_stats_interval;
var GLOBAL_PUFFLE_STATS_FREQUENCY = 36000;
var PUFFLE_UPDATE_MODIFIER = 10;
var PUFFLE_UPDATE_BASE = 10000;
var PUFFLE_MOVE_ACTION = "m";
var PUFFLE_PLAY_ACTION = "p";
var PUFFLE_HUNGER_FRAME = 32;
var PUFFLE_HEALTH_FRAME = 33;
var PUFFLE_REST_FRAME = 26;
var SUPER_PLAY_FRAME = 28;
var GREAT_PLAY_FRAME = 35;
var NORMAL_PLAY_FRAME = 27;
var REST_FRAME = 25;
var BATH_FRAME = 34;
var FEED_FRAME = 31;
var ANGRY_TREAT_FRAME = 33;
var GUM_TREAT_FRAME = 29;
var COOKIE_TREAT_FRAME = 30;
var TREAT_COOKIE = 1;
var TREAT_GUM = 2;
var PUFFLE_INVENTORY_ID = 750;
var MAX_PUFFLES = 14;
var is_igloo_locked = true;
var player_igloo;
var igloo_player_id;
var player_igloo_furniture;
var current_igloo_type;
var current_igloo_floor_id;
var is_room_igloo = false;
var igloo_crumbs = new Object();
var floor_crumbs = new Object();
var MAX_IGLOO_ITEMS = 99;
var buddy_list = undefined;
var buddy_request = undefined;
var ignore_list = undefined;
var REPORT_SWEARING = 0;
var REPORT_SEXUAL_LANGUAGE = 1;
var REPORT_RACIAL_WORDS = 2;
var REPORT_PERSONAL_INFO = 3;
var REPORT_EMAIL_ADDRESS = 4;
var REPORT_REAL_NAME = 5;
var REPORT_NAME_CALLING = 6;
var REPORT_BAD_PENGUIN_NAME = 7;
var mail_engine = undefined;
var total_sent_messages = 0;
var MAX_MAIL_MESSAGES = 250;
var POSTCARD_COST = 10;
var MAIL_INBOX_FULL = 0;
var MAIL_SUCCESSFULLY_SENT = 1;
var MAIL_NOT_ENOUGH_COINS = 2;
var active_postcard;
var world_id_holder;
var world_crumbs;
var world_list = new Array();
var world_dependency_count = 2;
var world_dependency_loaded_count = 0;
var is_world_safe = false;
var states_holder = new Array();
var UPDATE_SHELL_STATE = "ups";
addState(SETUP_STATE, showSetup, hideSetup);
addState(LOGIN_STATE, showLogin, null);
var chat_log;
var MAX_CHAT_LOG_ENTRIES = 20;
var current_engine;
var on_engine_included_response;
var current_interface;
var on_interface_included_response;
addState(PLAY_STATE, setupPlay);
var play_state_setup = false;
addState(EDIT_STATE, setupEdit, hideEdit);
// Action script...
// [Action in Frame 1]
function treverseMessages(node)
{
for (var _loc3 in node)
{
var _loc2 = node[_loc3].id;
treveresed_safe_message_obj[_loc2] = node[_loc3];
if (node[_loc3].menu.length > 0)
{
treverseMessages(node[_loc3].menu);
} // end if
} // end of for...in
} // End of the function
var shell = _global.getCurrentShell();
var root_path = shell.getRootPath();
var language_folder = shell.getLocalizedFolder();
var local_content = root_path + "content/local/" + language_folder;
var website_content = root_path;
var local_paths = new Object();
local_paths.help = local_content + "/content/help1.swf";
local_paths.profile = local_content + "/content/profile1.swf";
local_paths.library = local_content + "/content/library61.swf";
local_paths.missions = local_content + "/content/missions61.swf";
local_paths.current_news = local_content + "/news/20080724.swf";
local_paths.old_news0 = local_content + "/news/20080717.swf";
local_paths.old_news1 = local_content + "/news/20080710.swf";
local_paths.old_news2 = local_content + "/news/20080703.swf";
local_paths.old_news3 = local_content + "/news/20080626.swf";
local_paths.old_news4 = local_content + "/news/20080619.swf";
local_paths.old_news5 = local_content + "/news/20080612.swf";
local_paths.mancala_help = local_content + "/content/help/mancala4.swf";
local_paths.clock_help = local_content + "/content/help/clock_tower2.swf";
local_paths.mod_help = local_content + "/content/help/moderator1.swf";
local_paths.egg_timer = local_content + "/content/help/egg_timer1.swf";
local_paths.help = local_content + "/content/help1.swf";
local_paths.membership = local_content + "/membership/membership2.swf";
local_paths.membership_inventory = local_content + "/membership/membership2.swf";
local_paths.membership_furniture = local_content + "/membership/membership2.swf";
local_paths.membership_igloo = local_content + "/membership/membership2.swf";
local_paths.membership_puffle = local_content + "/membership/membership2.swf";
local_paths.stowaway_book = local_content + "/content/books/stowaway.swf";
local_paths.franky_book = local_content + "/content/books/franky.swf";
local_paths.spice_book = local_content + "/content/books/spice.swf";
local_paths.dare_book = local_content + "/content/books/dare.swf";
local_paths.journal_book = local_content + "/content/books/journal.swf";
local_paths.tales07_book = local_content + "/content/books/tales07.swf";
local_paths.tales08_book = local_content + "/content/books/tales08.swf";
local_paths.year0506_book = local_content + "/content/books/year0506.swf";
local_paths.year0607_book = local_content + "/content/books/year0607.swf";
local_paths.give_tour = local_content + "/content/tours/give_tour2.swf";
local_paths.take_tour = local_content + "/content/tours/take_tour2.swf";
local_paths.clothing_catalogue = local_content + "/catalogues/clothing/200807.swf";
local_paths.costume_catalogue = local_content + "/catalogues/costume/200807.swf";
local_paths.sport_catalogue = local_content + "/catalogues/sport/200806.swf";
local_paths.hair_catalogue = local_content + "/catalogues/hair/200807.swf";
local_paths.fish_catalogue = local_content + "/catalogues/fish/200806.swf";
local_paths.pets_catalogue = local_content + "/catalogues/pets/200805.swf";
local_paths.adopt_catalogue = local_content + "/catalogues/adopt/200711.swf";
local_paths.pirate_catalogue = local_content + "/catalogues/pirate/200804.swf";
local_paths.igloo_catalogue = local_content + "/catalogues/igloo/200805.swf";
local_paths.furniture_catalogue = local_content + "/catalogues/furniture/200807.swf";
local_paths.agent_form = local_content + "/content/forms/agent1.swf";
local_paths.news_form = local_content + "/content/forms/news1.swf";
local_paths.report_form = local_content + "/content/forms/report1.swf";
local_paths.tour_form = local_content + "/content/forms/tour4.swf";
local_paths["801_award"] = local_content + "/awards/801.swf";
local_paths["802_award"] = local_content + "/awards/802.swf";
local_paths["803_award"] = local_content + "/awards/803.swf";
local_paths["804_award"] = local_content + "/awards/804.swf";
local_paths["805_award"] = local_content + "/awards/805.swf";
local_paths["806_award"] = local_content + "/awards/806.swf";
local_paths["807_award"] = local_content + "/awards/807.swf";
local_paths["808_award"] = local_content + "/awards/808.swf";
local_paths["809_award"] = local_content + "/awards/809.swf";
local_paths["810_award"] = local_content + "/awards/810.swf";
local_paths["811_award"] = local_content + "/awards/811.swf";
local_paths["812_award"] = local_content + "/awards/812.swf";
local_paths["813_award"] = local_content + "/awards/813.swf";
local_paths["814_award"] = local_content + "/awards/814.swf";
local_paths["815_award"] = local_content + "/awards/815.swf";
local_paths["816_award"] = local_content + "/awards/816.swf";
local_paths["817_award"] = local_content + "/awards/817.swf";
local_paths["818_award"] = local_content + "/awards/818.swf";
local_paths.postcards = local_content + "/postcards/content/";
local_paths.postcard_icons = local_content + "/postcards/icons/";
var master_link_paths = new Object();
var miniclip_link_paths = new Object();
var link_paths = new Object();
master_link_paths.main_web = "http://www.clubpenguin.com/";
master_link_paths.client_web = "http://play.clubpenguin.com/";
master_link_paths.cache_web = "http://support.clubpenguin.com/help/technical/clear_my_cache.htm";
master_link_paths.connection_web = "http://support.clubpenguin.com/help/technical/lost_connection.htm";
master_link_paths.cant_connect_web = "http://support.clubpenguin.com/help/technical/cant_connect_server.htm";
master_link_paths.support_web = "http://support.clubpenguin.com/help/";
master_link_paths.member_web = "https://secure2.clubpenguin.com/membership/";
master_link_paths.manage_web = "https://secure2.clubpenguin.com/manage_account/login.php";
master_link_paths.community_web = "http://community.clubpenguin.com/";
master_link_paths.guide_web = "http://www.clubpenguin.com/parents/club_penguin_guide.htm";
master_link_paths.parents_web = "http://www.clubpenguin.com/parents/";
master_link_paths.create_account_web = "http://play.clubpenguin.com/create_account/";
master_link_paths.forgot_password_web = "http://support.clubpenguin.com/lost-password.php";
miniclip_link_paths.main_web = "http://play.clubpenguin.com/miniclip.htm";
miniclip_link_paths.client_web = "http://play.clubpenguin.com/miniclip.htm";
miniclip_link_paths.cache_web = "http://support.clubpenguin.com/help/technical/clear_my_cache.htm";
miniclip_link_paths.connection_web = "http://support.clubpenguin.com/help/technical/lost_connection.htm";
miniclip_link_paths.cant_connect_web = "http://support.clubpenguin.com/help/technical/cant_connect_server.htm";
miniclip_link_paths.support_web = "http://support.clubpenguin.com/help/";
miniclip_link_paths.member_web = "https://secure2.clubpenguin.com/membership/";
miniclip_link_paths.manage_web = "https://secure2.clubpenguin.com/manage_account/login.php";
miniclip_link_paths.community_web = "http://community.clubpenguin.com/";
miniclip_link_paths.guide_web = "http://www.clubpenguin.com/parents/club_penguin_guide.htm";
miniclip_link_paths.parents_web = "http://www.clubpenguin.com/parents/";
miniclip_link_paths.create_account_web = "http://play.clubpenguin.com/miniclip_join_club_penguin.htm";
miniclip_link_paths.forgot_password_web = "http://support.clubpenguin.com/lost-password.php";
link_paths[0] = master_link_paths;
link_paths[1] = miniclip_link_paths;
var lang = new Object();
var error_lang = new Object();
lang.chat_restrict = "a-z A-Z !?";
lang["Club Penguin"] = "Club Penguin";
lang.am = "am";
lang.pm = "pm";
lang.hour = "hour";
lang.hours = "hours";
lang.of = "of";
lang["Loading Localized Files"] = "Loading Localized Files";
lang["Loading Global Files"] = "Loading Global Files";
lang["Loading Communication"] = "Loading Communication";
lang["Loading Login Screen"] = "Loading Login";
lang.Joining = "Joining";
lang["Logging in"] = "Logging in";
lang.Parents = "Parents";
lang["Click Here"] = "Click Here";
lang["Don\'t have a penguin?"] = "Don\'t have a penguin?";
lang["Create a free account now"] = "Create a free account now";
lang["Login as a different penguin"] = "Login as a different penguin";
lang.Password: = "Password:";
lang["Remember me on this computer"] = "Remember me on this computer";
lang["Remember my password"] = "Remember my password";
lang["Forgot your password?"] = "Forgot your password?";
lang["Forget my penguin"] = "Forget my penguin";
lang["Penguin Name:"] = "Penguin Name:";
lang["Your Suggested Servers"] = "Your Suggested Servers";
lang["Buddies online"] = "Buddies online";
lang["Amount of penguins online"] = "Amount of penguins online";
lang["Ultimate safe chat"] = "Ultimate safe chat";
lang["Incorrect Password"] = "Incorrect Password";
lang["Too many failed login attempts. Please try again later."] = "Too many failed login attempts. Please try again later.";
lang.Yes = "Yes";
lang.No = "No";
lang.Ok = "Ok";
lang.Start = "Start";
lang.Okay = "Okay";
lang.Close = "Close";
lang.Continue = "Continue";
lang["Learn More"] = "Learn More";
lang.Login = "Login";
lang["Sign In"] = "Sign In";
lang["Visit Community Section"] = "Visit Community Section";
lang["Loading Engine"] = "Loading Engine";
lang["Loading Interface"] = "Loading Interface";
lang["Loading Gridview"] = "Loading Gridview";
lang["Loading Mail"] = "Loading Mail";
lang["Loading Clothing"] = "Loading Clothing";
lang["Loading Your Inventory"] = "Loading Your Inventory";
lang["Loading Local Language"] = "Loading Local Language";
lang["Preview Postcard"] = "Preview Postcard";
lang["Select a Postcard"] = "Select a Postcard";
lang["Send to"] = "Send To";
lang.Inbox = "Inbox";
lang["You have no postcards"] = "You have no postcards";
lang["You have %number% postcards!"] = "You have %number% postcards!";
lang["You have 1 postcard!"] = "You have 1 postcard!";
lang["You have no postcards!"] = "You have no postcards!";
lang["Are you sure you want to ignore %playername%?"] = "Are you sure you want to ignore %playername%?";
lang["This will remove all messages from %playername%. This is not undoable."] = "This will remove all messages from %playername%. This is not undoable.";
lang.From: = "From:";
lang["New!"] = "New!";
lang.message = "message";
lang["Send this postcard to %0 for %1 coins?"] = "Send this postcard to %0 for %1 coins?";
lang["Loading Your Furniture"] = "Loading Your Furniture";
lang["Stop Edit"] = "Stop Edit";
lang["Edit Igloo"] = "Edit Igloo";
lang["Loading Controls"] = "Loading Controls";
lang["Loading Furniture"] = "Loading Furniture";
lang["Loading Floor"] = "Loading Floor";
lang["Close Igloo"] = "Close Igloo";
lang["Open Igloo"] = "Open Igloo";
lang["Edit Igloo"] = "Edit Igloo";
lang["View Items"] = "View Items";
lang["Buy Items"] = "Buy Items";
lang["Upgrade Igloo"] = "Upgrade Igloo";
lang["Play Music"] = "Play Music";
lang.emote_hint = "Emotes";
lang.action_hint = "Actions";
lang.throw_hint = "Snowball";
lang.buddy_hint = "Show Buddies";
lang.online_hint = "Show Online";
lang.ignore_hint = "Show Ignored";
lang.player_hint = "Edit Player";
lang.home_hint = "Your Home";
lang.help_hint = "Edit Account";
lang.send_hint = "Send";
lang.safe_hint = "Messages";
lang.archives_hint = "Old news";
lang.town_hint = "Town";
lang.coffee_hint = "Coffee Shop";
lang.book_hint = "Book Room";
lang.dance_hint = "Dance Club";
lang.lounge_hint = "Lounge";
lang.shop_hint = "Gift Shop";
lang.village_hint = "Ski Village";
lang.sport_hint = "Sport Shop";
lang.lodge_hint = "Ski Lodge";
lang.attic_hint = "Lodge Attic";
lang.mtn_hint = "Ski Hill";
lang.plaza_hint = "The Plaza";
lang.pet_hint = "Pet Shop";
lang.dojo_hint = "Dojo";
lang.pizza_hint = "Pizza Parlor";
lang.stage_hint = "Stage";
lang.beach_hint = "The Beach";
lang.light_hint = "Lighthouse";
lang.beacon_hint = "Beacon";
lang.ship_hint = "Pirate Ship";
lang.hold_hint = "Hold";
lang.captain_hint = "Captain\'s Quarters";
lang.crowsnest_hint = "Crows Nest";
lang.dock_hint = "The Dock";
lang.forts_hint = "Snow Forts";
lang.rink_hint = "Ice Rink";
lang.boiler_hint = "Boiler Room";
lang.berg_hint = "Ice Berg";
lang.cave_hint = "Cave";
lang.mine_hint = "Mine";
lang.shack_hint = "Mine Shack";
lang.forest_hint = "Forest";
lang.cove_hint = "Cove";
lang.party_hint = "Party";
lang.igloos_hint = "Member Igloos";
lang.aqua_hint = "Aqua Grabber";
lang.astro_hint = "Astro-Barrier";
lang.beans_hint = "Play Beans";
lang.cart_hint = "Cart Surfer";
lang.fish_hint = "Go Fishing";
lang.jetpack_hint = "Play Jet Pack";
lang.thinice_hint = "Thin Ice";
lang.waves_hint = "Go Surfing";
lang.hydro_hint = "Hydro Hopper";
lang.pizzatron_hint = "Play Pizzatron";
lang.roundup_hint = "Puffle Roundup";
lang.mancala_hint = "Play Manacala";
lang.four_hint = "Play Find Four";
lang.sled_hint = "Join Sled Race";
lang.profile_hint = "Find Player";
lang.send_mail_hint = "Send Mail";
lang.free_item_hint = "Free Gift";
lang.report_player_hint = "Report Player";
lang.add_ignore_hint = "Ignore Player";
lang.remove_ignore_hint = "Remove Ignore";
lang.add_buddy_hint = "Add Buddy";
lang.remove_buddy_hint = "Remove Buddy";
lang.visit_home_hint = "Visit Igloo";
lang.ban_player_hint = "Ban Player";
lang.mute_player_hint = "Mute Player";
lang.kick_player_hint = "Kick Player";
lang.remove_hint = "Clear Penguin";
lang.play_puffle_hint = "Play with Pet";
lang.feed_puffle_hint = "Feed your Pet";
lang.rest_puffle_hint = "Sleep";
lang.walk_puffle_hint = "Walk your Pet";
lang.aqua_prompt = "Would you like to play\nAqua Grabber?";
lang.astro_prompt = "Would you like to play\nAstro Barrier?";
lang.beans_prompt = "Would you like to play\nBean Counters?";
lang.jetpack_prompt = "Would you like to go on a\nJet Pack Adventure?";
lang.beans_prompt = "Would you like to play\nBean Counters?";
lang.fish_prompt = "Would you like to go\nIce Fishing?";
lang.hydro_prompt = "Would you like to play\nHydro Hopper?";
lang.roundup_prompt = "Would you like to play\nPuffle Roundup?";
lang.mancala_prompt = "Would you like to join this\nMancala game?";
lang.four_prompt = "Would you like to join this\nFind Four game?";
lang.cart_prompt = "Would you like to go\nCart Surfing?";
lang.thinice_prompt = "Would you like to play\nThin Ice?";
lang.pizzatron_prompt = "Would you like to play\nPizzatron 3000?";
lang.waves_prompt = "Would you like to\ncatch some waves?";
lang.sled_prompt = "Would you like to join this\nSled race?";
lang.book1_prompt = "Would you like to read\nMy Puffle?";
lang.book2_prompt = "Would you like to read\nBurnt Out Bulbs?";
lang.book3_prompt = "Would you like to read\nBurnt Out Bulbs?";
lang.game_over0 = "You have earned 0 coins.\nYou now have %total% coins.";
lang.game_over1 = "You have earned 1 coin.\nYou now have %total% coins.";
lang.game_over2 = "You have earned %num% coins.\nYou now have %total% coins.";
lang.quit_game_prompt = "Are you sure you want to quit this game?";
lang.player_quit_prompt = "%name% has quit the game.";
lang.mission1_prompt = "Would you like to begin\nThe Missing Puffles Mission?";
lang.mission2_prompt = "Would you like to begin\nG\'s Secret Mission?";
lang.mission3_prompt = "Would you like to begin\nCase of the Missing Coins?";
lang.mission4_prompt = "Would you like to begin\nThe Avalanche Rescue?";
lang.mission5_prompt = "Would you like to begin\nThe Secret of the Fur Mission?";
lang.mission6_prompt = "Would you like to begin\nThe Questions for a Crab Mission?";
lang.mission7_prompt = "Would you like to begin\nClockwork Repairs Mission?";
lang.mission8_prompt = "Would you like to begin\nMysterious Tremors Mission?";
lang.aqua_find = "%name% is playing Aqua Grabber";
lang.astro_find = "%name% is playing Astro-Barrier";
lang.beans_find = "%name% is playing Bean Counters";
lang.cart_find = "%name% is Cart Surfing";
lang.fish_find = "%name% is Ice Fishing";
lang.jetpack_find = "%name% is flying a Jet Pack";
lang.thinice_find = "%name% is playing Thin Ice";
lang.waves_find = "%name% is Surfing";
lang.hydro_find = "%name% is playing Hydro Hopper";
lang.pizza_find = "%name% is making pizzas";
lang.roundup_find = "%name% is rounding up puffles";
lang.mancala_find = "%name% is playing Manacala";
lang.four_find = "%name% is playing Find Four";
lang.sled_find = "%name% is in a Sled Race";
lang.book1_find = "%name% is reading a Book";
lang.book2_find = "%name% is reading a Book";
lang.book3_find = "%name% is reading a Book";
lang.mission1_find = "%name% is on an Adventure";
lang.mission2_find = "%name% is on an Adventure";
lang.mission3_find = "%name% is on an Adventure";
lang.mission4_find = "%name% is on an Adventure";
lang.mission5_find = "%name% is on an Adventure";
lang.mission6_find = "%name% is on an Adventure";
lang.mission7_find = "%name% is on an Adventure";
lang.mission8_find = "%name% is on an Adventure";
lang.town_find = "%name% is in the Town";
lang.coffee_find = "%name% is in the Coffee Shop";
lang.book_find = "%name% is in the Book Room";
lang.dance_find = "%name% is in the Dance Club";
lang.lounge_find = "%name% is in the Dance Lounge";
lang.shop_find = "%name% is in the Gift Shop";
lang.village_find = "%name% is in the Ski Village";
lang.lodge_find = "%name% is in the Ski Lodge";
lang.attic_find = "%name% is in the Lodge Attic";
lang.mtn_find = "%name% is on top of the Mountain";
lang.sport_find = "%name% is in the Sport Shop";
lang.plaza_find = "%name% is in the Plaza";
lang.pet_find = "%name% is in the Pet Shop";
lang.dojo_find = "%name% is in the Dojo (hidden on your map)";
lang.pizza_find = "%name% is in the Pizza Parlor";
lang.stage_find = "%name% is at the Stage";
lang.beach_find = "%name% is at the Beach";
lang.light_find = "%name% is in the Lighthouse";
lang.beacon_find = "%name% is at the Lighthouse Beacon";
lang.ship_find = "%name% is on the Pirate Ship";
lang.hold_find = "%name% is in the Pirate Ship Hold";
lang.captain_find = "%name% is in the Captain\'s Quarters";
lang.crowsnest_find = "%name% is in the Crows Nest";
lang.dock_find = "%name% is at the Dock";
lang.forts_find = "%name% is at the Snow Forts";
lang.rink_find = "%name% is at the Ice Rink";
lang.agent_find = "%name% is hiding";
lang.boiler_find = "%name% is in the Boiler Room";
lang.berg_find = "%name% is on the Ice Berg (hidden on your map)";
lang.cave_find = "%name% is in the Cave (hidden underground)";
lang.mine_find = "%name% is in the Mine (hidden underground)";
lang.shack_find = "%name% is in the Mine Shack (hidden on your map)";
lang.forest_find = "%name% is in the Forest";
lang.cove_find = "%name% is at the Cove";
lang.party_find = "%name% is at the Party";
lang.igloo_find = "%name% is in their Igloo";
lang.buddy_request_prompt = "Would you like to add %name%\nto your buddy list?";
lang.buddy_request_sent_prompt = "Request Sent";
lang.buddy_remove_prompt = "Would you like to remove %name% from your buddy list?";
lang.buddy_question_prompt = "%name% has asked to be your buddy. Do you accept?";
lang.buddy_accepted_prompt = "%name% is now your buddy!";
lang.buddy_online = "%name% is online";
lang.ignore_request_prompt = "Would you like to add %name% to your ignore list?";
lang.ignore_request_sent_prompt = "Done";
lang.ignore_remove_prompt = "Would you like to remove %name% from your ignore list?";
lang.remove_done_prompt = "Done";
lang.widget_coins = "Your Coins: %total%";
lang.buy_inventory = "Would you like to buy %name% for %cost% coins.";
lang.buy_furniture = "Would you like to buy %name% for %cost% coins.";
lang.buy_igloo_upgrade = "Would you like to buy %name% for %cost% coins.";
lang.buy_igloo_floor = "Would you like to buy %name% for %cost% coins.";
lang.buy_puffle_food = "Would you like to buy some Pet Food for 10 coins?";
lang.buy_puffle_bath = "Would you like to bath your puffle for 5 coins?";
lang.buy_puffle_gum = "Would you like to buy some Gum for 5 coins?";
lang.buy_puffle_cookie = "Would you like to buy a Cookie for 5 coins?";
lang.buy_inventory_done = "%name% has been\nadded to your inventory.";
lang.buy_furniture_done = "%name% has been\nadded to your inventory.";
lang.num_coins = "You currently have %num% coins.";
lang.inventory_free = "You have found a %name%.\nWould you like to pick it up?";
lang.inventory_medal = "Would you like to get your medal of excellence?";
lang.inventory_gift = "Would you like to get your gift?";
lang.item_in_inventory_warn = "You already have this item.";
lang.tour_guide_hat_required = "Sorry, you must wear the tour guide\nhat to use this feature";
lang.igloo_upgrade_warn = "WARNING\nThis upgrade will replace your current igloo. All of your furniture will be moved to storage. Any floor upgrades will be lost.";
lang.low_coin_warn = "You need more coins.";
lang.duplicate_igloo_warn = "You already have this igloo.";
lang.duplicate_floor_warn = "You already have this flooring.";
lang.adopt_puffle = "Would you like to adopt this puffle for 800 coins?";
lang.name_puffle = "Your puffle needs a name?";
lang.adopt_puffle_done = "Your new puffle is now in your igloo. Enjoy!";
lang.max_puffles_prompt = "Sorry, you may only have a\nmaximum of 14 puffles";
lang.clothing_catalogue = "Loading Clothing Catalog";
lang.costume_catalogue = "Loading Costume Catalog";
lang.sport_catalogue = "Loading Sport Catalog";
lang.hair_catalogue = "Loading Hair Catalog";
lang.fish_catalogue = "Loading FISH Catalog";
lang.pets_catalogue = "Loading Puffle Catalog";
lang.adopt_catalogue = "Loading Puffle Catalog";
lang.pirate_catalogue = "Loading Pirate Catalog";
lang.igloo_catalogue = "Loading Igloo Catalog";
lang.furniture_catalogue = "Loading Furniture Catalog";
lang.load_town = "Loading Town";
lang.load_coffee = "Loading Coffee Shop";
lang.load_book = "Loading Book Room";
lang.load_dance = "Loading Dance Club";
lang.load_lounge = "Loading Dance Lounge";
lang.load_shop = "Loading Gift Shop";
lang.load_village = "Loading Ski Village";
lang.load_lodge = "Loading Ski Lodge";
lang.load_attic = "Loading Lodge Attic";
lang.load_sport = "Loading Sport Shop";
lang.load_mtn = "Loading Mountain";
lang.load_plaza = "Loading the Plaza";
lang.load_pet = "Loading the Pet Shop";
lang.load_dojo = "Loading the Dojo";
lang.load_pizza = "Loading the Pizza Parlor";
lang.load_stage = "Loading the Stage";
lang.load_beach = "Loading Beach";
lang.load_light = "Loading Lighthouse";
lang.load_beacon = "Loading Beacon";
lang.load_ship = "Loading Pirate Ship";
lang.load_hold = "Loading Ship Hold";
lang.load_captain = "Loading Captain\'s Quarters";
lang.load_crowsnest = "Loading Crows Nest";
lang.load_dock = "Loading the Dock";
lang.load_forts = "Loading Snow Forts";
lang.load_rink = "Loading Ice Rink";
lang.load_agent = "Loading HQ";
lang.load_boiler = "Loading Boiler Room";
lang.load_berg = "Loading the Ice Berg";
lang.load_cave = "Loading Cave";
lang.load_mine = "Loading Mine";
lang.load_shack = "Loading Mine Shack";
lang.load_forest = "Loading Forest";
lang.load_cove = "Loading the Cove";
lang.load_party = "Loading the Party";
lang.load_igloo = "Loading the Igloo";
lang.load_mancala = "Loading Mancala";
lang.load_four = "Loading Find Four";
lang.load_aqua = "Loading Aqua Grabber";
lang.load_astro = "Loading Astro-Barrier";
lang.load_beans = "Loading Beans";
lang.load_cart = "Loading Cart Surfer";
lang.load_fish = "Loading Gone Fishing";
lang.load_jetpack = "Loading Jet Pack Adventure";
lang.load_thinice = "Loading Thin Ice";
lang.load_waves = "Loading Catchin Waves";
lang.load_hydro = "Loading Hydro Hopper";
lang.load_pizza = "Loading Pizzatron 3000";
lang.load_roundup = "Loading Puffle Round-up";
lang.load_sled = "Loading Sled Racing";
lang.load_book1 = "Loading Paint by Letters";
lang.load_book2 = "Loading Paint by Letters";
lang.load_book3 = "Loading Paint by Letters";
lang.load_mission1 = "Loading Mission";
lang.load_mission2 = "Loading Mission";
lang.load_mission3 = "Loading Mission";
lang.load_mission4 = "Loading Mission";
lang.load_mission5 = "Loading Mission";
lang.load_mission6 = "Loading Mission";
lang.load_mission7 = "Loading Mission";
lang.load_mission8 = "Loading Mission";
lang.all_items = "All Items";
lang.head_items = "Head Items";
lang.face_items = "Face Items";
lang.neck_items = "Neck Items";
lang.body_items = "Body Items";
lang.hand_items = "Hand Items";
lang.feet_items = "Feet Items";
lang.flag_items = "Pins/Flags";
lang.other_items = "Other Items";
lang.photo_items = "Backgrounds";
lang.award_items = "Awards";
lang.colour_items = "Colors";
lang.map = "Loading Map";
lang.igloo_map = "Loading Igloo Map";
lang.current_news = "Loading Newspaper";
lang.library = "Loading Library";
lang.load_penguin = "Loading Penguin";
lang.page = "Page";
lang.new = "New";
lang.teleport = "Teleport";
lang.visit_hq = "Visit HQ";
lang.energy = "Energy";
lang.health = "Health";
lang.rest = "Rest";
lang.buddy_list = "Your Friends";
lang.online_list = "Users in Room";
lang.ignore_list = "Ignore List";
lang.mod_help = "Moderator";
lang.egg_timer = "Egg Timer";
lang.membership = "Membership";
lang.membership = "Membership";
lang.help = "Help";
lang.agent_form = "Agent Form";
lang.news_form = "Newspaper Form";
lang.tour_form = "Tour Guide Form";
lang.unlock_igloo_prompt = "Would you like to open your igloo?\nThis will add your igloo to the map.";
lang.remove_all_mail_prompt = "This will permanently remove all postcards from %nickname%. Do you want to do this?";
lang.remove_single_mail_prompt = "Are you sure you want to trash this postcard from %nickname%?";
lang.agent_line1 = " ";
lang.agent_line2 = " ";
lang.agent_line3 = " ";
lang.agent_line4 = " ";
lang.map_note = "Click where you want to go.";
lang.town = "Town";
lang.coffee = "Coffee Shop";
lang.book = "Book Room";
lang.dance = "Dance Club";
lang.lounge = "Dance Lounge";
lang.shop = "Gift Shop";
lang.village = "Ski Village";
lang.lodge = "Ski Lodge";
lang.attic = "Lodge Attic";
lang.sport = "Sport Shop";
lang.mtn = "Mountain";
lang.plaza = "The Plaza";
lang.pet = "The Pet Shop";
lang.dojo = "The Dojo";
lang.pizza = "The Pizza Parlor";
lang.stage = "The Stage";
lang.beach = "Beach";
lang.light = "Lighthouse";
lang.beacon = "Beacon";
lang.ship = "Pirate Ship";
lang.hold = "Ship Hold";
lang.captain = "Captain\'s Quarters";
lang.crowsnest = "Crows Nest";
lang.dock = "The Dock";
lang.forts = "Snow Forts";
lang.rink = "Ice Rink";
lang.agent = "HQ";
lang.boiler = "Boiler Room";
lang.berg = "The Ice Berg";
lang.cave = "Cave";
lang.mine = "Mine";
lang.shack = "Mine Shack";
lang.forest = "Forest";
lang.cove = "The Cove";
lang.party = "The Party";
lang.mancala = "Mancala";
lang.four = "Find Four";
lang.aqua = "Aqua Grabber";
lang.astro = "Astro-Barrier";
lang.beans = "Beans";
lang.cart = "Cart Surfer";
lang.fish = "Gone Fishing";
lang.jetpack = "Jet Pack Adventure";
lang.thinice = "Thin Ice";
lang.waves = "Catchin Waves";
lang.hydro = "Hydro Hopper";
lang.pizza = "Pizzatron 3000";
lang.roundup = "Puffle Round-up";
lang.sled = "Sled Racing";
lang.book1 = "Paint by Letters";
lang.book2 = "Paint by Letters";
lang.book3 = "Paint by Letters";
lang.mission1 = "Mission";
lang.mission2 = "Mission";
lang.mission3 = "Mission";
lang.mission4 = "Mission";
lang.mission5 = "Mission";
lang.mission6 = "Mission";
lang.mission7 = "Mission";
lang.mission8 = "Mission";
var quick_messages = new Array("Hello", "Bye", "Yes", "No", "Ok");
error_lang[shell.DEFAULT_ERROR] = "There was an error";
error_lang[shell.TIME_OUT] = "Auto Disconnect, your penguin has been idle for more than 10 minutes";
error_lang[shell.CONNECTION_LOST] = "Connection was lost.\nPlease click to learn more";
error_lang[shell.LOAD_ERROR] = "Load Error\nPlease clear your cache and try again";
error_lang[shell.MULTI_CONNECTIONS] = "Multiple connections detected. Please disconnect old connections";
error_lang[shell.ACCOUNT_NOT_ACTIVATE] = "Your account has not been activated";
error_lang[shell.NO_CONNECTION] = "Game temporarily unavailable. Please try again in 10 minutes";
error_lang[shell.ITEM_IN_HOUSE] = "You already have this item";
error_lang[shell.NOT_ENOUGH_COINS] = "You need more coins";
error_lang[shell.PUFFLE_LIMIT_M] = "Sorry, you may only have a maximum of %number% puffles";
error_lang[shell.PUFFLE_LIMIT_NM] = "Sorry, you must be a member to have more than %number% puffles";
error_lang[shell.NAME_NOT_ALLOWED] = "Sorry, this name is not available. Please try again";
error_lang[shell.MAX_IGLOO_FURNITURE_ERROR] = "Sorry, your igloo may only contain %number% items Please remove an item to add this item";
error_lang[shell.PASSWORD_REQUIRED] = "You must provide your password \nto enter Club Penguin";
error_lang[shell.PASSWORD_SHORT] = "Your password is too short. \nPlease try again";
error_lang[shell.PASSWORD_LONG] = "Your password is too long. \nPlease try again";
error_lang[shell.PASSWORD_WRONG] = "Incorrect Password. \nNOTE: Passwords are CaSe SeNsiTIVE";
error_lang[shell.NAME_REQUIRED] = "You must provide your Penguin Name to enter Club Penguin";
error_lang[shell.NAME_SHORT] = "Your Penguin Name is too short. Please try again";
error_lang[shell.NAME_LONG] = "Your Penguin Name is too long. Please try again";
error_lang[shell.NAME_NOT_FOUND] = "Penguin not found. Try Again?";
error_lang[shell.LOGIN_FAILED] = "Login Failed, please try at a later time";
error_lang[shell.LOGIN_FLOODING_DAILY] = "Maximum login attempts exceeded. Please try again in an hour";
error_lang[shell.LOGIN_FLOODING] = "Maximum login attempts exceeded. Please try again in an hour";
error_lang[shell.PASSWORD_SAVE_PROMPT] = "Do not use this feature if\nyou are using a school, library,\nor public computer.\n\nAnyone that uses this computer will have access to your penguin";
error_lang[shell.SERVER_FULL] = "Sorry this server is full. Please select another server?";
error_lang[shell.ROOM_FULL] = "Sorry this room is currently full";
error_lang[shell.TIME_WARNING] = "You have %number% minutes remaining on the Club Penguin Timer. Have fun!";
error_lang[shell.NO_PLAY_TIME] = "Time\'s up. Thanks for playing! Check out the %0Community%1 section of the website for fun ways to spend your time outside of Club Penguin";
error_lang[shell.PLAY_TIME_OVER] = "Time\'s up. Thanks for playing! Check out the %0Community%1 section of the website for fun ways to spend your time outside of Club Penguin";
error_lang[shell.OUT_PLAY_TIME] = "You can only play between the hours of %0 and %1";
error_lang[shell.GROUNDED] = "You cannot play because you\'re currently grounded.";
error_lang[shell.PLAYER_IN_ROOM] = "Please exit your game before leaving the room";
error_lang[shell.BUDDY_LIMIT] = "Sorry, you may only have %number% buddies. Please remove some buddies to add more";
error_lang[shell.NOT_MEMBER] = "Oops! You need to purchase a membership to buy %type%. We would love to have you join. Click the button below to see more about membership";
error_lang[shell.PUFFLE_MEMBERSHIP] = "Oops! To adopt the %colour% puffle you must purchase a Club Penguin membership. We would love to have you join. Click the button below to see more about membership";
error_lang[shell.KICK] = "A moderator has removed you from this server. Please be careful what you say and do online and remember to follow the Club Penguin rules.";
error_lang[shell.MODERATOR_BAN] = "A moderator has banned your account. Your ban will expire in: %number% hours";
error_lang[shell.GAME_CHEAT] = "Banned:\nThe server has automatically banned your account for hacking. Your penguin will be reviewed by a moderator";
error_lang[shell.AUTO_BAN] = "Banned:\nThe server has automatically banned you for saying a bad word.\nYou Said: \"%badword%\"";
error_lang[shell.BAN_DURATION] = "Banned:\nYou are banned for the next %0 %1";
error_lang[shell.BAN_FOREVER] = "Banned:\nYou are banned forever";
var safe_messages = new Array({id: 1, name: "Hello", menu: [{id: 100, name: "Hi", menu: [{id: 101, name: "Hi There!"}, {id: 102, name: "Hi Everyone"}]}, {id: 110, name: "Howdy", menu: [{id: 111, name: "Howdy Partner"}]}, {id: 120, name: "Greetings", menu: [{id: 121, name: "Greetings Everyone"}, {id: 122, name: "Greetings Earthling"}, {id: 123, name: "Seasons Greetings!"}]}, {id: 130, name: "Welcome", menu: [{id: 131, name: "Welcome to my Igloo"}, {id: 132, name: "Welcome back!"}]}, {id: 140, name: "Hey There!"}, {id: 150, name: "What\'s Up?", menu: [{id: 151, name: "How are you doing?"}, {id: 152, name: "How\'s it going?"}, {id: 153, name: "What\'s new?"}]}, {id: 160, name: "Good Day", menu: [{id: 161, name: "Good Morning"}, {id: 162, name: "Good Afternoon"}, {id: 163, name: "Good Night"}, {id: 164, name: "Good Evening"}]}, {id: 170, name: "Silly", menu: [{id: 171, name: "Hulloo"}, {id: 172, name: "Waz Up!"}, {id: 173, name: "Ahoy!"}]}, {id: 180, name: "Holidays", wide: 2, menu: [{id: 181, name: "Happy New Year!"}, {id: 182, name: "Happy Valentine\'s Day!"}, {id: 183, name: "Happy Easter!"}, {id: 184, name: "Happy Halloween!"}, {id: 185, name: "Happy Thanksgiving!"}, {id: 186, name: "Merry Christmas!"}, {id: 187, name: "Happy Hanukkah!"}, {id: 188, name: "Happy Holidays!"}]}]}, {id: 2, name: "Good-Bye", menu: [{id: 210, name: "Later", menu: [{id: 211, name: "See you tomorrow"}, {id: 212, name: "See you later"}]}, {id: 220, name: "Bye"}, {id: 230, name: "I\'ll be right back"}, {id: 240, name: "I have to go"}, {id: 250, name: "Farewell", menu: [{id: 251, name: "Take care"}, {id: 252, name: "Have a nice day!"}, {id: 253, name: "Good luck!"}, {id: 254, name: "Enjoy!"}, {id: 255, name: "Cheers"}, {id: 256, name: "Ta-ta for now!"}]}, {id: 260, name: "Peace!"}, {id: 270, name: "Silly", wide: 2, menu: [{id: 271, name: "Over and Out!"}, {id: 272, name: "Happy Trails!"}, {id: 273, name: "Live long and prosper"}, {id: 274, name: "May the force be with you"}, {id: 275, name: "Hasta la vista, baby"}, {id: 277, name: "Beam me up!"}, {id: 278, name: "Game Over"}]}]}, {id: 3, name: "Friend", menu: [{id: 300, name: "Wanna be friends?"}, {id: 310, name: "Follow me", menu: [{id: 311, name: "Come to my igloo"}, {id: 312, name: "Party at my place!"}]}, {id: 330, name: "Thank-you", menu: [{id: 331, name: "Thanks for playing"}, {id: 332, name: "Thanks for visiting"}, {id: 333, name: "No, Thank-you"}]}, {id: 340, name: "No Problem"}, {id: 350, name: "You are ...", menu: [{id: 351, name: "You are Great!"}, {id: 352, name: "You are Cool!"}, {id: 353, name: "You are Funny!"}, {id: 354, name: "You are Silly!"}, {id: 355, name: "You are Awesome!"}, {id: 356, name: "You are a good friend!"}]}, {id: 360, name: "Igloo", menu: [{id: 361, name: "Cool igloo!"}, {id: 362, name: "Great decorating!"}, {id: 363, name: "Awesome design"}, {id: 364, name: "I like your igloo"}, {id: 365, name: "Great party!"}]}, {id: 370, name: "Sorry", menu: [{id: 371, name: "Sorry, I am busy"}, {id: 372, name: "Sorry, I need to go"}, {id: 373, name: "Please forgive me"}, {id: 374, name: "I forgive you"}]}]}, {id: 4, name: "Questions", menu: [{id: 400, name: "What?", wide: 2, menu: [{id: 401, name: "What is your favorite Animal?"}, {id: 402, name: "What is your favorite Game?"}, {id: 403, name: "What is your favorite Sport?"}, {id: 405, name: "What is your favorite Music?"}, {id: 407, name: "What are your hobbies?"}]}, {id: 410, name: "Where?", wide: 2, menu: [{id: 412, name: "Where do you want to go?"}, {id: 413, name: "Where are you going?"}, {id: 414, name: "Where did you find that?"}, {id: 415, name: "Where did you find that pin?"}]}, {id: 420, name: "When?", wide: 2, menu: [{id: 421, name: "When is your party?"}]}, {id: 430, name: "How are you today?"}, {id: 450, name: "Can I have a tour?"}]}, {id: 5, name: "Answers", menu: [{id: 10000, name: "Animals", menu: [{id: 10100, name: "Cats", menu: [{id: 10101, name: "Lion"}, {id: 10102, name: "Tiger"}, {id: 10103, name: "Leopard"}, {id: 10104, name: "Cheetah"}]}, {id: 10200, name: "Dogs", menu: [{id: 10201, name: "Beagle"}, {id: 10202, name: "Collie"}, {id: 10203, name: "Dalmatian"}, {id: 10204, name: "Poodle"}, {id: 10205, name: "Spaniel"}, {id: 10206, name: "Shepherd"}, {id: 10207, name: "Terrier"}, {id: 10208, name: "Retriever"}, {id: 10209, name: "Wolf"}]}, {id: 10300, name: "Horses"}, {id: 10400, name: "Reptiles", menu: [{id: 10410, name: "Lizard"}, {id: 10420, name: "Turtle"}, {id: 10430, name: "Snake"}]}, {id: 10500, name: "Hamster"}, {id: 10600, name: "Monkey"}, {id: 10700, name: "Bears"}, {id: 10800, name: "Fish", menu: [{id: 10810, name: "Goldfish"}]}, {id: 10900, name: "Birds", menu: [{id: 10901, name: "Penguin"}]}, {id: 11000, name: "Elephants"}, {id: 12000, name: "Puffles", wide: 2, menu: [{id: 12001, name: "Cute puffles"}, {id: 12002, name: "Cool puffles"}, {id: 12003, name: "Your puffles are hungry"}, {id: 12004, name: "Let\'s walk our puffles"}]}]}, {id: 50000, name: "Games", menu: [{id: 51100, name: "Astro Barrier"}, {id: 51150, name: "Aqua Grabber"}, {id: 51300, name: "Bean Counters"}, {id: 51320, name: "Cart Surfer"}, {id: 51321, name: "Catchin Waves"}, {id: 51330, name: "Find Four"}, {id: 51200, name: "Hydro-Hopper"}, {id: 51350, name: "Ice Fishing"}, {id: 51360, name: "Jet Pack Adventure"}, {id: 51400, name: "Mancala"}]}, {id: 52000, name: "More Games", menu: [{id: 51420, name: "Paint By Letters"}, {id: 51450, name: "Pizzatron 3000"}, {id: 51500, name: "Sled Racing"}, {id: 51600, name: "Puffle Round-Up"}, {id: 51700, name: "Thin Ice"}, {id: 51750, name: "Treasure Hunt"}]}, {id: 20000, name: "Sports", menu: [{id: 20100, name: "Hockey"}, {id: 20200, name: "Baseball"}, {id: 20300, name: "Basketball"}, {id: 20400, name: "Football"}, {id: 20500, name: "Soccer"}, {id: 20600, name: "Volleyball"}, {id: 20700, name: "Watersports", menu: [{id: 20710, name: "Water Ski"}, {id: 20720, name: "Wakeboard"}, {id: 20730, name: "Ski Biscuit"}, {id: 20740, name: "Swimming"}]}, {id: 20800, name: "Winter Sports", menu: [{id: 20810, name: "Skiing", menu: [{id: 20811, name: "Cross Country"}, {id: 20812, name: "Downhill"}]}, {id: 20820, name: "Sledding"}, {id: 20830, name: "Snowboard"}, {id: 20840, name: "Skating"}]}, {id: 20900, name: "Adventure", menu: [{id: 20910, name: "Hiking"}, {id: 20920, name: "Rock Climbing"}, {id: 20930, name: "Fishing"}]}]}, {id: 40000, name: "Music", menu: [{id: 41000, name: "Country"}, {id: 42000, name: "Jazz"}, {id: 43000, name: "Rap"}, {id: 44000, name: "Hip-Hop"}, {id: 45000, name: "Classical"}, {id: 46000, name: "Pop"}, {id: 47000, name: "Rock"}, {id: 48000, name: "Techno"}]}, {id: 60000, name: "Hobbies", menu: [{id: 61000, name: "Reading", menu: [{id: 61100, name: "Fiction Books"}, {id: 61200, name: "Non-Fiction Books"}, {id: 61300, name: "Comics"}, {id: 61400, name: "Magazines"}]}, {id: 62000, name: "The Internet"}, {id: 63000, name: "Dance", menu: [{id: 63100, name: "Ballet"}, {id: 63200, name: "Tap Dance"}, {id: 63300, name: "Jazz Dance"}, {id: 63400, name: "Hip Hop Dance"}, {id: 63500, name: "Modern Dance"}]}, {id: 64000, name: "Gymnastics"}, {id: 65000, name: "Martial Arts", menu: [{id: 65100, name: "Karate"}, {id: 65200, name: "Judo"}, {id: 65300, name: "Tae Kwon Do"}]}, {id: 66000, name: "Listening to music"}, {id: 67000, name: "Music Lessons", menu: [{id: 67100, name: "Playing Piano"}, {id: 67200, name: "Playing Guitar"}, {id: 67300, name: "Playing the Drums"}]}, {id: 68000, name: "Arts and Crafts"}, {id: 69000, name: "Hanging Out"}]}, {id: 80000, name: "Location", menu: [{id: 81000, name: "USA"}, {id: 82000, name: "Canada"}, {id: 82100, name: "Mexico"}, {id: 82200, name: "Central America"}, {id: 83000, name: "Europe", menu: [{id: 83010, name: "Great Britain", menu: [{id: 83011, name: "England"}, {id: 83012, name: "Scotland"}, {id: 83013, name: "Wales"}, {id: 83014, name: "Northern Ireland"}]}, {id: 83020, name: "France"}, {id: 83030, name: "Germany"}, {id: 83040, name: "Spain"}, {id: 83050, name: "Italy"}, {id: 83060, name: "Poland"}, {id: 83070, name: "Switzerland"}, {id: 83080, name: "Greece"}]}, {id: 84000, name: "Asia", menu: [{id: 84010, name: "China"}, {id: 84020, name: "India"}, {id: 84030, name: "Indonesia"}, {id: 84040, name: "Japan"}, {id: 84050, name: "Russia"}]}, {id: 85000, name: "Australia", menu: [{id: 85010, name: "New South Wales"}, {id: 85020, name: "Northern Territory"}, {id: 85030, name: "Queensland"}, {id: 85040, name: "South Australia"}, {id: 85050, name: "Tasmania"}, {id: 85060, name: "Victoria"}, {id: 85070, name: "Western Australia"}]}, {id: 86000, name: "Africa"}, {id: 87000, name: "Middle East"}, {id: 88000, name: "South America", menu: [{id: 88010, name: "Argentina"}, {id: 88020, name: "Brazil"}]}, {id: 89000, name: "Club Penguin", menu: [{id: 89010, name: "Town Center", menu: [{id: 89011, name: "Coffee Shop"}, {id: 89012, name: "Book Room"}, {id: 89013, name: "Night Club"}, {id: 89014, name: "Lounge"}, {id: 89015, name: "Gift Shop"}, {id: 89016, name: "Boiler Room"}]}, {id: 89020, name: "Ski Village", menu: [{id: 89021, name: "Sport Shop"}, {id: 89022, name: "Ski Lodge"}, {id: 89023, name: "Lodge Attic"}, {id: 89024, name: "Ski Hill"}]}, {id: 89030, name: "The Plaza", menu: [{id: 89031, name: "Pet Shop"}, {id: 89033, name: "The Stage"}, {id: 89032, name: "Pizza Parlor"}, {id: 89034, name: "The Forest"}, {id: 89035, name: "The Cove"}]}, {id: 89040, name: "The Beach", menu: [{id: 89041, name: "The Lighthouse"}, {id: 89042, name: "Beacon"}, {id: 89043, name: "The Migrator"}]}, {id: 89050, name: "Underground", menu: [{id: 89051, name: "The Pool"}, {id: 89052, name: "The Mine"}]}, {id: 89080, name: "Other", menu: [{id: 89081, name: "Dock"}, {id: 89082, name: "Snow Forts"}, {id: 89083, name: "Ice Rink"}, {id: 89084, name: "Iceberg"}, {id: 89085, name: "Mine Shack"}]}, {id: 89086, name: "Your igloo"}, {id: 89087, name: "My igloo"}]}]}, {id: 70000, name: "Age", menu: [{id: 70100, name: "Rugrat"}, {id: 70200, name: "Kid"}, {id: 70300, name: "Tween"}, {id: 70400, name: "Teen"}, {id: 70500, name: "Twenty"}, {id: 70600, name: "Old"}]}, {id: 90000, name: "Mood", menu: [{id: 90100, name: "Good"}, {id: 90200, name: "Great!"}, {id: 90300, name: "All right"}, {id: 90400, name: "Not bad"}]}, {id: 99998, name: "Boy"}, {id: 99999, name: "Girl"}]}, {id: 6, name: "Game", action: "game", wide: 2, menu: [{id: 600, name: "Want to play a game?"}, {id: 601, name: "Want to play Sled Racing?"}, {id: 602, name: "Want to play Mancala?"}, {id: 603, name: "Want to play Find Four?"}, {id: 620, name: "Good Game!"}, {id: 630, name: "Good Move!"}, {id: 640, name: "Play Again?"}, {id: 650, name: "Tag!", menu: [{id: 651, name: "Tag, you\'re it!"}, {id: 652, name: "You\'re it!"}]}, {id: 660, name: "Hide and Seek", menu: [{id: 661, name: "I found you!"}, {id: 662, name: "Ready or not, here I come!"}]}]}, {id: 7, name: "Activities", menu: [{id: 701, name: "Tell a Joke", action: "joke"}, {id: 702, name: "Give a Tour", action: "tour"}, {id: 710, name: "Event", menu: [{id: 711, name: "Party", wide: 2, menu: [{id: 712, name: "Party at my igloo"}]}, {id: 716, name: "Fashion show", wide: 2, menu: [{id: 717, name: "Fashion show at my igloo"}]}, {id: 721, name: "Auditions", wide: 2, menu: [{id: 722, name: "Auditions at my igloo"}]}, {id: 726, name: "Concert", wide: 2, menu: [{id: 727, name: "Concert at my igloo"}]}, {id: 731, name: "Practice", wide: 2, menu: [{id: 732, name: "Practice at my igloo"}]}, {id: 736, name: "Contest", wide: 2, menu: [{id: 737, name: "Contest at my igloo"}]}]}, {id: 750, name: "Time", menu: [{id: 751, name: "In 5 minutes"}, {id: 752, name: "In 10 minutes"}, {id: 753, name: "In 15 minutes"}, {id: 754, name: "In 30 minutes"}, {id: 755, name: "In an hour"}, {id: 756, name: "Today"}, {id: 757, name: "Tomorrow"}, {id: 758, name: "Yesterday"}, {id: 759, name: "Clock", menu: [{id: 75900, name: "12:00", menu: [{id: 75901, name: "12:15"}, {id: 75902, name: "12:30"}, {id: 75903, name: "12:45"}]}, {id: 75910, name: "1:00", menu: [{id: 75911, name: "1:15"}, {id: 75912, name: "1:30"}, {id: 75913, name: "1:45"}]}, {id: 75920, name: "2:00", menu: [{id: 75921, name: "2:15"}, {id: 75922, name: "2:30"}, {id: 75923, name: "2:45"}]}, {id: 75930, name: "3:00", menu: [{id: 75931, name: "3:15"}, {id: 75932, name: "3:30"}, {id: 75933, name: "3:45"}]}, {id: 75940, name: "4:00", menu: [{id: 75941, name: "4:15"}, {id: 75942, name: "4:30"}, {id: 75943, name: "4:45"}]}, {id: 75950, name: "5:00", menu: [{id: 75951, name: "5:15"}, {id: 75952, name: "5:30"}, {id: 75953, name: "5:45"}]}, {id: 75960, name: "6:00", menu: [{id: 75961, name: "6:15"}, {id: 75962, name: "6:30"}, {id: 75963, name: "6:45"}]}, {id: 75970, name: "7:00", menu: [{id: 75971, name: "7:15"}, {id: 75972, name: "7:30"}, {id: 75973, name: "7:45"}]}, {id: 75980, name: "8:00", menu: [{id: 75981, name: "8:15"}, {id: 75982, name: "8:30"}, {id: 75983, name: "8:45"}]}, {id: 75990, name: "9:00", menu: [{id: 75991, name: "9:15"}, {id: 75992, name: "9:30"}, {id: 75993, name: "9:45"}]}, {id: 76000, name: "10:00", menu: [{id: 76001, name: "10:15"}, {id: 76002, name: "10:30"}, {id: 76003, name: "10:45"}]}, {id: 76100, name: "11:00", menu: [{id: 76101, name: "11:15"}, {id: 76102, name: "11:30"}, {id: 76103, name: "11:45"}]}]}]}, {id: 790, name: "Days of the week", menu: [{id: 791, name: "Monday"}, {id: 792, name: "Tuesday"}, {id: 793, name: "Wednesday"}, {id: 794, name: "Thursday"}, {id: 795, name: "Friday"}, {id: 796, name: "Saturday"}, {id: 797, name: "Sunday"}]}]}, {id: 8, name: "Grub!", menu: [{id: 801, name: "That was not nice"}, {id: 802, name: "Please go away"}, {id: 803, name: "Stop That!"}, {id: 804, name: "Nevermind"}, {id: 805, name: "Aaaaaah!"}, {id: 806, name: "Shiver me timbers"}]}, {id: 10, name: "Hurray!", menu: [{id: 851, name: "Woo hoo!"}, {id: 852, name: "All right!"}, {id: 853, name: "Yay!"}]}, {id: 20, name: "Yes"}, {id: 21, name: "No"}, {id: 22, name: "Ok"});
var treveresed_safe_message_obj = new Object();
treverseMessages(safe_messages);
var script_messages = new Array({name: "Reporter:", message: "Action news live! Tell us what\'s happening!"}, {name: "Witness:", message: "I saw a monster eat the pet shop!"}, {name: "Squidzoid:", message: "GRAWL! I HUNGRY!"}, {name: "Witness:", message: "Who can save us now?"}, {name: "Shadow Guy:", message: "The city needs our help!"}, {name: "Gammma Gal:", message: "Super costume mega transform!"}, {note: "(Heroes change into super suits)"}, {name: "Witness:", message: "Look! The heroes have arrived!"}, {name: "Reporter:", message: "Here they come to save the day!"}, {name: "SG:", message: "Freeze Squidzoid! Drop that shop!"}, {name: "GG:", message: "I think you\'ve had enough to eat!"}, {name: "Squidzoid:", message: "BLARRG! YOU CAN\'T STOP ME!"}, {name: "GG:", message: "Oh yeah? Take this! PLASMA GLOW WAVE!"}, {name: "Squidzoid:", message: "RROOOOAAAARR!"}, {name: "Reporter:", message: "The superheroes are using their powers!"}, {name: "Witness:", message: "Hurray heroes! Nice going!"}, {name: "Squidzoid:", message: "PUNY HEROES! YOU\'RE NO MATCH FOR ME!"}, {name: "SG:", message: "Then try this on for size! SHADOW WAVE!"}, {name: "Squidzoid:", message: "GLEEGRRAUWLL!"}, {name: "Reporter:", message: "This just in! Squidzoid is trying to escape!"}, {name: "Witness:", message: "After it! Don\'t let it get away!"}, {name: "GG:", message: "Quick! With our powers combined!"}, {name: "SG:", message: "For great justice!"}, {name: "Squidzoid:", message: "NO! THIS IS IMPOSSIBLE! GRRAAA!"}, {name: "Witness:", message: "It\'s turning into a penguin!"}, {note: "(Squidzoid turns into a penguin)"}, {name: "Squidzoid:", message: "Hey, I\'m a penguin again. What happened?"}, {name: "Reporter:", message: "You turned into Squidzoid!"}, {name: "Witness:", message: "And started eating the city!"}, {name: "Squidzoid:", message: "Oh! I had a monster appetite!"}, {name: "SG:", message: "With great power comes great hunger."}, {name: "GG:", message: "Looks like our work here is done!"}, {name: "Squidzoid:", message: "Let\'s go get a fish pizza."}, {name: "Reporter:", message: "The city is saved! This reporter is signing off."}, {note: "THE END"}, {name: "Director:", message: "Places everyone!"}, {name: "Director:", message: "Take it again from the top!"}, {name: "Director:", message: "Excellent work, team. Keep it up!"}, {name: "Director:", message: "That\'s a wrap!"}, {name: "Director:", message: "Take a bow everyone!"});
var tour_guide_messages = new Object();
tour_guide_messages[100] = "Welcome to the Town Center!|This is often the first place you visit.|If Club Penguin is having a party...|...this room is usually well decorated for it.";
tour_guide_messages[110] = "This is the Coffee Shop.|It is one of Club Penguins oldest rooms.|If you go to the bag of beans in the corner...|...you can play the game Bean Counters.";
tour_guide_messages[111] = "Here is the Book Room.|You can read books from the bookshelf here.|You can also play a game called Mancala.|It is a fun game, but difficult to learn.|Read How to Play Mancala before playing...|then play a few games to learn how it works.";
tour_guide_messages[120] = "This is the main floor of the Night Club.|It is called the Dance Club.|The Dance Club is often decorated for parties.";
tour_guide_messages[121] = "This is the second floor of the Night Club.|It is called the Lounge.|It is a great place to rest after dancing.|Also, fun arcade games are found here.";
tour_guide_messages[130] = "This is the Gift Shop.|You can buy clothes from the monthly catalog.|Colors and backgrounds can be bought as well.|Use coins you have earned from playing games.";
tour_guide_messages[200] = "This is the Ski Village.|We are at the base of the Ski Mountain.|To the right are the Ski Lodge and Sports Shop.|If you need help getting around Club Penguin...|...you can take a tour from here!";
tour_guide_messages[210] = "Welcome to the Sports Shop.|Here, you can buy all sorts of sports equipment.";
tour_guide_messages[220] = "The Ski Lodge is a great place to warm up.|Or, you can play Find Four with friends.|You can also go Ice Fishing out the back door.";
tour_guide_messages[221] = "This is the Lodge Attic.|It has been used to store just about anything!|It also has more Find Four tables.";
tour_guide_messages[230] = "Welcome to the Ski Mountain!|This is the place to be if you like to sled.|Sled Racing is very popular.|The easiest course is the Bunny Hill.|The hardest is the Ridge Run.";
tour_guide_messages[300] = "Welcome to the Plaza!|This is one of the most popular places to be.|From here, you can visit the Pizza Parlor...|...watch a show at the Stage...|...or you can adopt a puffle at the Pet Shop.|Also, if you walk to the manhole cover...|...it will take you to underground rooms.";
tour_guide_messages[310] = "The Pet Shop is where you can adopt a puffle.|Puffles are animals native to Club Penguin.|They have different colors and personalities.|They all like penguins, and make great pets.";
tour_guide_messages[320] = "The Dojo is a Club Penguin secret room.|High in the mountains it is the perfect place...|...for penguins to hide out for a while.";
tour_guide_messages[330] = "This is the Pizza Parlor.|Come here to order the best pizza.|If you go into the kitchen...|...you can help make pizzas with the Pizzatron.";
tour_guide_messages[340] = "Welcome, ladies and gentlemen, to the Stage!|You can watch a play...|...or jump on stage and act with your friends!";
tour_guide_messages[400] = "This is the Beach, home of the Lighthouse.|It is a great place to relax in the sun.|Sometimes you see the pirate ship docked here!";
tour_guide_messages[410] = "This is the Lighthouse.|It is the tallest building in Club Penguin.|It was an empty building for a long time...|...but penguins helped restore it.|Take a look at the pictures on the wall...|...or watch performances on the band stage.";
tour_guide_messages[411] = "The Beacon holds the Lighthouse spotlight...|...and a telescope that you can look through.|And if you thought penguins could not fly...|...you should try the Jetpack game on the right.";
tour_guide_messages[420] = "This is the pirate ship, the Migrator. Arrrr!|Rockhopper sails the seas in this ship.";
tour_guide_messages[421] = "Here is the ship\'s cargo hold.|This is where Rockhopper sells his rare items.";
tour_guide_messages[422] = "This is the Captain\'s Quarters!|Rockhopper spends a lot of time here.|Look at the corkboard for his photos!|Or, grab a friend and hunt for some treasure!";
tour_guide_messages[423] = "Welcome to the Crow\'s Nest!.|What a beautiful view!";
tour_guide_messages[800] = "Welcome to the Dock.|You can play Hydro-Hopper here.|Take a ride on a tube behind the speedboat.";
tour_guide_messages[801] = "These Snow Forts are fun for snowball fights.|Click the snowball icon to throw one.|Over there is the Club Penguin clock.|It shows the time in the Club Penguin Time Zone.";
tour_guide_messages[802] = "Here is the Ice Rink! Lets play some hockey!|Walk over to the puck to shoot it.|If you score a goal, puck returns to center.|It is a great team game to play.";
tour_guide_messages[803] = "This room... is classified.|I can not tell you what goes on here.|Oh, wait, we are all agents here.|This room is the Agent Headquarters.|You can get here through the Sports Shop.|Or, you can just use your spy phone.|Click a TV to go somewhere.";
tour_guide_messages[804] = "This is the Boiler Room.|It gives electricity and heat to Club Penguin.|Here you can read old editions of the newspaper.|It is a great way to learn about Club Penguin.";
tour_guide_messages[805] = "This is the Iceberg. It is a secret room.|In the distance you can see Club Penguin.|If you want to dive into the ocean depths...|...try out the Aqua Grabber!";
tour_guide_messages[806] = "Here we have the Cave, which has its own pool.|It also has windows to see underwater.|Wait a moment, and a crab may walk by.";
tour_guide_messages[807] = "This is the Mine Shack.|Finish a game of Cart Surfer, and you come here.|It can be found by clicking on the world map.|No one knows who built the Mine Shack.";
tour_guide_messages[808] = "This is the Mine of Club Penguin.|Here, you can play Cart Surfer.|Many penguins like Cart Surfer for earning coins.";
tour_guide_messages[809] = "Welcome to the Forest.|It is a great place to get back to nature.|It is also a wonderful camping spot.|Go to the Cove by walking down those stairs.";
tour_guide_messages[810] = "This is the Cove!|It is a wonderful, secluded spot.|You can go swimming in the shallow water here.|Or, test your surf skill and catch some waves!";
tour_guide_messages[899] = "Welcome to the Treetop Fort!|This fort was added just for the party.|Some puffles have already found their way up.";
var jokes = new Array("What\'s the best way to catch a fish?|Have someone throw it at you", "What bird can write underwater?|A ball point PENguin!", "What´s black and white and goes round and round?|A penguin in a revolving door", "Why don´t you see Penguins in Britain?|Because they´re afraid of Wales", "What do you call a penguin in the desert?|Lost", "Why are penguins so popular on the Internet?|Because they have Web feet!", "How does a penguin build its house?|Igloos it together", "Why are igloos round?|So that penguins can\'t hide in the corners", "What is a penguin\'s favourite party game?|Sardines", "How do you communicate with a fish?|You drop him a line", "What do Penguins sing on a birthday?|Freeze a jolly good fellow", "Why is it so easy to weigh fish?|They have their own scales", "What lies at the bottom of the sea and shakes?|A nervous wreck!", "Why do penguins eat fish?|Because donuts get soggy before they can catch them", "What do you call a fish with no eyes?|FSH");
var news_crumbs = new Array();
news_crumbs[0] = {issue: "Issue:144", date: "July 17, 2008", title: "Superheroes Return!"};
news_crumbs[1] = {issue: "Issue:143", date: "July 10, 2008", title: "See the Penguin Band"};
news_crumbs[2] = {issue: "Issue:142", date: "July 3, 2008", title: "Captain Comes Back!"};
news_crumbs[3] = {issue: "Issue:141", date: "June 26, 2008", title: "Tremors Shake Up Town Center"};
news_crumbs[4] = {issue: "Issue:140", date: "June 19, 2008", title: "Water Party Review"};
news_crumbs[5] = {issue: "Issue:139", date: "June 12, 2008", title: "Water Party Starts June 13"};
var category_01 = new Object();
category_01[12] = {subject: "Welcome", in_catalog: true};
category_01[32] = {subject: "Terrific Friend", in_catalog: true};
category_01[46] = {subject: "Aloha", in_catalog: true};
category_01[56] = {subject: "Hey There", in_catalog: true};
category_01[57] = {subject: "Be My Buddy", in_catalog: true};
category_01[62] = {subject: "Let\'s Hang Out", in_catalog: true};
var category_02 = new Object();
category_02[43] = {subject: "Happy Puffles", in_catalog: true};
category_02[44] = {subject: "Best Friends", in_catalog: true};
category_02[45] = {subject: "Cool Puffles", in_catalog: true};
var category_03 = new Object();
category_03[17] = {subject: "Cool Igloo", in_catalog: true};
category_03[61] = {subject: "Igloo Party", in_catalog: true};
var category_04 = new Object();
category_04[19] = {subject: "Good Game", in_catalog: true};
category_04[39] = {subject: "Sled Race", in_catalog: true};
category_04[51] = {subject: "Jet Pack", in_catalog: true};
category_04[58] = {subject: "Cart Surfer", in_catalog: true};
category_04[59] = {subject: "Find Four", in_catalog: true};
category_04[60] = {subject: "Ice Hockey", in_catalog: true};
var category_05 = new Object();
category_05[4] = {subject: "Coffee Shop", in_catalog: true};
category_05[5] = {subject: "Pizza Parlor", in_catalog: true};
category_05[14] = {subject: "Beach", in_catalog: true};
category_05[16] = {subject: "Ice Rink", in_catalog: true};
category_05[20] = {subject: "Snow Forts", in_catalog: true};
category_05[21] = {subject: "Pool", in_catalog: true};
category_05[52] = {subject: "Ski Hill", in_catalog: true};
category_05[54] = {subject: "Stage", in_catalog: true};
category_05[55] = {subject: "Dojo", in_catalog: true};
category_05[63] = {subject: "Night Club", in_catalog: true};
category_05[64] = {subject: "Dropping By", in_catalog: true};
var category_06 = new Object();
category_06[100] = {subject: "Blue Ran", in_catalog: false};
category_06[101] = {subject: "Pink Ran", in_catalog: false};
category_06[102] = {subject: "Black Ran", in_catalog: false};
category_06[103] = {subject: "Green Ran", in_catalog: false};
category_06[104] = {subject: "Purple Ran", in_catalog: false};
category_06[105] = {subject: "Red Ran", in_catalog: false};
category_06[106] = {subject: "Yellow Ran", in_catalog: false};
category_06[110] = {subject: "Hungry Puffle", in_catalog: false};
category_06[111] = {subject: "Adopted Puffle", in_catalog: false};
category_06[120] = {subject: "Penguin Mail", in_catalog: false};
category_06[121] = {subject: "Enjoy Membership", in_catalog: false};
category_06[122] = {subject: "Membership Expires in 7", in_catalog: false};
category_06[123] = {subject: "Membership Expires in 2", in_catalog: false};
category_06[124] = {subject: "Membership Expired", in_catalog: false};
category_06[126] = {subject: "Welcome to CP", in_catalog: false};
category_06[127] = {subject: "Congrats Agent", in_catalog: false};
category_06[128] = {subject: "Thanks CPIP", in_catalog: false};
var pc_crumbs = new Object();
pc_crumbs.Friendship = category_01;
pc_crumbs.Puffles = category_02;
pc_crumbs.Party = category_03;
pc_crumbs.Games = category_04;
pc_crumbs.Rooms = category_05;
pc_crumbs["From us"] = category_06;
// Action script...
// [Action in Frame 1]
function checkDomain()
{
var _loc3 = this._url.toLowerCase();
var _loc5 = "clubpenguin.com";
var _loc4 = false;
if (_loc3.substr(0, 4) == "http")
{
var _loc6 = new Array();
_loc6 = _loc3.split("/");
if (_loc6[2].substr(-_loc5.length) == _loc5)
{
_loc4 = true;
} // end if
} // end if
if (!_loc4)
{
_root.loadMovie();
} // end if
} // End of the function
function getPlayerId()
{
return (shell.getMyPlayerId());
} // End of the function
function getPlayerNickname()
{
return (shell.getMyPlayerNickname());
} // End of the function
function getCoins()
{
return (shell.getMyPlayerTotalCoins());
} // End of the function
function isMember()
{
return (shell.isMyPlayerMember());
} // End of the function
function isModerator()
{
return (is_moderator);
} // End of the function
function isSafeMode()
{
return (shell.isMyPlayerSafeMode());
} // End of the function
function isSecretAgent()
{
return (shell.isMyPlayerSecretAgent());
} // End of the function
function isTourGuide()
{
return (shell.isMyPlayerTourGuide());
} // End of the function
function isItemInInventory(item_id)
{
return (shell.isItemInMyInventory(item_id));
} // End of the function
function isEggTimerActive()
{
return (shell.isEggTimerActive());
} // End of the function
function getEggTimerMinutesRemaining()
{
return (shell.getEggTimerMinutesRemaining());
} // End of the function
function getPlayerObject(player_id)
{
return (shell.getPlayerObjectById(player_id));
} // End of the function
function getPlayerRelationship(player_id)
{
if (isLocalPlayer(player_id))
{
return ("Player");
}
else if (isBuddy(player_id))
{
if (isBuddyOnline(player_id))
{
return ("Online");
}
else
{
return ("Offline");
} // end else if
}
else if (isIgnored(player_id))
{
return ("Ignore");
}
else
{
return ("None");
} // end else if
} // End of the function
function isLocalPlayer(player_id)
{
return (shell.isMyPlayer(player_id));
} // End of the function
function isBuddy(player_id)
{
return (shell.isPlayerBuddyById(player_id));
} // End of the function
function isBuddyOnline(player_id)
{
return (shell.isBuddyOnlineById(player_id));
} // End of the function
function isIgnored(player_id)
{
return (shell.isPlayerIgnoredById(player_id));
} // End of the function
function getBuddyList()
{
var _loc2 = shell.getSortedBuddyList();
var _loc1 = 0;
var _loc3 = _loc2.length;
while (_loc1 < _loc3)
{
_loc2[_loc1].is_buddy = true;
_loc2[_loc1].is_ignored = false;
++_loc1;
} // end while
return (_loc2);
} // End of the function
function getIgnoreList()
{
var _loc2 = shell.getSortedIgnoreList();
var _loc1 = 0;
var _loc3 = _loc2.length;
while (_loc1 < _loc3)
{
_loc2[_loc1].is_buddy = false;
_loc2[_loc1].is_ignored = true;
_loc2[_loc1].is_online = true;
++_loc1;
} // end while
return (_loc2);
} // End of the function
function getPlayerList()
{
var _loc2 = shell.getSortedPlayerList();
var _loc1 = 0;
var _loc3 = _loc2.length;
while (_loc1 < _loc3)
{
_loc2[_loc1].is_online = true;
++_loc1;
} // end while
return (_loc2);
} // End of the function
function getItemList()
{
return (shell.getMyInventoryArray());
} // End of the function
function handleJoinRoom()
{
closeInterface();
} // End of the function
function getLocalizedString(message)
{
return (shell.getLocalizedString(message));
} // End of the function
function isInventoryEmptyByType(type)
{
var _loc1 = getItemList();
if (type == "ALL" && _loc1.length > 0)
{
return (false);
}
else
{
for (var _loc3 in _loc1)
{
if (_loc1[_loc3].type == shell[type])
{
return (false);
} // end if
} // end of for...in
} // end else if
return (true);
} // End of the function
function showItemGridview(type, clickFunction)
{
var _loc1 = getItemList();
var _loc5 = getFilePath("clothing_icons");
var _loc2 = new Array();
if (type != "ALL")
{
for (var _loc4 in _loc1)
{
if (_loc1[_loc4].type == shell[type])
{
_loc2.push(_loc1[_loc4]);
} // end if
} // end of for...in
}
else
{
_loc2 = _loc1;
} // end else if
if (_loc2.length > 0)
{
shell.gotoState(shell.EDIT_STATE);
_loc2.sortOn("id", Array.NUMERIC);
shell.startGridview(_loc2, _loc5, clickFunction, {on_close: closeItemGridView});
} // end if
} // End of the function
function closeItemGridView()
{
shell.gotoState(shell.PLAY_STATE);
closeWindow();
} // End of the function
function getInventoryObjectById(item_id)
{
return (shell.getInventoryObjectById(item_id));
} // End of the function
function getColourHex(colour_id)
{
return (shell.getPlayerHexFromId(colour_id));
} // End of the function
function getLog()
{
return (shell.getChatLog());
} // End of the function
function getRoomObject()
{
return (shell.getRoomObject());
} // End of the function
function getFilePath(name)
{
return (shell.getPath(name));
} // End of the function
function getShellConstant(name)
{
return (shell[name]);
} // End of the function
function isInventoryMemberOnly(item_id)
{
return (shell.isInventoryMemberOnly(item_id));
} // End of the function
function getLastNews()
{
var _loc1 = shell.getMyPlayerObject();
return (_loc1.last_news);
} // End of the function
function setLastNews(crumb)
{
myPlayer.last_news = crumb;
} // End of the function
function getCurrentNews()
{
return (mySetup.news);
} // End of the function
function getEggTimerRemaining()
{
var _loc3 = myPlayer.start_time;
var _loc2 = myPlayer.EggTimer;
var _loc1 = getTimer();
return (_loc2 - (_loc1 - _loc3));
} // End of the function
function isEggTimer()
{
var _loc1 = shell.getMyPlayerObject();
return (_loc1.IsEggTimer);
} // End of the function
function getScript()
{
return (shell.getLineMessageArray());
} // End of the function
function getSafeMessages()
{
return (shell.getSafeMessageArray());
} // End of the function
function getPuffleObjectById(puffle_id)
{
return (shell.getPuffleObjectById(puffle_id));
} // End of the function
function handleStartInterface()
{
ENGINE = shell.getCurrentEngine();
startEggTimer();
} // End of the function
function handleUpdateShellState(ob)
{
traceObject(ob);
if (ob.state == shell.PLAY_STATE)
{
startQuickKeys();
}
else
{
stopQuickKeys();
} // end else if
} // End of the function
function handleUpdateInventory()
{
showPhoneIcon();
} // End of the function
function handleUpdateCoins()
{
if (isPlayerWidgetOpen() && isActivePlayer(getPlayerId()))
{
updatePlayerWidgetCoins();
} // end if
} // End of the function
function handleUpdateLog(log_ob)
{
showLog();
} // End of the function
function sendMessage(message)
{
message = message.split("\r").join("");
message = message.split("\n").join("");
message = removeExtraSpaces(message);
message = convertToSafeCase(message);
showBalloon(getPlayerId(), message);
shell.sendMessage(message);
} // End of the function
function handleSendMessage(ob)
{
var _loc1 = ob.player_id;
var _loc3 = ob.message;
if (!isLocalPlayer(_loc1))
{
showBalloon(_loc1, _loc3);
} // end if
} // End of the function
function handleSendBlockedMessage(ob)
{
var _loc1 = ob.player_id;
showEmoteBalloon(_loc1, 9);
is_moderator = true;
} // End of the function
function sendSafeMessage(safe_id)
{
var _loc1 = shell.getSafeMessageById(safe_id);
showBalloon(getPlayerId(), _loc1);
shell.sendSafeMessage(safe_id);
} // End of the function
function handleSendSafeMessage(ob)
{
var _loc1 = ob.player_id;
var _loc4 = ob.safe_id;
var _loc3 = shell.getSafeMessageById(_loc4);
if (!isLocalPlayer(_loc1))
{
showBalloon(_loc1, _loc3);
} // end if
} // End of the function
function sendLineMessage(line_id)
{
var _loc1 = shell.getLineMessageById(line_id);
showBalloon(getPlayerId(), _loc1);
shell.sendLineMessage(line_id);
} // End of the function
function handleSendLineMessage(ob)
{
var _loc1 = ob.player_id;
var _loc4 = ob.line_id;
var _loc3 = shell.getLineMessageById(_loc4);
if (!isLocalPlayer(_loc1))
{
showBalloon(_loc1, _loc3);
} // end if
} // End of the function
function sendTourGuideMessage()
{
var _loc1 = shell.getCurrentRoomId();
var _loc2 = shell.getTourGuideMessageById(_loc1);
showBalloon(getPlayerId(), _loc2);
shell.sendTourGuideMessage(_loc1);
} // End of the function
function handleSendTourGuideMessage(ob)
{
var _loc1 = ob.player_id;
var _loc4 = ob.room_id;
var _loc3 = shell.getTourGuideMessageById(_loc4);
if (!isLocalPlayer(_loc1))
{
showBalloon(_loc1, _loc3);
} // end if
} // End of the function
function sendJoke()
{
var _loc1 = shell.getRandomJokeId();
var _loc2 = shell.getJokeById(_loc1);
showBalloon(getPlayerId(), _loc2);
shell.sendJoke(_loc1);
} // End of the function
function handleSendJoke(ob)
{
var _loc1 = ob.player_id;
var _loc4 = ob.joke_id;
var _loc3 = shell.getJokeById(_loc4);
if (!isLocalPlayer(_loc1))
{
showBalloon(_loc1, _loc3);
} // end if
} // End of the function
function sendPlayerAction(frame)
{
ENGINE.sendPlayerAction(frame);
} // End of the function
function sendPlayerFrame(frame)
{
ENGINE.sendPlayerFrame(frame);
} // End of the function
function sendPlayerSitDown()
{
ENGINE.sendPlayerSitDown();
} // End of the function
function sendThrowBall(x, y)
{
ENGINE.sendThrowBall(x, y);
} // End of the function
function sendEmote(emote_id)
{
shell.sendEmote(emote_id);
showEmoteBalloon(getPlayerId(), emote_id);
} // End of the function
function handleSendEmote(ob)
{
var _loc1 = ob.player_id;
var _loc3 = ob.emote_id;
if (!isLocalPlayer(_loc1))
{
showEmoteBalloon(_loc1, _loc3);
} // end if
} // End of the function
function sendJoinRoom(name, x, y)
{
shell.sendJoinRoom(name, x, y);
} // End of the function
function sendJoinGame(name)
{
shell.sendJoinGame(name);
} // End of the function
function sendJoinPlayerIgloo(player_id)
{
shell.sendJoinPlayerIgloo(player_id);
} // End of the function
function sendUpdatePlayerRemoveAll()
{
shell.sendUpdatePlayerRemoveAll(item_id);
} // End of the function
function handleUpdatePlayer(ob)
{
traceObject(ob);
var _loc2 = ob.player_id;
if (isActivePlayer(_loc2))
{
updatePlayerWidget();
} // end if
} // End of the function
function sendBuyInventory()
{
showPrompt("wait");
var _loc1 = getActiveShopItem();
shell.sendBuyInventory(_loc1);
} // End of the function
function handleBuyInventory(ob)
{
traceObject(ob);
var _loc3 = ob.item_id;
var _loc5 = getInventoryObjectById(_loc3);
var _loc4 = _loc5.name;
if (ob.success)
{
var _loc1 = getLocalizedString("buy_inventory_done");
_loc1 = replaceString("%name%", _loc4, _loc1);
showPrompt("ok", _loc1);
}
else
{
closePrompt();
} // end else if
} // End of the function
function sendBuyFurniture(item_id)
{
showPrompt("wait");
item_id = getActiveShopItem();
shell.sendBuyFurniture(item_id);
} // End of the function
function handleBuyFurniture(ob)
{
traceObject(ob);
var _loc3 = ob.item_id;
var _loc5 = shell.getFurnitureObjectById(_loc3);
var _loc4 = _loc5.name;
if (ob.success)
{
var _loc1 = getLocalizedString("buy_furniture_done");
_loc1 = replaceString("%name%", _loc4, _loc1);
showPrompt("ok", _loc1);
} // end if
} // End of the function
function sendBuyIglooType(item_id)
{
showPrompt("wait");
item_id = getActiveShopItem();
shell.sendBuyIglooType(item_id);
} // End of the function
function handleBuyIglooUpgrade(ob)
{
traceObject(ob);
if (ob.success)
{
var _loc2 = "handleBuyIglooUpgrade Message";
closePrompt();
closeContent();
} // end if
} // End of the function
function sendBuyIglooFloor(item_id)
{
showPrompt("wait");
item_id = getActiveShopItem();
shell.sendBuyIglooFloor(item_id);
} // End of the function
function handleBuyIglooFloor(ob)
{
traceObject(ob);
if (ob.success)
{
var _loc2 = "handleBuyIglooFloor Message";
closePrompt();
closeContent();
} // end if
} // End of the function
function sendBuddyRequest()
{
var _loc1 = getActivePlayerId();
var _loc2 = getLocalizedString("buddy_request_sent_prompt");
showPrompt("ok", _loc2);
shell.sendBuddyRequest(_loc1);
} // End of the function
function handleBuddyRequest(ob)
{
traceObject(ob);
var _loc2 = ob.player_id;
var _loc3 = ob.nickname;
addBuddyRequest(_loc2, _loc3);
} // End of the function
function sendBuddyAccept()
{
var _loc1 = getActiveBuddyRequest();
shell.sendBuddyAccept(_loc1);
} // End of the function
function handleBuddyAccept(ob)
{
traceObject(ob);
var _loc2 = ob.player_id;
var _loc3 = ob.nickname;
addBuddyAccepted(_loc2, _loc3);
handleUpdateBuddyList();
} // End of the function
function sendBuddyRemove()
{
var _loc1 = getActivePlayerId();
var _loc2 = getLocalizedString("remove_done_prompt");
showPrompt("ok", _loc2);
shell.sendRemoveBuddyPlayer(_loc1);
handleUpdateBuddyList();
} // End of the function
function handleUpdateBuddyList()
{
if (isBuddyWidgetOpen())
{
updateBuddyWidget();
} // end if
if (isPlayerWidgetOpen())
{
updatePlayerWidget();
} // end if
} // End of the function
function sendIgnoreRequest()
{
var _loc1 = getActivePlayerId();
var _loc3 = getActivePlayerNickname();
var _loc2 = getLocalizedString("ignore_request_sent_prompt");
showPrompt("ok", _loc2);
shell.sendAddIgnorePlayer(_loc1, _loc3);
handleUpdateBuddyList();
} // End of the function
function sendIgnoreRemove()
{
var _loc1 = getActiveIgnore();
var _loc2 = getLocalizedString("remove_done_prompt");
showPrompt("ok", _loc2);
shell.sendRemoveIgnorePlayer(_loc1);
handleUpdateBuddyList();
} // End of the function
function handleLoadPlayerObject(ob)
{
traceObject(ob);
var _loc2 = ob.player_id;
if (isActivePlayer(_loc2))
{
updatePlayerWidget();
} // end if
} // End of the function
function sendReportPlayer(player_id, reason_id, nickname)
{
shell.sendReportPlayer(player_id, reason_id, nickname);
} // End of the function
function sendAdoptPuffle(puffle_name)
{
showPrompt("wait");
var _loc1 = getActiveShopItem();
shell.sendAdoptPuffle(_loc1, puffle_name);
} // End of the function
function handleAdoptPuffle(ob)
{
if (ob.success)
{
var _loc1 = getLocalizedString("adopt_puffle_done");
showPrompt("ok", _loc1);
}
else
{
closePrompt();
} // end else if
} // End of the function
function sendPufflePlay()
{
var _loc1 = getActivePuffle();
var _loc2 = getPuffleObjectById(_loc1);
if (_loc2.rest > 20 && _loc2.happy > 10)
{
shell.sendPufflePlay(_loc1);
}
else
{
ENGINE.updatePuffleFrame(_loc1, 33);
} // end else if
closePuffleWidget();
} // End of the function
function sendPuffleRest()
{
var _loc1 = getActivePuffle();
shell.sendPuffleRest(_loc1);
closePuffleWidget();
} // End of the function
function sendPuffleFood()
{
var _loc1 = getActivePuffle();
shell.sendPuffleFood(_loc1);
closePuffleWidget();
} // End of the function
function sendPuffleBath()
{
var _loc1 = getActivePuffle();
shell.sendPuffleBath(_loc1);
closePuffleWidget();
} // End of the function
function sendPuffleCookie()
{
var _loc1 = getActivePuffle();
shell.sendPuffleCookie(_loc1);
closePuffleWidget();
} // End of the function
function sendPuffleGum()
{
var _loc1 = getActivePuffle();
shell.sendPuffleGum(_loc1);
closePuffleWidget();
} // End of the function
function sendPuffleWalk()
{
var _loc1 = getActivePuffle();
var _loc2 = getPuffleObjectById(_loc1);
if (_loc2.rest > 20 && _loc2.hunger > 40)
{
shell.sendStartPuffleWalk(_loc1);
}
else
{
ENGINE.updatePuffleFrame(_loc1, 33);
} // end else if
closePuffleWidget();
} // End of the function
function findPlayer(player_id)
{
showPrompt("wait");
shell.getPlayerLocationById(player_id);
} // End of the function
function handleFindPlayer(ob)
{
traceObject(ob);
var _loc1 = ob.room_id;
if (_loc1 > 999)
{
var _loc3 = "igloo";
}
else if (_loc1 > 899)
{
_loc3 = shell.getGameNameById(_loc1);
}
else
{
_loc3 = shell.getRoomNameById(_loc1);
} // end else if
var _loc4 = getActivePlayerNickname();
var _loc2 = shell.getLocalizedString(_loc3 + "_find");
_loc2 = replaceString("%name%", _loc4, _loc2);
showPrompt("ok", _loc2);
} // End of the function
function mutePlayer()
{
var _loc1 = getActivePlayerId();
shell.mutePlayerById(_loc1);
} // End of the function
function kickPlayer()
{
var _loc1 = getActivePlayerId();
shell.kickPlayerById(_loc1);
} // End of the function
function banPlayer()
{
var _loc1 = getActiveReport();
var _loc2 = _loc1.player_id;
var _loc4 = _loc1.player_id;
var _loc3 = _loc1.message;
if (_loc2 == getActivePlayerId())
{
shell.banPlayerById(_loc2, _loc3);
} // end if
} // End of the function
function showInterface()
{
showIcons();
showDock();
closeAllWidgets();
LOG._visible = true;
startQuickKeys();
} // End of the function
function closeInterface()
{
closeIcons();
closeDock();
closeAllWidgets();
closeLog();
closeHint();
closeContent();
closeWindow();
LOG._visible = false;
stopQuickKeys();
} // End of the function
function showIcons()
{
ICONS._visible = true;
MAIL_ICON._visible = true;
BUDDY_ICON._visible = false;
updateBuddyRequestIcon();
if (getLastNews() == getCurrentNews())
{
NEWS_ICON.new_mc._visible = false;
}
else
{
NEWS_ICON.new_mc._visible = true;
} // end else if
NEWS_ICON.news_btn.onRelease = function ()
{
showContent("current_news");
setLastNews(getCurrentNews());
NEWS_ICON.new_mc._visible = false;
};
showPhoneIcon();
MAIL_ICON.mail_btn.onRelease = function ()
{
shell.showMail();
};
MAP_ICON.map_btn.onRelease = function ()
{
showContent("map");
};
if (isEggTimerActive())
{
EGG_TIMER_ICON._visible = true;
startEggTimer();
}
else
{
EGG_TIMER_ICON._visible = false;
} // end else if
EGG_TIMER_ICON.clock_btn.onRelease = function ()
{
showContent("egg_timer");
};
MOD_ICON.shield_btn.onRelease = function ()
{
showContent("mod_help");
};
} // End of the function
function showPhoneIcon()
{
if (isSecretAgent())
{
PHONE_ICON._visible = true;
PHONE_ICON.phone_btn.onRelease = function ()
{
showPhoneWidget();
};
}
else
{
PHONE_ICON._visible = false;
} // end else if
} // End of the function
function bounceIcon(mc)
{
if (mc.start_y == undefined)
{
mc.start_y = mc._y;
} // end if
var _loc2 = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Bounce.easeOut, mc.start_y - 50, mc.start_y, 5, false);
} // End of the function
function closeIcons()
{
ICONS._visible = false;
} // End of the function
function showCrosshair()
{
CROSSHAIR._visible = true;
CROSSHAIR.startDrag(true, 20, 20, 740, 440);
CROSSHAIR._x = this._xmouse;
CROSSHAIR._y = this._ymouse;
CROSSHAIR.target_btn.onRelease = function ()
{
var _loc2 = Math.round(CROSSHAIR._x + random(20) - 10);
var _loc1 = Math.round(CROSSHAIR._y + random(20) - 10);
sendThrowBall(_loc2, _loc1);
stopDrag ();
CROSSHAIR._y = -100;
CROSSHAIR._visible = false;
};
} // End of the function
function loadWidget(target_mc, file_path, load_message)
{
loadFile(target_mc, file_path, load_message, closeWidget);
} // End of the function
function showWidget(mc, closeFunction)
{
mc._visible = true;
mc.swapDepths(99);
mc.gotoAndStop(1);
if (mc.load_mc != undefined)
{
var _loc3 = mc.load_mc;
}
else
{
_loc3 = mc.art_mc;
} // end else if
_loc3.close_btn.onRelease = function ()
{
closeWidget(this._parent._parent);
closeFunction();
};
_loc3.background_mc.onPress = function ()
{
this._parent._parent.swapDepths(99);
this._parent._parent.startDrag();
};
_loc3.background_mc.onRelease = function ()
{
this._parent._parent.stopDrag();
};
_loc3.background_mc.useHandCursor = false;
} // End of the function
function centerWidget(mc)
{
mc._x = Math.floor(Stage.width / 2 - mc._width / 2);
mc._y = Math.floor(Stage.height / 2 - mc._height / 2) - 40;
} // End of the function
function closeWidget(mc)
{
if (mc.load_mc != undefined)
{
mc.load_mc.removeMovieClip();
} // end if
mc.gotoAndStop(2);
} // End of the function
function closeAllWidgets()
{
for (var _loc1 in WIDGETS)
{
closeWidget(WIDGETS[_loc1]);
} // end of for...in
} // End of the function
function startQuickKeys()
{
if (!is_quick_keys_active)
{
myKeyListener = new Object();
myKeyListener.is_emote = false;
myKeyListener.onKeyDown = function ()
{
var _loc1 = Key.getCode();
var _loc2 = DOCK.chat_mc.chat_input;
if (Selection.getFocus() != null)
{
if (_loc1 == 13)
{
var _loc3 = _loc2.text;
if (_loc3 != "")
{
sendMessage(_loc2.text);
_loc2.text = "";
}
else
{
Selection.setFocus(null);
} // end if
} // end else if
}
else if (_loc1 == 13)
{
Selection.setFocus(_loc2);
myKeyListener.is_emote = false;
}
else if (myKeyListener.is_emote)
{
processEmoteKeyCode(_loc1);
myKeyListener.is_emote = false;
}
else
{
processQuickKeyCode(_loc1);
} // end else if
};
Key.removeListener(myKeyListener);
Key.addListener(myKeyListener);
is_quick_keys_active = true;
} // end if
} // End of the function
function processEmoteKeyCode(c)
{
switch (c)
{
case 49:
{
sendEmote(1);
break;
}
case 50:
{
sendEmote(2);
break;
}
case 51:
{
sendEmote(3);
break;
}
case 52:
{
sendEmote(4);
break;
}
case 53:
{
sendEmote(5);
break;
}
case 54:
{
sendEmote(6);
break;
}
case 55:
{
sendEmote(7);
break;
}
case 56:
{
sendEmote(8);
break;
}
case 57:
{
sendEmote(9);
break;
}
case 48:
{
sendEmote(10);
break;
}
case 71:
{
sendEmote(18);
break;
}
case 76:
{
sendEmote(17);
break;
}
case 72:
{
sendEmote(30);
break;
}
case 67:
{
sendEmote(13);
break;
}
case 70:
{
sendEmote(16);
break;
}
case 68:
{
sendEmote(22);
break;
}
case 78:
{
sendEmote(23);
break;
}
case 84:
{
sendEmote(19);
break;
}
case 77:
{
sendEmote(20);
break;
}
case 80:
{
sendEmote(21);
break;
}
case 90:
{
sendEmote(24);
break;
}
case 73:
{
sendEmote(25);
break;
}
case 66:
{
sendEmote(12);
break;
}
case 75:
{
sendEmote(28);
break;
}
case 79:
{
sendEmote(29);
break;
}
case 81:
{
sendEmote(26);
break;
}
case 87:
{
sendEmote(27);
break;
}
case 85:
{
sendEmote(11);
break;
}
} // End of switch
} // End of the function
function processQuickKeyCode(c)
{
switch (c)
{
case 69:
{
myKeyListener.is_emote = true;
break;
}
case 49:
{
sendEmote(15);
break;
}
case 191:
{
sendEmote(14);
break;
}
case 87:
{
sendPlayerAction(25);
break;
}
case 68:
{
sendPlayerFrame(26);
break;
}
case 74:
{
sendJoke();
break;
}
case 83:
{
sendPlayerSitDown();
break;
}
case 37:
{
sendPlayerFrame(19);
break;
}
case 39:
{
sendPlayerFrame(23);
break;
}
case 38:
{
sendPlayerFrame(21);
break;
}
case 40:
{
sendPlayerFrame(17);
break;
}
case 84:
{
showCrosshair();
break;
}
case 72:
{
sendSafeMessage(1);
break;
}
case 66:
{
sendSafeMessage(2);
break;
}
case 89:
{
sendSafeMessage(20);
break;
}
case 78:
{
sendSafeMessage(21);
break;
}
case 79:
{
sendSafeMessage(22);
break;
}
case 187:
{
toggleHighQuality ();
break;
}
case 189:
{
toggleHighQuality ();
break;
}
} // End of switch
} // End of the function
function stopQuickKeys()
{
Key.removeListener(myKeyListener);
is_quick_keys_active = false;
} // End of the function
function showContent(name, initFunction)
{
stopQuickKeys();
if (name == "current_news")
{
is_news_open = true;
ENGINE.sendOpenBook();
} // end if
var _loc2 = getLocalizedString(name);
var _loc3 = getFilePath(name);
loadFile(CONTENT, _loc3, _loc2, closeContent, initFunction);
} // End of the function
function closeContent()
{
if (is_news_open)
{
is_news_open = false;
ENGINE.sendCloseBook();
} // end if
CONTENT.load_mc.removeMovieClip();
CONTENT.gotoAndStop(1);
startQuickKeys();
} // End of the function
function showWindow(name, initFunction)
{
stopQuickKeys();
if (name == "News Form")
{
name = "news_form";
} // end if
var _loc2 = getLocalizedString(name);
var _loc3 = getFilePath(name);
loadFile(WINDOW, _loc3, _loc2, closeWindow, initFunction);
} // End of the function
function showEmptyWindow()
{
WINDOW.gotoAndStop("Done");
WINDOW.block_mc.useHandCursor = false;
WINDOW.block_mc.tabEnabled = false;
WINDOW.block_mc.onRelease = null;
} // End of the function
function closeWindow()
{
WINDOW.load_mc.removeMovieClip();
WINDOW.gotoAndStop(1);
startQuickKeys();
} // End of the function
function showHint(mc, hint)
{
var _loc1 = {x: mc._x, y: mc._y};
mc._parent.localToGlobal(_loc1);
HINT._x = _loc1.x;
HINT._y = _loc1.y - 28;
HINT.message = getLocalizedString(hint);
HINT.gotoAndStop(1);
HINT.gotoAndPlay(2);
HINT._visible = true;
} // End of the function
function closeHint()
{
HINT._visible = false;
HINT.gotoAndStop(1);
} // End of the function
function showDock()
{
if (isSafeMode() || shell.isWorldSafe())
{
DOCK.chat_mc._visible = false;
}
else
{
DOCK.chat_mc.chat_input.restrict = getLocalizedString("chat_restrict");
DOCK.chat_mc.chat_input.tabIndex = 1;
DOCK.chat_mc.chat_input.onSetFocus = function ()
{
is_chat_focused = true;
};
DOCK.chat_mc.chat_input.onKillFocus = function ()
{
is_chat_focused = false;
};
DOCK.chat_mc.send_btn.onRelease = function ()
{
var _loc1 = DOCK.chat_mc.chat_input;
sendMessage(_loc1.text);
_loc1.text = "";
closeHint();
};
DOCK.chat_mc.send_btn.onRollOver = function ()
{
showHint(this, "send_hint");
};
DOCK.chat_mc.send_btn.onRollOut = closeHint;
} // end else if
DOCK.safe_btn.onRelease = function ()
{
showSafeMenu();
closeHint();
};
DOCK.safe_btn.onRollOver = function ()
{
showHint(this, "safe_hint");
};
DOCK.safe_btn.onRollOut = closeHint;
DOCK.emote_btn.onRelease = function ()
{
showEmoteMenu();
closeHint();
};
DOCK.emote_btn.onRollOver = function ()
{
showHint(this, "emote_hint");
};
DOCK.emote_btn.onRollOut = closeHint;
DOCK.action_btn.onRelease = function ()
{
showActionMenu();
closeHint();
};
DOCK.action_btn.onRollOver = function ()
{
showHint(this, "action_hint");
};
DOCK.action_btn.onRollOut = closeHint;
DOCK.throw_btn.onRelease = function ()
{
showCrosshair();
closeHint();
};
DOCK.throw_btn.onRollOver = function ()
{
showHint(this, "throw_hint");
};
DOCK.throw_btn.onRollOut = closeHint;
DOCK.player_btn.onRelease = function ()
{
showPlayerWidget(getPlayerId(), getPlayerNickname());
closeHint();
};
DOCK.player_btn.onRollOver = function ()
{
showHint(this, "player_hint");
};
DOCK.player_btn.onRollOut = closeHint;
DOCK.buddy_btn.onRelease = function ()
{
showBuddyWidget();
closeHint();
};
DOCK.buddy_btn.onRollOver = function ()
{
showHint(this, "buddy_hint");
};
DOCK.buddy_btn.onRollOut = closeHint;
DOCK.home_btn.onRelease = function ()
{
sendJoinPlayerIgloo(getPlayerId());
closeHint();
};
DOCK.home_btn.onRollOver = function ()
{
showHint(this, "home_hint");
};
DOCK.home_btn.onRollOut = closeHint;
DOCK.help_btn.onRelease = function ()
{
showContent("help");
closeHint();
};
DOCK.help_btn.onRollOver = function ()
{
showHint(this, "help_hint");
};
DOCK.help_btn.onRollOut = closeHint;
DOCK._visible = true;
DOCK.buddy_online_mc._visible = false;
if (DOCK.onMouseDown == undefined)
{
DOCK.onMouseDown = function ()
{
if (Selection.getFocus() != null)
{
Selection.setFocus(null);
} // end if
};
} // end if
} // End of the function
function handleBuddyOnline(ob)
{
traceObject(ob);
var _loc5 = ob.player_id;
var _loc3 = ob.nickname;
var _loc1 = DOCK.buddy_online_mc;
if (isValidString(_loc3))
{
var _loc2 = getLocalizedString("buddy_online");
_loc2 = replaceString("%name%", _loc3, _loc2);
if (_loc2.length > 18)
{
_loc1.gotoAndStop(2);
}
else
{
_loc1.gotoAndStop(1);
} // end else if
_loc1.message_txt.text = _loc2;
_loc1._visible = true;
if (_loc1.start_y == undefined)
{
_loc1.start_y = _loc1._y;
} // end if
var _loc6 = new mx.transitions.Tween(_loc1, "_y", mx.transitions.easing.Bounce.easeOut, _loc1.start_y + 20, _loc1.start_y, 5, false);
clearInterval(buddy_online_interval);
buddy_online_interval = setInterval(closeBuddyOnline, 10000);
} // end if
} // End of the function
function closeBuddyOnline()
{
clearInterval(buddy_online_interval);
delete buddy_online_interval;
DOCK.buddy_online_mc._visible = false;
} // End of the function
function closeDock()
{
DOCK._visible = false;
} // End of the function
function buyInventory(item_id)
{
if (isItemInInventory(item_id))
{
showPrompt("warn", getLocalizedString("item_in_inventory_warn"));
}
else if (isMember() || !isInventoryMemberOnly(item_id))
{
var _loc4 = getInventoryObjectById(item_id);
var _loc3 = _loc4.name;
var _loc6 = _loc4.cost;
var _loc10 = getFilePath("clothing_icons") + item_id + ".swf";
var _loc7 = getCoins();
var _loc8 = _loc4.is_medal;
var _loc9 = _loc4.is_gift;
if (_loc7 >= _loc6)
{
setActiveShopItem(item_id);
if (_loc8)
{
var _loc11 = getLocalizedString("inventory_medal");
_loc11 = replaceString("%name%", _loc3, _loc11);
}
else if (_loc9)
{
_loc11 = getLocalizedString("inventory_gift");
_loc11 = replaceString("%name%", _loc3, _loc11);
}
else if (_loc6 == 0)
{
_loc11 = getLocalizedString("inventory_free");
_loc11 = replaceString("%name%", _loc3, _loc11);
}
else
{
var _loc1 = getLocalizedString("buy_inventory");
var _loc5 = getLocalizedString("num_coins");
_loc1 = replaceString("%name%", _loc3, _loc1);
_loc1 = replaceString("%cost%", String(_loc6), _loc1);
_loc5 = replaceString("%num%", String(_loc7), _loc5);
_loc11 = _loc1 + " " + _loc5;
} // end else if
showPrompt("shop", _loc11, _loc10, sendBuyInventory);
}
else
{
_loc11 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc11);
} // end else if
}
else
{
showWindow("membership_inventory");
} // end else if
} // End of the function
function buyFurniture(item_id)
{
if (isMember())
{
var _loc5 = shell.getFurnitureObjectById(item_id);
var _loc7 = _loc5.name;
var _loc4 = _loc5.cost;
var _loc8 = getFilePath("furniture_icons") + item_id + ".swf";
var _loc6 = getCoins();
if (_loc6 >= _loc4)
{
setActiveShopItem(item_id);
var _loc1 = getLocalizedString("buy_furniture");
var _loc2 = getLocalizedString("num_coins");
_loc1 = replaceString("%name%", _loc7, _loc1);
_loc1 = replaceString("%cost%", String(_loc4), _loc1);
_loc2 = replaceString("%num%", String(_loc6), _loc2);
var _loc9 = _loc1 + " " + _loc2;
showPrompt("shop", _loc9, _loc8, sendBuyFurniture);
}
else
{
_loc9 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc9);
} // end else if
}
else
{
showWindow("membership_furniture");
} // end else if
} // End of the function
function buyIglooUpgrade(igloo_id)
{
if (shell.getCurrentIglooType() == igloo_id)
{
showPrompt("warn", getLocalizedString("duplicate_igloo_warn"));
}
else if (isMember())
{
var _loc5 = shell.getIglooCrumbById(igloo_id);
var _loc7 = _loc5.name;
var _loc3 = _loc5.cost;
var _loc6 = getCoins();
if (_loc6 >= _loc3)
{
setActiveShopItem(igloo_id);
var _loc1 = getLocalizedString("buy_igloo_upgrade");
var _loc2 = getLocalizedString("num_coins");
var _loc8 = getLocalizedString("igloo_upgrade_warn");
_loc1 = replaceString("%name%", _loc7, _loc1);
_loc1 = replaceString("%cost%", String(_loc3), _loc1);
_loc2 = replaceString("%num%", String(_loc6), _loc2);
var _loc9 = _loc1 + " " + _loc2 + "\n\n" + _loc8;
showPrompt("igloo", _loc9, file, sendBuyIglooType);
}
else
{
_loc9 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc9);
} // end else if
}
else
{
showWindow("membership_igloo");
} // end else if
} // End of the function
function buyIglooFloor(floor_id)
{
if (shell.getCurrentIglooFloorId() == floor_id)
{
showPrompt("warn", getLocalizedString("duplicate_floor_warn"));
}
else if (isMember())
{
var _loc5 = shell.getFloorCrumbById(floor_id);
var _loc7 = _loc5.name;
var _loc4 = _loc5.cost;
var _loc6 = getCoins();
if (_loc6 >= _loc4)
{
setActiveShopItem(floor_id);
var _loc1 = getLocalizedString("buy_igloo_floor");
var _loc2 = getLocalizedString("num_coins");
_loc1 = replaceString("%name%", _loc7, _loc1);
_loc1 = replaceString("%cost%", String(_loc4), _loc1);
_loc2 = replaceString("%num%", String(_loc6), _loc2);
var _loc8 = _loc1 + " " + _loc2;
showPrompt("question", _loc8, file, sendBuyIglooFloor);
}
else
{
_loc8 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc8);
} // end else if
}
else
{
showWindow("membership_igloo");
} // end else if
} // End of the function
function adoptPuffle(type_id)
{
var _loc5 = getFilePath("puffle" + type_id + "_icon");
var _loc3 = getCoins();
var _loc2 = shell.getMyPuffleArray().length;
var _loc6 = getInventoryObjectById(type_id + 750);
if (!isMember() && _loc6.is_member)
{
showWindow("membership_puffle");
}
else if (!isMember() && _loc2 >= 2)
{
showWindow("membership_puffle");
}
else if (_loc2 >= shell.MAX_PUFFLES)
{
var _loc8 = getLocalizedString("max_puffles_prompt");
showPrompt("warn", _loc8);
}
else if (_loc3 >= 800)
{
setActiveShopItem(type_id);
var _loc4 = getLocalizedString("adopt_puffle");
var _loc1 = getLocalizedString("num_coins");
_loc1 = replaceString("%num%", _loc3, _loc1);
_loc8 = _loc4 + " " + _loc1;
showPrompt("shop", _loc8, _loc5, adoptPuffleName);
}
else
{
_loc8 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc8);
} // end else if
} // End of the function
function adoptPuffleName()
{
var _loc2 = getActiveShopItem();
var _loc1 = getFilePath("puffle" + _loc2 + "_icon");
var _loc3 = getLocalizedString("name_puffle");
showPrompt("input", _loc3, _loc1, sendAdoptPuffle);
} // End of the function
function buyPuffleFood()
{
var _loc1 = getFilePath("puffle_food");
var _loc2 = getCoins();
if (_loc2 >= 10)
{
var _loc3 = getPufflePromptMessage("buy_puffle_food");
showPrompt("shop", _loc3, _loc1, sendPuffleFood);
}
else
{
_loc3 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc3);
} // end else if
} // End of the function
function buyPuffleBath()
{
var _loc1 = getFilePath("puffle_bath");
var _loc2 = getCoins();
if (_loc2 >= 5)
{
var _loc3 = getPufflePromptMessage("buy_puffle_bath");
showPrompt("shop", _loc3, _loc1, sendPuffleBath);
}
else
{
_loc3 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc3);
} // end else if
} // End of the function
function buyPuffleGum()
{
var _loc1 = getFilePath("puffle_gum");
var _loc2 = getCoins();
if (_loc2 >= 5)
{
var _loc3 = getPufflePromptMessage("buy_puffle_gum");
showPrompt("shop", _loc3, _loc1, sendPuffleGum);
}
else
{
_loc3 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc3);
} // end else if
} // End of the function
function buyPuffleCookie()
{
var _loc1 = getFilePath("puffle_cookie");
var _loc2 = getCoins();
if (_loc2 >= 5)
{
var _loc3 = getPufflePromptMessage("buy_puffle_cookie");
showPrompt("shop", _loc3, _loc1, sendPuffleCookie);
}
else
{
_loc3 = getLocalizedString("low_coin_warn");
showPrompt("warn", _loc3);
} // end else if
} // End of the function
function getPufflePromptMessage(message)
{
var _loc3 = getCoins();
var _loc2 = getLocalizedString(message);
var _loc1 = getLocalizedString("num_coins");
_loc1 = replaceString("%num%", _loc3, _loc1);
return (_loc2 + " " + _loc1);
} // End of the function
function setActiveShopItem(item_id)
{
active_shop_item = item_id;
} // End of the function
function getActiveShopItem()
{
return (active_shop_item);
} // End of the function
function setActivePuffleAction(action)
{
active_puffle_action = action;
} // End of the function
function getActivePuffleAction()
{
return (active_puffle_action);
} // End of the function
function showPrompt(style, message, file, sendFunction)
{
stopQuickKeys();
if (style == "question")
{
PROMPT.gotoAndStop(2);
}
else if (style == "ok")
{
PROMPT.gotoAndStop(4);
}
else if (style == "wait")
{
PROMPT.gotoAndStop(5);
}
else if (style == "game")
{
PROMPT.gotoAndStop(3);
}
else if (style == "igloo")
{
PROMPT.gotoAndStop(6);
PROMPT.icon_mc.loadMovie(file);
}
else if (style == "shop")
{
PROMPT.gotoAndStop(7);
PROMPT.icon_mc.loadMovie(file);
}
else if (style == "coin")
{
PROMPT.gotoAndStop(8);
}
else if (style == "input")
{
PROMPT.gotoAndStop(9);
PROMPT.icon_mc.loadMovie(file);
PROMPT.text_input.restrict = getLocalizedString("chat_restrict");
Selection.setFocus(PROMPT.text_input);
}
else if (style == "warn")
{
PROMPT.gotoAndStop(10);
}
else
{
PROMPT.gotoAndStop(1);
} // end else if
PROMPT.block_mc.useHandCursor = false;
PROMPT.block_mc.tabEnabled = false;
PROMPT.block_mc.onRelease = null;
PROMPT.message_txt.text = message;
PROMPT.continue_txt.text = getLocalizedString("Continue");
PROMPT.yes_txt.text = getLocalizedString("Yes");
PROMPT.no_txt.text = getLocalizedString("No");
PROMPT.ok_txt.text = getLocalizedString("Ok");
PROMPT.yes_btn.onRelease = function ()
{
closePrompt();
sendFunction();
};
PROMPT.ok_btn.onRelease = function ()
{
closePrompt();
sendFunction();
};
PROMPT.continue_btn.onRelease = function ()
{
var _loc1 = PROMPT.text_input.text;
if (_loc1.length > 0)
{
closePrompt();
sendFunction(_loc1);
} // end if
};
PROMPT.no_btn.onRelease = closePrompt;
PROMPT.close_btn.onRelease = closePrompt;
} // End of the function
function showGamePrompt(name)
{
setActiveGamePrompt(name);
showPrompt(question);
} // End of the function
function clickGamePrompt()
{
sendJoinGame(getActiveGamePrompt());
} // End of the function
function setActiveGamePrompt(name)
{
active_game_prompt = name;
} // End of the function
function getActiveGamePrompt()
{
return (active_game_prompt);
} // End of the function
function showGameOverPrompt(total, earned, sendFunction)
{
if (earned == 0)
{
var _loc1 = getLocalizedString("game_over0");
}
else if (earned == 1)
{
_loc1 = getLocalizedString("game_over1");
}
else
{
_loc1 = getLocalizedString("game_over2");
} // end else if
_loc1 = replaceString("%num%", String(earned), _loc1);
_loc1 = replaceString("%total%", String(total), _loc1);
showPrompt("coin", _loc1, "", sendFunction);
} // End of the function
function closePrompt()
{
PROMPT.gotoAndStop(1);
startQuickKeys();
} // End of the function
function showBalloon(player_id, message)
{
var mc = BALLOONS["p" + player_id];
mc.output = message.split("|");
updateBalloonMessage(mc, mc.output.shift());
var counter = 0;
mc.onEnterFrame = function ()
{
if (counter > balloon_duration + 5)
{
if (mc.output.length > 0)
{
updateBalloonMessage(mc, mc.output.shift());
counter = 0;
}
else
{
mc.onEnterFrame = null;
} // end else if
}
else if (counter == balloon_duration)
{
mc.gotoAndStop(mc._totalframes);
} // end else if
++counter;
};
} // End of the function
function showEmoteBalloon(player_id, emote_id)
{
var mc = BALLOONS["p" + player_id];
mc.gotoAndStop(mc._totalframes);
mc.gotoAndStop(1);
mc.icon_mc.gotoAndStop(emote_id);
var counter = 0;
mc.onEnterFrame = function ()
{
if (counter > balloon_duration)
{
mc.gotoAndStop(mc._totalframes);
mc.onEnterFrame = null;
}
else
{
++counter;
} // end else if
};
} // End of the function
function updateBalloonMessage(mc, message)
{
mc.gotoAndStop(mc._totalframes);
mc.gotoAndStop(2);
mc.message_txt.text = message;
mc.gotoAndStop(mc.message_txt.maxscroll + 1);
mc.message_txt.text = message;
} // End of the function
function LEGACY_showWindow(name, ob)
{
if (name == "Found Item")
{
buyInventory(ob.ItemId);
}
else if (name == "News Form")
{
showWindow("news_form");
}
else if (name == "Game Over")
{
var _loc4 = ob.score;
var _loc3 = ob.coins;
} // end else if
} // End of the function
function dragLog()
{
LOG.starty = LOG._y;
LOG.startDrag(false, LOG._x, 6, LOG._x, 420);
} // End of the function
function updateLog()
{
LOG.stopDrag();
if (LOG._y == LOG.starty)
{
if (LOG._y > 40)
{
closeLog();
}
else
{
openLog();
} // end else if
}
else
{
is_log_open = true;
showLog();
} // end else if
} // End of the function
function openLog()
{
is_log_open = true;
LOG.arrow_mc.gotoAndStop(2);
LOG._y = 110;
showLog();
} // End of the function
function closeLog()
{
is_log_open = false;
LOG.arrow_mc.gotoAndStop(1);
LOG._y = 6;
clearLog();
} // End of the function
function showLog()
{
if (is_log_open)
{
var _loc10 = getLog();
var _loc9 = LOG.menu_mc;
clearLog();
var _loc11 = Math.floor((LOG._y - 30) / 20);
var _loc8 = _loc10.length - 1;
for (var _loc4 = 0; _loc4 < _loc11; ++_loc4)
{
var _loc3 = _loc10[_loc8];
_loc9.item_mc.duplicateMovieClip("item" + _loc4, _loc4 + 1);
var _loc2 = _loc9["item" + _loc4];
if (_loc3 != undefined)
{
if (_loc3.type == shell.SEND_BLOCKED_MESSAGE)
{
_loc2.gotoAndStop(2);
}
else
{
_loc2.gotoAndStop(1);
} // end else if
_loc2.message_text.text = _loc3.nickname + ": " + _loc3.message;
_loc2.player_id = _loc3.player_id;
_loc2.nickname = _loc3.nickname;
_loc2.message = _loc3.message;
_loc2.type = _loc3.type;
}
else
{
_loc2.message_text.text = "";
} // end else if
_loc2._y = -20 * _loc4;
_loc2.message_btn.onRelease = function ()
{
var _loc2 = this._parent.player_id;
var _loc3 = this._parent.nickname;
var _loc4 = this._parent.message;
if (_loc2 != undefined)
{
showPlayerWidget(_loc2, _loc3);
setActiveReport(_loc2, _loc3, _loc4);
} // end if
};
--_loc8;
} // end of for
} // end if
} // End of the function
function clearLog()
{
var _loc1 = LOG.menu_mc;
for (var _loc2 in _loc1)
{
if (_loc1[_loc2] != "item_mc")
{
removeMovieClip (_loc1[_loc2]);
} // end if
} // end of for...in
} // End of the function
function setActiveReport(player_id, nickname, message)
{
active_report = new Object();
active_report.player_id = player_id;
active_report.nickname = nickname;
active_report.message = message;
} // End of the function
function getActiveReport()
{
return (active_report);
} // End of the function
function getActiveReportMessage()
{
return (active_report.message);
} // End of the function
function startEggTimer()
{
var _loc1 = new Object();
_loc1.minutes_remaining = getEggTimerMinutesRemaining();
handleUpdateEggTimer(_loc1);
} // End of the function
function handleUpdateEggTimer(ob)
{
traceObject(ob);
var _loc1 = Math.ceil(ob.minutes_remaining);
if (_loc1 > 999)
{
EGG_TIMER_ICON.message_mc.gotoAndStop(2);
EGG_TIMER_ICON.message_mc.message_txt.text = _loc1;
}
else
{
EGG_TIMER_ICON.message_mc.gotoAndStop(1);
EGG_TIMER_ICON.message_mc.message_txt.text = _loc1;
} // end else if
if (EGG_TIMER_ICON.minutes_remaining != _loc1)
{
EGG_TIMER_ICON.minutes_remaining = _loc1;
if (_loc1 == 5)
{
EGG_TIMER_ICON.gotoAndStop(2);
}
else if (_loc1 == 4)
{
EGG_TIMER_ICON.gotoAndStop(3);
}
else if (_loc1 == 3)
{
EGG_TIMER_ICON.gotoAndStop(4);
}
else if (_loc1 == 2)
{
EGG_TIMER_ICON.gotoAndStop(5);
}
else if (_loc1 == 1)
{
EGG_TIMER_ICON.gotoAndStop(6);
}
else if (_loc1 == 0)
{
}
else
{
EGG_TIMER_ICON.gotoAndStop(1);
} // end else if
} // end else if
} // End of the function
function addBuddyRequest(player_id, nickname)
{
var _loc1 = new Object();
_loc1.action = "request";
_loc1.player_id = player_id;
_loc1.nickname = nickname;
buddy_request_list.push(_loc1);
updateBuddyRequestIcon();
} // End of the function
function addBuddyAccepted(player_id, nickname)
{
var _loc1 = new Object();
_loc1.action = "accepted";
_loc1.player_id = player_id;
_loc1.nickname = nickname;
buddy_request_list.push(_loc1);
updateBuddyRequestIcon();
} // End of the function
function updateBuddyRequestIcon()
{
if (buddy_request_list.length > 0)
{
BUDDY_ICON._visible = true;
BUDDY_ICON.onRelease = showBuddyRequest;
bounceIcon(BUDDY_ICON);
}
else
{
BUDDY_ICON._visible = false;
} // end else if
} // End of the function
function showBuddyRequest()
{
var _loc1 = buddy_request_list.pop();
buddy_request_item = _loc1;
setActiveBuddyRequest(_loc1.player_id);
if (_loc1.action == "request")
{
var _loc2 = getLocalizedString("buddy_question_prompt");
_loc2 = replaceString("%name%", _loc1.nickname, _loc2);
showPrompt("question", _loc2, "", sendBuddyAccept);
}
else if (_loc1.action == "accepted")
{
_loc2 = getLocalizedString("buddy_accepted_prompt");
_loc2 = replaceString("%name%", _loc1.nickname, _loc2);
showPrompt("ok", _loc2);
} // end else if
updateBuddyRequestIcon();
} // End of the function
function setActiveBuddyRequest(player_id)
{
active_buddy_request = player_id;
} // End of the function
function getActiveBuddyRequest()
{
return (active_buddy_request);
} // End of the function
function updateNewMailIcon(t)
{
MAIL_ICON.new_mc._visible = true;
if (t > 999)
{
MAIL_ICON.new_mc.gotoAndStop(2);
MAIL_ICON.new_mc.mail_count_txt.text = t;
}
else
{
MAIL_ICON.new_mc.gotoAndStop(1);
MAIL_ICON.new_mc.mail_count_txt.text = t;
} // end else if
if (t < 1)
{
MAIL_ICON.new_mc._visible = false;
} // end if
if (t > last_new_total)
{
bounceIcon(MAIL_ICON);
} // end if
last_new_total = t;
} // End of the function
function showEmoteMenu()
{
EMOTE_MENU.gotoAndStop(1);
EMOTE_MENU.gotoAndStop(2);
EMOTE_MENU.back_btn.onRelease = closeEmoteMenu;
EMOTE_MENU.back_btn.onRollOver = closeEmoteMenu;
EMOTE_MENU.close_btn.onRelease = closeEmoteMenu;
EMOTE_MENU.back_btn.useHandCursor = false;
EMOTE_MENU.safe_btn.useHandCursor = false;
EMOTE_MENU.e1_btn.onRelease = function ()
{
clickEmote(1);
};
EMOTE_MENU.e2_btn.onRelease = function ()
{
clickEmote(2);
};
EMOTE_MENU.e3_btn.onRelease = function ()
{
clickEmote(3);
};
EMOTE_MENU.e4_btn.onRelease = function ()
{
clickEmote(4);
};
EMOTE_MENU.e5_btn.onRelease = function ()
{
clickEmote(5);
};
EMOTE_MENU.e6_btn.onRelease = function ()
{
clickEmote(6);
};
EMOTE_MENU.e7_btn.onRelease = function ()
{
clickEmote(7);
};
EMOTE_MENU.e8_btn.onRelease = function ()
{
clickEmote(8);
};
EMOTE_MENU.e9_btn.onRelease = function ()
{
clickEmote(9);
};
EMOTE_MENU.e10_btn.onRelease = function ()
{
clickEmote(10);
};
EMOTE_MENU.e11_btn.onRelease = function ()
{
clickEmote(11);
};
EMOTE_MENU.coffee_btn.onRelease = function ()
{
clickEmote(13);
};
EMOTE_MENU.game_btn.onRelease = function ()
{
clickEmote(18);
};
EMOTE_MENU.popcorn_btn.onRelease = function ()
{
clickEmote(29);
};
EMOTE_MENU.pizza_btn.onRelease = function ()
{
clickEmote(24);
};
EMOTE_MENU.icecream_btn.onRelease = function ()
{
clickEmote(26);
};
EMOTE_MENU.luck_btn.onRelease = function ()
{
clickEmote(17);
};
EMOTE_MENU.flower_btn.onRelease = function ()
{
clickEmote(16);
};
EMOTE_MENU.cake_btn.onRelease = function ()
{
clickEmote(28);
};
EMOTE_MENU.heart_btn.onRelease = function ()
{
clickEmote(30);
};
EMOTE_MENU.idea_btn.onRelease = function ()
{
clickEmote(12);
};
} // End of the function
function clickEmote(n)
{
sendEmote(n);
closeEmoteMenu();
} // End of the function
function closeEmoteMenu()
{
EMOTE_MENU.gotoAndStop(1);
} // End of the function
function showActionMenu()
{
ACTION_MENU.gotoAndStop(1);
ACTION_MENU.gotoAndStop(2);
ACTION_MENU.back_btn.onRelease = closeActionMenu;
ACTION_MENU.back_btn.onRollOver = closeActionMenu;
ACTION_MENU.close_btn.onRelease = closeActionMenu;
ACTION_MENU.back_btn.useHandCursor = false;
ACTION_MENU.safe_btn.useHandCursor = false;
ACTION_MENU.dance_btn.onRelease = function ()
{
sendPlayerFrame(26);
closeActionMenu();
};
ACTION_MENU.wave_btn.onRelease = function ()
{
sendPlayerAction(25);
closeActionMenu();
};
ACTION_MENU.sit1_btn.onRelease = function ()
{
sendPlayerFrame(18);
closeActionMenu();
};
ACTION_MENU.sit2_btn.onRelease = function ()
{
sendPlayerFrame(20);
closeActionMenu();
};
ACTION_MENU.sit3_btn.onRelease = function ()
{
sendPlayerFrame(22);
closeActionMenu();
};
ACTION_MENU.sit4_btn.onRelease = function ()
{
sendPlayerFrame(24);
closeActionMenu();
};
} // End of the function
function closeActionMenu()
{
ACTION_MENU.gotoAndStop(1);
} // End of the function
function showSafeMenu()
{
var _loc1 = getSafeMessages();
SAFE_MENU.gotoAndStop(1);
SAFE_MENU.gotoAndStop(2);
SAFE_MENU.back_btn.onRelease = closeSafeMenu;
SAFE_MENU.back_btn.onRollOver = startCloseSafeMenuDelay;
SAFE_MENU.close_btn.onRelease = closeSafeMenu;
SAFE_MENU.back_btn.useHandCursor = false;
SAFE_MENU.safe_btn.useHandCursor = false;
SAFE_MENU.master_mc._visible = false;
showMenuList(_loc1, 0, 0, 0);
} // End of the function
function showMenuList(l, c, r, w)
{
if (w == undefined)
{
w = 1;
} // end if
var _loc9 = SAFE_MENU.menu_mc;
var _loc7 = _loc9.master_mc.item_mc._height + 2;
var _loc13 = _loc9.master_mc.item_mc._width + 2;
var _loc12 = "menu" + c;
_loc9.master_mc.duplicateMovieClip(_loc12, 100 + c + 1);
var _loc3 = _loc9[_loc12];
_loc3.item_mc._visible = false;
_loc3.c = c;
var _loc11 = l.length * _loc7;
if (c > 0)
{
var _loc10 = _loc9["menu" + (c - 1)];
_loc3._y = _loc10._y + r * _loc7;
_loc3._x = _loc10._x + _loc10._width + 2;
}
else
{
_loc3._y = _loc3._y - _loc11 + _loc7;
} // end else if
if (_loc3._y + _loc11 > _loc7)
{
_loc3._y = _loc3._y - (_loc3._y + _loc11 - _loc7);
} // end if
for (i = 0; i < l.length; i++)
{
var _loc2 = l[i];
var _loc4 = "item" + i;
_loc3.item_mc.duplicateMovieClip(_loc4, i + 1);
var _loc1 = _loc3[_loc4];
_loc1._y = _loc7 * i;
_loc1.c = c;
_loc1.r = i;
_loc1.ob = _loc2;
if (_loc2.menu)
{
if (w > 1)
{
_loc1.gotoAndStop(4);
}
else
{
_loc1.gotoAndStop(2);
} // end else if
}
else if (w > 1)
{
_loc1.gotoAndStop(3);
}
else
{
_loc1.gotoAndStop(1);
} // end else if
_loc1.large_txt.text = _loc2.name;
if (_loc1.large_txt.textWidth > _loc1.large_txt._width)
{
_loc1.large_txt.text = "";
_loc1.small_txt.text = _loc2.name;
} // end if
_loc1.item_btn.onRollOver = handleMenuItemRollOver;
_loc1.item_btn.onRelease = handleMenuItemRelease;
} // end of for
} // End of the function
function closeMenuList(c)
{
var _loc1 = SAFE_MENU.menu_mc;
for (var _loc3 in _loc1)
{
if (_loc1[_loc3].c > c)
{
_loc1[_loc3].removeMovieClip();
} // end if
} // end of for...in
} // End of the function
function handleMenuItemRollOver()
{
var _loc3 = this._parent._parent.c;
var _loc4 = this._parent.r;
var _loc2 = this._parent.ob;
stopCloseSafeMenuDelay();
closeMenuList(_loc3);
if (_loc2.menu)
{
showMenuList(_loc2.menu, _loc3 + 1, _loc4, _loc2.wide);
} // end if
} // End of the function
function handleMenuItemRelease()
{
var _loc2 = this._parent;
if (_loc2.ob.action == "joke")
{
sendJoke();
}
else if (_loc2.ob.action == "tour")
{
if (!shell.isItemOnMyPlayer(428))
{
var _loc3 = getLocalizedString("tour_guide_hat_required");
showPrompt("warn", _loc3);
}
else
{
sendTourGuideMessage();
} // end else if
}
else
{
sendSafeMessage(_loc2.ob.id);
} // end else if
closeSafeMenu();
} // End of the function
function startCloseSafeMenuDelay()
{
var _loc1 = interface_mc.safe_menu_mc.menu_mc;
var delay_counter = 12;
_loc1.onEnterFrame = function ()
{
if (delay_counter < 1)
{
closeSafeMenu();
}
else
{
--delay_counter;
} // end else if
};
} // End of the function
function stopCloseSafeMenuDelay()
{
var _loc1 = SAFE_MENU.menu_mc;
delete _loc1.onEnterFrame;
} // End of the function
function closeSafeMenu()
{
SAFE_MENU.gotoAndStop(1);
} // End of the function
function showBuddyWidget()
{
showBuddyList();
setupBuddyWidget();
} // End of the function
function showBuddyList()
{
showWidget(BUDDY_WIDGET);
updateBuddyWidget(0, "buddy");
} // End of the function
function showOnlineList()
{
showWidget(BUDDY_WIDGET);
updateBuddyWidget(0, "online");
} // End of the function
function showIgnoreList()
{
showWidget(BUDDY_WIDGET);
is_buddy_widget_open = true;
updateBuddyWidget(0, "ignore");
} // End of the function
function updateBuddyWidget(page_id, list_name)
{
var _loc4 = BUDDY_WIDGET.art_mc;
var _loc9 = getPlayerId();
if (page_id == undefined)
{
page_id = _loc4.page_id;
list_name = _loc4.list_name;
} // end if
_loc4.page_id = page_id;
_loc4.list_name = list_name;
if (list_name == "buddy")
{
var _loc7 = getBuddyList();
_loc4.title_txt.text = getLocalizedString("buddy_list");
}
else if (list_name == "ignore")
{
_loc7 = getIgnoreList();
_loc4.title_txt.text = getLocalizedString("ignore_list");
}
else
{
_loc7 = getPlayerList();
_loc4.title_txt.text = getLocalizedString("online_list");
} // end else if
var _loc6 = paginateArray(_loc7, page_id, MAX_BUDDIES_PER_PAGE);
var _loc8 = getMaxPage(_loc7, MAX_BUDDIES_PER_PAGE);
if (page_id < _loc8)
{
_loc4.next_btn.onRelease = function ()
{
updateBuddyWidget(page_id + 1, list_name);
};
}
else
{
_loc4.next_btn.onRelease = null;
} // end else if
if (page_id > 0)
{
_loc4.back_btn.onRelease = function ()
{
updateBuddyWidget(page_id - 1, list_name);
};
}
else
{
_loc4.back_btn.onRelease = null;
} // end else if
for (var _loc3 = 0; _loc3 < MAX_BUDDIES_PER_PAGE; ++_loc3)
{
var _loc1 = _loc4["item" + _loc3 + "_mc"];
var _loc2 = _loc6[_loc3];
if (_loc2 != undefined)
{
var _loc5 = getPlayerRelationship(_loc2.player_id);
_loc1.icon_mc.gotoAndStop(1);
_loc1.icon_mc.gotoAndStop(_loc5);
_loc1.icon_mc._visible = true;
_loc1.name_txt.text = _loc2.nickname;
_loc1.player_id = _loc2.player_id;
_loc1.nickname = _loc2.nickname;
if (list_name == "ignore")
{
_loc1.item_btn.onRelease = clickIgnoreWidgetItem;
}
else
{
_loc1.item_btn.onRelease = clickBuddyWidgetItem;
} // end else if
continue;
} // end if
_loc1.icon_mc.gotoAndStop(1);
_loc1.icon_mc._visible = false;
_loc1.name_txt.text = "";
_loc1.player_id = undefined;
_loc1.item_btn.onRelease = null;
} // end of for
} // End of the function
function clickBuddyWidgetItem()
{
var _loc2 = this._parent.player_id;
var _loc3 = this._parent.nickname;
showPlayerWidget(_loc2, _loc3);
} // End of the function
function clickIgnoreWidgetItem()
{
var _loc2 = this._parent.player_id;
var _loc4 = this._parent.nickname;
setActiveIgnore(_loc2);
var _loc3 = getLocalizedString("ignore_remove_prompt");
var _loc5 = replaceString("%name%", _loc4, _loc3);
showPrompt("question", _loc5, "", sendIgnoreRemove);
} // End of the function
function setupBuddyWidget()
{
var _loc2 = BUDDY_WIDGET.art_mc;
_loc2.buddy_btn.onRelease = function ()
{
showBuddyList();
closeHint();
};
_loc2.buddy_btn.onRollOver = function ()
{
showHint(this, "buddy_hint");
};
_loc2.buddy_btn.onRollOut = closeHint;
_loc2.online_btn.onRelease = function ()
{
showOnlineList();
closeHint();
};
_loc2.online_btn.onRollOver = function ()
{
showHint(this, "online_hint");
};
_loc2.online_btn.onRollOut = closeHint;
_loc2.ignore_btn.onRelease = function ()
{
showIgnoreList();
closeHint();
};
_loc2.ignore_btn.onRollOver = function ()
{
showHint(this, "ignore_hint");
};
_loc2.ignore_btn.onRollOut = closeHint;
} // End of the function
function setActiveIgnore(player_id)
{
active_ignore = player_id;
} // End of the function
function getActiveIgnore()
{
return (active_ignore);
} // End of the function
function isBuddyWidgetOpen()
{
if (BUDDY_WIDGET._currentframe == 1)
{
return (true);
}
else
{
return (false);
} // end else if
} // End of the function
function showScriptWidget()
{
showWidget(SCRIPT_WIDGET);
updateScriptWidget(0);
} // End of the function
function updateScriptWidget(page_id)
{
var _loc5 = SCRIPT_WIDGET.art_mc;
var _loc3 = getScript();
var _loc6 = Math.floor(_loc3.length / 4);
if (page_id == 0)
{
_loc5.back_btn._visible = false;
}
else
{
_loc5.back_btn._visible = true;
_loc5.back_btn.onRelease = function ()
{
updateScriptWidget(page_id - 1);
};
} // end else if
if (page_id + 1 == _loc6)
{
_loc5.next_btn._visible = false;
}
else
{
_loc5.next_btn._visible = true;
_loc5.next_btn.onRelease = function ()
{
updateScriptWidget(page_id + 1);
};
} // end else if
if (_loc6 > 0)
{
var _loc7 = getLocalizedString("page");
_loc5.page_txt.text = _loc7 + " " + (page_id + 1) + " / " + _loc6;
} // end if
var _loc2 = page_id * 4;
for (var _loc4 = 0; _loc4 < 4; ++_loc4)
{
var _loc1 = _loc5["item" + _loc4 + "_mc"];
if (_loc3[_loc2].note != undefined)
{
_loc1._visible = true;
_loc1.gotoAndStop(2);
_loc1.message_txt.text = _loc3[_loc2].note;
}
else if (_loc3[_loc2].message != undefined)
{
_loc1._visible = true;
_loc1.gotoAndStop(1);
_loc1.line_id = _loc2;
_loc1.name_txt.text = _loc3[_loc2].name;
_loc1.message_txt.text = _loc3[_loc2].message;
_loc1.send_btn.onRelease = clickScriptLine;
}
else
{
_loc1._visible = false;
} // end else if
++_loc2;
} // end of for
} // End of the function
function clickScriptLine()
{
var _loc2 = this._parent.line_id;
sendLineMessage(_loc2);
} // End of the function
function showGameWidget(game_name)
{
var _loc1 = GAME_WIDGET;
var _loc6 = getFilePath(game_name);
var _loc3 = getLocalizedString(game_name);
var _loc9 = closeGameWidget;
var _loc7 = GAME_WIDGET.load_mc.startGame;
var _loc4 = new MovieClipLoader();
var _loc2 = new Object();
_loc1.load_mc.removeMovieClip();
_loc1.createEmptyMovieClip("load_mc", 1);
WINDOW.gotoAndStop("Wait");
WINDOW.close_btn.onRelease = closeWindow;
WINDOW.progressbar_mc.message_txt.text = _loc3;
WINDOW.block_mc.useHandCursor = false;
WINDOW.block_mc.tabEnabled = false;
WINDOW.block_mc.onRelease = null;
_loc2.onLoadProgress = function (target_mc, bytes_loaded, bytes_total)
{
var _loc1 = Math.floor(bytes_loaded / bytes_total * 100);
WINDOW.progressbar_mc.gotoAndStop(_loc1);
};
_loc2.onLoadInit = function (target_mc)
{
target_mc._lockroot = true;
showWidget(target_mc._parent);
centerWidget(target_mc._parent);
closeWindow();
target_mc.startGame();
};
_loc4.addListener(_loc2);
_loc4.loadClip(_loc6, _loc1.load_mc);
} // End of the function
function closeGameWidget(mc)
{
if (mc != undefined)
{
closeWidget(mc);
}
else
{
closeWidget(GAME_WIDGET);
} // end else if
} // End of the function
function showPhoneWidget()
{
showWidget(PHONE_WIDGET);
updatePhoneWidget();
} // End of the function
function updatePhoneWidget()
{
var mc = PHONE_WIDGET.art_mc;
mc.screen_mc.gotoAndStop(LANGUAGE_FRAME);
mc.screen_mc.art_mc.gotoAndStop(1);
mc.teleport_txt.text = getLocalizedString("teleport");
mc.hq_txt.text = getLocalizedString("visit_hq");
mc.secret_btn.onRelease = function ()
{
if (mc.gadget_mc._currentframe == mc.gadget_mc._totalframes)
{
mc.gadget_mc.gotoAndStop(2);
}
else
{
mc.gadget_mc.nextFrame();
} // end else if
};
mc.teleport_btn.onRelease = function ()
{
var _loc1 = mc.screen_mc.art_mc._currentframe;
sendJoinRoom(phone_list[_loc1 - 1], 0, 0);
};
mc.hq_btn.onRelease = function ()
{
sendJoinRoom("agent", 0, 0);
};
mc.scroll_mc.next_btn.onRelease = function ()
{
mc.scroll_mc.gotoAndPlay("up");
if (mc.screen_mc.art_mc._currentframe == mc.screen_mc.art_mc._totalframes)
{
mc.screen_mc.art_mc.gotoAndStop(1);
}
else
{
mc.screen_mc.art_mc.nextFrame();
} // end else if
};
mc.scroll_mc.back_btn.onRelease = function ()
{
mc.scroll_mc.gotoAndPlay("down");
if (mc.screen_mc.art_mc._currentframe == 1)
{
mc.screen_mc.art_mc.gotoAndStop(mc.screen_mc.art_mc._totalframes);
}
else
{
mc.screen_mc.art_mc.prevFrame();
} // end else if
};
mc.next_btn.onRelease = mc.scroll_mc.next_btn.onRelease;
} // End of the function
function showPuffleWidget(puffle_id)
{
showWidget(PUFFLE_WIDGET);
setActivePuffle(puffle_id);
updatePuffleWidget();
} // End of the function
function updatePuffleWidget()
{
var _loc5 = getActivePuffle();
var _loc2 = PUFFLE_WIDGET.art_mc;
var _loc3 = getPuffleObjectById(_loc5);
traceObject(_loc3);
var _loc8 = Math.round(_loc3.hunger / 10);
var _loc6 = Math.round(_loc3.health / 10);
var _loc7 = Math.round(_loc3.rest / 10);
var _loc4 = _loc3.happy;
if (_loc4 > 75)
{
var _loc9 = 1;
}
else if (_loc4 > 50)
{
_loc9 = 2;
}
else if (_loc4 > 25)
{
_loc9 = 3;
}
else
{
_loc9 = 4;
} // end else if
_loc2.paper_mc.gotoAndStop(_loc3.type_id + 1);
_loc2.paper_mc.art_mc.gotoAndStop(_loc9);
_loc2.name_txt.text = _loc3.name;
_loc2.stats_mc.gotoAndStop(shell.getLocalizedFrame());
_loc2.stats_mc.hunger_mc.gotoAndStop(_loc8);
_loc2.stats_mc.health_mc.gotoAndStop(_loc6);
_loc2.stats_mc.rest_mc.gotoAndStop(_loc7);
_loc2.tab_btn.onRelease = openPuffleWidgetTab;
_loc2.play_btn.onRelease = function ()
{
sendPufflePlay();
closeHint();
};
_loc2.play_btn.onRollOver = function ()
{
showHint(this, "play_puffle_hint");
};
_loc2.play_btn.onRollOut = closeHint;
_loc2.rest_btn.onRelease = function ()
{
sendPuffleRest();
closeHint();
};
_loc2.rest_btn.onRollOver = function ()
{
showHint(this, "rest_puffle_hint");
};
_loc2.rest_btn.onRollOut = closeHint;
_loc2.feed_btn.onRelease = function ()
{
openPuffleWidgetTab();
closeHint();
};
_loc2.feed_btn.onRollOver = function ()
{
showHint(this, "feed_puffle_hint");
};
_loc2.feed_btn.onRollOut = closeHint;
_loc2.walk_btn.onRelease = function ()
{
sendPuffleWalk();
closeHint();
};
_loc2.walk_btn.onRollOver = function ()
{
showHint(this, "walk_puffle_hint");
};
_loc2.walk_btn.onRollOut = closeHint;
} // End of the function
function closePuffleWidget()
{
closeWidget(PUFFLE_WIDGET);
} // End of the function
function openPuffleWidgetTab()
{
var _loc1 = PUFFLE_WIDGET.art_mc;
_loc1.gotoAndStop(2);
_loc1.tab_btn.onRelease = closePuffleWidgetTab;
_loc1.gum_btn.onRelease = function ()
{
buyPuffleGum();
};
_loc1.cookie_btn.onRelease = function ()
{
buyPuffleCookie();
};
_loc1.food_btn.onRelease = function ()
{
buyPuffleFood();
};
_loc1.bath_btn.onRelease = function ()
{
buyPuffleBath();
};
} // End of the function
function closePuffleWidgetTab()
{
var _loc1 = PUFFLE_WIDGET.art_mc;
_loc1.gotoAndStop(1);
_loc1.tab_btn.onRelease = openPuffleWidgetTab;
} // End of the function
function setActivePuffle(puffle_id)
{
PUFFLE_WIDGET.puffle_id = puffle_id;
} // End of the function
function getActivePuffle()
{
return (PUFFLE_WIDGET.puffle_id);
} // End of the function
function isPuffleWidgetOpen()
{
if (PUFFLE_WIDGET._currentframe == 1)
{
return (true);
}
else
{
return (false);
} // end else if
} // End of the function
function showPlayerWidget(player_id, nickname)
{
var _loc1 = new Object();
_loc1.player_id = player_id;
_loc1.nickname = nickname;
setActivePlayerObject(_loc1);
showWidget(PLAYER_WIDGET, closePlayerWidget);
updatePlayerWidget();
} // End of the function
function closePlayerWidget()
{
setActivePlayerObject(null);
} // End of the function
function updatePlayerWidget()
{
var _loc1 = PLAYER_WIDGET.art_mc;
var _loc2 = getActivePlayerId();
var _loc5 = getActivePlayerNickname();
var _loc3 = getPlayerObject(_loc2);
var _loc4 = getPlayerRelationship(_loc2);
if (_loc3 == undefined)
{
_loc1.gotoAndStop(1);
}
else
{
if (_loc2 == getPlayerId())
{
if (is_player_widget_tab_open)
{
openPlayerWidgetTab();
}
else
{
closePlayerWidgetTab();
} // end else if
updatePlayerWidgetCoins();
}
else
{
_loc1.gotoAndStop(2);
} // end else if
if (isLocalPlayer(_loc2))
{
updatePaperDoll(_loc1, _loc3, true);
}
else
{
updatePaperDoll(_loc1, _loc3, false);
} // end else if
updatePlayerWidgetMenu(_loc2, _loc4);
} // end else if
_loc1.name_txt.text = _loc5;
_loc1.icon_mc.gotoAndStop(_loc4);
} // End of the function
function updatePlayerWidgetCoins()
{
var _loc2 = PLAYER_WIDGET.art_mc;
var _loc1 = getLocalizedString("widget_coins");
_loc1 = replaceString("%total%", getCoins(), _loc1);
_loc2.coins_txt.text = _loc1;
} // End of the function
function updatePlayerWidgetMenu(player_id, player_relationship)
{
var _loc2 = PLAYER_WIDGET.art_mc;
_loc2.buddy_mc.gotoAndStop(1);
_loc2.profile_mc.gotoAndStop(1);
_loc2.home_mc.gotoAndStop(1);
_loc2.mail_mc.gotoAndStop(1);
_loc2.ignore_mc.gotoAndStop(1);
_loc2.report_mc.gotoAndStop(1);
if (player_relationship == "Player")
{
}
else if (player_relationship == "Mascot")
{
_loc2.buddy_mc.gotoAndStop(4);
}
else if (player_relationship == "Online")
{
_loc2.buddy_mc.gotoAndStop(3);
_loc2.profile_mc.gotoAndStop(2);
_loc2.home_mc.gotoAndStop(2);
_loc2.mail_mc.gotoAndStop(2);
_loc2.report_mc.gotoAndStop(2);
}
else if (player_relationship == "Offline")
{
_loc2.buddy_mc.gotoAndStop(3);
_loc2.home_mc.gotoAndStop(2);
_loc2.mail_mc.gotoAndStop(2);
_loc2.report_mc.gotoAndStop(2);
}
else if (player_relationship == "Ignore")
{
_loc2.ignore_mc.gotoAndStop(3);
}
else
{
_loc2.buddy_mc.gotoAndStop(2);
_loc2.mail_mc.gotoAndStop(2);
_loc2.ignore_mc.gotoAndStop(2);
_loc2.report_mc.gotoAndStop(2);
} // end else if
if (isModerator())
{
_loc2.profile_mc.gotoAndStop(3);
_loc2.ignore_mc.gotoAndStop(2);
_loc2.report_mc.gotoAndStop(2);
} // end if
if (player_relationship == "Online" || player_relationship == "Offline")
{
_loc2.buddy_mc.button_btn.onRelease = function ()
{
if (isPlayerWidgetClickReady(2000))
{
var _loc2 = getActivePlayerNickname();
var _loc1 = getLocalizedString("buddy_remove_prompt");
var _loc3 = replaceString("%name%", _loc2, _loc1);
showPrompt("question", _loc3, "", sendBuddyRemove);
} // end if
closeHint();
};
_loc2.buddy_mc.button_btn.onRollOver = function ()
{
showHint(this, "remove_buddy_hint");
};
}
else if (player_relationship == "Mascot")
{
_loc2.buddy_mc.button_btn.onRelease = function ()
{
closeHint();
};
_loc2.buddy_mc.button_btn.onRollOver = function ()
{
showHint(this, "free_item_hint");
};
}
else
{
_loc2.buddy_mc.button_btn.onRelease = function ()
{
if (!shell.hasMaxBuddies())
{
if (isPlayerWidgetClickReady(2000))
{
var _loc2 = getActivePlayerNickname();
var _loc1 = getLocalizedString("buddy_request_prompt");
var _loc3 = replaceString("%name%", _loc2, _loc1);
showPrompt("question", _loc3, "", sendBuddyRequest);
} // end if
}
else
{
shell.$e("[interface] updatePlayerWidgetMenu() -> Max amount of buddies! ", {error_code: shell.BUDDY_LIMIT});
} // end else if
closeHint();
};
_loc2.buddy_mc.button_btn.onRollOver = function ()
{
showHint(this, "add_buddy_hint");
};
} // end else if
_loc2.buddy_mc.button_btn.onRollOut = closeHint;
_loc2.mail_mc.button_btn.onRelease = function ()
{
if (isPlayerWidgetClickReady(2500))
{
var _loc1 = getActivePlayerId();
var _loc2 = getActivePlayerNickname();
shell.sendMailToUserById(_loc1, _loc2);
} // end if
closeHint();
};
_loc2.mail_mc.button_btn.onRollOver = function ()
{
showHint(this, "send_mail_hint");
};
_loc2.mail_mc.button_btn.onRollOut = closeHint;
_loc2.profile_mc.button_btn.onRelease = function ()
{
findPlayer(getActivePlayerId());
closeHint();
};
_loc2.profile_mc.button_btn.onRollOver = function ()
{
showHint(this, "profile_hint");
};
_loc2.profile_mc.button_btn.onRollOut = closeHint;
_loc2.home_mc.button_btn.onRelease = function ()
{
sendJoinPlayerIgloo(getActivePlayerId());
closeHint();
};
_loc2.home_mc.button_btn.onRollOver = function ()
{
showHint(this, "visit_home_hint");
};
_loc2.home_mc.button_btn.onRollOut = closeHint;
if (player_relationship == "Ignore")
{
_loc2.ignore_mc.button_btn.onRelease = function ()
{
if (isPlayerWidgetClickReady(2000))
{
setActiveIgnore(getActivePlayerId());
var _loc2 = getActivePlayerNickname();
var _loc1 = getLocalizedString("ignore_remove_prompt");
var _loc3 = replaceString("%name%", _loc2, _loc1);
showPrompt("question", _loc3, "", sendIgnoreRemove);
} // end if
closeHint();
};
_loc2.ignore_mc.button_btn.onRollOver = function ()
{
showHint(this, "remove_ignore_hint");
};
}
else
{
_loc2.ignore_mc.button_btn.onRelease = function ()
{
if (isPlayerWidgetClickReady(2000))
{
var _loc2 = getActivePlayerNickname();
var _loc1 = getLocalizedString("ignore_request_prompt");
var _loc3 = replaceString("%name%", _loc2, _loc1);
showPrompt("question", _loc3, "", sendIgnoreRequest);
} // end if
closeHint();
};
_loc2.ignore_mc.button_btn.onRollOver = function ()
{
showHint(this, "add_ignore_hint");
};
} // end else if
_loc2.ignore_mc.button_btn.onRollOut = closeHint;
_loc2.report_mc.button_btn.onRelease = function ()
{
showContent("report_form");
closeHint();
};
_loc2.report_mc.button_btn.onRollOver = function ()
{
showHint(this, "report_player_hint");
};
_loc2.report_mc.button_btn.onRollOut = closeHint;
_loc2.remove_btn.onRelease = function ()
{
if (isPlayerWidgetClickReady(1000))
{
shell.sendClearPaperdoll();
} // end if
closeHint();
};
_loc2.remove_btn.onRollOver = function ()
{
showHint(this, "remove_hint");
};
_loc2.remove_btn.onRollOut = closeHint;
if (isModerator())
{
_loc2.report_mc.button_btn.onRelease = function ()
{
var _loc2 = getActiveReport();
var _loc3 = _loc2.player_id;
var _loc1 = _loc2.nickname;
if (_loc3 == getActivePlayerId())
{
var _loc4 = _loc1 + ": " + getActiveReportMessage();
showPrompt("question", _loc4, undefined, banPlayer);
}
else
{
_loc1 = getActivePlayerNickname();
setActiveReport(getActivePlayerId(), _loc1, "");
_loc4 = shell.getLocalizedString("ban_player_hint") + ": " + _loc1;
showPrompt("question", _loc4, undefined, banPlayer);
} // end else if
closeHint();
};
_loc2.report_mc.button_btn.onRollOver = function ()
{
showHint(this, "ban_player_hint");
};
_loc2.ignore_mc.button_btn.onRelease = function ()
{
var _loc1 = getActivePlayerNickname();
var _loc2 = shell.getLocalizedString("kick_player_hint") + ": " + _loc1;
showPrompt("question", "Kick: " + _loc1, undefined, kickPlayer);
closeHint();
};
_loc2.ignore_mc.button_btn.onRollOver = function ()
{
showHint(this, "kick_player_hint");
};
_loc2.profile_mc.button_btn.onRelease = function ()
{
var _loc2 = getActivePlayerNickname();
var _loc1 = shell.getLocalizedString("mute_player_hint") + ": " + _loc2;
showPrompt("question", _loc1, undefined, mutePlayer);
closeHint();
};
_loc2.profile_mc.button_btn.onRollOver = function ()
{
showHint(this, "mute_player_hint");
};
} // end if
} // End of the function
function showPlayerWidgetMenu()
{
var _loc8 = PLAYER_WIDGET.art_mc;
var _loc3 = getItemList();
var _loc7 = new Array();
var _loc10 = PLAYER_WIDGET_MENU_MAX_ITEMS;
var _loc9 = player_widget_menu_type;
var _loc16 = player_widget_menu_text;
_loc8.sort_mc.sort_txt.text = _loc16;
if (_loc9 != undefined)
{
if (_loc9 == "INVENTORY_TYPE_ALL")
{
_loc7 = _loc3;
}
else if (_loc9 == "INVENTORY_TYPE_AWARD")
{
var _loc14 = shell.INVENTORY_TYPE_FLAG;
var _loc13 = shell.INVENTORY_TYPE_OTHER;
var _loc11 = shell.INVENTORY_TYPE_PHOTO;
for (var _loc5 in _loc3)
{
var _loc6 = _loc3[_loc5].type;
if (_loc6 == _loc14 || _loc6 == _loc13 || _loc6 == _loc11)
{
traceOject(_loc3[_loc5]);
_loc7.push(_loc3[_loc5]);
} // end if
} // end of for...in
}
else
{
for (var _loc5 in _loc3)
{
if (_loc3[_loc5].type == shell[_loc9])
{
_loc7.push(_loc3[_loc5]);
} // end if
} // end of for...in
} // end else if
}
else
{
_loc7 = _loc3;
} // end else if
_loc7.sortOn(["type", "id"], Array.NUMERIC);
var _loc15 = Math.ceil(_loc7.length / _loc10) - 1;
var _loc12 = paginateArray(_loc7, player_widget_menu_page, _loc10);
if (player_widget_menu_page < _loc15)
{
_loc8.next_btn.onRelease = function ()
{
++player_widget_menu_page;
showPlayerWidgetMenu();
};
}
else
{
_loc8.next_btn.onRelease = undefined;
} // end else if
if (player_widget_menu_page > 0)
{
_loc8.back_btn.onRelease = function ()
{
--player_widget_menu_page;
showPlayerWidgetMenu();
};
}
else
{
_loc8.back_btn.onRelease = undefined;
} // end else if
for (var _loc5 = 0; _loc5 < _loc10; ++_loc5)
{
var _loc4 = _loc12[_loc5];
var _loc2 = _loc8.menu_mc["item" + _loc5 + "_mc"];
if (_loc4 != undefined)
{
if (_loc4.is_member && isMember() || !_loc4.is_member)
{
_loc2.gotoAndStop(1);
_loc2.button_btn.item_id = _loc4.id;
_loc2.button_btn.onRelease = function ()
{
clickPlayerWidgetItem(this.item_id);
};
}
else
{
_loc2.gotoAndStop(2);
_loc2.button_btn.onRelease = function ()
{
showWindow("membership_inventory");
};
} // end else if
_loc2.loader_mc.gotoAndStop(1);
_loc2.icon_mc._visible = false;
loadPlayerWidgetMenuIcon(_loc2.icon_mc, _loc4.id);
continue;
} // end if
removeMovieClip (_loc2.icon_mc.load_mc);
_loc2.loader_mc.gotoAndStop(3);
_loc2.gotoAndStop(3);
_loc2.button_btn.onRelease = undefined;
} // end of for
} // End of the function
function loadPlayerWidgetMenuIcon(mc, id)
{
var _loc2 = new MovieClipLoader();
var _loc1 = new Object();
var _loc3 = getFilePath("clothing_icons") + "" + id + ".swf";
mc.createEmptyMovieClip("load_mc", 1);
_loc1.onLoadInit = function (target_mc)
{
target_mc._parent._parent.loader_mc.gotoAndStop(3);
target_mc._parent._visible = true;
};
_loc1.onLoadError = function (target_mc, error_code)
{
target_mc._parent._parent.loader_mc.gotoAndStop(2);
};
_loc2.addListener(_loc1);
_loc2.loadClip(_loc3, mc.load_mc);
} // End of the function
function openPlayerWidgetSortMenu()
{
var mc = PLAYER_WIDGET.art_mc.sort_mc;
mc.gotoAndStop(2);
var _loc1 = {x: mc._x, y: mc._y};
mc._parent.localToGlobal(_loc1);
traceObject(_loc1);
mc.back_btn._x = -_loc1.x;
mc.back_btn._y = -_loc1.y;
mc.sort_btn.onRelease = closePlayerWidgetSortMenu;
mc.back_btn.onRelease = closePlayerWidgetSortMenu;
mc.back_btn.onRollOver = closePlayerWidgetSortMenu;
mc.back_btn.useHandCursor = false;
mc.safe_btn.useHandCursor = false;
mc.head_txt.text = shell.getLocalizedString("head_items");
mc.head_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.head_btn.onRelease = function ()
{
player_widget_menu_text = mc.head_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_HEAD");
};
mc.face_txt.text = shell.getLocalizedString("face_items");
mc.face_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.face_btn.onRelease = function ()
{
player_widget_menu_text = mc.face_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_FACE");
};
mc.neck_txt.text = shell.getLocalizedString("neck_items");
mc.neck_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.neck_btn.onRelease = function ()
{
player_widget_menu_text = mc.neck_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_NECK");
};
mc.body_txt.text = shell.getLocalizedString("body_items");
mc.body_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.body_btn.onRelease = function ()
{
player_widget_menu_text = mc.body_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_BODY");
};
mc.hand_txt.text = shell.getLocalizedString("hand_items");
mc.hand_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.hand_btn.onRelease = function ()
{
player_widget_menu_text = mc.hand_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_HAND");
};
mc.feet_txt.text = shell.getLocalizedString("feet_items");
mc.feet_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.feet_btn.onRelease = function ()
{
player_widget_menu_text = mc.feet_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_FEET");
};
mc.colour_txt.text = shell.getLocalizedString("colour_items");
mc.colour_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.colour_btn.onRelease = function ()
{
player_widget_menu_text = mc.colour_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_COLOUR");
};
mc.other_txt.text = shell.getLocalizedString("other_items");
mc.other_btn.onRollOver = openPlayerWidgetSortOtherMenu;
mc.other_btn.onRelease = function ()
{
player_widget_menu_text = mc.other_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_AWARD");
};
mc.all_txt.text = shell.getLocalizedString("all_items");
mc.all_btn.onRollOver = closePlayerWidgetSortOtherMenu;
mc.all_btn.onRelease = function ()
{
player_widget_menu_text = mc.all_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_ALL");
};
} // End of the function
function openPlayerWidgetSortOtherMenu()
{
var mc = PLAYER_WIDGET.art_mc.sort_mc;
mc.gotoAndStop(3);
mc.award_txt.text = shell.getLocalizedString("award_items");
mc.award_btn.onRelease = function ()
{
player_widget_menu_text = mc.award_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_OTHER");
};
mc.flag_txt.text = shell.getLocalizedString("flag_items");
mc.flag_btn.onRelease = function ()
{
player_widget_menu_text = mc.flag_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_FLAG");
};
mc.photo_txt.text = shell.getLocalizedString("photo_items");
mc.photo_btn.onRelease = function ()
{
player_widget_menu_text = mc.photo_txt.text;
clickPlayerWidgetSortMenu("INVENTORY_TYPE_PHOTO");
};
} // End of the function
function closePlayerWidgetSortOtherMenu()
{
var _loc1 = PLAYER_WIDGET.art_mc.sort_mc;
_loc1.gotoAndStop(2);
} // End of the function
function clickPlayerWidgetSortMenu(type)
{
player_widget_menu_type = type;
player_widget_menu_page = 0;
closePlayerWidgetSortMenu();
showPlayerWidgetMenu();
} // End of the function
function closePlayerWidgetSortMenu()
{
var _loc1 = PLAYER_WIDGET.art_mc.sort_mc;
_loc1.gotoAndStop(1);
_loc1.sort_btn.onRelease = openPlayerWidgetSortMenu;
} // End of the function
function openPlayerWidgetTab()
{
var _loc1 = PLAYER_WIDGET.art_mc;
is_player_widget_tab_open = true;
_loc1.gotoAndStop(4);
_loc1.tab_btn.onRelease = closePlayerWidgetTab;
_loc1.tab_mc.onRelease = undefined;
_loc1.tab_mc.useHandCursor = false;
showPlayerWidgetMenu(item_list);
_loc1.sort_mc.sort_btn.onRelease = function ()
{
openPlayerWidgetSortMenu();
};
} // End of the function
function closePlayerWidgetTab()
{
var _loc1 = PLAYER_WIDGET.art_mc;
is_player_widget_tab_open = false;
_loc1.gotoAndStop(3);
_loc1.tab_btn.onRelease = openPlayerWidgetTab;
} // End of the function
function clickPlayerWidgetItem(item_id)
{
var _loc3 = PLAYER_WIDGET.art_mc;
var _loc2 = getInventoryObjectById(item_id);
traceObject(_loc2);
if (isPlayerWidgetClickReady(1000))
{
if (item_id == 800)
{
showPhoneWidget();
}
else if (isItemOnPlayer(item_id))
{
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_OTHER"))
{
showContent(item_id + "_award");
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_COLOUR"))
{
shell.sendUpdatePlayerColour(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_PHOTO"))
{
shell.sendUpdatePlayerPhoto(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_FLAG"))
{
shell.sendUpdatePlayerFlag(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_HEAD"))
{
shell.sendUpdatePlayerHead(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_FACE"))
{
shell.sendUpdatePlayerFace(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_NECK"))
{
shell.sendUpdatePlayerNeck(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_BODY"))
{
shell.sendUpdatePlayerBody(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_HAND"))
{
shell.sendUpdatePlayerHand(item_id);
}
else if (_loc2.type == getShellConstant("INVENTORY_TYPE_FEET"))
{
shell.sendUpdatePlayerFeet(item_id);
} // end else if
} // end if
closeWindow();
} // End of the function
function clickPlayerWidgetRemoveItem(name)
{
var _loc3 = PLAYER_WIDGET.art_mc;
if (isPlayerWidgetClickReady(1000))
{
if (name == "colour_id")
{
shell.sendUpdatePlayerColour(0);
}
else if (name == "head")
{
shell.sendUpdatePlayerHead(0);
}
else if (name == "face")
{
shell.sendUpdatePlayerFace(0);
}
else if (name == "neck")
{
shell.sendUpdatePlayerNeck(0);
}
else if (name == "body")
{
shell.sendUpdatePlayerBody(0);
}
else if (name == "hand")
{
shell.sendUpdatePlayerHand(0);
}
else if (name == "feet")
{
shell.sendUpdatePlayerFeet(0);
}
else if (name == "flag_id")
{
shell.sendUpdatePlayerFlag(0);
}
else if (name == "photo_id")
{
shell.sendUpdatePlayerPhoto(0);
} // end else if
var _loc2 = new Object();
_loc2[name] = 0;
updatePaperDoll(_loc3, _loc2, true);
} // end if
} // End of the function
function setActivePlayerObject(ob)
{
active_player_object = ob;
} // End of the function
function getActivePlayerObject()
{
return (active_player_object);
} // End of the function
function getActivePlayerId()
{
return (getActivePlayerObject().player_id);
} // End of the function
function getActivePlayerNickname()
{
return (getActivePlayerObject().nickname);
} // End of the function
function isActivePlayer(player_id)
{
if (player_id == getActivePlayerId())
{
return (true);
}
else
{
return (false);
} // end else if
} // End of the function
function isItemOnPlayer(item_id)
{
var _loc1 = getPlayerObject(getPlayerId());
if (_loc1.colour_id == item_id)
{
return (true);
}
else if (_loc1.head == item_id)
{
return (true);
}
else if (_loc1.face == item_id)
{
return (true);
}
else if (_loc1.neck == item_id)
{
return (true);
}
else if (_loc1.body == item_id)
{
return (true);
}
else if (_loc1.hand == item_id)
{
return (true);
}
else if (_loc1.feet == item_id)
{
return (true);
}
else if (_loc1.flag_id == item_id)
{
return (true);
}
else if (_loc1.photo_id == item_id)
{
return (true);
}
else
{
return (false);
} // end else if
} // End of the function
function isPlayerWidgetOpen()
{
if (PLAYER_WIDGET._currentframe == 1)
{
return (true);
}
else
{
return (false);
} // end else if
} // End of the function
function isPlayerWidgetClickReady(delay_time)
{
var _loc1 = getTimer();
if (player_widget_last_click + delay_time < _loc1)
{
player_widget_last_click = _loc1;
return (true);
} // end if
return (false);
} // End of the function
function showWaddleWidget(name, waddle_id)
{
showWidget(WADDLE_WIDGET, closeWaddleWidget);
active_waddle_name = name;
active_waddle_id = waddle_id;
updateWaddleWidget();
} // End of the function
function updateWaddleWidget()
{
var _loc3 = WADDLE_WIDGET.art_mc;
var _loc6 = active_waddle_id;
var _loc8 = active_waddle_name;
var _loc7 = shell.getWaddleById(_loc6);
var _loc4 = _loc7.player_list;
if (_loc3.load_mc.art_mc == undefined)
{
_loc3.load_mc.createEmptyMovieClip("art_mc", 1);
_loc3.load_mc.art_mc.loadMovie(shell.getPath(_loc8 + "_bg"));
} // end if
_loc3.item0_mc._visible = false;
_loc3.item1_mc._visible = false;
_loc3.item2_mc._visible = false;
_loc3.item3_mc._visible = false;
for (var _loc5 in _loc4)
{
var _loc1 = _loc3["item" + _loc5 + "_mc"];
var _loc2 = _loc4[_loc5];
_loc1._visible = true;
if (_loc2 != undefined)
{
if (_loc2 == getPlayerNickname())
{
_loc1.icon_mc.gotoAndStop(3);
}
else
{
_loc1.icon_mc.gotoAndStop(4);
} // end else if
_loc1.name_txt.text = _loc2;
continue;
} // end if
_loc1.icon_mc.gotoAndStop(6);
_loc1.name_txt.text = getLocalizedString("Empty");
} // end of for...in
} // End of the function
function handleUpdateWaddle(ob)
{
traceObject(ob);
var _loc2 = ob.waddle_id;
var _loc3 = ob.player_list;
if (_loc2 == active_waddle_id)
{
updateWaddleWidget();
} // end if
} // End of the function
function closeWaddleWidget()
{
ENGINE.sendLeaveWaddle();
} // End of the function
function setActiveWaddle(name)
{
active_waddle = name;
} // End of the function
function getActiveWaddle()
{
return (active_waddle);
} // End of the function
function loadFile(mc, file_path, load_message, closeFunction, initFunction)
{
var _loc2 = new MovieClipLoader();
var _loc1 = new Object();
mc.load_mc.removeMovieClip();
mc.gotoAndStop("Wait");
mc.createEmptyMovieClip("load_mc", 1);
mc.block_mc.useHandCursor = false;
mc.block_mc.tabEnabled = false;
mc.block_mc.onRelease = null;
mc.close = closeFunction;
mc.close_btn.onRelease = closeFunction;
mc.progressbar_mc.message_txt.text = load_message;
_loc1.onLoadStart = function (target_mc)
{
target_mc._visible = false;
};
_loc1.onLoadProgress = function (target_mc, bytes_loaded, bytes_total)
{
var _loc1 = Math.floor(bytes_loaded / bytes_total * 100);
mc.progressbar_mc.gotoAndStop(_loc1);
};
_loc1.onLoadInit = function (target_mc)
{
target_mc._visible = true;
mc._lockroot = true;
mc.buyItem = buyInventory;
mc.buyFurniture = buyFurniture;
mc.upgradeIgloo = buyIglooUpgrade;
mc.upgradeIglooFloor = buyIglooFloor;
mc.adoptPet = adoptPuffle;
mc.showWindow = LEGACY_showWindow;
mc.myPlayer = new Object();
mc.myPlayer.Nickname = shell.getMyPlayerNickname();
mc.gotoAndStop("Done");
initFunction();
};
_loc1.onLoadError = function (target_mc, error_code)
{
};
_loc2.addListener(_loc1);
_loc2.loadClip(file_path, mc.load_mc);
} // End of the function
function updatePaperDoll(mc, ob, is_editable)
{
if (ob.colour_id != undefined && ob.colour_id != mc.colour_id)
{
var _loc4 = new Color(mc.paper_doll_mc.colour_mc);
_loc4.setRGB(getColourHex(ob.colour_id));
mc.colour_id = ob.colour_id;
} // end if
if (mc.flag_mc != undefined)
{
if (ob.flag_id != undefined && ob.flag_id != mc.flag_id)
{
removeMovieClip (mc.flag_mc.art_mc);
if (ob.flag_id > 0)
{
mc.flag_mc.createEmptyMovieClip("art_mc", 1);
mc.flag_mc.art_mc._xscale = 66;
mc.flag_mc.art_mc._yscale = 66;
var _loc5 = getFilePath("clothing_icons") + ob.flag_id + ".swf";
loadPaperDollItem(mc.flag_mc.art_mc, _loc5);
} // end if
mc.flag_id = ob.flag_id;
} // end if
} // end if
if (mc.photo_mc != undefined)
{
if (ob.photo_id != undefined && ob.photo_id != mc.photo_id)
{
removeMovieClip (mc.photo_mc.art_mc);
if (ob.photo_id > 0)
{
mc.photo_mc.createEmptyMovieClip("art_mc", 1);
var _loc3 = ob.photo_id - 900;
_loc5 = getFilePath("clothing_photos") + _loc3 + ".swf";
loadPaperDollItem(mc.photo_mc.art_mc, _loc5);
} // end if
mc.photo_id = ob.photo_id;
} // end if
} // end if
ob.back = 0;
if (ob.neck > 0)
{
if (getInventoryObjectById(ob.neck).is_back)
{
ob.back = ob.neck;
} // end if
} // end if
if (ob.head == 448)
{
ob.back = 448;
} // end if
updatePaperDollItem(mc.paper_doll_mc, ob, "hand", 7000);
updatePaperDollItem(mc.paper_doll_mc, ob, "head", 6000);
updatePaperDollItem(mc.paper_doll_mc, ob, "face", 5000);
updatePaperDollItem(mc.paper_doll_mc, ob, "neck", 4000);
updatePaperDollItem(mc.paper_doll_mc, ob, "body", 3000);
updatePaperDollItem(mc.paper_doll_mc, ob, "feet", 2000);
updatePaperDollItem(mc.paper_doll_mc, ob, "back", 1000);
if (ob.neck == 168)
{
mc.paper_doll_mc.neck_mc.swapDepths(9000);
} // end if
if (ob.body == 274 || ob.body == 292)
{
mc.paper_doll_mc.body_mc.swapDepths(4500);
} // end if
mc.flag_mc.onRelease = undefined;
delete mc.flag_mc.onRelease;
mc.photo_mc.onRelease = undefined;
delete mc.photo_mc.onRelease;
if (is_editable)
{
if (ob.flag_id > 0)
{
mc.flag_mc.useHandCursor = true;
mc.flag_mc.onRelease = function ()
{
clickPaperDollItem("flag_id");
};
}
else
{
mc.flag_mc.useHandCursor = false;
mc.flag_mc.onRelease = null;
} // end else if
if (ob.photo_id > 0)
{
mc.photo_mc.useHandCursor = true;
mc.photo_mc.onRelease = function ()
{
clickPaperDollItem("photo_id");
};
}
else
{
mc.photo_mc.useHandCursor = false;
mc.photo_mc.onRelease = null;
} // end else if
mc.paper_doll_mc.colour_mc.useHandCursor = false;
mc.paper_doll_mc.colour_mc.onRelease = function ()
{
};
mc.paper_doll_mc.head_mc.onRelease = function ()
{
clickPaperDollItem("head");
};
mc.paper_doll_mc.face_mc.onRelease = function ()
{
clickPaperDollItem("face");
};
mc.paper_doll_mc.neck_mc.onRelease = function ()
{
clickPaperDollItem("neck");
};
mc.paper_doll_mc.hand_mc.onRelease = function ()
{
clickPaperDollItem("hand");
};
mc.paper_doll_mc.body_mc.onRelease = function ()
{
clickPaperDollItem("body");
};
mc.paper_doll_mc.feet_mc.onRelease = function ()
{
clickPaperDollItem("feet");
};
mc.paper_doll_mc.back_mc.onRelease = function ()
{
clickPaperDollItem("neck");
};
} // end if
} // End of the function
function clickPaperDollItem(name)
{
clickPlayerWidgetRemoveItem(name);
} // End of the function
function updatePaperDollItem(mc, ob, name, depth)
{
if (ob[name] != mc[name] && ob[name] != undefined)
{
removeMovieClip (mc[name + "_mc"]);
if (ob[name] > 0)
{
mc.createEmptyMovieClip(name + "_mc", depth);
mc[name + "_mc"].createEmptyMovieClip("art_mc", 1);
if (name == "back")
{
var _loc4 = getFilePath("clothing_paper") + ob[name] + "_back.swf";
}
else
{
_loc4 = getFilePath("clothing_paper") + ob[name] + ".swf";
} // end else if
loadPaperDollItem(mc[name + "_mc"].art_mc, _loc4);
} // end if
mc[name] = ob[name];
} // end if
} // End of the function
function loadPaperDollItem(mc, file_path)
{
var _loc2 = new MovieClipLoader();
var _loc1 = new Object();
mc._parent._visible = false;
_loc1.onLoadInit = function (target_mc)
{
target_mc._parent._visible = true;
var _loc2 = new mx.transitions.Tween(target_mc, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 5, false);
};
_loc1.onLoadError = function (target_mc, error_code)
{
};
_loc2.addListener(_loc1);
_loc2.loadClip(file_path, mc);
} // End of the function
function updatePaperDoll(mc, ob, is_editable)
{
if (ob.colour_id != undefined && ob.colour_id != mc.colour_id)
{
var _loc4 = new Color(mc.paper_doll_mc.colour_mc);
_loc4.setRGB(getColourHex(ob.colour_id));
mc.colour_id = ob.colour_id;
} // end if
if (mc.flag_mc != undefined)
{
if (ob.flag_id != undefined && ob.flag_id != mc.flag_id)
{
removeMovieClip (mc.flag_mc.art_mc);
if (ob.flag_id > 0)
{
mc.flag_mc.createEmptyMovieClip("art_mc", 1);
mc.flag_mc.art_mc._xscale = 66;
mc.flag_mc.art_mc._yscale = 66;
var _loc5 = getFilePath("clothing_icons") + ob.flag_id + ".swf";
loadPaperDollItem(mc.flag_mc.art_mc, _loc5);
} // end if
mc.flag_id = ob.flag_id;
} // end if
} // end if
if (mc.photo_mc != undefined)
{
if (ob.photo_id != undefined && ob.photo_id != mc.photo_id)
{
removeMovieClip (mc.photo_mc.art_mc);
if (ob.photo_id > 0)
{
mc.photo_mc.createEmptyMovieClip("art_mc", 1);
var _loc3 = ob.photo_id - 900;
_loc5 = getFilePath("clothing_photos") + _loc3 + ".swf";
loadPaperDollItem(mc.photo_mc.art_mc, _loc5);
} // end if
mc.photo_id = ob.photo_id;
} // end if
} // end if
ob.back = 0;
if (ob.neck > 0)
{
if (getInventoryObjectById(ob.neck).is_back)
{
ob.back = ob.neck;
} // end if
} // end if
if (ob.head == 448)
{
ob.back = 448;
} // end if
updatePaperDollItem(mc.paper_doll_mc, ob, "hand", 7000);
updatePaperDollItem(mc.paper_doll_mc, ob, "head", 6000);
updatePaperDollItem(mc.paper_doll_mc, ob, "face", 5000);
updatePaperDollItem(mc.paper_doll_mc, ob, "neck", 4000);
updatePaperDollItem(mc.paper_doll_mc, ob, "body", 3000);
updatePaperDollItem(mc.paper_doll_mc, ob, "feet", 2000);
updatePaperDollItem(mc.paper_doll_mc, ob, "back", 1000);
if (ob.neck == 168)
{
mc.paper_doll_mc.neck_mc.swapDepths(9000);
} // end if
if (ob.body == 274 || ob.body == 292)
{
mc.paper_doll_mc.body_mc.swapDepths(4500);
} // end if
mc.flag_mc.onRelease = undefined;
delete mc.flag_mc.onRelease;
mc.photo_mc.onRelease = undefined;
delete mc.photo_mc.onRelease;
if (is_editable)
{
if (ob.flag_id > 0)
{
mc.flag_mc.useHandCursor = true;
mc.flag_mc.onRelease = function ()
{
clickPaperDollItem("flag_id");
};
}
else
{
mc.flag_mc.useHandCursor = false;
mc.flag_mc.onRelease = null;
} // end else if
if (ob.photo_id > 0)
{
mc.photo_mc.useHandCursor = true;
mc.photo_mc.onRelease = function ()
{
clickPaperDollItem("photo_id");
};
}
else
{
mc.photo_mc.useHandCursor = false;
mc.photo_mc.onRelease = null;
} // end else if
mc.paper_doll_mc.colour_mc.useHandCursor = false;
mc.paper_doll_mc.colour_mc.onRelease = function ()
{
};
mc.paper_doll_mc.head_mc.onRelease = function ()
{
clickPaperDollItem("head");
};
mc.paper_doll_mc.face_mc.onRelease = function ()
{
clickPaperDollItem("face");
};
mc.paper_doll_mc.neck_mc.onRelease = function ()
{
clickPaperDollItem("neck");
};
mc.paper_doll_mc.hand_mc.onRelease = function ()
{
clickPaperDollItem("hand");
};
mc.paper_doll_mc.body_mc.onRelease = function ()
{
clickPaperDollItem("body");
};
mc.paper_doll_mc.feet_mc.onRelease = function ()
{
clickPaperDollItem("feet");
};
mc.paper_doll_mc.back_mc.onRelease = function ()
{
clickPaperDollItem("neck");
};
} // end if
} // End of the function
function clickPaperDollItem(name)
{
clickPlayerWidgetRemoveItem(name);
} // End of the function
function updatePaperDollItem(mc, ob, name, depth)
{
if (ob[name] != mc[name] && ob[name] != undefined)
{
removeMovieClip (mc[name + "_mc"]);
if (ob[name] > 0)
{
mc.createEmptyMovieClip(name + "_mc", depth);
mc[name + "_mc"].createEmptyMovieClip("art_mc", 1);
if (name == "back")
{
var _loc4 = getFilePath("clothing_paper") + ob[name] + "_back.swf";
}
else
{
_loc4 = getFilePath("clothing_paper") + ob[name] + ".swf";
} // end else if
loadPaperDollItem(mc[name + "_mc"].art_mc, _loc4);
} // end if
mc[name] = ob[name];
} // end if
} // End of the function
function loadPaperDollItem(mc, file_path)
{
var _loc2 = new MovieClipLoader();
var _loc1 = new Object();
mc._parent._visible = false;
_loc1.onLoadInit = function (target_mc)
{
target_mc._parent._visible = true;
var _loc2 = new mx.transitions.Tween(target_mc, "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 5, false);
};
_loc1.onLoadError = function (target_mc, error_code)
{
};
_loc2.addListener(_loc1);
_loc2.loadClip(file_path, mc);
} // End of the function
function replaceString(target, word, message)
{
return (message.split(target).join(word));
} // End of the function
function isValidString(txt)
{
if (txt.length < 1)
{
return (false);
} // end if
if (txt == "")
{
return (false);
} // end if
if (txt == undefined)
{
return (false);
} // end if
if (txt == null)
{
return (false);
} // end if
if (txt == "undefined")
{
return (false);
} // end if
return (true);
} // End of the function
function convertToSafeCase(m)
{
m = m.split(" ");
for (var _loc5 in m)
{
var _loc1 = m[_loc5];
if (_loc1.length > 1)
{
var _loc2 = _loc1.charCodeAt(1);
if (_loc2 > 64 && _loc2 < 91)
{
_loc1 = _loc1.toUpperCase();
}
else
{
var _loc3 = _loc1.charCodeAt(0);
if (_loc3 > 64 && _loc3 < 91)
{
_loc1 = _loc1.substr(0, 1).toUpperCase() + _loc1.substr(1).toLowerCase();
}
else
{
_loc1 = _loc1.toLowerCase();
} // end if
} // end else if
} // end else if
m[_loc5] = _loc1;
} // end of for...in
return (m.join(" "));
} // End of the function
function convertToTitleCase(m)
{
m = m.toLowerCase();
var _loc4 = m.substr(0, 1).toUpperCase();
var _loc3 = false;
for (var _loc2 = 1; _loc2 < m.length; ++_loc2)
{
var _loc1 = m.substr(_loc2, 1);
if (_loc1 == " ")
{
_loc3 = true;
}
else
{
if (_loc3)
{
_loc1 = _loc1.toUpperCase();
} // end if
_loc3 = false;
} // end else if
_loc4 = _loc4 + "" + _loc1;
} // end of for
return (_loc4);
} // End of the function
function convertToSentenceCase(m)
{
m = m.toLowerCase();
var _loc2 = m.substr(0, 1).toUpperCase() + m.substr(1);
return (_loc2);
} // End of the function
function removeExtraSpaces(m)
{
var _loc4 = "";
var _loc3 = true;
for (var _loc2 = 0; _loc2 < m.length; ++_loc2)
{
var _loc1 = m.substr(_loc2, 1);
if (_loc1 != " ")
{
_loc4 = _loc4 + _loc1;
_loc3 = false;
continue;
} // end if
if (_loc1 == " " && !_loc3)
{
_loc4 = _loc4 + " ";
_loc3 = true;
} // end if
} // end of for
if (_loc4.substr(_loc4.length - 1) == " ")
{
_loc4 = _loc4.substr(0, _loc4.length - 1);
} // end if
return (_loc4);
} // End of the function
function removeSymbols(m)
{
var _loc4 = "";
for (var _loc1 = 0; _loc1 < m.length; ++_loc1)
{
var _loc2 = m.charCodeAt(_loc1);
if (_loc2 > 96 && _loc2 < 123)
{
_loc4 = _loc4 + m.charAt(_loc1);
continue;
} // end if
if (_loc2 == 32)
{
_loc4 = _loc4 + " ";
} // end if
} // end of for
return (_loc4);
} // End of the function
function removeDuplicateLetters(m)
{
var _loc4;
var _loc2;
var _loc3;
for (var _loc1 = 0; _loc1 < m.length; ++_loc1)
{
_loc2 = m.substr(_loc1, 1);
if (_loc2 != _loc4)
{
_loc3 = _loc3 + _loc2;
} // end if
_loc4 = _loc2;
} // end of for
return (_loc3);
} // End of the function
function traceObject(ob)
{
var _loc2 = new Array();
for (var _loc3 in ob)
{
_loc2.push(_loc3 + ":" + ob[_loc3]);
} // end of for...in
} // End of the function
function paginateArray(in_array, page, items_on_page)
{
var _loc2 = page * items_on_page;
var _loc1 = _loc2 + items_on_page;
if (_loc1 > in_array.length)
{
_loc1 = in_array.length;
} // end if
return (in_array.slice(_loc2, _loc1));
} // End of the function
function getMaxPage(in_array, items_on_page)
{
return (Math.ceil(in_array.length / items_on_page) - 1);
} // End of the function
System.security.allowDomain("play.clubpenguin.com");
System.security.allowDomain("media.clubpenguin.com");
System.security.allowDomain("media1.clubpenguin.com");
System.security.allowDomain("media2.clubpenguin.com");
System.security.allowDomain("stage.play.clubpenguin.com");
System.security.allowDomain("stage.media.clubpenguin.com");
System.security.allowDomain("stage.media1.clubpenguin.com");
System.security.allowDomain("stage.media2.clubpenguin.com");
System.security.allowDomain("sandbox01.play.clubpenguin.com");
System.security.allowDomain("sandbox01.media.clubpenguin.com");
System.security.allowDomain("sandbox01.media1.clubpenguin.com");
System.security.allowDomain("sandbox01.media2.clubpenguin.com");
System.security.allowDomain("sandbox02.play.clubpenguin.com");
System.security.allowDomain("sandbox02.media.clubpenguin.com");
System.security.allowDomain("sandbox02.media1.clubpenguin.com");
System.security.allowDomain("sandbox02.media2.clubpenguin.com");
System.security.allowDomain("sandbox03.play.clubpenguin.com");
System.security.allowDomain("sandbox03.media.clubpenguin.com");
System.security.allowDomain("sandbox03.media1.clubpenguin.com");
System.security.allowDomain("sandbox03.media2.clubpenguin.com");
System.security.allowDomain("sandbox04.play.clubpenguin.com");
System.security.allowDomain("sandbox04.media.clubpenguin.com");
System.security.allowDomain("sandbox04.media1.clubpenguin.com");
System.security.allowDomain("sandbox04.media2.clubpenguin.com");
System.security.allowDomain("sandbox05.play.clubpenguin.com");
System.security.allowDomain("sandbox05.media.clubpenguin.com");
System.security.allowDomain("sandbox05.media1.clubpenguin.com");
System.security.allowDomain("sandbox05.media2.clubpenguin.com");
checkDomain();
var shell = _parent;
shell.addListener(shell.START_INTERFACE, handleStartInterface);
shell.addListener(shell.UPDATE_SHELL_STATE, handleUpdateShellState);
shell.addListener(shell.SEND_MESSAGE, handleSendMessage);
shell.addListener(shell.SEND_BLOCKED_MESSAGE, handleSendBlockedMessage);
shell.addListener(shell.SEND_SAFE_MESSAGE, handleSendSafeMessage);
shell.addListener(shell.SEND_LINE_MESSAGE, handleSendLineMessage);
shell.addListener(shell.SEND_TOUR_GUIDE_MESSAGE, handleSendTourGuideMessage);
shell.addListener(shell.SEND_QUICK_MESSAGE, handleSendQuickMessage);
shell.addListener(shell.SEND_JOKE, handleSendJoke);
shell.addListener(shell.SEND_EMOTE, handleSendEmote);
shell.addListener(shell.SEND_BUDDY_REQUEST, handleBuddyRequest);
shell.addListener(shell.SEND_BUDDY_ACCEPT, handleBuddyAccept);
shell.addListener(shell.BUDDY_ONLINE, handleBuddyOnline);
shell.addListener(shell.BUY_INVENTORY, handleBuyInventory);
shell.addListener(shell.BUY_FURNITURE, handleBuyFurniture);
shell.addListener(shell.BUY_IGLOO_TYPE, handleBuyIglooUpgrade);
shell.addListener(shell.BUY_IGLOO_FLOOR, handleBuyIglooFloor);
shell.addListener(shell.ADOPT_PUFFLE, handleAdoptPuffle);
shell.addListener(shell.UPDATE_PLAYER, handleUpdatePlayer);
shell.addListener(shell.UPDATE_CHAT_LOG, handleUpdateLog);
shell.addListener(shell.UPDATE_COINS, handleUpdateCoins);
shell.addListener(shell.UPDATE_BUDDY_LIST, handleUpdateBuddyList);
shell.addListener(shell.UPDATE_EGG_TIMER, handleUpdateEggTimer);
shell.addListener(shell.UPDATE_INVENTORY, handleUpdateInventory);
shell.addListener(shell.LOAD_PLAYER_OBJECT, handleLoadPlayerObject);
shell.addListener(shell.GET_PLAYER_LOCATION, handleFindPlayer);
shell.addListener(shell.JOIN_ROOM, handleJoinRoom);
shell.addListener(shell.JOIN_PLAYER_IGLOO, handleJoinRoom);
shell.addListener(shell.JOIN_GAME, handleJoinRoom);
shell.addListener(shell.UPDATE_WADDLE, handleUpdateWaddle);
var active_player;
var active_ignore;
var is_moderator = false;
var ICONS = interface_mc.icons_mc;
var NEWS_ICON = interface_mc.icons_mc.news_mc;
var MAIL_ICON = interface_mc.icons_mc.mail_mc;
var BUDDY_ICON = interface_mc.icons_mc.buddy_btn;
var MAP_ICON = interface_mc.icons_mc.map_mc;
var MOD_ICON = interface_mc.icons_mc.mod_mc;
var PHONE_ICON = interface_mc.icons_mc.phone_mc;
var EGG_TIMER_ICON = interface_mc.icons_mc.egg_timer_mc;
var CROSSHAIR = interface_mc.crosshair_mc;
CROSSHAIR._visible = false;
var WIDGETS = interface_mc.widgets_mc;
var is_quick_keys_active = false;
var CONTENT = interface_mc.content_mc;
var WINDOW = interface_mc.window_mc;
var is_news_open = false;
var HINT = interface_mc.hint_mc;
var DOCK = interface_mc.dock_mc;
var is_chat_focused = false;
var SHOP = interface_mc.shop_mc;
var active_shop_item = 0;
var active_puffle_action = undefined;
var PROMPT = interface_mc.prompt_mc;
var active_game_prompt = undefined;
var BALLOONS = balloons_mc;
var NICKNAMES = nicknames_mc;
var balloon_duration = 120;
var LOG = interface_mc.log_mc;
var active_report;
var is_log_open = false;
LOG.tab_btn.onRelease = updateLog;
LOG.tab_btn.onPress = dragLog;
LOG.menu_mc.item_mc._visible = false;
var buddy_request_list = new Array();
var buddy_request_item = new Object();
var active_buddy_request;
var last_new_total = 0;
shell.addListener(shell.NEW_MAIL, updateNewMailIcon);
MAIL_ICON.new_mc._visible = false;
var EMOTE_MENU = interface_mc.emote_menu_mc;
var ACTION_MENU = interface_mc.action_menu_mc;
var SAFE_MENU = interface_mc.safe_menu_mc;
var BUDDY_WIDGET = interface_mc.widgets_mc.buddy_mc;
var MAX_BUDDIES_PER_PAGE = 8;
var SCRIPT_WIDGET = interface_mc.widgets_mc.script_mc;
var GAME_WIDGET = interface_mc.widgets_mc.game_mc;
var PHONE_WIDGET = interface_mc.widgets_mc.phone_mc;
var phone_list = ["town", "coffee", "book", "dance", "lounge", "shop", "village", "sport", "lodge", "attic", "mtn", "plaza", "pet", "stage", "pizza", "beach", "light", "beacon", "dock", "forts", "rink", "boiler", "berg", "cave", "mine", "shack", "forest", "cove"];
var PUFFLE_WIDGET = interface_mc.widgets_mc.puffle_mc;
var PLAYER_WIDGET = interface_mc.widgets_mc.player_mc;
var PLAYER_WIDGET_MENU_MAX_ITEMS = 12;
var active_player_object = new Object();
var is_player_widget_tab_open = false;
var player_widget_menu_page = 0;
var player_widget_menu_type = "INVENTORY_TYPE_ALL";
var player_widget_menu_text = shell.getLocalizedString("all_items");
var player_widget_last_click = getTimer();
var WADDLE_WIDGET = interface_mc.widgets_mc.waddle_mc;
var active_waddle_name = undefined;
var active_waddle_id = undefined;
showInterface();
stop ();
// Action script...
// [Action in Frame 1]
function handleStartEngine()
{
INTERFACE = _global.getCurrentInterface();
} // End of the function
function handleUpdateShellState(ob)
{
traceObject(ob);
if (ob.state == SHELL.PLAY_STATE)
{
startMouse();
}
else
{
stopMouse();
} // end else if
} // End of the function
function handleAddPlayer(player_ob)
{
var _loc1 = player_ob.player_id;
if (!SHELL.isMyPlayer(_loc1) && isRoomReady())
{
addPlayer(player_ob);
} // end if
} // End of the function
function handleRemovePlayer(player_id)
{
if (!SHELL.isMyPlayer(player_id))
{
removePlayer(player_id);
} // end if
} // End of the function
function sendPlayerMove(x, y, is_trigger, frame)
{
var _loc1 = SHELL.getMyPlayerId();
var _loc4 = getPlayerMovieClip(_loc1);
var _loc8 = Math.round(_loc4._x);
var _loc7 = Math.round(_loc4._y);
var _loc6 = findPlayerPath(_loc1, x, y);
var _loc2 = _loc6.x;
var _loc3 = _loc6.y;
var _loc9 = findDistance(_loc8, _loc7, _loc2, _loc3);
if (_loc9 > 10)
{
setPlayerAction("move");
movePlayer(_loc1, _loc2, _loc3, is_trigger, frame);
SHELL.sendPlayerMove(_loc2, _loc3);
}
else if (frame != undefined)
{
SHELL.sendPlayerFrame(frame);
} // end else if
} // End of the function
function handlePlayerMove(player_ob)
{
var _loc1 = player_ob.player_id;
if (!SHELL.isMyPlayer(_loc1))
{
var _loc7 = player_ob.x;
var _loc6 = player_ob.y;
var _loc3 = findPlayerPath(_loc1, _loc7, _loc6);
var _loc4 = _loc3.x;
var _loc5 = _loc3.y;
movePlayer(_loc1, _loc4, _loc5);
} // end if
} // End of the function
function sendPuffleMove(puffle_ob)
{
var _loc2 = puffle_ob.puffle_id;
var _loc1 = findPufflePath();
var _loc3 = _loc1.x;
var _loc4 = _loc1.y;
SHELL.sendPuffleMove(_loc2, _loc3, _loc4);
} // End of the function
function handlePuffleMove(puffle_ob)
{
var _loc4 = puffle_ob.x;
var _loc3 = puffle_ob.y;
var _loc2 = getRoomBlockMovieClip();
if (!_loc2.hitTest(_loc4, _loc3, true))
{
movePuffle(puffle_ob);
} // end if
} // End of the function
function handlePuffleWalk(puffle_ob)
{
traceObject(puffle_ob);
var _loc1 = puffle_ob.puffle_id;
var _loc3 = puffle_ob.is_walking;
if (_loc3)
{
hidePuffle(_loc1);
}
else
{
showPuffle(_loc1);
} // end else if
} // End of the function
function sendPlayerAction(frame)
{
var _loc1 = SHELL.getMyPlayerId();
if (validateUpdateFrame(_loc1, frame))
{
updatePlayerFrame(_loc1, frame, true);
setPlayerAction("custom");
SHELL.sendPlayerAction(frame);
} // end if
} // End of the function
function handlePlayerAction(ob)
{
var _loc1 = ob.player_id;
var _loc2 = ob.frame;
if (!SHELL.isMyPlayer(_loc1))
{
if (validateUpdateFrame(_loc1, _loc2))
{
updatePlayerFrame(_loc1, _loc2, true);
} // end if
} // end if
} // End of the function
function sendPlayerSitDown()
{
sendPlayerFrame(getPlayerDirectionToMouse() + 16);
} // End of the function
function sendPlayerFrame(frame)
{
var _loc1 = SHELL.getMyPlayerId();
if (validateUpdateFrame(_loc1, frame))
{
updatePlayerFrame(_loc1, frame);
setPlayerAction("custom");
SHELL.sendPlayerFrame(frame);
} // end if
} // End of the function
function handlePlayerFrame(ob)
{
var _loc1 = ob.player_id;
var _loc2 = ob.frame;
if (!SHELL.isMyPlayer(_loc1))
{
if (validateUpdateFrame(_loc1, _loc2))
{
updatePlayerFrame(_loc1, _loc2);
} // end if
} // end if
} // End of the function
function handlePuffleFrame(ob)
{
traceObject(ob);
var _loc2 = ob.puffle_id;
var _loc3 = ob.frame;
updatePuffleFrame(_loc2, _loc3);
} // End of the function
function sendThrowBall(x, y)
{
setPlayerAction("throw");
throwBall(SHELL.getMyPlayerId(), x, y, -6, -100, 20);
SHELL.sendThrowBall(x, y);
} // End of the function
function handleThrowBall(ob)
{
var _loc2 = ob.player_id;
if (!SHELL.isMyPlayer(_loc2))
{
var _loc4 = ob.x;
var _loc3 = ob.y;
throwBall(_loc2, _loc4, _loc3, -6, -100, 20);
} // end if
} // End of the function
function handleUpdatePlayer(player_ob)
{
updatePlayer(player_ob);
} // End of the function
function sendOpenBook(book_id)
{
setPlayerAction("reading");
loadPlayerBook(SHELL.getMyPlayerId(), book_id);
SHELL.sendOpenBook(book_id);
} // End of the function
function handleOpenBook(player_id, book_id)
{
if (!SHELL.isMyPlayer(player_id))
{
loadPlayerBook(player_id, book_id);
} // end if
} // End of the function
function sendCloseBook()
{
setPlayerAction("reading");
removePlayerBook(SHELL.getMyPlayerId());
SHELL.sendCloseBook();
} // End of the function
function handleCloseBook(player_id)
{
if (!SHELL.isMyPlayer(player_id))
{
removePlayerBook(player_id);
} // end if
} // End of the function
function sendJoinRoom(name, x, y)
{
SHELL.sendJoinRoom(name, x, y);
} // End of the function
function sendGameOver(score, room)
{
INTERFACE.showPrompt("wait");
setGameOverRoom(room);
SHELL.sendGameOver(score);
} // End of the function
function sendJoinGameOverRoom()
{
var _loc1 = getGameOverRoom();
if (_loc1 != undefined)
{
sendJoinRoom(_loc1, 0, 0);
}
else
{
sendJoinLastRoom();
} // end else if
} // End of the function
function sendJoinLastRoom()
{
SHELL.sendJoinLastRoom();
} // End of the function
function handleJoinRoom()
{
var _loc1 = SHELL.getRoomObject();
stopMouse();
loadRoom(_loc1, false);
} // End of the function
function handleJoinIgloo()
{
var _loc1 = SHELL.getPlayerIglooObject();
stopMouse();
loadRoom(_loc1, true);
} // End of the function
function handleJoinGame()
{
var _loc1 = SHELL.getGameObject();
stopMouse();
loadGame(_loc1);
} // End of the function
function handleAddPuffle(puffle_ob)
{
traceObject(puffle_ob);
addPuffle(puffle_ob);
} // End of the function
function loadRoom(room_ob, is_player_room)
{
traceObject(room_ob);
setRoomReady(false);
if (is_player_room == undefined)
{
is_player_room = false;
} // end if
var _loc7 = room_ob.name;
var _loc3 = room_ob.file_path;
removeRoom();
removeGame();
INTERFACE.showInterface();
this.createEmptyMovieClip("room_mc", 100);
room_mc.createEmptyMovieClip("load_mc", 1);
var _loc4 = new MovieClipLoader();
var _loc2 = new Object();
_loc2.onLoadProgress = function (target_mc, bytes_loaded, bytes_total)
{
var _loc1 = Math.floor(bytes_loaded / bytes_total * 100);
};
_loc2.onLoadInit = function (target_mc)
{
room_mc.load_mc._lockroot = true;
if (!is_player_room)
{
setupRoom(room_mc.load_mc);
} // end if
};
var _loc5 = SHELL.getLocalizedString("load_" + _loc7);
SHELL.showLoading(_loc5, _loc2);
_loc4.addListener(_loc2);
_loc4.loadClip(_loc3, room_mc.load_mc);
} // End of the function
function setupRoom(mc)
{
if (mc.room_mc != undefined)
{
var _loc3 = mc.room_mc;
_loc3.start_x = mc.start_x;
_loc3.start_y = mc.start_y;
}
else
{
_loc3 = mc;
} // end else if
setRoomMovieClip(_loc3);
for (var _loc4 in mc)
{
if (typeof(mc[_loc4]) == "movieclip")
{
var _loc1 = mc[_loc4];
if (_loc1 == mc.block_mc)
{
setRoomBlockMovieClip(_loc1);
_loc1._visible = false;
continue;
} // end if
if (_loc1 == mc.triggers_mc)
{
setRoomTriggersMovieClip(_loc1);
_loc1._visible = false;
continue;
} // end if
if (_loc1 == mc.interface_mc)
{
setRoomInterfaceMovieClip(_loc1);
_loc1.swapDepths(900002);
continue;
} // end if
if (_loc1 == mc.foreground_mc)
{
_loc1.swapDepths(900001);
continue;
} // end if
if (_loc1 == mc.background_mc)
{
_loc1._visible = true;
continue;
} // end if
if (_loc1._x > 0 && _loc3._x < MAX_SCREEN_WIDTH)
{
if (_loc1._y > 0 && _loc3._y < MAX_SCREEN_HEIGHT)
{
updateObjectDepth(_loc1);
} // end if
} // end if
} // end if
} // end of for...in
setRoomReady(true);
setupTables();
setupWaddle();
setupPlayer();
SHELL.startRoomMusic();
} // End of the function
function removeRoom()
{
load_mc.removeMovieClip();
for (var _loc1 in INTERFACE.balloons_mc)
{
INTERFACE.balloons_mc[_loc1].removeMovieClip();
} // end of for...in
for (var _loc1 in INTERFACE.nicknames_mc)
{
INTERFACE.nicknames_mc[_loc1].removeMovieClip();
} // end of for...in
} // End of the function
function checkTrigger(mc)
{
var _loc1 = getRoomTriggersMovieClip();
var _loc3 = mc._x;
var _loc2 = mc._y;
if (_loc1.hitTest(_loc3, _loc2, true))
{
for (var _loc4 in _loc1)
{
if (_loc1[_loc4].hitTest(_loc3, _loc2, true))
{
_loc1[_loc4].triggerFunction();
break;
} // end if
} // end of for...in
} // end if
} // End of the function
function setRoomMovieClip(mc)
{
my_room_movieclips.room_mc = mc;
} // End of the function
function getRoomMovieClip()
{
return (my_room_movieclips.room_mc);
} // End of the function
function setRoomInterfaceMovieClip(mc)
{
my_room_movieclips.interface_mc = mc;
} // End of the function
function getRoomInterfaceMovieClip()
{
return (my_room_movieclips.interface_mc);
} // End of the function
function setRoomTriggersMovieClip(mc)
{
my_room_movieclips.triggers_mc = mc;
} // End of the function
function getRoomTriggersMovieClip()
{
return (my_room_movieclips.triggers_mc);
} // End of the function
function setRoomBlockMovieClip(mc)
{
my_room_movieclips.block_mc = mc;
} // End of the function
function getRoomBlockMovieClip()
{
return (my_room_movieclips.block_mc);
} // End of the function
function setRoomBallMovieClip(mc)
{
my_room_movieclips.ball_mc = mc;
is_ball_moving = false;
} // End of the function
function getRoomBallMovieClip()
{
return (my_room_movieclips.ball_mc);
} // End of the function
function setRoomReady(is_ready)
{
is_room_ready = is_ready;
} // End of the function
function isRoomReady()
{
return (is_room_ready);
} // End of the function
function LEGACY_showWindow(name, ob, room_id)
{
if (name == "Found Item")
{
INTERFACE.buyInventory(ob.ItemId);
}
else if (room_id != undefined)
{
var _loc2 = SHELL.getRoomNameById(room_id);
sendGameOver(ob.score, _loc2);
}
else
{
sendGameOver(ob.score);
} // end else if
} // End of the function
function LEGACY_checkPlayerItem(item_id)
{
return (SHELL.isItemInMyInventory(item_id));
} // End of the function
function LEGACY_joinRoom()
{
SHELL.sendJoinLastRoom();
} // End of the function
function loadGame(game_ob)
{
var _loc6 = game_ob.file_path;
var _loc7 = game_ob.name;
removeRoom();
removeGame();
setGameOverRoom(undefined);
this.createEmptyMovieClip("game_mc", 100);
game_mc.createEmptyMovieClip("load_mc", 1);
game_mc._lockroot = true;
game_mc.myCrumbs = new Object();
game_mc.myCrumbs.colors = SHELL.getPlayerColoursObject();
var _loc3 = SHELL.getPlayerObjectById(SHELL.getMyPlayerId());
game_mc.myPlayer = new Object();
game_mc.myPlayer.Colour = _loc3.colour_id;
game_mc.myPlayer.Hand = _loc3.hand;
game_mc.myMediaPath = this._url.split("/");
game_mc.myMediaPath = game_mc.myMediaPath.slice(0, -2).join("/") + "/";
game_mc.checkPlayerItem = LEGACY_checkPlayerItem;
game_mc.showWindow = LEGACY_showWindow;
game_mc.joinRoom = LEGACY_joinRoom;
var _loc4 = new MovieClipLoader();
var _loc2 = new Object();
_loc2.onLoadProgress = function (target_mc, bytes_loaded, bytes_total)
{
var _loc1 = Math.floor(bytes_loaded / bytes_total * 100);
updateWaitScreen();
};
_loc2.onLoadInit = function (target_mc)
{
game_mc.load_mc.startGame();
SHELL.hideLoading();
SHELL.startGameMusic();
};
var _loc5 = SHELL.getLocalizedString("load_" + _loc7);
SHELL.showLoading(_loc5, _loc2);
_loc4.addListener(_loc2);
_loc4.loadClip(_loc6, game_mc.load_mc);
} // End of the function
function sendJoinGame(name, is_prompt)
{
if (is_prompt)
{
setActiveGame(name);
var _loc2 = SHELL.getLocalizedString(name + "_prompt");
INTERFACE.showPrompt("game", _loc2, undefined, clickJoinGamePrompt);
}
else
{
SHELL.sendJoinGame(name);
} // end else if
} // End of the function
function clickJoinGamePrompt()
{
var _loc1 = getActiveGame();
sendJoinGame(_loc1, false);
} // End of the function
function handleGameOver(ob)
{
traceObject(ob);
var _loc2 = ob.total;
var _loc3 = ob.earned;
var _loc4 = ob.is_table;
if (_loc4)
{
game_over_object = new Object();
game_over_object.total_coins = _loc2;
game_over_object.coins_earned = _loc3;
}
else
{
INTERFACE.showGameOverPrompt(_loc2, _loc3, sendJoinGameOverRoom);
} // end else if
} // End of the function
function showGameOver()
{
var _loc1 = game_over_object.total_coins;
var _loc2 = game_over_object.coins_earned;
INTERFACE.showGameOverPrompt(_loc1, _loc2);
} // End of the function
function removeGame()
{
game_mc.removeMovieClip();
} // End of the function
function setActiveGame(name)
{
active_game = name;
} // End of the function
function getActiveGame()
{
return (active_game);
} // End of the function
function setGameOverRoom(name)
{
game_over_room = name;
} // End of the function
function getGameOverRoom()
{
return (game_over_room);
} // End of the function
function setupPlayer()
{
var _loc1 = SHELL.getMyPlayerId();
var _loc2 = SHELL.getPlayerObjectById(_loc1);
setupDepthList();
add_more_players = true;
addPlayer(_loc2);
startMouse();
} // End of the function
function addPlayer(player_ob)
{
var _loc7 = getRoomMovieClip();
var _loc11 = getRoomBlockMovieClip();
var player_id = player_ob.player_id;
var nickname = player_ob.nickname;
removePlayer(player_id);
var _loc5 = findPlayerDepth(player_id);
var _loc4 = "p" + player_id;
INTERFACE.balloons_mc.attachMovie("balloon", _loc4, _loc5);
INTERFACE.balloons_mc[_loc4].gotoAndStop(INTERFACE.balloons_mc[_loc4]._totalframes);
INTERFACE.nicknames_mc.attachMovie("nickname", _loc4, _loc5);
INTERFACE.nicknames_mc[_loc4].name_txt.text = player_ob.nickname;
_loc7.createEmptyMovieClip(_loc4, _loc5);
var _loc2 = _loc7[_loc4];
_loc2.createEmptyMovieClip("art_mc", 1);
_loc2.createEmptyMovieClip("book_mc", 70);
_loc2.createEmptyMovieClip("head_mc", 60);
_loc2.createEmptyMovieClip("face_mc", 50);
_loc2.createEmptyMovieClip("hand_mc", 40);
_loc2.createEmptyMovieClip("neck_mc", 30);
_loc2.createEmptyMovieClip("body_mc", 20);
_loc2.createEmptyMovieClip("feet_mc", 10);
_loc2.colour_id = 0;
_loc2.head = 0;
_loc2.face = 0;
_loc2.neck = 0;
_loc2.body = 0;
_loc2.hand = 0;
_loc2.feet = 0;
_loc2.player_id = player_id;
_loc2.nickname = nickname;
_loc2.depth_id = _loc5;
_loc2.frame = player_ob.frame;
_loc2.is_moving = false;
_loc2.is_ready = false;
_loc2.is_reading = false;
_loc2.is_table = false;
_loc2.onRelease = function ()
{
clickPlayer(this.player_id, this.nickname);
};
var _loc8 = _loc11.hitTest(player_ob.x, player_ob.y, true);
if (player_ob.x == 0 || _loc8)
{
player_ob.x = findRandomLocation(_loc7.start_x, 40);
} // end if
if (player_ob.y == 0 || _loc8)
{
player_ob.y = findRandomLocation(_loc7.start_y, 40);
} // end if
updatePlayerPosition(player_id, player_ob.x, player_ob.y);
var _loc9 = new MovieClipLoader();
var _loc6 = new Object();
_loc6.onLoadStart = function (target_mc)
{
target_mc._visible = false;
};
_loc6.onLoadInit = function (target_mc)
{
updatePlayerFromId(target_mc._parent.player_id);
checkTablesForPlayer(target_mc._parent.player_id);
addAllPlayers();
target_mc._parent.is_ready = true;
target_mc._visible = true;
if (SHELL.isMyPlayer(player_id))
{
if (!SHELL.getIsRoomIgloo())
{
SHELL.hideLoading();
} // end if
} // end if
};
if (SHELL.isMyPlayer(player_id))
{
var _loc10 = SHELL.getLocalizedString("load_penguin");
SHELL.showLoading(_loc10, _loc6);
} // end if
_loc9.addListener(_loc6);
_loc9.loadClip(SHELL.getPath("penguin"), _loc2.art_mc);
} // End of the function
function addAllPlayers()
{
if (add_more_players)
{
add_more_players = false;
var _loc1 = SHELL.getPlayerList();
for (var _loc3 in _loc1)
{
var _loc2 = _loc1[_loc3].player_id;
if (_loc2 != SHELL.getMyPlayerId())
{
addPlayer(_loc1[_loc3]);
} // end if
} // end of for...in
} // end if
} // End of the function
function removePlayer(player_id)
{
var _loc2 = getPlayerMovieClip(player_id);
var _loc4 = getBalloonMovieClip(player_id);
var _loc3 = getNicknameMovieClip(player_id);
_loc2.removeMovieClip();
_loc4.removeMovieClip();
_loc3.removeMovieClip();
removePlayerDepth(player_id);
} // End of the function
function updatePlayerFromId(player_id)
{
var _loc1 = SHELL.getPlayerObjectById(player_id);
updatePlayer(_loc1);
} // End of the function
function updatePlayer(player_ob)
{
var _loc3 = player_ob.player_id;
var _loc1 = getPlayerMovieClip(_loc3);
if (!SHELL.isMyPlayer(_loc3))
{
_loc1.art_mc.ring._visible = false;
} // end if
if (_loc1.frame > 26)
{
_loc1.frame = 1;
} // end if
if (_loc1.colour_id != player_ob.colour_id)
{
updateColour(_loc1.art_mc.body, player_ob.colour_id);
_loc1.colour_id = player_ob.colour_id;
} // end if
updatePlayerItem(_loc1, player_ob, "head", 60);
updatePlayerItem(_loc1, player_ob, "face", 50);
updatePlayerItem(_loc1, player_ob, "hand", 40);
updatePlayerItem(_loc1, player_ob, "neck", 30);
updatePlayerItem(_loc1, player_ob, "body", 20);
updatePlayerItem(_loc1, player_ob, "feet", 10);
updatePlayerFrame(_loc3, _loc1.frame);
} // End of the function
function updateColour(mc, colour_id)
{
var _loc1 = new Color(mc);
_loc1.setRGB(SHELL.getPlayerHexFromId(colour_id));
} // End of the function
function setupDepthList()
{
depth_list = new Array();
for (var _loc1 = 0; _loc1 < 100; ++_loc1)
{
depth_list[_loc1] = undefined;
} // end of for
} // End of the function
function findPlayerDepth(player_id)
{
if (player_id == SHELL.getMyPlayerId())
{
depth_list[99] = player_id;
return (99);
}
else
{
for (var _loc2 in depth_list)
{
if (depth_list[_loc2] == undefined)
{
depth_list[_loc2] = player_id;
return (Number(_loc2));
} // end if
} // end of for...in
} // end else if
} // End of the function
function removePlayerDepth(player_id)
{
for (var _loc2 in depth_list)
{
if (depth_list[_loc2] == player_id)
{
depth_list[_loc2] = undefined;
break;
} // end if
} // end of for...in
} // End of the function
function updatePlayerItem(mc, ob, name, depth)
{
if (ob[name] != mc[name])
{
removeMovieClip (mc[name + "_mc"]);
mc.createEmptyMovieClip(name + "_mc", depth);
loadPlayerItem(mc[name + "_mc"], ob[name]);
mc[name] = ob[name];
} // end if
} // End of the function
function loadPlayerItem(mc, item_id)
{
if (item_id > 0)
{
var _loc3 = SHELL.getPath("clothing_sprites") + item_id + ".swf";
mc._visible = false;
var _loc2 = new MovieClipLoader();
var _loc1 = new Object();
_loc1.onLoadStart = function (target_mc)
{
target_mc._visible = false;
};
_loc1.onLoadInit = function (target_mc)
{
updatePlayerFrame(target_mc._parent.player_id);
target_mc._visible = true;
};
_loc2.addListener(_loc1);
_loc2.loadClip(_loc3, mc);
} // end if
} // End of the function
function loadPlayerBook(player_id, book_id)
{
var _loc1 = getPlayerMovieClip(player_id);
if (book_id == undefined)
{
book_id = 1;
} // end if
if (_loc1.is_ready && !_loc1.is_moving)
{
var _loc3 = SHELL.getPath("clothing_book" + book_id);
_loc1.book_mc.createEmptyMovieClip("load_mc", 1);
_loc1.book_mc.load_mc.loadMovie(_loc3);
_loc1.is_reading = true;
updatePlayerFrame(player_id, 1);
} // end if
} // End of the function
function removePlayerBook(player_id)
{
var _loc1 = getPlayerMovieClip(player_id);
removeMovieClip (_loc1.book_mc.load_mc);
_loc1.is_reading = false;
} // End of the function
function updatePlayerPosition(player_id, x, y)
{
var _loc1 = getPlayerMovieClip(player_id);
var _loc6 = getBalloonMovieClip(player_id);
var _loc5 = getNicknameMovieClip(player_id);
x = getValidXPosition(x);
y = getValidYPosition(y);
_loc1._x = x;
_loc1._y = y;
_loc6._x = x;
_loc6._y = y;
_loc5._x = x;
_loc5._y = y;
updatePlayerDepth(_loc1, _loc1.depth_id);
if (SHELL.isMyPlayer(player_id))
{
player_x = x;
player_y = y;
} // end if
} // End of the function
function updatePlayerFrame(player_id, frame, is_action)
{
var _loc1 = getPlayerMovieClip(player_id);
if (frame == undefined)
{
frame = _loc1.frame;
} // end if
if (frame == 25 || frame == 26)
{
var _loc2 = SHELL.getSecretFrame(player_id, frame);
}
else
{
_loc2 = frame;
} // end else if
_loc1.art_mc.gotoAndStop(1);
_loc1.art_mc.gotoAndStop(_loc2);
updateColour(_loc1.art_mc.body, _loc1.colour_id);
updatePlayerItemFrame(_loc1.head_mc, _loc2);
updatePlayerItemFrame(_loc1.face_mc, _loc2);
updatePlayerItemFrame(_loc1.neck_mc, _loc2);
updatePlayerItemFrame(_loc1.body_mc, _loc2);
updatePlayerItemFrame(_loc1.hand_mc, _loc2);
updatePlayerItemFrame(_loc1.feet_mc, _loc2);
if (is_action)
{
_loc1.frame = 1;
}
else
{
_loc1.frame = frame;
} // end else if
} // End of the function
function clickPlayer(player_id, nickname)
{
INTERFACE.showPlayerWidget(player_id, nickname);
} // End of the function
function setPlayerAction(action)
{
player_action = action;
} // End of the function
function getPlayerAction()
{
return (player_action);
} // End of the function
function validateUpdateFrame(player_id, frame)
{
var _loc1 = getPlayerMovieClip(player_id);
if (_loc1.is_reading || _loc1.is_table)
{
return (false);
}
else if (!_loc1.is_moving)
{
if (frame > 8 && frame < 17)
{
return (false);
}
else if (frame < 27)
{
return (true);
}
else
{
return (false);
} // end else if
}
else
{
return (false);
} // end else if
} // End of the function
function updatePlayerItemFrame(mc, frame)
{
mc.gotoAndStop(1);
mc.gotoAndStop(frame);
} // End of the function
function getValidXPosition(x)
{
if (x < MAP_WIDTH_MIN)
{
return (MAP_WIDTH_MIN);
}
else if (x > MAP_WIDTH_MAX)
{
return (MAP_WIDTH_MAX);
}
else
{
return (Math.round(x));
} // end else if
} // End of the function
function getValidYPosition(y)
{
if (y < MAP_HEIGHT_MIN)
{
return (MAP_HEIGHT_MIN);
}
else if (y > MAP_HEIGHT_MAX)
{
return (MAP_HEIGHT_MAX);
}
else
{
return (Math.round(y));
} // end else if
} // End of the function
function getPlayerMovieClip(player_id)
{
var _loc1 = getRoomMovieClip();
return (_loc1["p" + player_id]);
} // End of the function
function getBalloonMovieClip(player_id)
{
return (INTERFACE.balloons_mc["p" + player_id]);
} // End of the function
function getNicknameMovieClip(player_id)
{
return (INTERFACE.nicknames_mc["p" + player_id]);
} // End of the function
function findRandomLocation(n, d)
{
return (Math.floor(n + (random(d) - d / 2)));
} // End of the function
function addPuffle(ob)
{
traceObject(ob);
var _loc6 = getRoomMovieClip();
var puffle_id = ob.puffle_id;
var is_walking = ob.is_walking;
var _loc11 = ob.type_id;
if (ob.x == 0 || ob.y == 0)
{
var _loc8 = findPufflePath();
var _loc13 = _loc8.x;
var _loc12 = _loc8.y;
}
else
{
_loc13 = ob.x;
_loc12 = ob.y;
} // end else if
removePuffle(puffle_id);
var _loc5 = findPlayerDepth(1);
var _loc7 = "puffle" + puffle_id;
_loc6.createEmptyMovieClip(_loc7, _loc5);
var _loc2 = _loc6[_loc7];
_loc2.puffle_id = puffle_id;
_loc2.depth = _loc5;
_loc2.is_ready = false;
_loc2._x = _loc13;
_loc2._y = _loc12;
if (SHELL.isMyIgloo())
{
_loc2.onRelease = function ()
{
clickPuffle(this.puffle_id);
};
} // end if
updatePuffleDepth(_loc2, _loc5);
_loc2.createEmptyMovieClip("art_mc", 1);
var _loc9 = new MovieClipLoader();
var _loc4 = new Object();
_loc4.onLoadStart = function (target_mc)
{
target_mc._visible = false;
};
_loc4.onLoadInit = function (target_mc)
{
target_mc._parent.is_ready = true;
target_mc._visible = true;
if (is_walking)
{
hidePuffle(puffle_id);
} // end if
};
var _loc10 = SHELL.getPath("puffle" + _loc11);
_loc9.addListener(_loc4);
_loc9.loadClip(_loc10, _loc2.art_mc);
} // End of the function
function removePuffle(puffle_id)
{
var _loc1 = getPuffleMovieClip(puffle_id);
if (depth_list[_loc1.depth] != undefined)
{
depth_list[_loc1.depth] = undefined;
} // end if
_loc1.removeMovieClip();
} // End of the function
function movePuffle(ob)
{
var _loc2 = ob.puffle_id;
var target_x = ob.x;
var target_y = ob.y;
var _loc5 = ob.happy;
var mc = getPuffleMovieClip(_loc2);
var start_x = mc._x;
var start_y = mc._y;
var _loc6 = findDistance(start_x, start_y, target_x, target_y);
var _loc4 = findAngle(start_x, start_y, target_x, target_y);
var d = findDirection(_loc4);
if (_loc5 > 50)
{
updatePuffleFrame(_loc2, d + 16);
}
else
{
updatePuffleFrame(_loc2, d + 8);
} // end else if
var duration = _loc6 / 4;
var change_x = target_x - start_x;
var change_y = target_y - start_y;
var t = 0;
mc.onEnterFrame = function ()
{
++t;
if (t < duration)
{
mc._x = mathLinearTween(t, start_x, change_x, duration);
mc._y = mathLinearTween(t, start_y, change_y, duration);
updatePuffleDepth(mc, mc.depth);
}
else
{
mc._x = target_x;
mc._y = target_y;
mc.art_mc.gotoAndStop(d);
this.onEnterFrame = null;
} // end else if
};
} // End of the function
function findPufflePath()
{
var _loc3 = getRoomMovieClip();
var _loc1 = _loc3._parent.pet_area;
if (_loc1 != undefined)
{
var _loc4 = Math.random() * 6.283185E+000;
var _loc2 = new Object();
_loc2.x = Math.round(_loc1._x + Math.sin(_loc4) * random(_loc1._width / 2));
_loc2.y = Math.round(_loc1._y + Math.cos(_loc4) * random(_loc1._height / 2));
return (_loc2);
}
else
{
_loc2 = new Object();
_loc2.x = _loc3.start_x;
_loc2.y = _loc3.start_y;
return (_loc2);
} // end else if
} // End of the function
function showPuffle(puffle_id)
{
var _loc1 = getPuffleMovieClip(puffle_id);
_loc1._visible = true;
} // End of the function
function hidePuffle(puffle_id)
{
var _loc1 = getPuffleMovieClip(puffle_id);
_loc1._visible = false;
} // End of the function
function updatePuffleFrame(puffle_id, frame)
{
var _loc1 = getPuffleMovieClip(puffle_id);
_loc1.onEnterFrame = null;
_loc1.art_mc.gotoAndStop(1);
_loc1.art_mc.gotoAndStop(frame);
} // End of the function
function clickPuffle(puffle_id)
{
INTERFACE.showPuffleWidget(puffle_id);
} // End of the function
function getPuffleMovieClip(puffle_id)
{
var _loc1 = getRoomMovieClip();
return (_loc1["puffle" + puffle_id]);
} // End of the function
function startMouse()
{
is_mouse_active = true;
this.onMouseMove = function ()
{
if (getPlayerAction() == "wait")
{
var _loc1 = getPlayerDirectionToMouse();
if (_loc1 != current_direction_to_mouse)
{
current_direction_to_mouse = _loc1;
updatePlayerFrame(SHELL.getMyPlayerId(), _loc1);
} // end if
} // end if
};
mouse_mc.useHandCursor = false;
mouse_mc.tabEnabled = false;
mouse_mc.onRelease = clickMouse;
} // End of the function
function clickMouse()
{
if (getPlayerAction() != "busy")
{
var _loc2 = Math.round(_xmouse);
var _loc1 = Math.round(_ymouse);
if (!isMouseOverInterface(_loc2, _loc1))
{
sendPlayerMove(_loc2, _loc1);
} // end if
} // end if
} // End of the function
function getPlayerDirectionToMouse()
{
var _loc2 = Math.round(_xmouse);
var _loc1 = Math.round(_ymouse) + 40;
var _loc3 = findAngle(player_x, player_y, _loc2, _loc1);
return (findDirection(_loc3));
} // End of the function
function stopMouse()
{
is_mouse_active = false;
this.onMouseMove = null;
this.onMouseDown = null;
mouse_mc.onRelease = null;
} // End of the function
function isMouseActive()
{
return (is_mouse_active);
} // End of the function
function isMouseOverInterface(x, y)
{
if (INTERFACE.interface_mc.hitTest(x, y, true))
{
return (true);
}
else if (INTERFACE.debug_mc.hitTest(x, y, true))
{
return (true);
}
else if (getRoomInterfaceMovieClip().hitTest(x, y, true))
{
return (true);
}
else if (debug_mc.hitTest(x, y, true))
{
return (true);
}
else
{
return (false);
} // end else if
} // End of the function
function movePlayer(player_id, target_x, target_y, is_trigger, frame)
{
var _loc4 = getRoomMovieClip();
if (is_trigger == undefined)
{
is_trigger = true;
} // end if
var mc = getPlayerMovieClip(player_id);
var start_x = Math.round(mc._x);
var start_y = Math.round(mc._y);
if (mc.is_reading)
{
removePlayerBook(player_id);
} // end if
if (!mc.is_ready)
{
updatePlayerPosition(player_id, target_x, target_y);
}
else
{
var _loc3 = findDistance(start_x, start_y, target_x, target_y);
if (_loc4.ease_method == "easeInOutQuad")
{
var easeFunction = mathEaseInOutQuad;
}
else
{
var easeFunction = mathLinearTween;
} // end else if
var _loc2 = findAngle(start_x, start_y, target_x, target_y);
var d = findDirection(_loc2);
var duration = _loc3 / 4;
var change_x = target_x - start_x;
var change_y = target_y - start_y;
mc.is_moving = true;
updatePlayerFrame(player_id, d + 8);
var t = 0;
mc.onEnterFrame = function ()
{
++t;
if (t < duration)
{
x = easeFunction(t, start_x, change_x, duration);
y = easeFunction(t, start_y, change_y, duration);
updatePlayerPosition(player_id, x, y);
}
else
{
mc.is_moving = false;
updatePlayerPosition(player_id, target_x, target_y);
updatePlayerFrame(player_id, d);
SHELL.sendPlayerMoveDone(player_id);
this.onEnterFrame = null;
delete this.onEnterFrame;
if (SHELL.isMyPlayer(player_id))
{
setPlayerAction("wait");
if (is_trigger && isMouseActive())
{
checkTrigger(mc);
} // end if
if (frame != undefined)
{
sendPlayerFrame(frame);
} // end if
} // end if
} // end else if
};
} // end else if
} // End of the function
function findPlayerPath(player_id, x, y)
{
var _loc12 = getPlayerMovieClip(player_id);
var _loc7 = getRoomBlockMovieClip();
var _loc13 = getValidXPosition(x);
var _loc14 = getValidYPosition(y);
var _loc11 = Math.round(_loc12._x);
var _loc10 = Math.round(_loc12._y);
var _loc15 = findDistance(_loc11, _loc10, _loc13, _loc14);
var _loc6 = Math.round(_loc15);
var _loc9 = (_loc13 - _loc11) / _loc6;
var _loc8 = (_loc14 - _loc10) / _loc6;
var _loc4 = _loc11;
var _loc3 = _loc10;
var _loc5 = new Object();
_loc5.x = _loc11;
_loc5.y = _loc10;
var _loc16 = _loc7.hitTest(_loc11, _loc10, true);
while (_loc6 > 0)
{
_loc4 = _loc4 + _loc9;
_loc3 = _loc3 + _loc8;
var _loc2 = Math.round(_loc4);
var _loc1 = Math.round(_loc3);
if (_loc7.hitTest(_loc2, _loc1, true))
{
break;
}
else
{
_loc5.x = _loc2;
_loc5.y = _loc1;
} // end else if
--_loc6;
} // end while
return (_loc5);
} // End of the function
function throwBall(player_id, target_x, target_y, start_height, max_height, wait)
{
var _loc2 = getPlayerMovieClip(player_id);
var room_mc = getRoomMovieClip();
if (_loc2.is_reading)
{
removePlayerBook(player_id);
} // end if
if (_loc2.is_ready && !_loc2.is_moving)
{
if (throw_item_counter == undefined)
{
throw_item_counter = 0;
} // end if
if (throw_item_counter > 10)
{
throw_item_counter = 0;
} // end if
var start_x = _loc2._x;
var start_y = _loc2._y;
var c = throw_item_counter++;
var _loc3 = "i" + c;
if (room_mc[_loc3] != undefined)
{
room_mc[_loc3].removeMovieClip();
} // end if
room_mc.attachMovie("ball", _loc3, 1000200 + c);
var mc = room_mc[_loc3];
mc._x = start_x;
mc._y = start_y;
updateItemDepth(mc, c);
var _loc7 = findDistance(start_x, start_y, target_x, target_y);
var _loc6 = findAngle(start_x, start_y, target_x, target_y);
var _loc4 = Math.round(findDirection(_loc6) / 2);
updatePlayerFrame(player_id, 26 + _loc4);
var duration = _loc7 / 15;
var change_x = target_x - start_x;
var change_y = target_y - start_y;
var peak = duration / 2;
var change_height1 = max_height - start_height;
var change_height2 = -max_height;
mc.art._y = start_height;
mc._visible = false;
var t = 0;
var w = 0;
mc.onEnterFrame = function ()
{
if (w > wait)
{
mc._visible = true;
++t;
if (t < duration)
{
mc._x = mathLinearTween(t, start_x, change_x, duration);
mc._y = mathLinearTween(t, start_y, change_y, duration);
updateItemDepth(mc, c);
if (t < peak)
{
mc.art._y = mathEaseOutQuad(t, start_height, change_height1, peak);
}
else
{
mc.art._y = mathEaseInQuad(t - peak, max_height, change_height2, peak);
} // end else if
}
else
{
mc._x = target_x;
mc._y = target_y;
mc.art._y = 0;
mc.gotoAndStop(2);
room_mc.handleThrow(mc);
this.onEnterFrame = null;
} // end else if
}
else
{
++w;
} // end else if
};
} // end if
} // End of the function
function setupTables()
{
var _loc1 = getTableListFromRoom();
if (_loc1 != undefined && _loc1.length > 0)
{
SHELL.getTablesPopulationById(_loc1);
} // end if
} // End of the function
function sendJoinTable(name, table_id, is_prompt)
{
if (is_prompt)
{
setActiveTable(name, table_id);
var _loc2 = SHELL.getLocalizedString(name + "_prompt");
INTERFACE.showPrompt("game", _loc2, undefined, clickJoinTablePrompt);
}
else
{
SHELL.sendJoinTableById(table_id);
} // end else if
} // End of the function
function clickJoinTablePrompt()
{
var _loc1 = getActiveTable();
traceObject(_loc1);
sendJoinTable(_loc1.name, _loc1.table_id, false);
} // End of the function
function handleJoinTable(ob)
{
traceObject(ob);
var _loc5 = ob.table_id;
var _loc1 = ob.seat_id;
setActiveTableSeat(_loc1);
var _loc3 = getActiveTable();
var _loc4 = _loc3.name;
stopMouse();
movePlayerToTableSeat(_loc5, _loc1);
INTERFACE.showGameWidget(_loc4);
} // End of the function
function handleUpdateTable(table_ob)
{
traceObject(table_ob);
var _loc5 = table_ob.table_id;
var _loc4 = table_ob.num_players;
var _loc2 = _loc4 + 1;
var _loc1 = getTableMovieClip(_loc5);
if (_loc2 > _loc1._totalframes)
{
_loc1.gotoAndStop(_loc1._totalframes);
}
else
{
_loc1.gotoAndStop(_loc2);
} // end else if
} // End of the function
function sendLeaveTable()
{
SHELL.sendLeaveTable();
movePlayerToTableDone();
startMouse();
} // End of the function
function movePlayerToTableSeat(table_id, seat_id)
{
var _loc1 = getTableSeatMovieClip(table_id, seat_id);
var _loc4 = getTableSeatFrame(table_id, seat_id);
var _loc2 = {x: _loc1._x, y: _loc1._y};
_loc1._parent.localToGlobal(_loc2);
var _loc7 = Math.round(_loc2.x);
var _loc6 = Math.round(_loc2.y);
sendPlayerMove(_loc7, _loc6, false, _loc4);
} // End of the function
function movePlayerToTableDone()
{
var _loc3 = getActiveTable();
var _loc5 = _loc3.table_id;
var _loc4 = _loc3.seat_id;
var _loc1 = getTableDoneMovieClip(_loc5, _loc4);
var _loc2 = {x: _loc1._x, y: _loc1._y};
_loc1._parent.localToGlobal(_loc2);
var _loc7 = Math.round(_loc2.x);
var _loc6 = Math.round(_loc2.y);
sendPlayerMove(_loc7, _loc6, false);
} // End of the function
function setActiveTable(name, table_id, seat_id)
{
active_table = {name: name, table_id: table_id, seat_id: seat_id};
} // End of the function
function setActiveTableSeat(seat_id)
{
active_table.seat_id = seat_id;
} // End of the function
function getActiveTable()
{
return (active_table);
} // End of the function
function getTableListFromRoom()
{
var _loc1 = getRoomMovieClip();
return (_loc1.table_list);
} // End of the function
function getTableSeatFrame(table_id, seat_id)
{
var _loc1 = getTableMovieClip(table_id);
var _loc2 = _loc1.seat_frames[seat_id - 1];
return (_loc2);
} // End of the function
function getTableMovieClip(table_id)
{
var _loc1 = getRoomMovieClip();
return (_loc1["table" + table_id + "_mc"]);
} // End of the function
function getTableSeatMovieClip(table_id, seat_id)
{
var _loc1 = getTableMovieClip(table_id);
return (_loc1["seat" + seat_id + "_mc"]);
} // End of the function
function getTableDoneMovieClip(table_id, seat_id)
{
var _loc1 = getTableMovieClip(table_id);
return (_loc1["done" + seat_id + "_mc"]);
} // End of the function
function setupWaddle()
{
var _loc1 = getWaddleListFromRoom();
if (_loc1 != undefined && _loc1.length > 0)
{
SHELL.getWaddlePopulationById(_loc1);
} // end if
} // End of the function
function handleUpdateWaddle(ob)
{
traceObject(ob);
var _loc4 = ob.waddle_id;
var _loc3 = ob.player_list;
for (var _loc5 in _loc3)
{
var _loc2 = Number(_loc5);
var _loc1 = getWaddleSeatMovieClip(_loc4, _loc2);
if (_loc3[_loc5] != undefined)
{
_loc1._visible = true;
continue;
} // end if
_loc1._visible = false;
} // end of for...in
} // End of the function
function sendJoinWaddle(name, waddle_id, is_prompt)
{
active_waddle_id = waddle_id;
active_waddle_name = name;
if (is_prompt)
{
var _loc7 = SHELL.getLocalizedString(name + "_prompt");
INTERFACE.showPrompt("game", _loc7, undefined, clickJoinWaddlePrompt);
}
else
{
var _loc2 = true;
var _loc5 = SHELL.getWaddleById(waddle_id);
traceObject(_loc5);
var _loc1 = _loc5.player_list;
for (var _loc3 in _loc1)
{
if (_loc1[_loc3] == undefined)
{
_loc2 = false;
break;
} // end if
} // end of for...in
if (!_loc2)
{
SHELL.sendJoinWaddleById(waddle_id);
} // end if
} // end else if
} // End of the function
function clickJoinWaddlePrompt()
{
sendJoinWaddle(active_waddle_name, active_waddle_id, false);
} // End of the function
function handleJoinWaddle(ob)
{
traceObject(ob);
var _loc2 = active_waddle_id;
var _loc3 = active_waddle_name;
var _loc1 = ob.seat_id;
active_seat_id = _loc1;
stopMouse();
movePlayerToWaddleSeat(_loc2, _loc1);
INTERFACE.showWaddleWidget(_loc3, _loc2);
} // End of the function
function sendLeaveWaddle()
{
SHELL.sendLeaveWaddle();
movePlayerToWaddleDone();
startMouse();
SHELL.sendLeaveWaddle();
} // End of the function
function movePlayerToWaddleSeat(waddle_id, seat_id)
{
var _loc1 = getWaddleSeatMovieClip(waddle_id, seat_id);
var _loc5 = getWaddleSeatFrame(waddle_id, seat_id);
var _loc2 = {x: _loc1._x, y: _loc1._y};
_loc1._parent.localToGlobal(_loc2);
var _loc7 = Math.round(_loc2.x);
var _loc6 = Math.round(_loc2.y);
sendPlayerMove(_loc7, _loc6, false, _loc5);
} // End of the function
function movePlayerToWaddleDone()
{
var _loc4 = active_waddle_id;
var _loc3 = active_seat_id;
var _loc1 = getWaddleDoneMovieClip(_loc4, _loc3);
var _loc2 = {x: _loc1._x, y: _loc1._y};
_loc1._parent.localToGlobal(_loc2);
var _loc6 = Math.round(_loc2.x);
var _loc5 = Math.round(_loc2.y);
sendPlayerMove(_loc6, _loc5, false);
} // End of the function
function getWaddleMovieClip(waddle_id)
{
var _loc1 = getRoomMovieClip();
return (_loc1["waddle" + waddle_id + "_mc"]);
} // End of the function
function getWaddleSeatMovieClip(waddle_id, seat_id)
{
var _loc1 = getWaddleMovieClip(waddle_id);
return (_loc1["seat" + seat_id + "_mc"]);
} // End of the function
function getWaddleDoneMovieClip(waddle_id, seat_id)
{
var _loc1 = getWaddleMovieClip(waddle_id);
return (_loc1["done" + seat_id + "_mc"]);
} // End of the function
function getWaddleListFromRoom()
{
var _loc1 = getRoomMovieClip();
return (_loc1.waddle_list);
} // End of the function
function getWaddleSeatFrame(waddle_id, seat_id)
{
var _loc1 = getWaddleMovieClip(waddle_id);
var _loc2 = _loc1.seat_frames[seat_id];
return (_loc2);
} // End of the function
function getActiveWaddleId()
{
return (active_waddle_id);
} // End of the function
function updatePlayerDepth(mc, n)
{
var _loc4 = Math.floor(mc._x);
var _loc3 = Math.floor(mc._y);
var _loc2 = n + 1 + 900 + 1000 * _loc3;
mc.swapDepths(_loc2);
} // End of the function
function updatePuffleDepth(mc, n)
{
updatePlayerDepth(mc, n);
} // End of the function
function updateObjectDepth(mc)
{
var _loc4 = Math.floor(mc._x);
var _loc3 = Math.floor(mc._y);
var _loc2 = _loc4 + 1000 * _loc3;
mc.swapDepths(_loc2);
} // End of the function
function updateItemDepth(mc, n)
{
var _loc4 = Math.floor(mc._x);
var _loc3 = Math.floor(mc._y);
var _loc2 = n + 1 + 800 + 1000 * _loc3;
mc.swapDepths(_loc2);
} // End of the function
function findAngle(x1, y1, x2, y2)
{
var _loc3 = x2 - x1;
var _loc2 = y2 - y1;
var _loc1 = int(Math.atan2(_loc2, _loc3) * 5.729578E+001 - 90);
if (_loc1 < 0)
{
return (_loc1 + 360);
}
else
{
return (_loc1);
} // end else if
} // End of the function
function findDirection(angle)
{
var _loc1 = Math.round(angle / 45) + 1;
if (_loc1 > 8)
{
_loc1 = 1;
} // end if
return (_loc1);
} // End of the function
function findDistance(x1, y1, x2, y2)
{
var _loc2 = x2 - x1;
var _loc1 = y2 - y1;
return (Math.sqrt(_loc2 * _loc2 + _loc1 * _loc1));
} // End of the function
function replaceString(target, word, message)
{
return (message.split(target).join(word));
} // End of the function
var SHELL = _global.getCurrentShell();
var INTERFACE = _global.getCurrentInterface();
var pending_join_game = undefined;
MAX_SCREEN_WIDTH = 760;
MAX_SCREEN_HEIGHT = 480;
MAP_MARGIN = 20;
MAP_WIDTH_MIN = MAP_MARGIN;
MAP_WIDTH_MAX = MAX_SCREEN_WIDTH - MAP_MARGIN;
MAP_HEIGHT_MIN = MAP_MARGIN;
MAP_HEIGHT_MAX = MAX_SCREEN_HEIGHT - MAP_MARGIN;
my_room_movieclips = new Object();
is_ball_moving = false;
is_room_ready = false;
var active_game = undefined;
var game_over_room = undefined;
var game_over_object = new Object();
var player_action = "wait";
var player_x = 0;
var player_y = 0;
var add_more_players = false;
var depth_list = new Array();
var is_mouse_active = false;
var current_direction_to_mouse = 0;
var active_table = new Object();
var pending_table = new Object();
var active_waddle_id = undefined;
var active_waddle_name = undefined;
var active_seat_id = undefined;
list[waddle1] = ["name1", "name2"];
list[waddle2] = ["name1", "name2"];
list[waddle3] = ["name1", "name2"];
list[waddle4] = ["name1", "name2"];
list[waddle1][0] = "name";
mathLinearTween = function (t, b, c, d)
{
return (c * t / d + b);
};
mathEaseInQuad = function (t, b, c, d)
{
t = t / d;
return (c * (t) * t + b);
};
mathEaseOutQuad = function (t, b, c, d)
{
t = t / d;
return (-c * (t) * (t - 2) + b);
};
mathEaseInOutQuad = function (t, b, c, d)
{
t = t / (d / 2);
if (t < 1)
{
return (c / 2 * t * t + b);
} // end if
return (-c / 2 * (--t * (t - 2) - 1) + b);
};
SHELL.addListener(SHELL.START_ENGINE, handleStartEngine);
SHELL.addListener(SHELL.UPDATE_SHELL_STATE, handleUpdateShellState);
SHELL.addListener(SHELL.ADD_PLAYER, handleAddPlayer);
SHELL.addListener(SHELL.REMOVE_PLAYER, handleRemovePlayer);
SHELL.addListener(SHELL.UPDATE_PLAYER, handleUpdatePlayer);
SHELL.addListener(SHELL.PLAYER_ACTION, handlePlayerAction);
SHELL.addListener(SHELL.PLAYER_FRAME, handlePlayerFrame);
SHELL.addListener(SHELL.PLAYER_MOVE, handlePlayerMove);
SHELL.addListener(SHELL.THROW_BALL, handleThrowBall);
SHELL.addListener(SHELL.ADD_PUFFLE, handleAddPuffle);
SHELL.addListener(SHELL.REQUEST_PUFFLE_MOVE, sendPuffleMove);
SHELL.addListener(SHELL.PUFFLE_MOVE, handlePuffleMove);
SHELL.addListener(SHELL.PUFFLE_FRAME, handlePuffleFrame);
SHELL.addListener(SHELL.PUFFLE_WALK, handlePuffleWalk);
SHELL.addListener(SHELL.OPEN_BOOK, handleOpenBook);
SHELL.addListener(SHELL.CLOSE_BOOK, handleCloseBook);
SHELL.addListener(SHELL.JOIN_ROOM, handleJoinRoom);
SHELL.addListener(SHELL.JOIN_PLAYER_IGLOO, handleJoinIgloo);
SHELL.addListener(SHELL.JOIN_GAME, handleJoinGame);
SHELL.addListener(SHELL.JOIN_TABLE, handleJoinTable);
SHELL.addListener(SHELL.JOIN_WADDLE, handleJoinWaddle);
SHELL.addListener(SHELL.UPDATE_TABLE, handleUpdateTable);
SHELL.addListener(SHELL.UPDATE_WADDLE, handleUpdateWaddle);
SHELL.addListener(SHELL.GAME_OVER, handleGameOver);
if (is_debug_mode)
{
handleStartEngine();
handleJoinRoom();
updateTestRoomMenu();
} // end if
// Action script...
// [Action in Frame 1]
function addListener(type, func, scope)
{
shell.$d("[airtower] Adding listener to: \"" + type + "\"");
if (type == undefined || func == undefined)
{
shell.$e("addListner() -> You must pass a valid listener type and function! type: " + type + " func: " + func);
return (false);
} // end if
var _loc2 = getListenersArray(type);
var _loc3 = getListenerIndex(_loc2, func);
if (_loc3 == -1)
{
_loc2.push({func: func, scope: scope});
return (true);
} // end if
shell.$d("[airtower] Tried to add a duplicate listener to: \"" + type + "\"");
return (false);
} // End of the function
function removeListener(type, func)
{
shell.$d("[airtower] Removing listener from: \"" + type + "\"");
var _loc1 = getListenersArray(type);
var _loc2 = getListenerIndex(_loc1, func);
if (_loc2 != -1)
{
_loc1.splice(_loc2, 1);
return (true);
} // end if
shell.$d("[airtower] Tried to remove a listener which did not exist");
return (false);
} // End of the function
function getListenerIndex(array, func)
{
var _loc2 = array.length;
for (var _loc1 = 0; _loc1 < _loc2; ++_loc1)
{
if (array[_loc1].func == func)
{
return (_loc1);
} // end if
} // end of for
return (-1);
} // End of the function
function updateListeners(type, obj)
{
var _loc2 = getListenersArray(type);
var _loc4 = _loc2.length;
if (_loc4 < 1)
{
shell.$d("[airtower] No listeners currently attached to: \"" + type + "\"");
return (false);
} // end if
if (_loc4 == 1)
{
_loc2[0].scope ? (_loc2[0].func.call(_loc2[0].scope, obj)) : (_loc2[0].func(obj));
return (true);
} // end if
for (var _loc1 = 0; _loc1 < _loc4; ++_loc1)
{
_loc2[_loc1].scope ? (_loc2[_loc1].func.call(_loc2[_loc1].scope, obj)) : (_loc2[_loc1].func(obj));
} // end of for
return (true);
} // End of the function
function getListenersArray(type)
{
if (sf_listener_container[type] == undefined)
{
sf_listener_container[type] = new Array();
} // end if
return (sf_listener_container[type]);
} // End of the function
function onAirtowerResponse(obj, type)
{
var _loc1 = obj.shift();
updateListeners(_loc1, obj);
} // End of the function
function hex_md5(s)
{
return (binl2hex(core_md5(str2binl(s), s.length * chrsz)));
} // End of the function
function b64_md5(s)
{
return (binl2b64(core_md5(str2binl(s), s.length * chrsz)));
} // End of the function
function str_md5(s)
{
return (binl2str(core_md5(str2binl(s), s.length * chrsz)));
} // End of the function
function hex_hmac_md5(key, data)
{
return (binl2hex(core_hmac_md5(key, data)));
} // End of the function
function b64_hmac_md5(key, data)
{
return (binl2b64(core_hmac_md5(key, data)));
} // End of the function
function str_hmac_md5(key, data)
{
return (binl2str(core_hmac_md5(key, data)));
} // End of the function
function md5_vm_test()
{
return (hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72");
} // End of the function
function core_md5(x, len)
{
x[len >> 5] = x[len >> 5] | 128 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var _loc4 = 1732584193;
var _loc3 = -271733879;
var _loc2 = -1732584194;
var _loc1 = 271733878;
for (var _loc5 = 0; _loc5 < x.length; _loc5 = _loc5 + 16)
{
var _loc10 = _loc4;
var _loc9 = _loc3;
var _loc8 = _loc2;
var _loc7 = _loc1;
_loc4 = md5_ff(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 0], 7, -680876936);
_loc1 = md5_ff(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 1], 12, -389564586);
_loc2 = md5_ff(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 2], 17, 606105819);
_loc3 = md5_ff(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 3], 22, -1044525330);
_loc4 = md5_ff(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 4], 7, -176418897);
_loc1 = md5_ff(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 5], 12, 1200080426);
_loc2 = md5_ff(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 6], 17, -1473231341);
_loc3 = md5_ff(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 7], 22, -45705983);
_loc4 = md5_ff(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 8], 7, 1770035416);
_loc1 = md5_ff(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 9], 12, -1958414417);
_loc2 = md5_ff(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 10], 17, -42063);
_loc3 = md5_ff(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 11], 22, -1990404162);
_loc4 = md5_ff(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 12], 7, 1804603682);
_loc1 = md5_ff(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 13], 12, -40341101);
_loc2 = md5_ff(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 14], 17, -1502002290);
_loc3 = md5_ff(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 15], 22, 1236535329);
_loc4 = md5_gg(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 1], 5, -165796510);
_loc1 = md5_gg(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 6], 9, -1069501632);
_loc2 = md5_gg(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 11], 14, 643717713);
_loc3 = md5_gg(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 0], 20, -373897302);
_loc4 = md5_gg(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 5], 5, -701558691);
_loc1 = md5_gg(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 10], 9, 38016083);
_loc2 = md5_gg(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 15], 14, -660478335);
_loc3 = md5_gg(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 4], 20, -405537848);
_loc4 = md5_gg(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 9], 5, 568446438);
_loc1 = md5_gg(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 14], 9, -1019803690);
_loc2 = md5_gg(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 3], 14, -187363961);
_loc3 = md5_gg(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 8], 20, 1163531501);
_loc4 = md5_gg(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 13], 5, -1444681467);
_loc1 = md5_gg(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 2], 9, -51403784);
_loc2 = md5_gg(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 7], 14, 1735328473);
_loc3 = md5_gg(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 12], 20, -1926607734);
_loc4 = md5_hh(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 5], 4, -378558);
_loc1 = md5_hh(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 8], 11, -2022574463);
_loc2 = md5_hh(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 11], 16, 1839030562);
_loc3 = md5_hh(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 14], 23, -35309556);
_loc4 = md5_hh(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 1], 4, -1530992060);
_loc1 = md5_hh(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 4], 11, 1272893353);
_loc2 = md5_hh(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 7], 16, -155497632);
_loc3 = md5_hh(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 10], 23, -1094730640);
_loc4 = md5_hh(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 13], 4, 681279174);
_loc1 = md5_hh(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 0], 11, -358537222);
_loc2 = md5_hh(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 3], 16, -722521979);
_loc3 = md5_hh(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 6], 23, 76029189);
_loc4 = md5_hh(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 9], 4, -640364487);
_loc1 = md5_hh(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 12], 11, -421815835);
_loc2 = md5_hh(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 15], 16, 530742520);
_loc3 = md5_hh(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 2], 23, -995338651);
_loc4 = md5_ii(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 0], 6, -198630844);
_loc1 = md5_ii(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 7], 10, 1126891415);
_loc2 = md5_ii(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 14], 15, -1416354905);
_loc3 = md5_ii(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 5], 21, -57434055);
_loc4 = md5_ii(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 12], 6, 1700485571);
_loc1 = md5_ii(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 3], 10, -1894986606);
_loc2 = md5_ii(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 10], 15, -1051523);
_loc3 = md5_ii(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 1], 21, -2054922799);
_loc4 = md5_ii(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 8], 6, 1873313359);
_loc1 = md5_ii(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 15], 10, -30611744);
_loc2 = md5_ii(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 6], 15, -1560198380);
_loc3 = md5_ii(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 13], 21, 1309151649);
_loc4 = md5_ii(_loc4, _loc3, _loc2, _loc1, x[_loc5 + 4], 6, -145523070);
_loc1 = md5_ii(_loc1, _loc4, _loc3, _loc2, x[_loc5 + 11], 10, -1120210379);
_loc2 = md5_ii(_loc2, _loc1, _loc4, _loc3, x[_loc5 + 2], 15, 718787259);
_loc3 = md5_ii(_loc3, _loc2, _loc1, _loc4, x[_loc5 + 9], 21, -343485551);
_loc4 = safe_add(_loc4, _loc10);
_loc3 = safe_add(_loc3, _loc9);
_loc2 = safe_add(_loc2, _loc8);
_loc1 = safe_add(_loc1, _loc7);
} // end of for
return (Array(_loc4, _loc3, _loc2, _loc1));
} // End of the function
function md5_cmn(q, a, b, x, s, t)
{
return (safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
} // End of the function
function md5_ff(a, b, c, d, x, s, t)
{
return (md5_cmn(b & c | (b ^ 4.294967E+009) & d, a, b, x, s, t));
} // End of the function
function md5_gg(a, b, c, d, x, s, t)
{
return (md5_cmn(b & d | c & (d ^ 4.294967E+009), a, b, x, s, t));
} // End of the function
function md5_hh(a, b, c, d, x, s, t)
{
return (md5_cmn(b ^ c ^ d, a, b, x, s, t));
} // End of the function
function md5_ii(a, b, c, d, x, s, t)
{
return (md5_cmn(c ^ (b | d ^ 4.294967E+009), a, b, x, s, t));
} // End of the function
function core_hmac_md5(key, data)
{
var _loc2 = str2binl(key);
if (_loc2.length > 16)
{
_loc2 = core_md5(_loc2, key.length * chrsz);
} // end if
var _loc3 = Array(16);
var _loc4 = Array(16);
for (var _loc1 = 0; _loc1 < 16; ++_loc1)
{
_loc3[_loc1] = _loc2[_loc1] ^ 909522486;
_loc4[_loc1] = _loc2[_loc1] ^ 1549556828;
} // end of for
var _loc5 = core_md5(_loc3.concat(str2binl(data)), 512 + data.length * chrsz);
return (core_md5(_loc4.concat(_loc5), 640));
} // End of the function
function safe_add(x, y)
{
var _loc1 = (x & 65535) + (y & 65535);
var _loc2 = (x >> 16) + (y >> 16) + (_loc1 >> 16);
return (_loc2 << 16 | _loc1 & 65535);
} // End of the function
function bit_rol(num, cnt)
{
return (num << cnt | num >>> 32 - cnt);
} // End of the function
function str2binl(str)
{
var _loc3 = Array();
var _loc4 = (1 << chrsz) - 1;
for (var _loc1 = 0; _loc1 < str.length * chrsz; _loc1 = _loc1 + chrsz)
{
_loc3[_loc1 >> 5] = _loc3[_loc1 >> 5] | (str.charCodeAt(_loc1 / chrsz) & _loc4) << _loc1 % 32;
} // end of for
return (_loc3);
} // End of the function
function binl2str(bin)
{
var _loc3 = "";
var _loc4 = (1 << chrsz) - 1;
for (var _loc1 = 0; _loc1 < bin.length * 32; _loc1 = _loc1 + chrsz)
{
_loc3 = _loc3 + String.fromCharCode(bin[_loc1 >> 5] >>> _loc1 % 32 & _loc4);
} // end of for
return (_loc3);
} // End of the function
function binl2hex(binarray)
{
var _loc3 = hexcase ? ("0123456789ABCDEF") : ("0123456789abcdef");
var _loc4 = "";
for (var _loc1 = 0; _loc1 < binarray.length * 4; ++_loc1)
{
_loc4 = _loc4 + (_loc3.charAt(binarray[_loc1 >> 2] >> _loc1 % 4 * 8 + 4 & 15) + _loc3.charAt(binarray[_loc1 >> 2] >> _loc1 % 4 * 8 & 15));
} // end of for
return (_loc4);
} // End of the function
function binl2b64(binarray)
{
var _loc6 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _loc4 = "";
for (var _loc2 = 0; _loc2 < binarray.length * 4; _loc2 = _loc2 + 3)
{
var _loc5 = (binarray[_loc2 >> 2] >> 8 * (_loc2 % 4) & 255) << 16 | (binarray[_loc2 + 1 >> 2] >> 8 * ((_loc2 + 1) % 4) & 255) << 8 | binarray[_loc2 + 2 >> 2] >> 8 * ((_loc2 + 2) % 4) & 255;
for (var _loc1 = 0; _loc1 < 4; ++_loc1)
{
if (_loc2 * 8 + _loc1 * 6 > binarray.length * 32)
{
_loc4 = _loc4 + b64pad;
continue;
} // end if
_loc4 = _loc4 + _loc6.charAt(_loc5 >> 6 * (3 - _loc1) & 63);
} // end of for
} // end of for
return (_loc4);
} // End of the function
function getServer()
{
server = new as_files.it.gotoandplay.smartfoxserver.SmartFoxClient();
} // End of the function
function connectToLogin(in_username, in_pass, login_response)
{
if (!is_logged_in)
{
on_login_response = login_response;
if (server == undefined)
{
getServer();
} // end if
username = in_username;
password = in_pass;
server.onConnection = handleLoginConnection;
server.onRandomKey = handleLoginRandomKey;
server.onExtensionResponse = onAirtowerResponse;
server.debug = true;
addListener(HANDLE_LOGIN, handleOnLogin);
var _loc1 = getLoginServerPort(in_username);
server.connect(LOGIN_IP, _loc1);
}
else
{
shell.$e("connectToLogin() -> Your already logged in! Cant login again");
} // end else if
} // End of the function
function getLoginServerPort(nickname)
{
var _loc1 = nickname.charCodeAt(0);
if (_loc1 % 2 == 0)
{
return (LOGIN_PORT_EVEN);
} // end if
return (LOGIN_PORT_ODD);
} // End of the function
function handleLostConnection()
{
updateListeners(CONNECTION_LOST, null);
} // End of the function
function handleLoginConnection(success)
{
if (success)
{
server.getRandomKey();
} // end if
} // End of the function
function handleLoginRandomKey(key)
{
rand_key = key;
login();
} // End of the function
function login()
{
var _loc1 = encryptPassword(password).toUpperCase();
_loc1 = encryptPassword(_loc1 + "" + rand_key);
server.login(LOGIN_ZONE, username, _loc1);
} // End of the function
function handleOnLogin(obj)
{
removeListener(HANDLE_LOGIN, handleOnLogin);
server.disconnect();
shell.setMyPlayerId(obj[1]);
shell.updateWorldPopulations(obj[4]);
shell.setWorldsWithBuddies(obj[3]);
login_key = obj[2];
on_login_response(true);
on_login_success = undefined;
is_logged_in = true;
} // End of the function
function connectToWorld(server_ip, server_port, connect_to_world_response)
{
on_world_response = connect_to_world_response;
server.onConnection = handleWorldConnection;
server.onRandomKey = handleWorldRandomKey;
addListener(HANDLE_LOGIN, joinWorld);
server.connect(server_ip, server_port);
} // End of the function
function handleWorldConnection(success)
{
if (success)
{
server.getRandomKey();
} // end if
} // End of the function
function handleWorldRandomKey(key)
{
rand_key = key;
worldLogin();
} // End of the function
function worldLogin()
{
var _loc1 = encryptPassword(login_key + rand_key) + login_key;
server.login(SERVER_ZONE, username, _loc1);
} // End of the function
function joinWorld()
{
removeListener(HANDLE_LOGIN, joinWorld);
var _loc1 = new Array();
_loc1.push(shell.getMyPlayerId());
_loc1.push(login_key);
addListener(JOIN_WORLD, handleJoinWorld);
send(PLAY_EXT, NAVIGATION + "#" + JOIN_WORLD, _loc1, "str", -1);
isWorldConnected(true);
} // End of the function
function handleJoinWorld(obj)
{
removeListener(JOIN_WORLD, handleJoinWorld);
var _loc3 = obj.shift();
var _loc1 = obj.shift();
server.onConnectionLost = handleLostConnection;
on_world_response(_loc1);
on_world_response = undefined;
} // End of the function
function send(extension, command, arr, type, room_id)
{
server.sendXtMessage(extension, command, arr, type, room_id);
} // End of the function
function disconnect()
{
if (server.connected())
{
server.disconnect();
shell.$d("[airtower] disconnect() -> Server is disconnected");
}
else
{
shell.$d("[airtower] disconnect() -> Trying to disconnect the server when its not connected");
} // end else if
} // End of the function
function encryptPassword(pass)
{
var _loc1 = hex_md5(pass);
_loc1 = _loc1.substr(16, 16) + "" + _loc1.substr(0, 16);
return (_loc1);
} // End of the function
System.security.allowDomain("play.clubpenguin.com");
System.security.allowDomain("media.clubpenguin.com");
System.security.allowDomain("media1.clubpenguin.com");
System.security.allowDomain("media2.clubpenguin.com");
System.security.allowDomain("stage.play.clubpenguin.com");
System.security.allowDomain("stage.media.clubpenguin.com");
System.security.allowDomain("stage.media1.clubpenguin.com");
System.security.allowDomain("stage.media2.clubpenguin.com");
System.security.allowDomain("sandbox01.play.clubpenguin.com");
System.security.allowDomain("sandbox01.media.clubpenguin.com");
System.security.allowDomain("sandbox01.media1.clubpenguin.com");
System.security.allowDomain("sandbox01.media2.clubpenguin.com");
System.security.allowDomain("sandbox02.play.clubpenguin.com");
System.security.allowDomain("sandbox02.media.clubpenguin.com");
System.security.allowDomain("sandbox02.media1.clubpenguin.com");
System.security.allowDomain("sandbox02.media2.clubpenguin.com");
System.security.allowDomain("sandbox03.play.clubpenguin.com");
System.security.allowDomain("sandbox03.media.clubpenguin.com");
System.security.allowDomain("sandbox03.media1.clubpenguin.com");
System.security.allowDomain("sandbox03.media2.clubpenguin.com");
System.security.allowDomain("sandbox04.play.clubpenguin.com");
System.security.allowDomain("sandbox04.media.clubpenguin.com");
System.security.allowDomain("sandbox04.media1.clubpenguin.com");
System.security.allowDomain("sandbox04.media2.clubpenguin.com");
System.security.allowDomain("sandbox05.play.clubpenguin.com");
System.security.allowDomain("sandbox05.media.clubpenguin.com");
System.security.allowDomain("sandbox05.media1.clubpenguin.com");
System.security.allowDomain("sandbox05.media2.clubpenguin.com");
var PLAY_EXT = "s";
var GAME_EXT = "z";
var NAVIGATION = "j";
var PLAYER_HANDLER = "u";
var ITEM_HANDLER = "i";
var IGNORE_HANDLER = "n";
var BUDDY_HANDLER = "b";
var TOY_HANDLER = "t";
var TABLE_HANDLER = "a";
var IGLOO_HANDLER = "g";
var PET_HANDLER = "p";
var MESSAGE_HANDLER = "m";
var MAIL_HANDLER = "l";
var SURVEY_HANDLER = "e";
var WADDLE = "w";
var SETTING_HANDLER = "s";
var MODERATION_HANDLER = "o";
var HANDLE_LOGIN = "l";
var HANDLE_ALERT = "a";
var HANDLE_ERROR = "e";
var GET_BUDDY_LIST = "gb";
var GET_IGNORE_LIST = "gn";
var GET_ITEM_LIST = "gi";
var GET_BUDDY_ONLINE_LIST = "go";
var GET_PLAYER = "gp";
var GET_ROOM_LIST = "gr";
var GET_TABLE = "gt";
var JOIN_WORLD = "js";
var JOIN_ROOM = "jr";
var LOAD_PLAYER = "lp";
var ADD_PLAYER = "ap";
var REMOVE_PLAYER = "rp";
var UPDATE_PLAYER = "up";
var PLAYER_MOVE = "sp";
var PLAYER_FRAME = "sf";
var PLAYER_ACTION = "sa";
var OPEN_BOOK = "at";
var CLOSE_BOOK = "rt";
var THROW_BALL = "sb";
var JOIN_GAME = "jg";
var SEND_MESSAGE = "sm";
var SEND_BLOCKED_MESSAGE = "mm";
var SEND_EMOTE = "se";
var SEND_JOKE = "sj";
var SEND_SAFE_MESSAGE = "ss";
var SEND_LINE_MESSAGE = "sl";
var SEND_QUICK_MESSAGE = "sq";
var SEND_TOUR_GUIDE_MESSAGE = "sg";
var GET_INVENTORY_LIST = "gi";
var MAIL_START_ENGINE = "mst";
var GET_MAIL = "mg";
var SEND_MAIL = "ms";
var RECEIVE_MAIL = "mr";
var DELETE_MAIL = "md";
var DELETE_MAIL_FROM_PLAYER = "mdp";
var GET_MAIL_DETAILS = "mgd";
var MAIL_CHECKED = "mc";
var GAME_OVER = "zo";
var BUY_INVENTORY = "ai";
var ADD_IGNORE = "an";
var REMOVE_IGNORE = "rn";
var REMOVE_BUDDY = "rb";
var REQUEST_BUDDY = "br";
var ACCEPT_BUDDY = "ba";
var BUDDY_ONLINE = "bon";
var BUDDY_OFFLINE = "bof";
var FIND_BUDDY = "bf";
var GET_PLAYER_OBJECT = "gp";
var REPORT_PLAYER = "r";
var UPDATE_PLAYER_COLOUR = "upc";
var UPDATE_PLAYER_HEAD = "uph";
var UPDATE_PLAYER_FACE = "upf";
var UPDATE_PLAYER_NECK = "upn";
var UPDATE_PLAYER_BODY = "upb";
var UPDATE_PLAYER_HAND = "upa";
var UPDATE_PLAYER_FEET = "upe";
var UPDATE_PLAYER_FLAG = "upl";
var UPDATE_PLAYER_PHOTO = "upp";
var UPDATE_PLAYER_REMOVE = "upr";
var GET_FURNITURE_LIST = "gf";
var UPDATE_ROOM = "up";
var UPDATE_FLOOR = "ag";
var UPDATE_IGLOO_TYPE = "au";
var UNLOCK_IGLOO = "or";
var LOCK_IGLOO = "cr";
var UPDATE_IGLOO_MUSIC = "um";
var GET_IGLOO_DETAILS = "gm";
var JOIN_PLAYER_IGLOO = "jp";
var SAVE_IGLOO_FURNITURE = "ur";
var GET_IGLOO_LIST = "gr";
var BUY_FURNITURE = "af";
var GET_MY_PLAYER_PUFFLES = "pgu";
var GET_PLAYER_PUFFLES = "pg";
var PUFFLE_FRAME = "ps";
var PUFFLE_MOVE = "pm";
var REST_PUFFLE = "pr";
var BATH_PUFFLE = "pb";
var PLAY_PUFFLE = "pp";
var FEED_PUFFLE = "pf";
var WALK_PUFFLE = "pw";
var TREAT_PUFFLE = "pt";
var ADOPT_PUFFLE = "pn";
var UPDATE_TABLE = "ut";
var GET_TABLE_POPULATION = "gt";
var JOIN_TABLE = "jt";
var LEAVE_TABLE = "lt";
var UPDATE_WADDLE = "uw";
var GET_WADDLE_POPULATION = "gw";
var JOIN_WADDLE = "jw";
var LEAVE_WADDLE = "lw";
var START_WADDLE = "sw";
var SEND_WADDLE = "jx";
var SPY_PHONE_REQUEST = "spy";
var HEARTBEAT = "h";
var TIMEOUT = "t";
var MODERATOR_ACTION = "ma";
var KICK = "k";
var MUTE = "m";
var BAN = "b";
var sf_listener_container = new Object();
var CONNECTION_LOST = "con";
var hexcase = 0;
var b64pad = "";
var chrsz = 8;
var shell = _global.getCurrentShell();
if (shell == undefined)
{
}
else
{
shell.$d("[airtower] *** Airtower Initiated ***");
} // end else if
var server = undefined;
var LOGIN_IP = "64.224.215.203";
var LOGIN_PORT_EVEN = 3724;
var LOGIN_PORT_ODD = 6112;
var LOGIN_ZONE = "w1";
var server_ip = "";
var server_port = 0;
var SERVER_ZONE = "w1";
var username = "";
var password = "";
var rand_key = "";
var login_key = "";
var on_login_response;
var is_logged_in = false;
var on_world_response;
// Action script...
// [Initial MovieClip Action of sprite 1]
#initclip 1
class as_files.it.gotoandplay.smartfoxserver.SmartFoxClient extends XMLSocket
{
var objRef, os, isConnected, debug, arrayTags, messageHandlers, httpConnection, onConnect, onData, onXML, onClose, fpMajorVersion, pollingDelayFn, __get__httpPollSpeed, roomList, buddyList, myBuddyVars, activeRoomId, myUserId, myUserName, playerId, changingRoom, amIModerator, configLoader, onConfigLoadFailure, blueBoxIpAddress, ipAddress, port, __set__httpPollSpeed, onConfigLoadSuccess, onBuddyListUpdate, onBuddyList, t1, socketConnectionTimeoutThread, onConnection, onConnectionLost, close;
function SmartFoxClient(objRef)
{
super();
this.objRef = objRef;
os = as_files.it.gotoandplay.smartfoxserver.ObjectSerializer.getInstance();
isConnected = false;
debug = false;
this.initialize();
arrayTags = {uLs: true, rmList: true, vars: true, bList: true, vs: true, mv: true};
messageHandlers = new Object();
httpConnection = new as_files.it.gotoandplay.smartfoxserver.http.HttpConnection(mx.utils.Delegate.create(this, handleHttpConnect), mx.utils.Delegate.create(this, handleHttpClose), mx.utils.Delegate.create(this, handleHttpData), mx.utils.Delegate.create(this, handleHttpError));
onConnect = connectionEstablished;
onData = gotData;
onXML = xmlReceived;
onClose = connectionClosed;
fpMajorVersion = this.getFpMajorVersion();
if (fpMajorVersion < 8)
{
pollingDelayFn = _global.setInterval;
}
else
{
pollingDelayFn = _global.setTimeout;
} // end else if
this.setupMessageHandlers();
} // End of the function
function get httpPollSpeed()
{
return (_httpPollSpeed);
} // End of the function
function set httpPollSpeed(sp)
{
if (sp >= as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.MIN_POLL_SPEED && sp <= as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.MAX_POLL_SPEED)
{
_httpPollSpeed = sp;
} // end if
//return (this.httpPollSpeed());
null;
} // End of the function
function getFpMajorVersion()
{
var _loc1 = System.capabilities.version.indexOf(",");
return (Number(System.capabilities.version.substr(_loc1 - 1, 1)));
} // End of the function
function initialize(isLogout)
{
if (isLogout == undefined)
{
isLogout = false;
} // end if
roomList = {};
buddyList = [];
myBuddyVars = [];
activeRoomId = null;
myUserId = null;
myUserName = "";
playerId = null;
changingRoom = false;
amIModerator = false;
if (!isLogout)
{
isConnected = false;
isHttpMode = false;
preConnection = true;
} // end if
} // End of the function
function loadConfig(configFile, autoConnect)
{
if (configFile == undefined)
{
configFile = DEFAULT_CONFIG_FILE;
} // end if
if (autoConnect == undefined)
{
autoConnectOnConfigSuccess = DEFAULT_AUTO_CONNECT;
}
else
{
autoConnectOnConfigSuccess = autoConnect;
} // end else if
configLoader = new XML();
configLoader.ignoreWhite = true;
configLoader.onLoad = mx.utils.Delegate.create(this, onConfigLoadSucceeded);
configLoader.load(configFile);
} // End of the function
function onConfigLoadSucceeded(ok)
{
if (!ok)
{
this.onConfigLoadFailure("Could not load config file!");
return;
} // end if
var _loc6 = configLoader.childNodes[0].childNodes;
for (var _loc4 = 0; _loc4 < _loc6.length; ++_loc4)
{
var _loc5 = _loc6[_loc4];
var _loc2 = _loc5.nodeName.toLowerCase();
var _loc3 = _loc5.firstChild.nodeValue;
if (_loc2 == "ip")
{
ipAddress = blueBoxIpAddress = _loc3;
continue;
} // end if
if (_loc2 == "port")
{
port = Number(_loc3);
continue;
} // end if
if (_loc2 == "zone")
{
defaultZone = _loc3;
continue;
} // end if
if (_loc2 == "smartconnect")
{
smartConnect = _loc3 == "true" ? (true) : (false);
continue;
} // end if
if (_loc2 == "blueboxipaddress")
{
blueBoxIpAddress = _loc3;
continue;
} // end if
if (_loc2 == "blueboxport")
{
blueBoxPort = _loc3;
continue;
} // end if
if (_loc2 == "debug")
{
debug = _loc3 == "true" ? (true) : (false);
continue;
} // end if
if (_loc2 == "httpport")
{
httpPort = Number(_loc3);
continue;
} // end if
if (_loc2 == "httppollspeed")
{
this.__set__httpPollSpeed(Number(_loc3));
continue;
} // end if
if (_loc2 == "socketconnectiontimeout")
{
socketConnectionTimeout = Number(_loc3);
continue;
} // end if
if (_loc2 == "rawprotocolseparator")
{
rawProtocolSeparator = _loc3;
} // end if
} // end of for
if (autoConnectOnConfigSuccess)
{
this.connect(ipAddress, port);
}
else
{
this.onConfigLoadSuccess();
} // end else if
} // End of the function
function onConfigLoadFailed(code)
{
if (code == 404)
{
this.onConfigLoadFailure("Could not find configuration file.");
}
else
{
this.onConfigLoadFailure("Could not load configuration file. Http status = " + code);
} // end else if
} // End of the function
function getVersion()
{
return (majVersion + "." + minVersion + "." + subVersion);
} // End of the function
function connected()
{
return (isConnected);
} // End of the function
function getConnectionMode()
{
var _loc2 = as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.CONNECTION_MODE_DISCONNECTED;
if (isConnected)
{
if (isHttpMode)
{
_loc2 = as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.CONNECTION_MODE_HTTP;
}
else
{
_loc2 = as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.CONNECTION_MODE_SOCKET;
} // end if
} // end else if
return (_loc2);
} // End of the function
function setupMessageHandlers()
{
this.addMessageHandler("sys", handleSysMessages);
this.addMessageHandler("xt", handleExtensionMessages);
} // End of the function
function addMessageHandler(handlerId, handlerMethod)
{
if (messageHandlers[handlerId] == undefined)
{
messageHandlers[handlerId] = new Object();
messageHandlers[handlerId].handleMessage = handlerMethod;
} // end if
} // End of the function
function isModerator()
{
return (amIModerator);
} // End of the function
function handleSysMessages(xmlObj, scope)
{
var _loc9 = xmlObj.attributes.action;
var _loc20 = xmlObj.attributes.r;
if (_loc9 == "apiOK")
{
scope.isConnected = true;
scope.onConnection(true);
}
else if (_loc9 == "apiKO")
{
scope.onConnection(false);
}
else if (_loc9 == "logOK")
{
scope.myUserId = xmlObj.login.attributes.id;
scope.myUserName = xmlObj.login.attributes.n;
scope.amIModerator = xmlObj.login.attributes.mod == "0" ? (false) : (true);
scope.onLogin({success: true, name: scope.myUserName, error: ""});
scope.getRoomList();
}
else if (_loc9 == "logKO")
{
var _loc62 = xmlObj.login.attributes.e;
scope.onLogin({success: false, name: "", error: _loc62});
}
else if (_loc9 == "logout")
{
scope.initialize(true);
scope.onLogout();
}
else if (_loc9 == "rmList")
{
var _loc10 = xmlObj.rmList.rmList;
scope.roomList = new Array();
for (var _loc43 in _loc10)
{
var _loc6 = _loc10[_loc43].attributes.id;
var _loc2 = _loc10[_loc43].attributes;
var _loc4 = _loc2.id;
var _loc22 = _loc10[_loc43].n.value;
var _loc23 = Number(_loc2.maxu);
var _loc24 = Number(_loc2.maxs);
var _loc66 = _loc2.temp ? (true) : (false);
var _loc54 = _loc2.game ? (true) : (false);
var _loc30 = _loc2.priv ? (true) : (false);
var _loc31 = Number(_loc2.ucnt);
var _loc25 = Number(_loc2.scnt);
var _loc71 = _loc2.lmb ? (true) : (false);
scope.roomList[_loc6] = new it.gotoandplay.smartfoxserver.Room(_loc4, _loc22, _loc23, _loc24, _loc66, _loc54, _loc30);
scope.roomList[_loc6].userCount = _loc31;
scope.roomList[_loc6].specCount = _loc25;
scope.roomList[_loc6].setIsLimbo(_loc71);
var _loc3 = _loc10[_loc43].vars.vars;
for (var _loc37 = 0; _loc37 < _loc3.length; ++_loc37)
{
var _loc28 = _loc3[_loc37].attributes.n;
var _loc12 = _loc3[_loc37].attributes.t;
var _loc11 = _loc3[_loc37].value;
var _loc13;
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
}
else if (_loc12 == "x")
{
_loc13 = function (x)
{
return (null);
};
} // end else if
scope.roomList[_loc6].variables[_loc28] = _loc13(_loc11);
} // end of for
} // end of for...in
scope.onRoomListUpdate(scope.roomList);
}
else if (_loc9 == "joinOK")
{
var _loc49 = xmlObj.uLs.attributes.r;
var _loc7 = xmlObj.uLs.uLs;
var _loc16 = xmlObj.vars.vars;
scope.activeRoomId = Number(_loc49);
var _loc50 = scope.roomList[_loc49];
_loc50.userList = new Object();
scope.playerId = xmlObj.pid.attributes.id;
_loc50.setMyPlayerIndex(xmlObj.pid.attributes.id);
_loc50.variables = new Object();
for (var _loc37 = 0; _loc37 < _loc16.length; ++_loc37)
{
_loc28 = _loc16[_loc37].attributes.n;
_loc12 = _loc16[_loc37].attributes.t;
_loc11 = _loc16[_loc37].value;
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
}
else if (_loc12 == "x")
{
_loc13 = function (x)
{
return (null);
};
} // end else if
_loc50.variables[_loc28] = _loc13(_loc11);
} // end of for
var _loc72 = 0;
var _loc59 = 0;
for (var _loc43 = 0; _loc43 < _loc7.length; ++_loc43)
{
_loc22 = _loc7[_loc43].n.value;
_loc4 = _loc7[_loc43].attributes.i;
var _loc63 = _loc7[_loc43].attributes.m;
var _loc75 = _loc7[_loc43].attributes.s;
var _loc51 = _loc7[_loc43].attributes.p;
_loc50.userList[_loc4] = new it.gotoandplay.smartfoxserver.User(_loc4, _loc22);
_loc50.userList[_loc4].isMod = _loc63 == "1" ? (true) : (false);
_loc50.userList[_loc4].isSpec = _loc75 == "1" ? (true) : (false);
_loc50.userList[_loc4].pid = _loc51 == undefined ? (-1) : (_loc51);
if (_loc50.isGame() && _loc75 == "1")
{
++_loc59;
}
else
{
++_loc72;
} // end else if
var _loc14 = _loc7[_loc43].vars.vars;
_loc50.userList[_loc4].variables = {};
var _loc41 = _loc50.userList[_loc4].variables;
for (var _loc37 = 0; _loc37 < _loc14.length; ++_loc37)
{
_loc28 = _loc14[_loc37].attributes.n;
_loc12 = _loc14[_loc37].attributes.t;
_loc11 = _loc14[_loc37].value;
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
}
else if (_loc12 == "x")
{
_loc13 = function (x)
{
return (null);
};
} // end else if
_loc41[_loc28] = _loc13(_loc11);
} // end of for
} // end of for
_loc50.userCount = _loc72;
_loc50.specCount = _loc59;
scope.changingRoom = false;
scope.onJoinRoom(scope.roomList[_loc49]);
}
else if (_loc9 == "joinKO")
{
scope.changingRoom = false;
var _loc65 = xmlObj.error.attributes.msg;
scope.onJoinRoomError(_loc65);
}
else if (_loc9 == "uER")
{
var _loc69 = xmlObj.u.attributes.i;
var _loc64 = xmlObj.u.n.value;
_loc63 = xmlObj.u.attributes.m;
_loc75 = xmlObj.u.attributes.s;
_loc51 = xmlObj.u.attributes.p;
_loc50 = scope.roomList[_loc20];
_loc50.userList[_loc69] = new it.gotoandplay.smartfoxserver.User(_loc69, _loc64);
_loc50.userList[_loc69].isMod = _loc63 == "1" ? (true) : (false);
_loc50.userList[_loc69].isSpec = _loc75 == "1" ? (true) : (false);
_loc50.userList[_loc69].pid = _loc51 == undefined ? (-1) : (_loc51);
if (_loc50.isGame() && _loc75 == "1")
{
++_loc50.specCount;
}
else
{
++_loc50.userCount;
} // end else if
_loc14 = xmlObj.u.vars.vars;
_loc50.userList[_loc69].variables = {};
_loc41 = _loc50.userList[_loc69].variables;
for (var _loc37 = 0; _loc37 < _loc14.length; ++_loc37)
{
_loc28 = _loc14[_loc37].attributes.n;
_loc12 = _loc14[_loc37].attributes.t;
_loc11 = _loc14[_loc37].value;
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
}
else if (_loc12 == "x")
{
_loc13 = function (x)
{
return (null);
};
} // end else if
_loc41[_loc28] = _loc13(_loc11);
} // end of for
scope.onUserEnterRoom(_loc20, _loc50.userList[_loc69]);
}
else if (_loc9 == "userGone")
{
_loc69 = xmlObj.user.attributes.id;
_loc50 = scope.roomList[_loc20];
_loc64 = _loc50.userList[_loc69].name;
_loc75 = _loc50.userList[_loc69].isSpec;
delete _loc50.userList[_loc69];
if (_loc50.isGame() && _loc75)
{
--_loc50.specCount;
}
else
{
--_loc50.userCount;
} // end else if
scope.onUserLeaveRoom(_loc20, _loc69, _loc64);
}
else if (_loc9 == "pubMsg")
{
_loc69 = xmlObj.user.attributes.id;
var _loc47 = xmlObj.txt.value;
_loc47 = scope.os.decodeEntities(_loc47.toString());
scope.onPublicMessage(_loc47.toString(), scope.roomList[_loc20].userList[_loc69], _loc20);
}
else if (_loc9 == "prvMsg")
{
_loc69 = xmlObj.user.attributes.id;
_loc47 = xmlObj.txt.value;
_loc47 = scope.os.decodeEntities(_loc47);
scope.onPrivateMessage(_loc47.toString(), scope.roomList[_loc20].userList[_loc69], _loc69, _loc20);
}
else if (_loc9 == "dmnMsg")
{
_loc69 = xmlObj.user.attributes.id;
_loc47 = xmlObj.txt.value;
_loc47 = scope.os.decodeEntities(_loc47);
scope.onAdminMessage(_loc47.toString(), scope.roomList[_loc20].userList[_loc69]);
}
else if (_loc9 == "modMsg")
{
_loc69 = xmlObj.user.attributes.id;
_loc47 = xmlObj.txt.value;
_loc47 = scope.os.decodeEntities(_loc47);
scope.onModeratorMessage(_loc47.toString(), scope.roomList[_loc20].userList[_loc69]);
}
else if (_loc9 == "dataObj")
{
var _loc73 = xmlObj.user.attributes.id;
var _loc60 = xmlObj.dataObj.value;
var _loc61 = scope.os.deserialize(_loc60);
scope.onObjectReceived(_loc61, scope.roomList[_loc20].userList[_loc73]);
}
else if (_loc9 == "uVarsUpdate")
{
_loc69 = xmlObj.user.attributes.id;
var _loc15 = xmlObj.vars.vars;
var _loc33 = scope.roomList[_loc20].userList[_loc69];
if (_loc33.variables == undefined)
{
_loc33.variables = {};
} // end if
var _loc34 = [];
for (var _loc37 = 0; _loc37 < _loc15.length; ++_loc37)
{
_loc28 = _loc15[_loc37].attributes.n;
_loc12 = _loc15[_loc37].attributes.t;
_loc11 = _loc15[_loc37].value;
_loc34.push(_loc28);
_loc34[_loc28] = true;
if (_loc12 == "x")
{
delete _loc33.variables[_loc28];
continue;
} // end if
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
} // end else if
_loc33.variables[_loc28] = _loc13(_loc11);
} // end of for
scope.onUserVariablesUpdate(_loc33, _loc34);
}
else if (_loc9 == "rVarsUpdate")
{
_loc15 = xmlObj.vars.vars;
_loc50 = scope.roomList[_loc20];
_loc34 = [];
if (_loc50.variables == undefined)
{
_loc50.variables = new Object();
} // end if
for (var _loc37 = 0; _loc37 < _loc15.length; ++_loc37)
{
_loc28 = _loc15[_loc37].attributes.n;
_loc12 = _loc15[_loc37].attributes.t;
_loc11 = _loc15[_loc37].value;
_loc34.push(_loc28);
_loc34[_loc28] = true;
if (_loc12 == "x")
{
delete _loc50.variables[_loc28];
continue;
} // end if
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
} // end else if
_loc50.variables[_loc28] = _loc13(_loc11);
} // end of for
scope.onRoomVariablesUpdate(_loc50, _loc34);
}
else if (_loc9 == "createRmKO")
{
_loc62 = xmlObj.room.attributes.e;
scope.onCreateRoomError(_loc62);
}
else if (_loc9 == "uCount")
{
_loc72 = xmlObj.attributes.u;
_loc59 = xmlObj.attributes.s;
var _loc44 = scope.roomList[_loc20];
_loc44.userCount = Number(_loc72);
_loc44.specCount = Number(_loc59);
scope.onUserCountChange(_loc44);
}
else if (_loc9 == "roomAdd")
{
var _loc38 = xmlObj.rm.attributes;
var _loc52 = _loc38.id;
var _loc67 = xmlObj.rm.name.value;
var _loc74 = Number(_loc38.max);
var _loc58 = Number(_loc38.spec);
_loc66 = _loc38.temp ? (true) : (false);
_loc54 = _loc38.game ? (true) : (false);
var _loc68 = _loc38.priv ? (true) : (false);
_loc71 = _loc38.limbo ? (true) : (false);
var _loc36 = new it.gotoandplay.smartfoxserver.Room(_loc52, _loc67, _loc74, _loc58, _loc66, _loc54, _loc68);
_loc36.setIsLimbo(_loc71);
scope.roomList[_loc52] = _loc36;
_loc15 = xmlObj.rm.vars.vars;
_loc36.variables = new Object();
for (var _loc37 = 0; _loc37 < _loc15.length; ++_loc37)
{
_loc28 = _loc15[_loc37].attributes.n;
_loc12 = _loc15[_loc37].attributes.t;
_loc11 = _loc15[_loc37].value;
if (_loc12 == "b")
{
_loc13 = Boolean;
_loc11 = Number(_loc11);
}
else if (_loc12 == "n")
{
_loc13 = Number;
}
else if (_loc12 == "s")
{
_loc13 = String;
} // end else if
_loc36.variables[_loc28] = _loc13(_loc11);
} // end of for
scope.onRoomAdded(_loc36);
}
else if (_loc9 == "roomDel")
{
var _loc53 = xmlObj.rm.attributes.id;
var _loc55 = scope.roomList[_loc53];
delete scope.roomList[_loc53];
scope.onRoomDeleted(_loc55);
}
else if (_loc9 == "leaveRoom")
{
var _loc76 = xmlObj.rm.attributes.id;
scope.onRoomLeft(_loc76);
}
else if (_loc9 == "roundTripRes")
{
scope.t2 = getTimer();
scope.onRoundTripResponse(scope.t2 - scope.t1);
}
else if (_loc9 == "swSpec")
{
var _loc46 = Number(xmlObj.pid.attributes.id);
var _loc48 = Number(xmlObj.pid.attributes.u);
if (_loc46 > 0)
{
++scope.roomList[_loc20].userCount;
--scope.roomList[_loc20].specCount;
} // end if
if (!isNaN(_loc48))
{
_loc50 = scope.roomList[_loc20];
_loc50.userList[_loc48].pid = _loc46;
_loc50.userList[_loc48].isSpec = false;
}
else
{
scope.playerId = _loc46;
scope.onSpectatorSwitched(scope.playerId > 0, scope.playerId, scope.roomList[_loc20]);
} // end else if
}
else if (_loc9 == "bList")
{
var _loc8 = xmlObj.bList.bList;
if (_loc8 == undefined)
{
scope.onBuddyListError(xmlObj.err.value);
return;
} // end if
var _loc18 = xmlObj.mv.mv;
if (_loc18 != undefined)
{
for (var it in _loc18)
{
var _loc32 = _loc18[it].attributes.n;
var _loc27 = _loc18[it].value;
scope.myBuddyVars[_loc32] = _loc27;
} // end of for...in
} // end if
for (var _loc43 = 0; _loc43 < _loc8.length; ++_loc43)
{
var _loc35 = {};
_loc35.isOnline = _loc8[_loc43].attributes.s == "1" ? (true) : (false);
_loc35.name = _loc8[_loc43].n.value;
_loc35.id = _loc8[_loc43].attributes.i;
_loc35.isBlocked = _loc8[_loc43].attributes.x == "1" ? (true) : (false);
_loc35.variables = {};
var _loc21 = _loc8[_loc43].vs.vs;
for (var _loc37 in _loc21)
{
var _loc29 = _loc21[_loc37].attributes.n;
var _loc26 = _loc21[_loc37].value;
_loc35.variables[_loc29] = _loc26;
} // end of for...in
scope.buddyList.push(_loc35);
} // end of for
scope.onBuddyList(scope.buddyList);
}
else if (_loc9 == "bUpd")
{
var _loc39 = false;
var _loc42 = xmlObj.b;
if (_loc42 == undefined)
{
scope.onBuddyListError(xmlObj.err.value);
return;
} // end if
_loc35 = {};
_loc35.name = _loc42.n.value;
_loc35.id = _loc42.attributes.i;
_loc35.isOnline = _loc42.attributes.s == "1" ? (true) : (false);
_loc35.isBlocked = _loc42.attributes.x == "1" ? (true) : (false);
_loc21 = _loc42.vs.vs;
var _loc17 = null;
for (var it in scope.buddyList)
{
_loc17 = scope.buddyList[it];
if (_loc17.name == _loc35.name)
{
scope.buddyList[it] = _loc35;
_loc35.isBlocked = _loc17.isBlocked;
_loc35.variables = _loc17.variables;
for (var _loc43 in _loc21)
{
_loc29 = _loc21[_loc43].attributes.n;
_loc26 = _loc21[_loc43].value;
_loc35.variables[_loc29] = _loc26;
} // end of for...in
_loc39 = true;
break;
} // end if
} // end of for...in
if (_loc39)
{
scope.onBuddyListUpdate(_loc35);
} // end if
}
else if (_loc9 == "bAdd")
{
_loc42 = xmlObj.b;
_loc35 = {};
_loc35.name = _loc42.n.value;
_loc35.id = _loc42.attributes.i;
_loc35.isOnline = _loc42.attributes.s == "1" ? (true) : (false);
_loc35.isBlocked = _loc42.attributes.x == "1" ? (true) : (false);
_loc35.variables = {};
_loc21 = _loc42.vs.vs;
for (var _loc43 in _loc21)
{
_loc29 = _loc21[_loc43].attributes.n;
_loc26 = _loc21[_loc43].value;
_loc35.variables[_loc29] = _loc26;
} // end of for...in
scope.buddyList.push(_loc35);
scope.onBuddyList(scope.buddyList);
}
else if (_loc9 == "remB")
{
var _loc40 = xmlObj.n.value;
_loc35 = null;
for (var it in scope.buddyList)
{
_loc35 = scope.buddyList[it];
if (_loc35.name == _loc40)
{
delete scope.buddyList[it];
scope.onBuddyList(scope.buddyList);
break;
} // end if
} // end of for...in
}
else if (_loc9 == "bPrm")
{
var _loc56 = xmlObj.n.value;
var _loc45 = "";
if (xmlObj.txt != undefined)
{
_loc45 = scope.os.decodeEntities(_loc45);
} // end if
scope.onBuddyPermissionRequest(_loc56, _loc45);
}
else if (_loc9 == "roomB")
{
var _loc70 = xmlObj.br.attributes.r;
var _loc19 = _loc70.toString().split(",");
for (var _loc43 in _loc19)
{
_loc19[_loc43] = Number(_loc19[_loc43]);
} // end of for...in
scope.onBuddyRoom(_loc19);
}
else if (_loc9 == "rndK")
{
var _loc57 = xmlObj.k.value;
scope.onRandomKey(_loc57);
} // end else if
} // End of the function
function handleExtensionMessages(dataObj, scope, type)
{
if (type == undefined)
{
type = "xml";
} // end if
if (type == "xml")
{
var _loc6 = dataObj.attributes.action;
var _loc7 = dataObj.attributes.r;
if (_loc6 == "xtRes")
{
var _loc4 = dataObj.value;
var _loc5 = scope.os.deserialize(_loc4);
scope.onExtensionResponse(_loc5, type);
} // end if
}
else if (type == "str")
{
scope.onExtensionResponse(dataObj, type);
}
else if (type == "json")
{
scope.onExtensionResponse(dataObj.o, type);
} // end else if
} // End of the function
function sendXtMessage(xtName, cmdName, paramObj, type, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
if (type == undefined)
{
type = "xml";
} // end if
if (type == "xml")
{
var _loc11;
_loc11 = {t: "xt"};
var _loc10 = {name: xtName, cmd: cmdName, param: paramObj};
var _loc12 = "";
this.send(_loc11, "xtReq", roomId, _loc12);
}
else if (type == "str")
{
var _loc4;
_loc4 = rawProtocolSeparator + "xt" + rawProtocolSeparator + xtName + rawProtocolSeparator + cmdName + rawProtocolSeparator + roomId + rawProtocolSeparator;
for (var _loc2 = 0; _loc2 < paramObj.length; ++_loc2)
{
_loc4 = _loc4 + (paramObj[_loc2].toString() + rawProtocolSeparator);
} // end of for
this.sendString(_loc4);
}
else if (type == "json")
{
var _loc5 = {};
_loc5.x = xtName;
_loc5.c = cmdName;
_loc5.r = roomId;
_loc5.p = paramObj;
var _loc6 = {};
_loc6.t = "xt";
_loc6.b = _loc5;
try
{
var _loc13 = as_files.it.gotoandplay.smartfoxserver.JSON.stringify(_loc6);
this.sendJson(_loc13);
} // End of try
catch(ex)
{
if (debug)
{
} // end else if
} // End of catch
} // end else if
} // End of the function
function dumpObj(obj, depth)
{
if (depth == undefined)
{
depth = 0;
} // end if
if (debug)
{
if (depth == 0)
{
} // end if
for (var _loc8 in obj)
{
var _loc4 = obj[_loc8];
var _loc5 = typeof(_loc4);
if (_loc5 != "object")
{
var _loc3 = "";
for (var _loc2 = 0; _loc2 < depth; ++_loc2)
{
_loc3 = _loc3 + "\t";
} // end of for
_loc3 = _loc3 + (_loc8 + " : " + _loc4 + " ( " + _loc5 + " )");
continue;
} // end if
this.dumpObj(_loc4, depth + 1);
} // end of for...in
} // end if
} // End of the function
function login(zone, name, pass)
{
var _loc3 = {t: "sys"};
var _loc2 = " ";
this.send(_loc3, "login", 0, _loc2);
} // End of the function
function logout()
{
var _loc2 = {t: "sys"};
this.send(_loc2, "logout", -1, "");
} // End of the function
function getRoomList()
{
var _loc2 = {t: "sys"};
this.send(_loc2, "getRmList", activeRoomId ? (activeRoomId) : (-1), "");
} // End of the function
function autoJoin()
{
var _loc2 = {t: "sys"};
this.send(_loc2, "autoJoin", activeRoomId ? (activeRoomId) : (-1), "");
} // End of the function
function joinRoom(newRoom, pword, isSpectator, dontLeave, oldRoom)
{
var _loc2 = null;
var _loc7;
if (isSpectator)
{
_loc7 = 1;
}
else
{
_loc7 = 0;
} // end else if
if (!changingRoom)
{
if (typeof(newRoom) == "number")
{
_loc2 = newRoom;
}
else
{
for (var _loc4 in roomList)
{
if (roomList[_loc4].name == newRoom)
{
_loc2 = roomList[_loc4].id;
break;
} // end if
} // end of for...in
} // end else if
if (_loc2 != null)
{
var _loc9 = {t: "sys"};
var _loc6 = dontLeave ? ("0") : ("1");
var _loc5;
if (oldRoom)
{
_loc5 = oldRoom;
}
else
{
_loc5 = activeRoomId;
} // end else if
if (activeRoomId == null)
{
_loc6 = "0";
_loc5 = -1;
} // end if
var _loc8 = " ";
this.send(_loc9, "joinRoom", activeRoomId ? (activeRoomId) : (-1), _loc8);
changingRoom = true;
} // end if
} // end if
} // End of the function
function sendBuddyPermissionResponse(allowBuddy, targetBuddy)
{
var _loc2 = " ";
this.send({t: "sys"}, "bPrm", -1, _loc2);
} // End of the function
function sendPublicMessage(message, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc2 = {t: "sys"};
var _loc3 = " ";
this.send(_loc2, "pubMsg", roomId, _loc3);
} // End of the function
function sendPrivateMessage(message, recipientId, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc2 = {t: "sys"};
var _loc3 = " ";
this.send(_loc2, "prvMsg", roomId, _loc3);
} // End of the function
function sendModeratorMessage(message, type, id)
{
var _loc2 = {t: "sys"};
var _loc3 = " ";
this.send(_loc2, "modMsg", activeRoomId, _loc3);
} // End of the function
function sendObject(obj, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc2 = "";
var _loc3 = {t: "sys"};
this.send(_loc3, "asObj", roomId, _loc2);
} // End of the function
function sendObjectToGroup(obj, userList, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc3 = "";
for (var _loc4 in userList)
{
if (!isNaN(userList[_loc4]))
{
_loc3 = _loc3 + (userList[_loc4] + ",");
} // end if
} // end of for...in
_loc3 = _loc3.substr(0, _loc3.length - 1);
obj._$$_ = _loc3;
var _loc5 = "";
var _loc6 = {t: "sys"};
this.send(_loc6, "asObjG", roomId, _loc5);
} // End of the function
function setBuddyBlockStatus(buddyName, status)
{
var _loc2 = this.getBuddyByName(buddyName);
if (_loc2 != null)
{
if (_loc2.blocked != status)
{
_loc2.isBlocked = status;
var _loc3 = " ";
this.send({t: "sys"}, "setB", -1, _loc3);
this.onBuddyListUpdate(_loc2);
} // end if
} // end if
} // End of the function
function setUserVariables(varObj, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc9 = {t: "sys"};
var _loc6 = "";
var _loc4 = roomList[roomId].userList[myUserId];
for (var _loc7 in varObj)
{
var _loc2 = varObj[_loc7];
var _loc3 = null;
if (typeof(_loc2) == "boolean")
{
_loc3 = "b";
_loc2 = _loc2 ? (1) : (0);
}
else if (typeof(_loc2) == "number")
{
_loc3 = "n";
}
else if (typeof(_loc2) == "string")
{
_loc3 = "s";
}
else if (typeof(_loc2) == "null")
{
_loc3 = "x";
delete _loc4.variables[_loc7];
} // end else if
if (_loc3 != null)
{
_loc4.variables[_loc7] = _loc2;
_loc6 = _loc6 + ("");
} // end if
} // end of for...in
_loc6 = _loc6 + " ";
this.send(_loc9, "setUvars", roomId, _loc6);
} // End of the function
function setBuddyVariables(varList)
{
var _loc6 = {t: "sys"};
var _loc4 = "";
for (var _loc5 in varList)
{
var _loc2 = varList[_loc5];
if (myBuddyVars[_loc5] != _loc2)
{
myBuddyVars[_loc5] = _loc2;
_loc4 = _loc4 + ("");
} // end if
} // end of for...in
_loc4 = _loc4 + " ";
this.send(_loc6, "setBvars", -1, _loc4);
} // End of the function
function dumpRoomList()
{
for (var _loc5 in roomList)
{
var _loc2 = roomList[_loc5];
for (var _loc4 in _loc2.variables)
{
} // end of for...in
var _loc3 = _loc2.getUserList();
for (var _loc4 in _loc3)
{
} // end of for...in
} // end of for...in
} // End of the function
function createRoom(roomObj, roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc7 = {t: "sys"};
var _loc10 = roomObj.updatable ? (1) : (0);
var _loc5 = roomObj.isGame ? (1) : (0);
var _loc6 = 1;
var _loc8 = roomObj.maxSpectators;
if (_loc5 && roomObj.exitCurrentRoom != undefined)
{
_loc6 = roomObj.exitCurrentRoom ? (1) : (0);
} // end if
var _loc3 = "";
_loc3 = _loc3 + (" ");
_loc3 = _loc3 + (" ");
_loc3 = _loc3 + ("" + roomObj.maxUsers + " ");
if (roomObj.uCount != undefined)
{
_loc3 = _loc3 + ("" + (roomObj.uCount ? ("1") : ("0")) + " ");
} // end if
if (roomObj.extension != undefined)
{
_loc3 = _loc3 + (" ");
} // end if
if (roomObj.vars == undefined)
{
_loc3 = _loc3 + " ";
}
else
{
_loc3 = _loc3 + "";
for (var _loc4 in roomObj.vars)
{
_loc3 = _loc3 + this.getXmlRoomVariable(roomObj.vars[_loc4]);
} // end of for...in
_loc3 = _loc3 + " ";
} // end else if
_loc3 = _loc3 + " ";
this.send(_loc7, "createRoom", roomId, _loc3);
} // End of the function
function leaveRoom(roomId)
{
var _loc3 = {t: "sys"};
var _loc2 = " ";
this.send(_loc3, "leaveRoom", roomId, _loc2);
} // End of the function
function getRoom(roomId)
{
if (typeof(roomId) == "number")
{
return (roomList[roomId]);
}
else if (typeof(roomId) == "string")
{
for (var _loc4 in roomList)
{
var _loc2 = roomList[_loc4];
if (_loc2.getName() == roomId)
{
return (_loc2);
} // end if
} // end of for...in
} // end else if
} // End of the function
function getActiveRoom()
{
return (roomList[activeRoomId]);
} // End of the function
function setRoomVariables(varList, roomId, setOwnership)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
if (setOwnership == undefined)
{
setOwnership = true;
} // end if
var _loc5 = {t: "sys"};
var _loc4;
if (setOwnership)
{
_loc4 = "";
}
else
{
_loc4 = "";
} // end else if
for (var _loc2 = 0; _loc2 < varList.length; ++_loc2)
{
_loc4 = _loc4 + this.getXmlRoomVariable(varList[_loc2]);
} // end of for
_loc4 = _loc4 + " ";
this.send(_loc5, "setRvars", roomId, _loc4);
} // End of the function
function getXmlRoomVariable(rVar)
{
var _loc5 = rVar.name;
var _loc1 = rVar.val;
var _loc6 = rVar.priv ? ("1") : ("0");
var _loc4 = rVar.persistent ? ("1") : ("0");
var _loc2 = null;
if (typeof(_loc1) == "boolean")
{
_loc2 = "b";
_loc1 = _loc1 ? (1) : (0);
}
else if (typeof(_loc1) == "number")
{
_loc2 = "n";
}
else if (typeof(_loc1) == "string")
{
_loc2 = "s";
}
else if (typeof(_loc1) == "null")
{
_loc2 = "x";
} // end else if
if (_loc2 != null)
{
return ("");
}
else
{
return ("");
} // end else if
} // End of the function
function loadBuddyList()
{
var _loc2 = {t: "sys"};
this.send(_loc2, "loadB", -1, "");
} // End of the function
function addBuddy(buddyName)
{
if (buddyName != myUserName && !this.checkBuddy(buddyName))
{
var _loc6 = roomList[activeRoomId].getUserList().getUser(buddyName);
var _loc4 = {t: "sys"};
var _loc3 = "" + buddyName + " ";
this.send(_loc4, "addB", -1, _loc3);
} // end if
} // End of the function
function removeBuddy(buddyName)
{
for (var _loc3 in buddyList)
{
if (buddyList[_loc3].name == buddyName)
{
delete buddyList[_loc3];
break;
} // end if
} // end of for...in
var _loc5 = {t: "sys"};
var _loc4 = "" + buddyName + " ";
this.send(_loc5, "remB", -1, _loc4);
this.onBuddyList(buddyList);
} // End of the function
function getBuddyByName(buddyName)
{
var _loc2;
for (var _loc4 in buddyList)
{
_loc2 = buddyList[_loc4];
if (_loc2.name == buddyName)
{
return (_loc2);
} // end if
} // end of for...in
return (null);
} // End of the function
function getBuddyById(id)
{
var _loc2;
for (var _loc4 in buddyList)
{
_loc2 = buddyList[_loc4];
if (_loc2.id == id)
{
return (_loc2);
} // end if
} // end of for...in
return (null);
} // End of the function
function getBuddyRoom(buddy)
{
if (buddy.id != -1)
{
this.send({t: "sys", bid: buddy.id}, "roomB", -1, "");
} // end if
} // End of the function
function checkBuddy(name)
{
var _loc2 = false;
for (var _loc4 in buddyList)
{
if (buddyList[_loc4].name == name)
{
_loc2 = true;
break;
} // end if
} // end of for...in
return (_loc2);
} // End of the function
function clearBuddyList()
{
buddyList = [];
this.send({t: "sys"}, "clearB", -1, "");
this.onBuddyList(buddyList);
} // End of the function
function roundTripBench()
{
t1 = getTimer();
var _loc2 = {t: "sys"};
this.send(_loc2, "roundTrip", activeRoomId, "");
} // End of the function
function switchSpectator(roomId)
{
if (roomId == undefined)
{
roomId = activeRoomId;
} // end if
var _loc2 = {t: "sys"};
this.send(_loc2, "swSpec", roomId, "");
} // End of the function
function getRandomKey()
{
this.send({t: "sys"}, "rndK", -1, "");
} // End of the function
function send(header, action, fromRoom, message)
{
var _loc3 = this.makeHeader(header);
_loc3 = _loc3 + ("" + message + "" + this.closeHeader());
if (debug)
{
} // end if
if (isHttpMode)
{
httpConnection.send(_loc3);
}
else
{
super.send(_loc3);
} // end else if
} // End of the function
function uploadFile(fileRef, id, nick, port)
{
if (id == undefined)
{
id = myUserId;
} // end if
if (nick == undefined)
{
nick = myUserName;
} // end if
if (port == undefined)
{
port = httpPort;
} // end if
fileRef.upload("http://" + ipAddress + ":" + port + "/default/Upload.py?id=" + id + "&nick=" + nick);
if (debug)
{
} // end if
} // End of the function
function getUploadPath()
{
return ("http://" + ipAddress + ":" + httpPort + "/default/uploads/");
} // End of the function
function sendString(message)
{
if (debug)
{
} // end if
if (isHttpMode)
{
httpConnection.send(message);
}
else
{
super.send(message);
} // end else if
} // End of the function
function sendJson(message)
{
if (debug)
{
} // end if
if (isHttpMode)
{
httpConnection.send(message);
}
else
{
super.send(message);
} // end else if
} // End of the function
function gotData(message)
{
if (message.charAt(0) == rawProtocolSeparator)
{
this.strReceived(message);
}
else if (message.charAt(0) == "<")
{
this.onXML(new XML(message));
}
else if (message.charAt(0) == "{")
{
this.jsonReceived(message);
} // end else if
} // End of the function
function connectionEstablished(ok)
{
if (ok)
{
clearInterval(socketConnectionTimeoutThread);
preConnection = false;
var _loc3 = {t: "sys"};
var _loc2 = " ";
this.send(_loc3, "verChk", 0, _loc2);
}
else if (smartConnect && preConnection)
{
if (debug)
{
} // end if
isHttpMode = true;
var _loc4 = blueBoxIpAddress != null ? (blueBoxIpAddress) : (ipAddress);
var _loc5 = blueBoxPort != 0 ? (blueBoxPort) : (httpPort);
httpConnection.connect(_loc4, _loc5);
}
else
{
preConnection = false;
this.onConnection(false);
} // end else if
} // End of the function
function connectionClosed()
{
isConnected = false;
if (preConnection)
{
this.connectionEstablished(false);
}
else
{
this.initialize();
this.onConnectionLost();
} // end else if
} // End of the function
function connect(ipAdr, port)
{
if (!isConnected)
{
ipAddress = ipAdr;
this.port = port;
super.connect(ipAdr, port);
socketConnectionTimeoutThread = setInterval(mx.utils.Delegate.create(this, socketTimeoutHandler), socketConnectionTimeout);
} // end if
} // End of the function
function disconnect()
{
this.close();
isConnected = false;
if (isHttpMode)
{
httpConnection.close();
} // end if
this.initialize();
this.onConnectionLost();
} // End of the function
function xmlReceived(message)
{
var _loc2 = new Object();
this.message2Object(message.childNodes, _loc2);
if (debug)
{
} // end if
var _loc3 = _loc2.msg.attributes.t;
messageHandlers[_loc3].handleMessage(_loc2.msg.body, this, "xml");
} // End of the function
function socketTimeoutHandler()
{
clearInterval(socketConnectionTimeoutThread);
this.close();
} // End of the function
function strReceived(message)
{
var _loc2 = message.substr(1, message.length - 2).split(rawProtocolSeparator);
if (debug)
{
} // end if
var _loc4 = _loc2[0];
messageHandlers[_loc4].handleMessage(_loc2.splice(1, _loc2.length - 1), this, "str");
} // End of the function
function jsonReceived(message)
{
var _loc2 = as_files.it.gotoandplay.smartfoxserver.JSON.parse(message);
if (debug)
{
} // end if
var _loc3 = _loc2.t;
messageHandlers[_loc3].handleMessage(_loc2.b, this, "json");
} // End of the function
function message2Object(xmlNodes, parentObj)
{
var _loc8 = 0;
var _loc3 = null;
while (_loc8 < xmlNodes.length)
{
var _loc4 = xmlNodes[_loc8];
var _loc5 = _loc4.nodeName;
var _loc6 = _loc4.nodeValue;
if (parentObj instanceof Array)
{
_loc3 = {};
parentObj.push(_loc3);
_loc3 = parentObj[parentObj.length - 1];
}
else
{
parentObj[_loc5] = new Object();
_loc3 = parentObj[_loc5];
} // end else if
for (var _loc11 in _loc4.attributes)
{
if (typeof(_loc3.attributes) == "undefined")
{
_loc3.attributes = {};
} // end if
var _loc2 = _loc4.attributes[_loc11];
if (!isNaN(Number(_loc2)))
{
_loc2 = Number(_loc2);
} // end if
if (_loc2.toLowerCase() == "true")
{
_loc2 = true;
}
else if (_loc2.toLowerCase() == "false")
{
_loc2 = false;
} // end else if
_loc3.attributes[_loc11] = _loc2;
} // end of for...in
if (arrayTags[_loc5])
{
_loc3[_loc5] = [];
_loc3 = _loc3[_loc5];
} // end if
if (_loc4.hasChildNodes() && _loc4.firstChild.nodeValue == undefined)
{
var _loc9 = _loc4.childNodes;
this.message2Object(_loc9, _loc3);
}
else
{
_loc6 = _loc4.firstChild.nodeValue;
if (!isNaN(_loc6) && _loc4.nodeName != "txt" && _loc4.nodeName != "var")
{
_loc6 = Number(_loc6);
} // end if
_loc3.value = _loc6;
} // end else if
++_loc8;
} // end while
} // End of the function
function makeHeader(headerObj)
{
var _loc2 = "";
return (_loc2);
} // End of the function
function closeHeader()
{
return (" ");
} // End of the function
function handleDelayedPoll()
{
httpConnection.send(as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.HTTP_POLL_REQUEST);
if (fpMajorVersion < 8)
{
clearInterval(pollingThread);
} // end if
} // End of the function
function handleHttpConnect(params)
{
isConnected = true;
preConnection = false;
this.connectionEstablished(true);
httpConnection.send(as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.HTTP_POLL_REQUEST);
} // End of the function
function handleHttpClose(params)
{
this.initialize();
this.onConnectionLost();
} // End of the function
function handleHttpData(params)
{
var _loc5 = params.data;
var _loc4 = _loc5.split("\n");
var _loc3;
for (var _loc2 = 0; _loc2 < _loc4.length - 1; ++_loc2)
{
_loc3 = _loc4[_loc2];
if (_loc3.length > 0)
{
this.gotData(_loc3);
} // end if
} // end of for
if (_httpPollSpeed > 0)
{
pollingThread = this.pollingDelayFn(mx.utils.Delegate.create(this, handleDelayedPoll), _httpPollSpeed);
}
else
{
httpConnection.send(as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.HTTP_POLL_REQUEST);
} // end else if
} // End of the function
function handleHttpError(params)
{
if (!isConnected)
{
this.onConnection(false);
}
else
{
this.connectionClosed();
} // end else if
} // End of the function
static var MIN_POLL_SPEED = 0;
static var DEFAULT_POLL_SPEED = 750;
static var MAX_POLL_SPEED = 10000;
static var HTTP_POLL_REQUEST = "poll";
static var MODMSG_TO_USER = "u";
static var MODMSG_TO_ROOM = "r";
static var MODMSG_TO_ZONE = "z";
static var PROTOCOL_XML = "xml";
static var PROTOCOL_STR = "str";
static var PROTOCOL_JSON = "json";
static var CONNECTION_MODE_DISCONNECTED = "disconnected";
static var CONNECTION_MODE_SOCKET = "socket";
static var CONNECTION_MODE_HTTP = "http";
var DEFAULT_CONFIG_FILE = "config.xml";
var DEFAULT_AUTO_CONNECT = true;
var majVersion = 1;
var minVersion = 5;
var subVersion = 3;
var autoConnectOnConfigSuccess = true;
var defaultZone = "";
var httpPort = 8080;
var rawProtocolSeparator = "%";
var blueBoxPort = 0;
var smartConnect = true;
var socketConnectionTimeout = 5000;
var isHttpMode = false;
var _httpPollSpeed = as_files.it.gotoandplay.smartfoxserver.SmartFoxClient.DEFAULT_POLL_SPEED;
var pollingThread = -1;
var preConnection = true;
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 2]
#initclip 2
class as_files.it.gotoandplay.smartfoxserver.ObjectSerializer
{
var tabs, xmlStr, debug, eof, ascTab, ascTabRev, hexTable;
static var __instance;
function ObjectSerializer()
{
this.init();
} // End of the function
static function getInstance()
{
if (as_files.it.gotoandplay.smartfoxserver.ObjectSerializer.__instance == null)
{
__instance = new as_files.it.gotoandplay.smartfoxserver.ObjectSerializer();
} // end if
return (as_files.it.gotoandplay.smartfoxserver.ObjectSerializer.__instance);
} // End of the function
function init()
{
tabs = "\t\t\t\t\t\t\t\t\t\t";
xmlStr = "";
debug = false;
eof = "";
ascTab = [];
ascTab[">"] = ">";
ascTab["<"] = "<";
ascTab["&"] = "&";
ascTab["\'"] = "'";
ascTab["\""] = """;
ascTabRev = [];
ascTabRev[">"] = ">";
ascTabRev["<"] = "<";
ascTabRev["&"] = "&";
ascTabRev["'"] = "\'";
ascTabRev["""] = "\"";
hexTable = new Array();
hexTable["0"] = 0;
hexTable["1"] = 1;
hexTable["2"] = 2;
hexTable["3"] = 3;
hexTable["4"] = 4;
hexTable["5"] = 5;
hexTable["6"] = 6;
hexTable["7"] = 7;
hexTable["8"] = 8;
hexTable["9"] = 9;
hexTable.A = 10;
hexTable.B = 11;
hexTable.C = 12;
hexTable.D = 13;
hexTable.E = 14;
hexTable.F = 15;
} // End of the function
function serialize(obj)
{
var _loc2 = {};
_loc2.xmlStr = "";
if (debug)
{
eof = "\n";
} // end if
this.obj2xml(_loc2, obj, 0, "");
return (_loc2.xmlStr);
} // End of the function
function obj2xml(envelope, obj, lev, objn)
{
if (lev == 0)
{
envelope.xmlStr = envelope.xmlStr + ("" + eof);
}
else
{
if (debug)
{
envelope.xmlStr = envelope.xmlStr + tabs.substr(0, lev);
} // end if
var _loc8 = obj instanceof Array ? ("a") : ("o");
envelope.xmlStr = envelope.xmlStr + ("" + eof);
} // end else if
for (var _loc7 in obj)
{
var _loc2 = typeof(obj[_loc7]);
var _loc3 = obj[_loc7];
if (_loc2 == "boolean" || _loc2 == "number" || _loc2 == "string" || _loc2 == "null")
{
if (_loc2 == "boolean")
{
_loc3 = Number(_loc3);
}
else if (_loc2 == "null")
{
_loc2 = "x";
_loc3 = "";
}
else if (_loc2 == "string")
{
_loc3 = this.encodeEntities(_loc3);
} // end else if
if (debug)
{
envelope.xmlStr = envelope.xmlStr + tabs.substr(0, lev + 1);
} // end if
envelope.xmlStr = envelope.xmlStr + ("" + _loc3 + "" + eof);
continue;
} // end if
if (_loc2 == "object")
{
this.obj2xml(envelope, _loc3, lev + 1, _loc7);
if (debug)
{
envelope.xmlStr = envelope.xmlStr + tabs.substr(0, lev + 1);
} // end if
envelope.xmlStr = envelope.xmlStr + (" " + eof);
} // end if
} // end of for...in
if (lev == 0)
{
envelope.xmlStr = envelope.xmlStr + (" " + eof);
} // end if
} // End of the function
function deserialize(xmlObj)
{
var _loc3 = new XML(xmlObj);
_loc3.ignoreWhite = true;
var _loc2 = new Object();
this.xml2obj(_loc3, _loc2);
return (_loc2);
} // End of the function
function xml2obj(xmlNode, currObj)
{
var _loc2 = 0;
var _loc3 = xmlNode.firstChild;
while (_loc3.childNodes[_loc2])
{
if (_loc3.childNodes[_loc2].nodeName == "obj")
{
var _loc9 = _loc3.childNodes[_loc2].attributes.o;
var _loc7 = _loc3.childNodes[_loc2].attributes.t;
if (_loc7 == "a")
{
currObj[_loc9] = [];
}
else if (_loc7 == "o")
{
currObj[_loc9] = {};
} // end else if
this.xml2obj(new XML(_loc3.childNodes[_loc2]), currObj[_loc9]);
}
else
{
_loc9 = _loc3.childNodes[_loc2].attributes.n;
var _loc4 = _loc3.childNodes[_loc2].attributes.t;
var _loc8 = _loc3.childNodes[_loc2].firstChild.nodeValue;
var _loc5;
if (_loc4 == "b")
{
_loc5 = function (b)
{
return (Boolean(Number(b)));
};
}
else if (_loc4 == "n")
{
_loc5 = Number;
}
else if (_loc4 == "s")
{
_loc5 = String;
}
else if (_loc4 == "x")
{
_loc5 = function (x)
{
return (null);
};
} // end else if
currObj[_loc9] = _loc5(_loc8);
} // end else if
++_loc2;
} // end while
} // End of the function
function encodeEntities(st)
{
var _loc5 = "";
for (var _loc4 = 0; _loc4 < st.length; ++_loc4)
{
var _loc3 = st.charAt(_loc4);
var _loc2 = st.charCodeAt(_loc4);
if (_loc2 == 9 || _loc2 == 10 || _loc2 == 13)
{
_loc5 = _loc5 + _loc3;
continue;
} // end if
if (_loc2 >= 32 && _loc2 <= 126)
{
if (ascTab[_loc3] != undefined)
{
_loc5 = _loc5 + ascTab[_loc3];
}
else
{
_loc5 = _loc5 + _loc3;
} // end else if
continue;
} // end if
_loc5 = _loc5 + _loc3;
} // end of for
return (_loc5);
} // End of the function
function decodeEntities(st)
{
var _loc7;
var _loc6;
var _loc5;
var _loc3;
var _loc8;
var _loc2 = 0;
_loc7 = "";
while (_loc2 < st.length)
{
_loc6 = st.charAt(_loc2);
if (_loc6 == "&")
{
_loc5 = _loc6;
do
{
++_loc2;
_loc3 = st.charAt(_loc2);
_loc5 = _loc5 + _loc3;
} while (_loc3 != ";" && _loc2 < st.length)
_loc8 = ascTabRev[_loc5];
if (_loc8 != undefined)
{
_loc7 = _loc7 + _loc8;
}
else
{
_loc7 = _loc7 + String.fromCharCode(this.getCharCode(_loc5));
} // end else if
}
else
{
_loc7 = _loc7 + _loc6;
} // end else if
++_loc2;
} // end while
return (_loc7);
} // End of the function
function getCharCode(ent)
{
var _loc1 = ent.substr(3, ent.length);
_loc1 = _loc1.substr(0, _loc1.length - 1);
return (Number("0x" + _loc1));
} // End of the function
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 3]
#initclip 3
class as_files.it.gotoandplay.smartfoxserver.http.HttpConnection
{
var codec, handlers, sessionId, ipAddr, port, webUrl, loaderFactory, _classRef;
function HttpConnection(httpConnectHandler, httpCloseHandler, httpDataHandler, httpErrorHandler)
{
codec = new as_files.it.gotoandplay.smartfoxserver.http.RawProtocolCodec();
handlers = [];
handlers[as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpConnect] = httpConnectHandler;
handlers[as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpClose] = httpCloseHandler;
handlers[as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpData] = httpDataHandler;
handlers[as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpError] = httpErrorHandler;
} // End of the function
function getSessionId()
{
return (sessionId);
} // End of the function
function isConnected()
{
return (connected);
} // End of the function
function connect(addr, port)
{
if (port == undefined)
{
port = 8080;
} // end if
ipAddr = addr;
this.port = port;
webUrl = "http://" + ipAddr + ":" + this.port + "/" + as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.servletUrl;
sessionId = null;
loaderFactory = new as_files.it.gotoandplay.smartfoxserver.http.LoaderFactory(this, handleResponse, webUrl, as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.paramName);
this.send(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.HANDSHAKE);
} // End of the function
function close()
{
this.send(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.DISCONNECT);
} // End of the function
function send(message)
{
if (connected || !connected && message == as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.HANDSHAKE || !connected && message == "poll")
{
if (message != "poll")
{
} // end if
loaderFactory.sendAndLoad(codec.encode(sessionId, message));
} // end if
} // End of the function
function handleResponse(data)
{
var _loc2 = _classRef;
if (data != undefined)
{
var _loc3 = {};
if (data.charAt(0) == as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.HANDSHAKE_TOKEN)
{
if (_loc2.sessionId == null)
{
_loc2.sessionId = _loc2.codec.decode(data);
_loc2.connected = true;
_loc3.sessionId = _loc2.sessionId;
_loc3.success = true;
_loc2.dispatchEvent(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpConnect, _loc3);
} // end if
}
else if (data.indexOf(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.CONN_LOST) == 0)
{
_loc3.data = {};
_loc2.dispatchEvent(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpClose, _loc3);
}
else
{
_loc3.data = data;
_loc2.dispatchEvent(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpData, _loc3);
} // end else if
} // end else if
} // End of the function
function handleIOError(error)
{
var _loc2 = {};
_loc2.message = error;
this.dispatchEvent(as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.onHttpError, _loc2);
} // End of the function
function dispatchEvent(type, params)
{
handlers[type](params);
} // End of the function
static var HANDSHAKE = "connect";
static var DISCONNECT = "disconnect";
static var CONN_LOST = "ERR#01";
static var HANDSHAKE_TOKEN = "#";
static var servletUrl = "BlueBox/HttpBox.do";
static var paramName = "sfsHttp";
static var onHttpData = "onHttpData";
static var onHttpError = "onHttpError";
static var onHttpConnect = "onHttpConnect";
static var onHttpClose = "onHttpClose";
var connected = false;
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 4]
#initclip 4
class as_files.it.gotoandplay.smartfoxserver.http.LoaderFactory
{
var poolSize, webUrl, loaderParamName, sendersPool, loadersPool, currentIndex;
function LoaderFactory(httpConnection, responseHandler, _webUrl, _loaderParamName, _poolSize)
{
if (_poolSize > 0)
{
poolSize = _poolSize;
}
else
{
poolSize = as_files.it.gotoandplay.smartfoxserver.http.LoaderFactory.DEFAULT_POOL_SIZE;
} // end else if
webUrl = _webUrl;
loaderParamName = _loaderParamName;
sendersPool = [];
loadersPool = [];
for (var _loc3 = 0; _loc3 < poolSize; ++_loc3)
{
var _loc4 = new LoadVars();
var _loc2 = new LoadVars();
_loc2._classRef = httpConnection;
_loc2.onData = responseHandler;
_loc2.onHTTPStatus = handleHTTPStatus;
sendersPool.push(_loc4);
loadersPool.push(_loc2);
} // end of for
currentIndex = 0;
} // End of the function
function sendAndLoad(message)
{
var _loc2 = sendersPool[currentIndex];
var _loc3 = loadersPool[currentIndex];
_loc2[loaderParamName] = message;
_loc2.sendAndLoad(webUrl, _loc3);
++currentIndex;
if (currentIndex >= poolSize)
{
currentIndex = 0;
} // end if
} // End of the function
function handleHTTPStatus(status)
{
} // End of the function
static var DEFAULT_POOL_SIZE = 8;
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 5]
#initclip 5
class as_files.it.gotoandplay.smartfoxserver.http.IHttpProtocolCodec
{
_global.as_files.it.gotoandplay.smartfoxserver.http.IHttpProtocolCodec = function ()
{
};
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 6]
#initclip 6
class as_files.it.gotoandplay.smartfoxserver.http.RawProtocolCodec implements as_files.it.gotoandplay.smartfoxserver.http.IHttpProtocolCodec
{
function RawProtocolCodec()
{
} // End of the function
function encode(sessionId, message)
{
return ((sessionId == null ? ("") : (sessionId)) + message);
} // End of the function
function decode(message)
{
var _loc1;
if (message.charAt(0) == as_files.it.gotoandplay.smartfoxserver.http.HttpConnection.HANDSHAKE_TOKEN)
{
_loc1 = message.substr(1, as_files.it.gotoandplay.smartfoxserver.http.RawProtocolCodec.SESSION_ID_LEN);
} // end if
return (_loc1);
} // End of the function
static var SESSION_ID_LEN = 32;
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 7]
#initclip 7
class mx.utils.Delegate extends Object
{
var func;
function Delegate(f)
{
super();
func = f;
} // End of the function
static function create(obj, func)
{
var _loc2 = function ()
{
var _loc2 = arguments.callee.target;
var _loc3 = arguments.callee.func;
return (_loc3.apply(_loc2, arguments));
};
_loc2.target = obj;
_loc2.func = func;
return (_loc2);
} // End of the function
function createDelegate(obj)
{
return (mx.utils.Delegate.create(obj, func));
} // End of the function
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 8]
#initclip 8
class as_files.it.gotoandplay.smartfoxserver.JSON
{
function JSON()
{
} // End of the function
static function stringify(arg)
{
var _loc3;
var _loc2;
var _loc6;
var _loc1 = "";
var _loc4;
switch (typeof(arg))
{
case "object":
{
if (arg)
{
if (arg instanceof Array)
{
for (var _loc2 = 0; _loc2 < arg.length; ++_loc2)
{
_loc4 = as_files.it.gotoandplay.smartfoxserver.JSON.stringify(arg[_loc2]);
if (_loc1)
{
_loc1 = _loc1 + ",";
} // end if
_loc1 = _loc1 + _loc4;
} // end of for
return ("[" + _loc1 + "]");
}
else if (typeof(arg.toString) != "undefined")
{
for (var _loc2 in arg)
{
_loc4 = arg[_loc2];
if (typeof(_loc4) != "undefined" && typeof(_loc4) != "function")
{
_loc4 = as_files.it.gotoandplay.smartfoxserver.JSON.stringify(_loc4);
if (_loc1)
{
_loc1 = _loc1 + ",";
} // end if
_loc1 = _loc1 + (as_files.it.gotoandplay.smartfoxserver.JSON.stringify(_loc2) + ":" + _loc4);
} // end if
} // end of for...in
return ("{" + _loc1 + "}");
} // end if
} // end else if
return ("null");
}
case "number":
{
return (isFinite(arg) ? (String(arg)) : ("null"));
}
case "string":
{
_loc6 = arg.length;
_loc1 = "\"";
for (var _loc2 = 0; _loc2 < _loc6; _loc2 = _loc2 + 1)
{
_loc3 = arg.charAt(_loc2);
if (_loc3 >= " ")
{
if (_loc3 == "\\" || _loc3 == "\"")
{
_loc1 = _loc1 + "\\";
} // end if
_loc1 = _loc1 + _loc3;
continue;
} // end if
switch (_loc3)
{
case "\b":
{
_loc1 = _loc1 + "\\b";
break;
}
case "\f":
{
_loc1 = _loc1 + "\\f";
break;
}
case "\n":
{
_loc1 = _loc1 + "\\n";
break;
}
case "\r":
{
_loc1 = _loc1 + "\\r";
break;
}
case "\t":
{
_loc1 = _loc1 + "\\t";
break;
}
default:
{
_loc3 = _loc3.charCodeAt();
_loc1 = _loc1 + ("\\u00" + Math.floor(_loc3 / 16).toString(16) + (_loc3 % 16).toString(16));
}
} // End of switch
} // end of for
return (_loc1 + "\"");
}
case "boolean":
{
return (String(arg));
}
} // End of switch
return ("null");
} // End of the function
static function parse(text)
{
var at = 0;
var ch = " ";
var _value;
var _error = function (m)
{
throw {name: "JSONError", message: m, at: at - 1, text: text};
};
var _next = function ()
{
ch = text.charAt(at);
at = at + 1;
return (ch);
};
var _white = function ()
{
while (ch)
{
if (ch <= " ")
{
_next();
continue;
} // end if
if (ch == "/")
{
switch (_next())
{
case "/":
{
while (_next() && ch != "\n" && ch != "\r")
{
} // end while
break;
}
case "*":
{
_next();
if (ch)
{
if (ch == "*")
{
if (_next() == "/")
{
_next();
} // end if
}
else
{
_next();
} // end else if
}
else
{
_error("Unterminated comment");
} // end else if
break;
}
default:
{
_error("Syntax error");
}
} // End of switch
continue;
} // end if
break;
} // end while
};
var _string = function ()
{
var _loc4;
var _loc1 = "";
var _loc3;
var _loc2;
var _loc5 = false;
if (ch == "\"")
{
while (_next())
{
if (ch == "\"")
{
_next();
return (_loc1);
continue;
} // end if
if (ch == "\\")
{
switch (_next())
{
case "b":
{
_loc1 = _loc1 + "\b";
break;
}
case "f":
{
_loc1 = _loc1 + "\f";
break;
}
case "n":
{
_loc1 = _loc1 + "\n";
break;
}
case "r":
{
_loc1 = _loc1 + "\r";
break;
}
case "t":
{
_loc1 = _loc1 + "\t";
break;
}
case "u":
{
_loc2 = 0;
for (var _loc4 = 0; _loc4 < 4; _loc4 = _loc4 + 1)
{
_loc3 = parseInt(_next(), 16);
if (!isFinite(_loc3))
{
_loc5 = true;
break;
} // end if
_loc2 = _loc2 * 16 + _loc3;
} // end of for
if (_loc5)
{
_loc5 = false;
break;
} // end if
_loc1 = _loc1 + String.fromCharCode(_loc2);
break;
}
default:
{
_loc1 = _loc1 + ch;
}
} // End of switch
continue;
} // end if
_loc1 = _loc1 + ch;
} // end while
} // end if
_error("Bad string");
};
var _array = function ()
{
var _loc1 = [];
if (ch == "[")
{
_next();
_white();
if (ch == "]")
{
_next();
return (_loc1);
} // end if
while (ch)
{
_loc1.push(_value());
_white();
if (ch == "]")
{
_next();
return (_loc1);
}
else if (ch != ",")
{
break;
} // end else if
_next();
_white();
} // end while
} // end if
_error("Bad array");
};
var _object = function ()
{
var _loc2;
var _loc1 = {};
if (ch == "{")
{
_next();
_white();
if (ch == "}")
{
_next();
return (_loc1);
} // end if
while (ch)
{
_loc2 = _string();
_white();
if (ch != ":")
{
break;
} // end if
_next();
_loc1[_loc2] = _value();
_white();
if (ch == "}")
{
_next();
return (_loc1);
}
else if (ch != ",")
{
break;
} // end else if
_next();
_white();
} // end while
} // end if
_error("Bad object");
};
var _number = function ()
{
var _loc1 = "";
var _loc2;
if (ch == "-")
{
_loc1 = "-";
_next();
} // end if
while (ch >= "0" && ch <= "9")
{
_loc1 = _loc1 + ch;
_next();
} // end while
if (ch == ".")
{
for (var _loc1 = _loc1 + "."; _next() && ch >= "0" && ch <= "9"; _loc1 = _loc1 + ch)
{
} // end of for
} // end if
_loc2 = 1 * _loc1;
if (!isFinite(_loc2))
{
_error("Bad number");
}
else
{
return (_loc2);
} // end else if
};
var _word = function ()
{
switch (ch)
{
case "t":
{
if (_next() == "r" && _next() == "u" && _next() == "e")
{
_next();
return (true);
} // end if
break;
}
case "f":
{
if (_next() == "a" && _next() == "l" && _next() == "s" && _next() == "e")
{
_next();
return (false);
} // end if
break;
}
case "n":
{
if (_next() == "u" && _next() == "l" && _next() == "l")
{
_next();
return (null);
} // end if
break;
}
} // End of switch
_error("Syntax error");
};
_value = function ()
{
_white();
switch (ch)
{
case "{":
{
return (_object());
}
case "[":
{
return (_array());
}
case "\"":
{
return (_string());
}
case "-":
{
return (_number());
}
} // End of switch
return (ch >= "0" && ch <= "9" ? (_number()) : (_word()));
};
return (_value());
} // End of the function
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 9]
#initclip 9
class as_files.it.gotoandplay.smartfoxserver.Room
{
var id, name, maxUsers, maxSpectators, temp, game, priv, limbo, updatable, description, userCount, specCount, userList, variables, myPlayerIndex;
function Room(id, name, maxUsers, maxSpectators, isTemp, isGame, isPrivate)
{
this.id = id;
this.name = name;
this.maxUsers = maxUsers;
this.maxSpectators = maxSpectators;
temp = isTemp;
game = isGame;
priv = isPrivate;
limbo = false;
updatable = false;
description = "";
userCount = 0;
specCount = 0;
userList = new Object();
variables = new Array();
} // End of the function
function getUserList()
{
return (userList);
} // End of the function
function getUser(userId)
{
if (typeof(userId) == "number")
{
return (userList[userId]);
}
else if (typeof(userId) == "string")
{
for (var _loc4 in userList)
{
var _loc2 = userList[_loc4];
if (_loc2.getName() == userId)
{
return (_loc2);
} // end if
} // end of for...in
} // end else if
} // End of the function
function getVariable(varName)
{
return (variables[varName]);
} // End of the function
function getVariables()
{
return (variables);
} // End of the function
function getName()
{
return (name);
} // End of the function
function getId()
{
return (id);
} // End of the function
function isTemp()
{
return (temp);
} // End of the function
function isGame()
{
return (game);
} // End of the function
function isPrivate()
{
return (priv);
} // End of the function
function getUserCount()
{
return (userCount);
} // End of the function
function getSpectatorCount()
{
return (specCount);
} // End of the function
function getMaxUsers()
{
return (maxUsers);
} // End of the function
function getMaxSpectators()
{
return (maxSpectators);
} // End of the function
function setMyPlayerIndex(id)
{
myPlayerIndex = id;
} // End of the function
function getMyPlayerIndex()
{
return (myPlayerIndex);
} // End of the function
function setIsLimbo(b)
{
limbo = b;
} // End of the function
function isLimbo()
{
return (limbo);
} // End of the function
} // End of Class
#endinitclip
// Action script...
// [Initial MovieClip Action of sprite 10]
#initclip 10
class as_files.it.gotoandplay.smartfoxserver.User
{
var id, name, variables, isSpec, isMod, pid;
function User(id, name)
{
this.id = id;
this.name = name;
variables = new Object();
isSpec = false;
} // End of the function
function getId()
{
return (id);
} // End of the function
function getName()
{
return (name);
} // End of the function
function getVariable(varName)
{
return (variables[varName]);
} // End of the function
function getVariables()
{
return (variables);
} // End of the function
function setIsSpectator(b)
{
isSpec = b;
} // End of the function
function isSpectator()
{
return (isSpec);
} // End of the function
function setModerator(b)
{
isMod = b;
} // End of the function
function isModerator()
{
return (isMod);
} // End of the function
function getPlayerId()
{
return (pid);
} // End of the function
function setPlayerId(pid)
{
this.pid = pid;
} // End of the function
} // End of Class
#endinitclip
// Action script...
// [Action in Frame 1]
var shell = _global.getCurrentShell();
var game_crumbs = new Object();
game_crumbs.aqua = {room_id: 916, music_id: 114};
game_crumbs.astro = {room_id: 900, music_id: 0};
game_crumbs.beans = {room_id: 901, music_id: 101};
game_crumbs.fish = {room_id: 904, music_id: 103};
game_crumbs.cart = {room_id: 905, music_id: 105};
game_crumbs.jetpack = {room_id: 906, music_id: 110};
game_crumbs.thinice = {room_id: 909, music_id: 111};
game_crumbs.waves = {room_id: 912, music_id: 113};
game_crumbs.hydro = {room_id: 903, music_id: 100};
game_crumbs.book1 = {room_id: 917, music_id: 0};
game_crumbs.book2 = {room_id: 918, music_id: 0};
game_crumbs.pizzatron = {room_id: 910, music_id: 106};
game_crumbs.roundup = {room_id: 902, music_id: 102};
game_crumbs.sled = {room_id: 999, music_id: 0};
game_crumbs.mission1 = {room_id: 907, music_id: 0};
game_crumbs.mission2 = {room_id: 908, music_id: 0};
game_crumbs.mission3 = {room_id: 911, music_id: 0};
game_crumbs.mission4 = {room_id: 913, music_id: 0};
game_crumbs.mission5 = {room_id: 914, music_id: 0};
game_crumbs.mission6 = {room_id: 915, music_id: 0};
game_crumbs.mission7 = {room_id: 920, music_id: 0};
game_crumbs.mission8 = {room_id: 921, music_id: 0};
var igloo_crumbs = new Object();
igloo_crumbs[1] = {cost: 1500, name: "Basic Igloo"};
igloo_crumbs[2] = {cost: 1500, name: "Candy Igloo"};
igloo_crumbs[3] = {cost: 4000, name: "Deluxe Igloo"};
igloo_crumbs[4] = {cost: 4000, name: "Deluxe Candy Igloo"};
igloo_crumbs[5] = {cost: 2000, name: "Secret Stone Igloo"};
igloo_crumbs[6] = {cost: 1000, name: "Snow Igloo"};
igloo_crumbs[8] = {cost: 5000, name: "Secret Deluxe Stone Igloo"};
igloo_crumbs[9] = {cost: 3000, name: "Deluxe Snow Igloo"};
igloo_crumbs[10] = {cost: 3200, name: "Bamboo Hut"};
igloo_crumbs[11] = {cost: 4100, name: "Log Cabin"};
igloo_crumbs[12] = {cost: 4800, name: "Gym"};
igloo_crumbs[13] = {cost: 4600, name: "Split Level Igloo"};
igloo_crumbs[14] = {cost: 4600, name: "Candy Split Level Igloo"};
igloo_crumbs[15] = {cost: 3700, name: "Snow Globe"};
igloo_crumbs[16] = {cost: 5100, name: "Ice Castle"};
igloo_crumbs[17] = {cost: 4600, name: "Split Level Snow Igloo"};
igloo_crumbs[18] = {cost: 2400, name: "Fish Bowl"};
igloo_crumbs[19] = {cost: 2700, name: "Tent"};
igloo_crumbs[20] = {cost: 2700, name: "Pumpkin"};
igloo_crumbs[21] = {cost: 4200, name: "Backyard Igloo"};
igloo_crumbs[22] = {cost: 4900, name: "Pink Ice Palace"};
var floor_crumbs = new Object();
floor_crumbs[0] = {cost: 20, name: "Floor Removal"};
floor_crumbs[1] = {cost: 680, name: "Terracotta Tile"};
floor_crumbs[2] = {cost: 620, name: "Maple Hardwood"};
floor_crumbs[3] = {cost: 530, name: "Green Carpet"};
floor_crumbs[4] = {cost: 530, name: "Burgandy Carpet"};
floor_crumbs[5] = {cost: 510, name: "Black & White Tile"};
floor_crumbs[6] = {cost: 540, name: "Linoleum"};
floor_crumbs[7] = {cost: 1000, name: "Dance Floor"};
floor_crumbs[8] = {cost: 280, name: "Painted Dance Steps"};
floor_crumbs[9] = {cost: 370, name: "Bamboo Floor"};
floor_crumbs[10] = {cost: 400, name: "Dirt & Leaves"};
floor_crumbs[11] = {cost: 530, name: "Blue Carpet"};
floor_crumbs[12] = {cost: 750, name: "Whirlpool"};
floor_crumbs[13] = {cost: 620, name: "Cherry Hardwood"};
floor_crumbs[14] = {cost: 700, name: "Phony-Lawn"};
var room_crumbs = new Object();
room_crumbs.town = {room_id: 100, music_id: 0};
room_crumbs.coffee = {room_id: 110, music_id: 1};
room_crumbs.book = {room_id: 111, music_id: 1};
room_crumbs.dance = {room_id: 120, music_id: 5};
room_crumbs.lounge = {room_id: 121, music_id: 6};
room_crumbs.shop = {room_id: 130, music_id: 0};
room_crumbs.plaza = {room_id: 300, music_id: 0};
room_crumbs.pet = {room_id: 310, music_id: 0};
room_crumbs.dojo = {room_id: 320, music_id: 0};
room_crumbs.pizza = {room_id: 330, music_id: 20};
room_crumbs.stage = {room_id: 340, music_id: 32};
room_crumbs.village = {room_id: 200, music_id: 0};
room_crumbs.sport = {room_id: 210, music_id: 0};
room_crumbs.lodge = {room_id: 220, music_id: 0};
room_crumbs.attic = {room_id: 221, music_id: 0};
room_crumbs.mtn = {room_id: 230, music_id: 0};
room_crumbs.forts = {room_id: 801, music_id: 0};
room_crumbs.rink = {room_id: 802, music_id: 0};
room_crumbs.boiler = {room_id: 804, music_id: 6};
room_crumbs.dock = {room_id: 800, music_id: 0};
room_crumbs.beach = {room_id: 400, music_id: 0};
room_crumbs.light = {room_id: 410, music_id: 212};
room_crumbs.beacon = {room_id: 411, music_id: 0};
room_crumbs.forest = {room_id: 809, music_id: 0};
room_crumbs.agent = {room_id: 803, music_id: 7};
room_crumbs.berg = {room_id: 805, music_id: 0};
room_crumbs.cove = {room_id: 810, music_id: 0};
room_crumbs.cave = {room_id: 806, music_id: 0};
room_crumbs.mine = {room_id: 808, music_id: 0};
room_crumbs.shack = {room_id: 807, music_id: 0};
var puffle_crumbs = new Object();
puffle_crumbs[0] = {name: "Blue", max_health: 100, max_hunger: 100, max_rest: 100};
puffle_crumbs[1] = {name: "Pink", max_health: 100, max_hunger: 120, max_rest: 80};
puffle_crumbs[2] = {name: "Black", max_health: 120, max_hunger: 80, max_rest: 100};
puffle_crumbs[3] = {name: "Green", max_health: 80, max_hunger: 100, max_rest: 120};
puffle_crumbs[4] = {name: "Purple", max_health: 80, max_hunger: 120, max_rest: 80};
puffle_crumbs[5] = {name: "Red", max_health: 100, max_hunger: 80, max_rest: 120};
puffle_crumbs[6] = {name: "Yellow", max_health: 100, max_hunger: 100, max_rest: 100};
var furniture_crumbs = new Object();
var TYPE_ROOM = shell.FURNITURE_TYPE_ROOM;
var TYPE_WALL = shell.FURNITURE_TYPE_WALL;
var TYPE_FLOOR = shell.FURNITURE_TYPE_FLOOR;
var SORT_ROOM = shell.FURNITURE_SORT_ROOM;
var SORT_WALL = shell.FURNITURE_SORT_WALL;
var SORT_FLOOR = shell.FURNITURE_SORT_FLOOR;
var SORT_PET = shell.FURNITURE_SORT_PET;
furniture_crumbs[1] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Pink Chair"};
furniture_crumbs[2] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Pink Beanbag Chair"};
furniture_crumbs[3] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Pink Table"};
furniture_crumbs[4] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Pink Dresser"};
furniture_crumbs[5] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 75, enable_music: false, name: "Pink Lamp"};
furniture_crumbs[6] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Pink Sofa"};
furniture_crumbs[10] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Log Chair"};
furniture_crumbs[11] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Log Bench"};
furniture_crumbs[12] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Log Drawers"};
furniture_crumbs[13] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 50, enable_music: false, name: "Log Stump"};
furniture_crumbs[14] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Log Table"};
furniture_crumbs[21] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Blue Chair"};
furniture_crumbs[22] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Blue Bench"};
furniture_crumbs[23] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 750, enable_music: false, name: "Blue Bookcase"};
furniture_crumbs[24] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Blue Table"};
furniture_crumbs[25] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Blue Deck Chair"};
furniture_crumbs[26] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 100, enable_music: false, name: "Blue Lamp"};
furniture_crumbs[31] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Coffee Tree"};
furniture_crumbs[32] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 750, enable_music: false, name: "Coffee Couch"};
furniture_crumbs[33] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Coffee Table"};
furniture_crumbs[34] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 120, enable_music: false, name: "Java Bag"};
furniture_crumbs[41] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 600, enable_music: false, name: "Book Room Couch"};
furniture_crumbs[42] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Book Room Lamp"};
furniture_crumbs[43] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 560, enable_music: false, name: "Arm Chair"};
furniture_crumbs[46] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 700, enable_music: false, name: "Dinner Table"};
furniture_crumbs[47] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 150, enable_music: false, name: "Dinner Chair"};
furniture_crumbs[51] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 150, enable_music: false, name: "Snow Chair"};
furniture_crumbs[52] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Snow Couch"};
furniture_crumbs[53] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 40, enable_music: false, name: "Snow Clump"};
furniture_crumbs[54] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Ice Table"};
furniture_crumbs[55] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 850, enable_music: false, name: "Penguin Ice Sculpture"};
furniture_crumbs[56] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Snow Deck Chair"};
furniture_crumbs[57] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 900, enable_music: false, name: "Knight Ice Sculpture"};
furniture_crumbs[58] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 405, enable_music: false, name: "Snowman"};
furniture_crumbs[59] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Sled"};
furniture_crumbs[61] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 700, enable_music: false, name: "Princess Armoire"};
furniture_crumbs[62] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 600, enable_music: false, name: "Princess Vanity"};
furniture_crumbs[63] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Princess Throne"};
furniture_crumbs[65] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 735, enable_music: false, name: "Mermaid Vanity"};
furniture_crumbs[66] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 550, enable_music: false, name: "Shell Chair"};
furniture_crumbs[67] = {type: TYPE_WALL, sort: SORT_WALL, cost: 350, enable_music: false, name: "Mermaid Clock"};
furniture_crumbs[71] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 700, enable_music: false, name: "Fridge"};
furniture_crumbs[72] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Barbecue"};
furniture_crumbs[73] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 650, enable_music: false, name: "Electric Stove"};
furniture_crumbs[74] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 410, enable_music: false, name: "Pantry"};
furniture_crumbs[75] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 380, enable_music: false, name: "Kitchen Sink"};
furniture_crumbs[76] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 180, enable_music: false, name: "Folding Chair"};
furniture_crumbs[77] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 130, enable_music: false, name: "Umbrella"};
furniture_crumbs[78] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 110, enable_music: false, name: "Beach Ball"};
furniture_crumbs[79] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 190, enable_music: false, name: "Whale Inflatable"};
furniture_crumbs[80] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 190, enable_music: false, name: "Dragon Inflatable"};
furniture_crumbs[81] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Bamboo Couch"};
furniture_crumbs[82] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Bamboo Chair"};
furniture_crumbs[83] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Bamboo Table"};
furniture_crumbs[84] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Torch"};
furniture_crumbs[85] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Palm Tree"};
furniture_crumbs[91] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Green Chair"};
furniture_crumbs[92] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Green Bench"};
furniture_crumbs[93] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 750, enable_music: false, name: "Green Bookcase"};
furniture_crumbs[94] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Green Vase"};
furniture_crumbs[95] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Green Deck Chair"};
furniture_crumbs[96] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Green Plush Couch"};
furniture_crumbs[97] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Green Chair"};
furniture_crumbs[99] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Superhero Stage Poster"};
furniture_crumbs[100] = {type: TYPE_WALL, sort: SORT_WALL, cost: 2000, enable_music: false, name: "Moose Head"};
furniture_crumbs[101] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Fish Tank"};
furniture_crumbs[102] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 1500, enable_music: false, name: "Speaker"};
furniture_crumbs[103] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Large Cactus"};
furniture_crumbs[104] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Small Cactus"};
furniture_crumbs[105] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Wood Cabinet"};
furniture_crumbs[106] = {type: TYPE_WALL, sort: SORT_WALL, cost: 3000, enable_music: false, name: "Mona Lisa"};
furniture_crumbs[107] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 50, enable_music: false, name: "Recycle Bin"};
furniture_crumbs[108] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 75, enable_music: false, name: "Welcome Mat"};
furniture_crumbs[109] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 5000, enable_music: false, name: "Big Screen TV"};
furniture_crumbs[110] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Tombstone"};
furniture_crumbs[111] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Happy Jack-O-Lantern"};
furniture_crumbs[112] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Goofy Jack-O-Lantern"};
furniture_crumbs[113] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Sad Jack-O-Lantern"};
furniture_crumbs[114] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Spiderweb"};
furniture_crumbs[115] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Silly Jack-O-Lantern"};
furniture_crumbs[116] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Puffle Pumpkin"};
furniture_crumbs[117] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 630, enable_music: false, name: "Cauldron"};
furniture_crumbs[118] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 4500, enable_music: true, name: "Pipe Organ"};
furniture_crumbs[119] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 650, enable_music: false, name: "Candlabra"};
furniture_crumbs[130] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 700, enable_music: false, name: "Christmas Tree"};
furniture_crumbs[131] = {type: TYPE_WALL, sort: SORT_WALL, cost: 150, enable_music: false, name: "Christmas Wreath"};
furniture_crumbs[132] = {type: TYPE_WALL, sort: SORT_WALL, cost: 1200, enable_music: false, name: "Fireplace"};
furniture_crumbs[133] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Small Christmas Tree"};
furniture_crumbs[134] = {type: TYPE_WALL, sort: SORT_WALL, cost: 30, enable_music: false, name: "Christmas Lights"};
furniture_crumbs[135] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 100, enable_music: false, name: "Giant Candy Cane"};
furniture_crumbs[136] = {type: TYPE_WALL, sort: SORT_WALL, cost: 900, enable_music: false, name: "Wood Stove"};
furniture_crumbs[137] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 120, enable_music: false, name: "Candle Stick"};
furniture_crumbs[138] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 950, enable_music: false, name: "Nutcracker"};
furniture_crumbs[139] = {type: TYPE_WALL, sort: SORT_WALL, cost: 750, enable_music: false, name: "Door Garland"};
furniture_crumbs[140] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Presents"};
furniture_crumbs[143] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 560, enable_music: false, name: "Plush Gray Chair"};
furniture_crumbs[144] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 105, enable_music: false, name: "Watering Can"};
furniture_crumbs[145] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Rare Flower Pot"};
furniture_crumbs[146] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 480, enable_music: false, name: "Wood Bench"};
furniture_crumbs[147] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Fan"};
furniture_crumbs[148] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 125, enable_music: false, name: "Lamp"};
furniture_crumbs[149] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Piñata"};
furniture_crumbs[150] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Lava Lamp"};
furniture_crumbs[151] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 400, enable_music: false, name: "Oval Rug"};
furniture_crumbs[152] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 500, enable_music: false, name: "Rectangle Rug"};
furniture_crumbs[153] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Coat Rack"};
furniture_crumbs[154] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 1000, enable_music: false, name: "Grandfather Clock"};
furniture_crumbs[155] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 550, enable_music: false, name: "Modern Art"};
furniture_crumbs[156] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Teddy Bear"};
furniture_crumbs[157] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 650, enable_music: false, name: "Student Desk"};
furniture_crumbs[158] = {type: TYPE_WALL, sort: SORT_WALL, cost: 1500, enable_music: false, name: "Sunset Painting"};
furniture_crumbs[159] = {type: TYPE_WALL, sort: SORT_WALL, cost: 2500, enable_music: false, name: "LCD HD-TV"};
furniture_crumbs[160] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 500, enable_music: false, name: "Green Rug"};
furniture_crumbs[161] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 550, enable_music: false, name: "Green Oval Rug"};
furniture_crumbs[162] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Small House Plant"};
furniture_crumbs[163] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Party Fountian"};
furniture_crumbs[164] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 1800, enable_music: true, name: "Stereo"};
furniture_crumbs[165] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 50, enable_music: false, name: "Wooden Crate"};
furniture_crumbs[166] = {type: TYPE_WALL, sort: SORT_WALL, cost: 600, enable_music: false, name: "Mullet Fish"};
furniture_crumbs[167] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 570, enable_music: false, name: "Large House Plant"};
furniture_crumbs[168] = {type: TYPE_WALL, sort: SORT_WALL, cost: 450, enable_music: false, name: "Wall Clock"};
furniture_crumbs[169] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 550, enable_music: false, name: "Mexican Rug"};
furniture_crumbs[170] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 15, enable_music: false, name: "Pink Balloon"};
furniture_crumbs[171] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 15, enable_music: false, name: "Blue Balloon"};
furniture_crumbs[172] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 15, enable_music: false, name: "Yellow Balloon"};
furniture_crumbs[173] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 15, enable_music: false, name: "Red Balloon"};
furniture_crumbs[174] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 15, enable_music: false, name: "Green Balloon"};
furniture_crumbs[175] = {type: TYPE_WALL, sort: SORT_WALL, cost: 50, enable_music: false, name: "Party Banner"};
furniture_crumbs[176] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 100, enable_music: false, name: "Birthday Cake"};
furniture_crumbs[177] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 2000, enable_music: false, name: "Dance Floor"};
furniture_crumbs[178] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 2200, enable_music: true, name: "Jukebox"};
furniture_crumbs[180] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 380, enable_music: false, name: "Umbrella Table"};
furniture_crumbs[181] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "White Plastic Chair"};
furniture_crumbs[182] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Lounging Deck Chair"};
furniture_crumbs[183] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 250, enable_music: false, name: "Surf Beach Towel"};
furniture_crumbs[184] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Curved Desk"};
furniture_crumbs[250] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 320, enable_music: false, name: "Barrel"};
furniture_crumbs[251] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 4000, enable_music: true, name: "Piano"};
furniture_crumbs[252] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Piano Bench"};
furniture_crumbs[253] = {type: TYPE_WALL, sort: SORT_WALL, cost: 80, enable_music: false, name: "Single Wall Light"};
furniture_crumbs[254] = {type: TYPE_WALL, sort: SORT_WALL, cost: 150, enable_music: false, name: "Double Wall Light"};
furniture_crumbs[260] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 180, enable_music: false, name: "Toy Train"};
furniture_crumbs[261] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 260, enable_music: false, name: "Chalk Board"};
furniture_crumbs[270] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Purple Plastic Chair"};
furniture_crumbs[271] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Purple Plastic Lawn Chair"};
furniture_crumbs[272] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Purple Beanbag Chair"};
furniture_crumbs[273] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Purple Coffee Table"};
furniture_crumbs[274] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Purple Lava Lamp"};
furniture_crumbs[275] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Purple Couch"};
furniture_crumbs[289] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 225, enable_music: false, name: "Cricket Wickets"};
furniture_crumbs[290] = {type: TYPE_WALL, sort: SORT_WALL, cost: 320, enable_music: false, name: "Basketball Net"};
furniture_crumbs[291] = {type: TYPE_WALL, sort: SORT_WALL, cost: 520, enable_music: false, name: "Score Board"};
furniture_crumbs[292] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 360, enable_music: false, name: "Hockey Net"};
furniture_crumbs[293] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 680, enable_music: false, name: "Weight Bench"};
furniture_crumbs[294] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 1560, enable_music: false, name: "Tread Mill"};
furniture_crumbs[295] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 220, enable_music: false, name: "Pommel Horse"};
furniture_crumbs[296] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 100, enable_music: false, name: "Red Gym Mat"};
furniture_crumbs[297] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 100, enable_music: false, name: "Blue Gym Mat"};
furniture_crumbs[298] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 120, enable_music: false, name: "Tube"};
furniture_crumbs[299] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 260, enable_music: false, name: "Court Lines"};
furniture_crumbs[300] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 60, enable_music: false, name: "Exercise Ball"};
furniture_crumbs[301] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 840, enable_music: false, name: "Exercise Bike"};
furniture_crumbs[302] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 150, enable_music: false, name: "Home Plate"};
furniture_crumbs[303] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 100, enable_music: false, name: "Base"};
furniture_crumbs[305] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 800, enable_music: false, name: "Treasure Chest"};
furniture_crumbs[306] = {type: TYPE_WALL, sort: SORT_WALL, cost: 355, enable_music: false, name: "Ship In A Bottle"};
furniture_crumbs[307] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 100, enable_music: false, name: "Pink Flamingo"};
furniture_crumbs[308] = {type: TYPE_WALL, sort: SORT_WALL, cost: 160, enable_music: false, name: "Porthole"};
furniture_crumbs[309] = {type: TYPE_WALL, sort: SORT_WALL, cost: 210, enable_music: false, name: "Captain\'s Wheel"};
furniture_crumbs[310] = {type: TYPE_WALL, sort: SORT_WALL, cost: 250, enable_music: false, name: "Wall Map"};
furniture_crumbs[311] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 600, enable_music: false, name: "Penguin Monument"};
furniture_crumbs[312] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 525, enable_music: false, name: "Pirate Ship"};
furniture_crumbs[313] = {type: TYPE_WALL, sort: SORT_WALL, cost: 200, enable_music: false, name: "Jolly Roger Flag"};
furniture_crumbs[314] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Camping Chair"};
furniture_crumbs[315] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 800, enable_music: false, name: "Picnic Table"};
furniture_crumbs[316] = {type: TYPE_WALL, sort: SORT_WALL, cost: 175, enable_music: false, name: "Lanterns"};
furniture_crumbs[317] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Fire Pit"};
furniture_crumbs[318] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 320, enable_music: false, name: "Sleeping Bag"};
furniture_crumbs[319] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 750, enable_music: false, name: "Bunk Bed"};
furniture_crumbs[330] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Red Coffee Table"};
furniture_crumbs[331] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Red Plush Couch"};
furniture_crumbs[332] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Red Chair"};
furniture_crumbs[333] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 450, enable_music: false, name: "Book Case"};
furniture_crumbs[334] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 350, enable_music: false, name: "Red Bean Bag Chair"};
furniture_crumbs[335] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Plastic Deck Chair"};
furniture_crumbs[340] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 320, enable_music: false, name: "Mexican Vase"};
furniture_crumbs[341] = {type: TYPE_WALL, sort: SORT_WALL, cost: 105, enable_music: false, name: "Medieval Banner"};
furniture_crumbs[342] = {type: TYPE_WALL, sort: SORT_WALL, cost: 85, enable_music: false, name: "Wall Torch"};
furniture_crumbs[343] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 750, enable_music: false, name: "Royal Throne"};
furniture_crumbs[344] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 320, enable_music: false, name: "Ficus Plant"};
furniture_crumbs[345] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 230, enable_music: false, name: "Snake Grass"};
furniture_crumbs[346] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 260, enable_music: false, name: "Flower Planter"};
furniture_crumbs[347] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 280, enable_music: false, name: "Vacuum"};
furniture_crumbs[348] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 30, enable_music: false, name: "Broom"};
furniture_crumbs[349] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 50, enable_music: false, name: "Mop & Bucket"};
furniture_crumbs[350] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 760, enable_music: false, name: "Drum Kit"};
furniture_crumbs[351] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 120, enable_music: false, name: "Shoe Rack"};
furniture_crumbs[352] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 150, enable_music: false, name: "CD Rack"};
furniture_crumbs[353] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Microphone"};
furniture_crumbs[354] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 800, enable_music: true, name: "DJ Table"};
furniture_crumbs[355] = {type: TYPE_WALL, sort: SORT_WALL, cost: 1650, enable_music: false, name: "Concert Lights"};
furniture_crumbs[356] = {type: TYPE_WALL, sort: SORT_WALL, cost: 450, enable_music: false, name: "Pop Art Painting"};
furniture_crumbs[357] = {type: TYPE_WALL, sort: SORT_WALL, cost: 520, enable_music: false, name: "Starry Night Painting"};
furniture_crumbs[358] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 360, enable_music: false, name: "Cooler"};
furniture_crumbs[359] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 315, enable_music: false, name: "Pink Plastic Castle"};
furniture_crumbs[360] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 305, enable_music: false, name: "Clam"};
furniture_crumbs[361] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 265, enable_music: false, name: "Sea Weed"};
furniture_crumbs[362] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 275, enable_music: false, name: "Inflatable Chair"};
furniture_crumbs[363] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Inflatable Sofa"};
furniture_crumbs[364] = {type: TYPE_WALL, sort: SORT_WALL, cost: 350, enable_music: false, name: "Security Camera"};
furniture_crumbs[365] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 220, enable_music: false, name: "Blender"};
furniture_crumbs[366] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 760, enable_music: false, name: "Ferris Wheel Couch"};
furniture_crumbs[367] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 170, enable_music: false, name: "Circus Ball"};
furniture_crumbs[368] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 100, enable_music: false, name: "Picket Fence"};
furniture_crumbs[369] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 220, enable_music: false, name: "Penguin Gnome"};
furniture_crumbs[370] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Garden"};
furniture_crumbs[371] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 480, enable_music: false, name: "Wheelbarrow"};
furniture_crumbs[372] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 75, enable_music: false, name: "Waves"};
furniture_crumbs[373] = {type: TYPE_WALL, sort: SORT_WALL, cost: 200, enable_music: false, name: "Orange Banner"};
furniture_crumbs[374] = {type: TYPE_WALL, sort: SORT_WALL, cost: 200, enable_music: false, name: "Green Banner"};
furniture_crumbs[375] = {type: TYPE_WALL, sort: SORT_WALL, cost: 200, enable_music: false, name: "Purple Banner"};
furniture_crumbs[376] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 500, enable_music: false, name: "Regal Chair"};
furniture_crumbs[377] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 150, enable_music: false, name: "Chess Castle"};
furniture_crumbs[378] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 150, enable_music: false, name: "Chess Knight"};
furniture_crumbs[390] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 200, enable_music: false, name: "Cash Register"};
furniture_crumbs[391] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 180, enable_music: false, name: "Easel"};
furniture_crumbs[392] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Penguin Band Poster"};
furniture_crumbs[393] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 400, enable_music: false, name: "Orange Inflatable Sofa"};
furniture_crumbs[394] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 275, enable_music: false, name: "Orange Inflatable Chair"};
furniture_crumbs[400] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Zeus Stage Poster"};
furniture_crumbs[401] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Peppy Stage Poster"};
furniture_crumbs[402] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Tate Stage Poster"};
furniture_crumbs[403] = {type: TYPE_WALL, sort: SORT_WALL, cost: 75, enable_music: false, name: "Space Stage Poster"};
furniture_crumbs[410] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 840, enable_music: false, name: "Harp"};
furniture_crumbs[411] = {type: TYPE_WALL, sort: SORT_WALL, cost: 700, enable_music: false, name: "Disco Ball"};
furniture_crumbs[412] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 250, enable_music: false, name: "Music Stand"};
furniture_crumbs[413] = {type: TYPE_ROOM, sort: SORT_ROOM, cost: 300, enable_music: false, name: "Guitar Stand"};
furniture_crumbs[414] = {type: TYPE_FLOOR, sort: SORT_FLOOR, cost: 800, enable_music: false, name: "Band Stage"};
furniture_crumbs[415] = {type: TYPE_WALL, sort: SORT_WALL, cost: 120, enable_music: false, name: "Quarter Note"};
furniture_crumbs[416] = {type: TYPE_WALL, sort: SORT_WALL, cost: 120, enable_music: false, name: "Eighth Note"};
furniture_crumbs[417] = {type: TYPE_WALL, sort: SORT_WALL, cost: 120, enable_music: false, name: "Treble Clef"};
furniture_crumbs[418] = {type: TYPE_WALL, sort: SORT_WALL, cost: 800, enable_music: false, name: "Wall Speakers"};
furniture_crumbs[200] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Blue Bed"};
furniture_crumbs[201] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Pink Bed"};
furniture_crumbs[202] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Gray Bed"};
furniture_crumbs[203] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Green Bed"};
furniture_crumbs[204] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Gray Puffle House"};
furniture_crumbs[205] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Brown Puffle House"};
furniture_crumbs[206] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Pink Puffle House"};
furniture_crumbs[207] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Blue Puffle House"};
furniture_crumbs[208] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Green Puffle House"};
furniture_crumbs[209] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Purple Puffle House"};
furniture_crumbs[210] = {type: TYPE_ROOM, sort: SORT_PET, cost: 150, enable_music: false, name: "Small Scratching Post"};
furniture_crumbs[211] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Large Scratching Post"};
furniture_crumbs[212] = {type: TYPE_ROOM, sort: SORT_PET, cost: 50, enable_music: false, name: "Water Dish"};
furniture_crumbs[213] = {type: TYPE_ROOM, sort: SORT_PET, cost: 200, enable_music: false, name: "Fish Bowl"};
furniture_crumbs[214] = {type: TYPE_ROOM, sort: SORT_PET, cost: 50, enable_music: false, name: "Water Bottle"};
furniture_crumbs[215] = {type: TYPE_ROOM, sort: SORT_PET, cost: 150, enable_music: false, name: "Running Wheel"};
furniture_crumbs[216] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Turtle Bowl"};
furniture_crumbs[217] = {type: TYPE_ROOM, sort: SORT_PET, cost: 350, enable_music: false, name: "Bird Cage"};
furniture_crumbs[218] = {type: TYPE_ROOM, sort: SORT_PET, cost: 220, enable_music: false, name: "Puffle Tree"};
furniture_crumbs[219] = {type: TYPE_ROOM, sort: SORT_PET, cost: 460, enable_music: false, name: "Puffle Tent"};
furniture_crumbs[220] = {type: TYPE_ROOM, sort: SORT_PET, cost: 280, enable_music: false, name: "Puffle Condo"};
furniture_crumbs[221] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Purple Bed"};
furniture_crumbs[222] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Red Bed"};
furniture_crumbs[223] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Red Puffle House"};
furniture_crumbs[224] = {type: TYPE_ROOM, sort: SORT_PET, cost: 350, enable_music: false, name: "Scratch Tower"};
furniture_crumbs[225] = {type: TYPE_ROOM, sort: SORT_PET, cost: 80, enable_music: false, name: "Double Dish"};
furniture_crumbs[226] = {type: TYPE_ROOM, sort: SORT_PET, cost: 400, enable_music: false, name: "Puffle Igloo"};
furniture_crumbs[227] = {type: TYPE_ROOM, sort: SORT_PET, cost: 250, enable_music: false, name: "Yellow Bed"};
furniture_crumbs[228] = {type: TYPE_ROOM, sort: SORT_PET, cost: 500, enable_music: false, name: "Yellow Puffle House"};
furniture_crumbs[229] = {type: TYPE_ROOM, sort: SORT_PET, cost: 450, enable_music: false, name: "Koi Pond"};
furniture_crumbs[230] = {type: TYPE_WALL, sort: SORT_PET, cost: 200, enable_music: false, name: "Green Birdhouse"};
furniture_crumbs[231] = {type: TYPE_WALL, sort: SORT_PET, cost: 170, enable_music: false, name: "Blue Birdhouse"};
var paper_crumbs = new Object();
var COLOUR = shell.INVENTORY_TYPE_COLOUR;
var HEAD = shell.INVENTORY_TYPE_HEAD;
var FACE = shell.INVENTORY_TYPE_FACE;
var NECK = shell.INVENTORY_TYPE_NECK;
var BODY = shell.INVENTORY_TYPE_BODY;
var HAND = shell.INVENTORY_TYPE_HAND;
var FEET = shell.INVENTORY_TYPE_FEET;
var FLAG = shell.INVENTORY_TYPE_FLAG;
var PHOTO = shell.INVENTORY_TYPE_PHOTO;
var OTHER = shell.INVENTORY_TYPE_OTHER;
paper_crumbs[1] = {type: COLOUR, cost: 20, is_member: false, name: "Blue"};
paper_crumbs[2] = {type: COLOUR, cost: 20, is_member: false, name: "Green"};
paper_crumbs[3] = {type: COLOUR, cost: 20, is_member: false, name: "Pink"};
paper_crumbs[4] = {type: COLOUR, cost: 20, is_member: false, name: "Black"};
paper_crumbs[5] = {type: COLOUR, cost: 20, is_member: false, name: "Red"};
paper_crumbs[6] = {type: COLOUR, cost: 20, is_member: false, name: "Orange"};
paper_crumbs[7] = {type: COLOUR, cost: 20, is_member: false, name: "Yellow"};
paper_crumbs[8] = {type: COLOUR, cost: 20, is_member: false, name: "Dark Purple"};
paper_crumbs[9] = {type: COLOUR, cost: 20, is_member: false, name: "Brown"};
paper_crumbs[10] = {type: COLOUR, cost: 20, is_member: false, name: "Peach"};
paper_crumbs[11] = {type: COLOUR, cost: 20, is_member: false, name: "Dark Green"};
paper_crumbs[12] = {type: COLOUR, cost: 20, is_member: false, name: "Light Blue"};
paper_crumbs[13] = {type: COLOUR, cost: 20, is_member: false, name: "Lime Green"};
paper_crumbs[401] = {type: HEAD, cost: 300, is_member: true, name: "Sombrero"};
paper_crumbs[402] = {type: HEAD, cost: 0, is_member: false, name: "Black Toque"};
paper_crumbs[403] = {type: HEAD, cost: 50, is_member: true, name: "Hard Hat"};
paper_crumbs[404] = {type: HEAD, cost: 250, is_member: true, name: "Cowboy Hat"};
paper_crumbs[405] = {type: HEAD, cost: 200, is_member: true, name: "Baseball Cap"};
paper_crumbs[406] = {type: HEAD, cost: 200, is_member: true, name: "Pink Ball Cap"};
paper_crumbs[407] = {type: HEAD, cost: 0, is_member: false, name: "Propellor Cap"};
paper_crumbs[408] = {type: HEAD, cost: 50, is_member: true, name: "Flower Hat"};
paper_crumbs[409] = {type: HEAD, cost: 100, is_member: true, name: "Graduation Cap"};
paper_crumbs[410] = {type: HEAD, cost: 450, is_member: true, name: "Queen\'s Crown"};
paper_crumbs[411] = {type: HEAD, cost: 350, is_member: true, name: "Festive Sombrero"};
paper_crumbs[412] = {type: HEAD, cost: 200, is_member: true, name: "Tiara"};
paper_crumbs[413] = {type: HEAD, cost: 0, is_member: false, name: "Party Hat"};
paper_crumbs[414] = {type: HEAD, cost: 0, is_member: false, name: "Santa Hat"};
paper_crumbs[415] = {type: HEAD, cost: 200, is_member: true, name: "Pilgrim Hat"};
paper_crumbs[417] = {type: HEAD, cost: 225, is_member: true, name: "Brown Fedora"};
paper_crumbs[418] = {type: HEAD, cost: 0, is_member: false, name: "Pink Toque"};
paper_crumbs[419] = {type: HEAD, cost: 600, is_member: true, name: "Russian Hat"};
paper_crumbs[420] = {type: HEAD, cost: 75, is_member: true, name: "Black Toque"};
paper_crumbs[421] = {type: HEAD, cost: 75, is_member: true, name: "Pink Toque"};
paper_crumbs[422] = {type: HEAD, cost: 50, is_member: true, name: "Newspaper Hat"};
paper_crumbs[423] = {type: HEAD, cost: 350, is_member: true, name: "Top Hat"};
paper_crumbs[424] = {type: HEAD, cost: 50, is_member: true, name: "Chef Hat"};
paper_crumbs[425] = {type: HEAD, cost: 0, is_member: false, name: "Lucky Hat"};
paper_crumbs[426] = {type: HEAD, cost: 250, is_member: true, name: "Jester Hat"};
paper_crumbs[427] = {type: HEAD, cost: 0, is_member: false, name: "Easter Bunny Hat"};
paper_crumbs[428] = {type: HEAD, cost: 0, is_member: false, make_tour_guide: true, name: "Tour Guide Hat"};
paper_crumbs[429] = {type: HEAD, cost: 0, is_member: false, name: "Miners Helmet"};
paper_crumbs[430] = {type: HEAD, cost: 0, is_member: false, name: "2nd Year Party Hat"};
paper_crumbs[431] = {type: HEAD, cost: 0, is_member: false, name: "Blue Propellor Cap"};
paper_crumbs[432] = {type: HEAD, cost: 250, is_member: true, name: "Safari Hat"};
paper_crumbs[433] = {type: HEAD, cost: 250, is_member: true, name: "Black Cowboy Hat"};
paper_crumbs[434] = {type: HEAD, cost: 250, is_member: true, name: "Pink Cowgirl Hat"};
paper_crumbs[435] = {type: HEAD, cost: 200, is_member: true, name: "Red Ball Cap"};
paper_crumbs[436] = {type: HEAD, cost: 200, is_member: true, name: "Blue Ball Cap"};
paper_crumbs[437] = {type: HEAD, cost: 200, is_member: true, name: "Straw Hat"};
paper_crumbs[438] = {type: HEAD, cost: 150, is_member: true, name: "Blue Toque"};
paper_crumbs[439] = {type: HEAD, cost: 210, is_member: true, name: "Park Ranger Hat"};
paper_crumbs[440] = {type: HEAD, cost: 0, is_member: false, name: "Sailor\'s Cap"};
paper_crumbs[441] = {type: HEAD, cost: 400, is_member: true, name: "Admiral\'s Hat"};
paper_crumbs[443] = {type: HEAD, cost: 0, is_member: false, name: "Wizard Hat"};
paper_crumbs[444] = {type: HEAD, cost: 0, is_member: false, name: "1st Year Party Hat"};
paper_crumbs[445] = {type: HEAD, cost: 120, is_member: true, name: "Green Toque"};
paper_crumbs[446] = {type: HEAD, cost: 220, is_member: true, name: "Fishing Hat"};
paper_crumbs[447] = {type: HEAD, cost: 150, is_member: true, name: "Elf Hat"};
paper_crumbs[448] = {type: HEAD, cost: 550, is_member: true, name: "Winter Cape", is_back: true};
paper_crumbs[449] = {type: HEAD, cost: 350, is_member: true, name: "Fruit Headdress"};
paper_crumbs[450] = {type: HEAD, cost: 180, is_member: true, name: "Earflap Cap"};
paper_crumbs[451] = {type: HEAD, cost: 800, is_member: true, name: "Roman Helmet"};
paper_crumbs[452] = {type: HEAD, cost: 750, is_member: true, name: "Viking Helmet"};
paper_crumbs[453] = {type: HEAD, cost: 550, is_member: true, name: "Football Helmet"};
paper_crumbs[454] = {type: HEAD, cost: 350, is_member: true, name: "Bike Helmet"};
paper_crumbs[455] = {type: HEAD, cost: 650, is_member: true, name: "Pink Viking Helmet"};
paper_crumbs[456] = {type: HEAD, cost: 1200, is_member: true, name: "Blue Viking Helmet"};
paper_crumbs[457] = {type: HEAD, cost: 650, is_member: true, name: "Divers Helmet"};
paper_crumbs[458] = {type: HEAD, cost: 500, is_member: true, name: "Space Helmet"};
paper_crumbs[460] = {type: HEAD, cost: 1500, is_member: true, name: "Gold Viking Helmet"};
paper_crumbs[461] = {type: HEAD, cost: 220, is_member: true, name: "Hockey Helmet"};
paper_crumbs[462] = {type: HEAD, cost: 360, is_member: true, name: "Red Football Helmet"};
paper_crumbs[463] = {type: HEAD, cost: 360, is_member: true, name: "Blue Football Helmet"};
paper_crumbs[464] = {type: HEAD, cost: 400, is_member: true, name: "Snowboard Helmet"};
paper_crumbs[465] = {type: HEAD, cost: 130, is_member: true, name: "Firefighter Hat"};
paper_crumbs[466] = {type: HEAD, cost: 0, is_member: false, name: "Angel Halo"};
paper_crumbs[467] = {type: HEAD, cost: 200, is_member: true, name: "Pink Pom Pom Toque"};
paper_crumbs[468] = {type: HEAD, cost: 200, is_member: true, name: "Alien Antenna"};
paper_crumbs[469] = {type: HEAD, cost: 0, is_member: false, name: "Umbrella Hat"};
paper_crumbs[470] = {type: HEAD, cost: 280, is_member: true, name: "Feathered Hat"};
paper_crumbs[471] = {type: HEAD, cost: 0, is_member: false, name: "Reindeer Antlers"};
paper_crumbs[472] = {type: HEAD, cost: 200, is_member: true, name: "Bee Antenna"};
paper_crumbs[473] = {type: HEAD, cost: 0, is_member: false, name: "Winged Helmet"};
paper_crumbs[474] = {type: HEAD, cost: 210, is_member: true, name: "Clown Wig"};
paper_crumbs[475] = {type: HEAD, cost: 400, is_member: true, name: "Countess Steeple Hat"};
paper_crumbs[476] = {type: HEAD, cost: 200, is_member: true, name: "Bard Hat"};
paper_crumbs[477] = {type: HEAD, cost: 250, is_member: true, name: "Court Jester Hat"};
paper_crumbs[478] = {type: HEAD, cost: 300, is_member: true, name: "Coral Crown"};
paper_crumbs[479] = {type: HEAD, cost: 450, is_member: true, name: "Moose Mascot costume"};
paper_crumbs[480] = {type: HEAD, cost: 450, is_member: true, name: "Parrot Mascot costume"};
paper_crumbs[481] = {type: HEAD, cost: 350, is_member: true, name: "Headphones"};
paper_crumbs[482] = {type: HEAD, cost: 200, is_member: true, name: "Stocking Cap"};
paper_crumbs[483] = {type: HEAD, cost: 250, is_member: true, name: "Blue Earmuffs"};
paper_crumbs[484] = {type: HEAD, cost: 250, is_member: true, name: "Pink Earmuffs"};
paper_crumbs[485] = {type: HEAD, cost: 300, is_member: true, name: "Bonnet"};
paper_crumbs[486] = {type: HEAD, cost: 0, is_member: false, name: "Feathered Tiara"};
paper_crumbs[487] = {type: HEAD, cost: 300, is_member: true, name: "Princess Hat"};
paper_crumbs[488] = {type: HEAD, cost: 100, is_member: true, name: "Head Band"};
paper_crumbs[489] = {type: HEAD, cost: 250, is_member: true, name: "Director\'s Hat"};
paper_crumbs[490] = {type: HEAD, cost: 0, is_member: false, name: "Pirate Bandana"};
paper_crumbs[491] = {type: HEAD, cost: 0, is_member: false, name: "Ice Crown"};
paper_crumbs[492] = {type: HEAD, cost: 300, is_member: true, name: "Floppy Hat"};
paper_crumbs[493] = {type: HEAD, cost: 350, is_member: true, name: "Tricorn Hat"};
paper_crumbs[494] = {type: HEAD, cost: 250, is_member: true, name: "Golf Hat"};
paper_crumbs[495] = {type: HEAD, cost: 360, is_member: true, name: "Marching Band Hat"};
paper_crumbs[496] = {type: HEAD, cost: 0, is_member: false, name: "Blue Bunny Ears"};
paper_crumbs[497] = {type: HEAD, cost: 0, is_member: false, name: "Sailor Hat"};
paper_crumbs[498] = {type: HEAD, cost: 0, is_member: false, name: "Puffle Bandana"};
paper_crumbs[499] = {type: HEAD, cost: 0, is_member: false, name: "Flower Headdress"};
paper_crumbs[650] = {type: HEAD, cost: 750, is_member: true, name: "The Rocker"};
paper_crumbs[651] = {type: HEAD, cost: 500, is_member: true, name: "The Spikester"};
paper_crumbs[652] = {type: HEAD, cost: 600, is_member: true, name: "The Disco"};
paper_crumbs[653] = {type: HEAD, cost: 500, is_member: true, name: "The Funster"};
paper_crumbs[654] = {type: HEAD, cost: 750, is_member: true, name: "The Beekeeper"};
paper_crumbs[655] = {type: HEAD, cost: 600, is_member: true, name: "The Sportster"};
paper_crumbs[656] = {type: HEAD, cost: 550, is_member: true, name: "The Sunstriker"};
paper_crumbs[657] = {type: HEAD, cost: 600, is_member: true, name: "The Flutterby"};
paper_crumbs[658] = {type: HEAD, cost: 500, is_member: true, name: "The Sidetied"};
paper_crumbs[659] = {type: HEAD, cost: 300, is_member: true, name: "Pirate Mascot Hat"};
paper_crumbs[660] = {type: HEAD, cost: 250, is_member: true, name: "Cocoa Bunny Ears"};
paper_crumbs[661] = {type: HEAD, cost: 650, is_member: true, name: "The Cleo"};
paper_crumbs[662] = {type: HEAD, cost: 550, is_member: true, name: "The Surf Knot"};
paper_crumbs[663] = {type: HEAD, cost: 0, is_member: false, name: "Gigantic St. Patrick\'s Hat"};
paper_crumbs[664] = {type: HEAD, cost: 0, is_member: false, name: "Green Bunny Ears"};
paper_crumbs[665] = {type: HEAD, cost: 300, is_member: true, name: "Alaska\'s Explorer Hat"};
paper_crumbs[666] = {type: HEAD, cost: 500, is_member: true, name: "Pharaoh Headdress"};
paper_crumbs[667] = {type: HEAD, cost: 500, is_member: true, name: "King\'s Crown"};
paper_crumbs[668] = {type: HEAD, cost: 400, is_member: true, name: "Knight Helmet"};
paper_crumbs[669] = {type: HEAD, cost: 200, is_member: true, name: "Woodsman\'s Hat"};
paper_crumbs[670] = {type: HEAD, cost: 550, is_member: true, name: "The Firestriker"};
paper_crumbs[671] = {type: HEAD, cost: 500, is_member: true, name: "The Sidetied Too"};
paper_crumbs[672] = {type: HEAD, cost: 500, is_member: true, name: "The Spikette"};
paper_crumbs[673] = {type: HEAD, cost: 300, is_member: true, name: "Emerald Hat"};
paper_crumbs[674] = {type: HEAD, cost: 0, is_member: false, name: "Red Hard Hat"};
paper_crumbs[675] = {type: HEAD, cost: 450, is_member: true, name: "The Fern Fuzz"};
paper_crumbs[676] = {type: HEAD, cost: 10, is_member: true, name: "Cheap Time Travel Hat"};
paper_crumbs[677] = {type: HEAD, cost: 650, is_member: true, name: "The Suprema Diva"};
paper_crumbs[678] = {type: HEAD, cost: 500, is_member: true, name: "The Messiness"};
paper_crumbs[101] = {type: FACE, cost: 200, is_member: true, name: "Black Sunglasses"};
paper_crumbs[102] = {type: FACE, cost: 1000, is_member: true, name: "Night Vision"};
paper_crumbs[103] = {type: FACE, cost: 50, is_member: true, name: "3D Glasses"};
paper_crumbs[105] = {type: FACE, cost: 0, is_member: false, name: "Eyepatch"};
paper_crumbs[106] = {type: FACE, cost: 100, is_member: true, name: "Superhero Mask"};
paper_crumbs[107] = {type: FACE, cost: 0, is_member: false, name: "Blue Sunglasses"};
paper_crumbs[108] = {type: FACE, cost: 150, is_member: true, name: "Blue Sunglasses"};
paper_crumbs[109] = {type: FACE, cost: 0, is_member: false, name: "Free Red Sunglasses"};
paper_crumbs[110] = {type: FACE, cost: 150, is_member: true, name: "Red Sunglasses"};
paper_crumbs[111] = {type: FACE, cost: 200, is_member: true, name: "Designer Glasses"};
paper_crumbs[112] = {type: FACE, cost: 0, is_member: false, name: "Funny-Face Glasses"};
paper_crumbs[113] = {type: FACE, cost: 225, is_member: true, name: "Black Glasses"};
paper_crumbs[114] = {type: FACE, cost: 225, is_member: true, name: "Brown Glasses"};
paper_crumbs[116] = {type: FACE, cost: 200, is_member: true, name: "Snowflake Mask"};
paper_crumbs[117] = {type: FACE, cost: 200, is_member: true, name: "Trendy Sunglasses"};
paper_crumbs[118] = {type: FACE, cost: 225, is_member: true, name: "Trendy White Sunglasses"};
paper_crumbs[119] = {type: FACE, cost: 160, is_member: true, name: "Monocle"};
paper_crumbs[120] = {type: FACE, cost: 300, is_member: true, name: "Alien Mask"};
paper_crumbs[121] = {type: FACE, cost: 0, is_member: false, name: "Green Sunglasses"};
paper_crumbs[122] = {type: FACE, cost: 300, is_member: true, name: "Robot Helmet"};
paper_crumbs[123] = {type: FACE, cost: 100, is_member: true, name: "Blue Superhero Mask"};
paper_crumbs[124] = {type: FACE, cost: 100, is_member: true, name: "Pink Superhero Mask"};
paper_crumbs[125] = {type: FACE, cost: 200, is_member: true, name: "Aviator Sunglasses"};
paper_crumbs[126] = {type: FACE, cost: 50, is_member: true, name: "Big Brow"};
paper_crumbs[127] = {type: FACE, cost: 300, is_member: true, name: "Blue Tiki Mask"};
paper_crumbs[128] = {type: FACE, cost: 300, is_member: true, name: "Pink Tiki Mask"};
paper_crumbs[130] = {type: FACE, cost: 75, is_member: true, name: "Earring"};
paper_crumbs[131] = {type: FACE, cost: 200, is_member: true, name: "Snorkel"};
paper_crumbs[132] = {type: FACE, cost: 250, is_member: true, name: "Blue Snorkel"};
paper_crumbs[133] = {type: FACE, cost: 0, is_member: false, name: "Red Face Paint"};
paper_crumbs[134] = {type: FACE, cost: 0, is_member: false, name: "Blue Face Paint"};
paper_crumbs[135] = {type: FACE, cost: 0, is_member: false, name: "Yellow Snorkel"};
paper_crumbs[136] = {type: FACE, cost: 480, is_member: true, name: "Ski Goggles"};
paper_crumbs[137] = {type: FACE, cost: 220, is_member: true, name: "Swim Goggles"};
paper_crumbs[138] = {type: FACE, cost: 0, is_member: false, name: "Swirly Glasses"};
paper_crumbs[139] = {type: FACE, cost: 200, is_member: true, name: "Pink Snorkel"};
paper_crumbs[162] = {type: NECK, cost: 0, is_member: false, name: "White Beard"};
paper_crumbs[166] = {type: NECK, cost: 60, is_member: true, name: "Green Bowtie"};
paper_crumbs[167] = {type: NECK, cost: 125, is_member: true, name: "Green Necktie"};
paper_crumbs[168] = {type: NECK, cost: 0, is_member: false, name: "Parrot"};
paper_crumbs[169] = {type: NECK, cost: 150, is_member: true, name: "Green Scarf"};
paper_crumbs[170] = {type: NECK, cost: 0, is_member: false, name: "Halloween Scarf"};
paper_crumbs[171] = {type: NECK, cost: 0, is_member: false, name: "Hawaiian Lei"};
paper_crumbs[172] = {type: NECK, cost: 150, is_member: true, name: "Scarf"};
paper_crumbs[173] = {type: NECK, cost: 0, is_member: false, name: "Christmas Scarf"};
paper_crumbs[174] = {type: NECK, cost: 300, is_member: true, name: "Boa"};
paper_crumbs[175] = {type: NECK, cost: 150, is_member: true, name: "Pink Scarf"};
paper_crumbs[176] = {type: NECK, cost: 125, is_member: true, name: "Black Tie"};
paper_crumbs[177] = {type: NECK, cost: 150, is_member: true, name: "Striped Tie"};
paper_crumbs[178] = {type: NECK, cost: 0, is_member: false, name: "Shell Necklace"};
paper_crumbs[179] = {type: NECK, cost: 150, is_member: true, name: "Blue Scarf"};
paper_crumbs[180] = {type: NECK, cost: 380, is_member: true, name: "Snare Drum"};
paper_crumbs[181] = {type: NECK, cost: 550, is_member: true, name: "Pearl Necklace"};
paper_crumbs[182] = {type: NECK, cost: 110, is_member: true, name: "Pendant"};
paper_crumbs[183] = {type: NECK, cost: 600, is_member: true, name: "Bling Bling Medallion"};
paper_crumbs[184] = {type: NECK, cost: 280, is_member: true, name: "Star Necklace"};
paper_crumbs[185] = {type: NECK, cost: 0, is_member: false, name: "Candy Necklace"};
paper_crumbs[186] = {type: NECK, cost: 300, is_member: true, name: "Ruffle Collar"};
paper_crumbs[187] = {type: NECK, cost: 125, is_member: true, name: "Cheesy Necktie"};
paper_crumbs[188] = {type: NECK, cost: 125, is_member: true, name: "Mullet Necktie"};
paper_crumbs[189] = {type: NECK, cost: 125, is_member: true, name: "Smiley Necktie"};
paper_crumbs[190] = {type: NECK, cost: 100, is_member: true, name: "Primitive Necklace"};
paper_crumbs[191] = {type: NECK, cost: 0, is_member: false, name: "Life Vest"};
paper_crumbs[192] = {type: NECK, cost: 0, is_member: false, name: "Bandana"};
paper_crumbs[193] = {type: NECK, cost: 0, is_member: false, name: "Blue Lei"};
paper_crumbs[194] = {type: NECK, cost: 0, is_member: false, name: "Whistle"};
paper_crumbs[195] = {type: NECK, cost: 300, is_member: true, name: "Reporter Camera"};
paper_crumbs[196] = {type: NECK, cost: 250, is_member: true, name: "Green Tabard"};
paper_crumbs[197] = {type: NECK, cost: 250, is_member: true, name: "Orange Tabard"};
paper_crumbs[198] = {type: NECK, cost: 250, is_member: true, name: "Purple Tabard"};
paper_crumbs[214] = {type: NECK, cost: 50, is_member: true, name: "Bowtie"};
paper_crumbs[216] = {type: NECK, cost: 0, is_member: false, name: "Free Bowtie"};
paper_crumbs[301] = {type: NECK, cost: 500, is_member: true, name: "Superhero Cape", is_back: true};
paper_crumbs[302] = {type: NECK, cost: 500, is_member: true, name: "Blue Cape", is_back: true};
paper_crumbs[303] = {type: NECK, cost: 550, is_member: true, name: "Black Cape", is_back: true};
paper_crumbs[304] = {type: NECK, cost: 0, is_member: true, name: "Lime Green Cape", is_back: true};
paper_crumbs[305] = {type: NECK, cost: 550, is_member: true, name: "Magicians Cape", is_back: true};
paper_crumbs[306] = {type: NECK, cost: 410, is_member: true, name: "Red Backpack"};
paper_crumbs[307] = {type: NECK, cost: 290, is_member: true, name: "Messenger Bag"};
paper_crumbs[308] = {type: NECK, cost: 480, is_member: true, name: "Scuba Tank"};
paper_crumbs[309] = {type: NECK, cost: 400, is_member: true, name: "Bee Wings", is_back: true};
paper_crumbs[310] = {type: NECK, cost: 400, is_member: true, name: "Fairy Wings", is_back: true};
paper_crumbs[312] = {type: NECK, cost: 410, is_member: true, name: "Blue Backpack"};
paper_crumbs[313] = {type: NECK, cost: 670, is_member: true, name: "Hiking Backpack"};
paper_crumbs[314] = {type: NECK, cost: 410, is_member: true, name: "Pink Backpack"};
paper_crumbs[315] = {type: NECK, cost: 500, is_member: true, name: "Pink Cape", is_back: true};
paper_crumbs[316] = {type: NECK, cost: 700, is_member: true, name: "Supply Bag"};
paper_crumbs[317] = {type: NECK, cost: 0, is_member: false, name: "Blue Mail Bag"};
paper_crumbs[793] = {type: NECK, cost: 400, is_member: true, name: "Royal Robe", is_back: true};
paper_crumbs[201] = {type: BODY, cost: 200, is_member: true, name: "Red Shirt"};
paper_crumbs[202] = {type: BODY, cost: 200, is_member: true, name: "Blue Polo Shirt"};
paper_crumbs[203] = {type: BODY, cost: 200, is_member: true, name: "Butterfly T-Shirt"};
paper_crumbs[204] = {type: BODY, cost: 200, is_member: true, name: "Astro Barrier T-Shirt"};
paper_crumbs[205] = {type: BODY, cost: 200, is_member: true, name: "I Love Puffle T-Shirt"};
paper_crumbs[206] = {type: BODY, cost: 150, is_member: true, name: "Red Shirt"};
paper_crumbs[207] = {type: BODY, cost: 0, is_member: false, name: "Snowflake Shirt"};
paper_crumbs[208] = {type: BODY, cost: 150, is_member: true, name: "Sailor\'s Shirt"};
paper_crumbs[209] = {type: BODY, cost: 240, is_member: true, name: "Flannel Shirt"};
paper_crumbs[210] = {type: BODY, cost: 200, is_member: true, name: "Star T-Shirt"};
paper_crumbs[211] = {type: BODY, cost: 250, is_member: true, name: "Hawaiian Shirt"};
paper_crumbs[212] = {type: BODY, cost: 200, is_member: true, name: "Grass Skirt"};
paper_crumbs[213] = {type: BODY, cost: 600, is_member: true, name: "Orange Snowsuit"};
paper_crumbs[215] = {type: BODY, cost: 500, is_member: true, name: "Life Jacket"};
paper_crumbs[217] = {type: BODY, cost: 420, is_member: true, name: "Cowboy Vest"};
paper_crumbs[218] = {type: BODY, cost: 450, is_member: true, name: "Quilted Vest"};
paper_crumbs[219] = {type: BODY, cost: 750, is_member: true, name: "Blue Coat"};
paper_crumbs[221] = {type: BODY, cost: 400, is_member: true, name: "Black Hoodie"};
paper_crumbs[222] = {type: BODY, cost: 400, is_member: true, name: "Pink Hoodie"};
paper_crumbs[223] = {type: BODY, cost: 400, is_member: true, name: "Green Hoodie"};
paper_crumbs[224] = {type: BODY, cost: 400, is_member: true, name: "Purple Hoodie"};
paper_crumbs[225] = {type: BODY, cost: 440, is_member: true, name: "Turtleneck Sweater"};
paper_crumbs[226] = {type: BODY, cost: 440, is_member: true, name: "Turtleneck Sweater"};
paper_crumbs[227] = {type: BODY, cost: 450, is_member: true, name: "Bee costume"};
paper_crumbs[228] = {type: BODY, cost: 550, is_member: true, name: "Princess costume"};
paper_crumbs[229] = {type: BODY, cost: 440, is_member: true, name: "Blue Turtleneck"};
paper_crumbs[230] = {type: BODY, cost: 450, is_member: true, name: "Orange Jumper"};
paper_crumbs[231] = {type: BODY, cost: 0, is_member: false, name: "Pirate Belt"};
paper_crumbs[232] = {type: BODY, cost: 700, is_member: true, name: "Green Suede Jacket"};
paper_crumbs[235] = {type: BODY, cost: 450, is_member: true, name: "Raincoat"};
paper_crumbs[236] = {type: BODY, cost: 350, is_member: true, name: "Poncho"};
paper_crumbs[237] = {type: BODY, cost: 700, is_member: true, name: "Red Suede Jacket"};
paper_crumbs[238] = {type: BODY, cost: 700, is_member: true, name: "Pastal Suede Jacket"};
paper_crumbs[239] = {type: BODY, cost: 600, is_member: true, name: "Wetsuit"};
paper_crumbs[240] = {type: BODY, cost: 0, is_member: false, name: "Pizza Apron"};
paper_crumbs[241] = {type: BODY, cost: 700, is_member: true, name: "Purple Suede Jacket"};
paper_crumbs[242] = {type: BODY, cost: 600, is_member: true, name: "Victorian Dress"};
paper_crumbs[243] = {type: BODY, cost: 500, is_member: true, name: "Parka"};
paper_crumbs[244] = {type: BODY, cost: 600, is_member: true, name: "Ghost costume"};
paper_crumbs[245] = {type: BODY, cost: 700, is_member: true, name: "Orange Space Suit"};
paper_crumbs[246] = {type: BODY, cost: 450, is_member: true, name: "Skeleton"};
paper_crumbs[247] = {type: BODY, cost: 450, is_member: true, name: "Clown Suit"};
paper_crumbs[248] = {type: BODY, cost: 460, is_member: true, name: "Kimono"};
paper_crumbs[249] = {type: BODY, cost: 600, is_member: true, name: "Pink Snowsuit"};
paper_crumbs[250] = {type: BODY, cost: 0, is_member: false, name: "Ice Cream Apron"};
paper_crumbs[251] = {type: BODY, cost: 450, is_member: true, name: "Jean Jacket"};
paper_crumbs[252] = {type: BODY, cost: 400, is_member: true, name: "Pink Dress"};
paper_crumbs[253] = {type: BODY, cost: 400, is_member: true, name: "Purple Dress"};
paper_crumbs[254] = {type: BODY, cost: 350, is_member: true, name: "Red Cheerleader"};
paper_crumbs[255] = {type: BODY, cost: 350, is_member: true, name: "Blue Cheerleader"};
paper_crumbs[256] = {type: BODY, cost: 450, is_member: true, name: "Ballerina"};
paper_crumbs[257] = {type: BODY, cost: 400, is_member: true, name: "Spring Dress"};
paper_crumbs[259] = {type: BODY, cost: 450, is_member: true, name: "Shamrock Dress"};
paper_crumbs[258] = {type: BODY, cost: 400, is_member: true, name: "Pirate Dress"};
paper_crumbs[260] = {type: BODY, cost: 580, is_member: true, name: "Formal Dress"};
paper_crumbs[261] = {type: BODY, cost: 650, is_member: true, name: "Black Suit"};
paper_crumbs[262] = {type: BODY, cost: 100, is_member: true, name: "Coffee Apron"};
paper_crumbs[263] = {type: BODY, cost: 100, is_member: true, name: "Pizza Apron"};
paper_crumbs[264] = {type: BODY, cost: 450, is_member: true, name: "Red Pirate Dress"};
paper_crumbs[265] = {type: BODY, cost: 480, is_member: true, name: "Fishing Vest"};
paper_crumbs[266] = {type: BODY, cost: 600, is_member: true, name: "Alien Suit"};
paper_crumbs[267] = {type: BODY, cost: 250, is_member: true, name: "Red Shorts"};
paper_crumbs[268] = {type: BODY, cost: 700, is_member: true, name: "Purple Space Suit"};
paper_crumbs[269] = {type: BODY, cost: 300, is_member: true, name: "Pink Swimsuit"};
paper_crumbs[270] = {type: BODY, cost: 300, is_member: true, name: "Purple Bikini"};
paper_crumbs[271] = {type: BODY, cost: 300, is_member: true, name: "Yellow Bikini"};
paper_crumbs[272] = {type: BODY, cost: 250, is_member: true, name: "Blue Shorts"};
paper_crumbs[273] = {type: BODY, cost: 300, is_member: true, name: "Aqua Bikini"};
paper_crumbs[274] = {type: BODY, cost: 0, is_member: false, name: "Inflatable Duck"};
paper_crumbs[275] = {type: BODY, cost: 450, is_member: true, name: "Overalls"};
paper_crumbs[276] = {type: BODY, cost: 800, is_member: true, name: "Robot Suit"};
paper_crumbs[277] = {type: BODY, cost: 450, is_member: true, name: "Red Jersey"};
paper_crumbs[278] = {type: BODY, cost: 450, is_member: true, name: "Blue Jersey"};
paper_crumbs[279] = {type: BODY, cost: 550, is_member: true, name: "Pink Letterman Jacket"};
paper_crumbs[280] = {type: BODY, cost: 550, is_member: true, name: "Green Letterman Jacket"};
paper_crumbs[281] = {type: BODY, cost: 550, is_member: true, name: "Black Letterman Jacket"};
paper_crumbs[282] = {type: BODY, cost: 750, is_member: false, name: "Lighthouse Shirt"};
paper_crumbs[283] = {type: BODY, cost: 550, is_member: true, name: "Pink Duffle Coat"};
paper_crumbs[284] = {type: BODY, cost: 350, is_member: true, name: "Elf Suit"};
paper_crumbs[285] = {type: BODY, cost: 350, is_member: true, name: "Admiral Jacket"};
paper_crumbs[286] = {type: BODY, cost: 640, is_member: true, name: "Flamenco Dress"};
paper_crumbs[287] = {type: BODY, cost: 520, is_member: true, name: "Matador Outfit"};
paper_crumbs[288] = {type: BODY, cost: 450, is_member: true, name: "Striped Overalls"};
paper_crumbs[289] = {type: BODY, cost: 350, is_member: true, name: "Long Johns"};
paper_crumbs[290] = {type: BODY, cost: 650, is_member: true, name: "Victorian Jacket"};
paper_crumbs[291] = {type: BODY, cost: 560, is_member: true, name: "Leprechaun Tuxedo"};
paper_crumbs[292] = {type: BODY, cost: 0, is_member: false, name: "Green Duck"};
paper_crumbs[293] = {type: BODY, cost: 600, is_member: true, name: "Tuba"};
paper_crumbs[294] = {type: BODY, cost: 800, is_member: true, name: "Tuxedo"};
paper_crumbs[295] = {type: BODY, cost: 650, is_member: true, name: "Captain\'s Coat"};
paper_crumbs[296] = {type: BODY, cost: 550, is_member: true, name: "Red Letterman Jacket"};
paper_crumbs[297] = {type: BODY, cost: 180, is_member: true, name: "Lifeguard Shirt"};
paper_crumbs[298] = {type: BODY, cost: 480, is_member: true, name: "Sport Life Jacket"};
paper_crumbs[299] = {type: BODY, cost: 380, is_member: true, name: "Firefighter Jacket"};
paper_crumbs[760] = {type: BODY, cost: 600, is_member: true, name: "Countess Dress"};
paper_crumbs[761] = {type: BODY, cost: 550, is_member: true, name: "Bard Outfit"};
paper_crumbs[762] = {type: BODY, cost: 550, is_member: true, name: "Court Jester"};
paper_crumbs[763] = {type: BODY, cost: 500, is_member: true, name: "Fish costume"};
paper_crumbs[764] = {type: BODY, cost: 400, is_member: true, name: "Winter Poncho"};
paper_crumbs[765] = {type: BODY, cost: 550, is_member: true, name: "Shadow Guy costume"};
paper_crumbs[766] = {type: BODY, cost: 550, is_member: true, name: "Gamma Gal costume"};
paper_crumbs[767] = {type: BODY, cost: 600, is_member: true, name: "Squidzoid costume"};
paper_crumbs[768] = {type: BODY, cost: 800, is_member: true, name: "Mermaid Outfit"};
paper_crumbs[769] = {type: BODY, cost: 620, is_member: true, name: "White Admiral Jacket"};
paper_crumbs[770] = {type: BODY, cost: 200, is_member: true, name: "Safety Vest"};
paper_crumbs[771] = {type: BODY, cost: 550, is_member: true, name: "Track Jacket"};
paper_crumbs[772] = {type: BODY, cost: 600, is_member: true, name: "Pirate Mascot costume"};
paper_crumbs[773] = {type: BODY, cost: 500, is_member: true, name: "Penguin Band Hoodie"};
paper_crumbs[774] = {type: BODY, cost: 0, is_member: false, name: "Seashell Belt"};
paper_crumbs[775] = {type: BODY, cost: 600, is_member: true, name: "Red Soccer Jersey"};
paper_crumbs[778] = {type: BODY, cost: 600, is_member: true, name: "Blue Soccer Jersey"};
paper_crumbs[780] = {type: BODY, cost: 500, is_member: true, name: "Daisy Zippered Hoodie"};
paper_crumbs[781] = {type: BODY, cost: 400, is_member: true, name: "Striped Rugby Shirt"};
paper_crumbs[782] = {type: BODY, cost: 550, is_member: true, name: "Cocoa Bunny costume"};
paper_crumbs[783] = {type: BODY, cost: 650, is_member: true, name: "Casual Suit Jacket"};
paper_crumbs[784] = {type: BODY, cost: 500, is_member: true, name: "Yellow Sundress"};
paper_crumbs[785] = {type: BODY, cost: 600, is_member: true, name: "Ski Patrol Jacket"};
paper_crumbs[786] = {type: BODY, cost: 650, is_member: true, name: "Sienna Explorer Outfit"};
paper_crumbs[787] = {type: BODY, cost: 650, is_member: true, name: "Beige Explorer Outfit"};
paper_crumbs[788] = {type: BODY, cost: 800, is_member: true, name: "Pharaoh costume"};
paper_crumbs[789] = {type: BODY, cost: 600, is_member: true, name: "Mummy costume"};
paper_crumbs[790] = {type: BODY, cost: 0, is_member: false, name: "Black and Red Sailor Shirt"};
paper_crumbs[791] = {type: BODY, cost: 600, is_member: true, name: "Red Baseball Uniform"};
paper_crumbs[792] = {type: BODY, cost: 600, is_member: true, name: "Blue Baseball Uniform"};
paper_crumbs[794] = {type: BODY, cost: 600, is_member: true, name: "Knight Armor"};
paper_crumbs[795] = {type: BODY, cost: 1000, is_member: true, name: "Dragon costume"};
paper_crumbs[796] = {type: BODY, cost: 550, is_member: true, name: "Emerald Dress"};
paper_crumbs[797] = {type: BODY, cost: 600, is_member: true, name: "Queen\'s Dress"};
paper_crumbs[798] = {type: BODY, cost: 100, is_member: true, name: "Blacksmith Apron"};
paper_crumbs[799] = {type: BODY, cost: 0, is_member: false, name: "Squire Outfit"};
paper_crumbs[830] = {type: BODY, cost: 300, is_member: true, name: "Surf Bikini"};
paper_crumbs[831] = {type: BODY, cost: 250, is_member: true, name: "Hawaiian Shorts"};
paper_crumbs[832] = {type: BODY, cost: 400, is_member: true, name: "Sarong"};
paper_crumbs[833] = {type: BODY, cost: 500, is_member: true, name: "Diver\'s Suit"};
paper_crumbs[834] = {type: BODY, cost: 350, is_member: true, name: "Tiger Cave Toga"};
paper_crumbs[835] = {type: BODY, cost: 350, is_member: true, name: "Zebra Cave Toga"};
paper_crumbs[836] = {type: BODY, cost: 600, is_member: true, name: "Red Basketball Jersey"};
paper_crumbs[837] = {type: BODY, cost: 600, is_member: true, name: "Blue Basketball Jersey"};
paper_crumbs[838] = {type: BODY, cost: 450, is_member: true, name: "Striped Sash Dress"};
paper_crumbs[839] = {type: BODY, cost: 200, is_member: true, name: "Pink Pop Music Shirt"};
paper_crumbs[840] = {type: BODY, cost: 200, is_member: true, name: "Orange Rocker Shirt"};
paper_crumbs[841] = {type: BODY, cost: 850, is_member: true, name: "Supernova Suit"};
paper_crumbs[842] = {type: BODY, cost: 600, is_member: true, name: "Dazzle Dress"};
paper_crumbs[843] = {type: BODY, cost: 350, is_member: true, name: "Black Cowboy Shirt"};
paper_crumbs[844] = {type: BODY, cost: 300, is_member: true, name: "Pink Cowgirl Shirt"};
paper_crumbs[845] = {type: BODY, cost: 650, is_member: true, name: "Gray Pirate Coat"};
paper_crumbs[846] = {type: BODY, cost: 600, is_member: true, name: "Conductor Suit"};
paper_crumbs[220] = {type: HAND, cost: 750, is_member: true, name: "Hockey Stick"};
paper_crumbs[233] = {type: HAND, cost: 975, is_member: true, name: "Electric Guitar"};
paper_crumbs[234] = {type: HAND, cost: 700, is_member: true, name: "Acoustic Guitar"};
paper_crumbs[321] = {type: HAND, cost: 200, is_member: true, name: "Flashing Lure Fishing Rod"};
paper_crumbs[322] = {type: HAND, cost: 175, is_member: true, name: "Gold Wristwatch"};
paper_crumbs[323] = {type: HAND, cost: 80, is_member: true, name: "Wrist Watch"};
paper_crumbs[324] = {type: HAND, cost: 200, is_member: true, name: "Pot O\'Gold"};
paper_crumbs[325] = {type: HAND, cost: 0, is_member: false, name: "Water Wings"};
paper_crumbs[326] = {type: HAND, cost: 0, is_member: false, name: "Paddle Ball"};
paper_crumbs[327] = {type: HAND, cost: 150, is_member: true, name: "Lasso"};
paper_crumbs[328] = {type: HAND, cost: 0, is_member: false, name: "Bell"};
paper_crumbs[329] = {type: HAND, cost: 120, is_member: true, name: "Pompom"};
paper_crumbs[330] = {type: HAND, cost: 120, is_member: true, name: "Red Pompom"};
paper_crumbs[331] = {type: HAND, cost: 0, is_member: false, name: "Pumpkin Basket"};
paper_crumbs[332] = {type: HAND, cost: 150, is_member: true, name: "Magic Wand"};
paper_crumbs[333] = {type: HAND, cost: 120, is_member: true, name: "Blue Pompom"};
paper_crumbs[334] = {type: HAND, cost: 170, is_member: true, name: "Cane"};
paper_crumbs[335] = {type: HAND, cost: 0, is_member: false, name: "Maracas"};
paper_crumbs[336] = {type: HAND, cost: 0, is_member: false, name: "Lollipop"};
paper_crumbs[337] = {type: HAND, cost: 0, is_member: false, name: "Festive Maracas"};
paper_crumbs[338] = {type: HAND, cost: 975, is_member: true, name: "Black Electric Guitar"};
paper_crumbs[339] = {type: HAND, cost: 0, is_member: false, name: "Friendship Bracelet"};
paper_crumbs[340] = {type: HAND, cost: 120, is_member: true, name: "Drumsticks"};
paper_crumbs[341] = {type: HAND, cost: 100, is_member: true, name: "Flower Basket"};
paper_crumbs[342] = {type: HAND, cost: 300, is_member: true, name: "Snow Shovel"};
paper_crumbs[343] = {type: HAND, cost: 450, is_member: true, name: "Violin"};
paper_crumbs[344] = {type: HAND, cost: 0, is_member: true, name: "Life Ring"};
paper_crumbs[345] = {type: HAND, cost: 0, is_member: false, name: "Blue Water Wings"};
paper_crumbs[346] = {type: HAND, cost: 0, is_member: false, name: "Fishing Rod"};
paper_crumbs[347] = {type: HAND, cost: 120, is_member: true, name: "Flashlight"};
paper_crumbs[348] = {type: HAND, cost: 0, is_member: false, name: "Marshmallow Stick"};
paper_crumbs[349] = {type: HAND, cost: 250, is_member: true, name: "Tennis Racket"};
paper_crumbs[350] = {type: HAND, cost: 0, is_member: false, name: "Cotton Candy"};
paper_crumbs[713] = {type: HAND, cost: 300, is_member: true, name: "Pink Purse"};
paper_crumbs[715] = {type: HAND, cost: 200, is_member: true, name: "Gold Bracelets"};
paper_crumbs[716] = {type: HAND, cost: 300, is_member: true, name: "Crook & Flail"};
paper_crumbs[717] = {type: HAND, cost: 300, is_member: true, name: "Baseball Glove"};
paper_crumbs[718] = {type: HAND, cost: 250, is_member: true, name: "Crystal Staff"};
paper_crumbs[719] = {type: HAND, cost: 300, is_member: true, name: "Basketball"};
paper_crumbs[723] = {type: HAND, cost: 350, is_member: true, name: "Green Shield"};
paper_crumbs[724] = {type: HAND, cost: 350, is_member: true, name: "Orange Shield"};
paper_crumbs[725] = {type: HAND, cost: 350, is_member: true, name: "Purple Shield"};
paper_crumbs[726] = {type: HAND, cost: 300, is_member: true, name: "Football"};
paper_crumbs[727] = {type: HAND, cost: 300, is_member: true, name: "Soccerball"};
paper_crumbs[728] = {type: HAND, cost: 170, is_member: true, name: "Spikester Cuffs"};
paper_crumbs[730] = {type: HAND, cost: 750, is_member: true, name: "Sunburst Acoustic"};
paper_crumbs[731] = {type: HAND, cost: 600, is_member: true, name: "Pink Electric Guitar"};
paper_crumbs[732] = {type: HAND, cost: 250, is_member: true, name: "Microphone"};
paper_crumbs[351] = {type: FEET, cost: 400, is_member: true, name: "Leather Shoes"};
paper_crumbs[352] = {type: FEET, cost: 250, is_member: true, name: "Black Sneakers"};
paper_crumbs[353] = {type: FEET, cost: 180, is_member: true, name: "Ballet Shoes"};
paper_crumbs[354] = {type: FEET, cost: 300, is_member: true, name: "Clown Shoes"};
paper_crumbs[355] = {type: FEET, cost: 5, is_member: true, name: "Cement Shoes"};
paper_crumbs[357] = {type: FEET, cost: 330, is_member: true, name: "Blue Sneakers"};
paper_crumbs[358] = {type: FEET, cost: 420, is_member: true, name: "Black Dress Shoes"};
paper_crumbs[359] = {type: FEET, cost: 420, is_member: true, name: "Dress Shoes"};
paper_crumbs[360] = {type: FEET, cost: 300, is_member: true, name: "Running Shoes"};
paper_crumbs[361] = {type: FEET, cost: 300, is_member: true, name: "Snowshoes"};
paper_crumbs[362] = {type: FEET, cost: 250, is_member: true, name: "Scuba Flippers"};
paper_crumbs[363] = {type: FEET, cost: 150, is_member: true, name: "Yellow Sandals"};
paper_crumbs[364] = {type: FEET, cost: 225, is_member: true, name: "Blue Flippers"};
paper_crumbs[365] = {type: FEET, cost: 450, is_member: true, name: "Winter Boots"};
paper_crumbs[366] = {type: FEET, cost: 200, is_member: true, name: "Bunny Slippers"};
paper_crumbs[367] = {type: FEET, cost: 200, is_member: true, name: "Yellow Flippers"};
paper_crumbs[368] = {type: FEET, cost: 300, is_member: true, name: "Cowboy Boots"};
paper_crumbs[369] = {type: FEET, cost: 0, is_member: false, name: "Ice Skates"};
paper_crumbs[370] = {type: FEET, cost: 250, is_member: true, name: "Elf Shoes"};
paper_crumbs[371] = {type: FEET, cost: 320, is_member: true, name: "Skateboard"};
paper_crumbs[372] = {type: FEET, cost: 325, is_member: true, name: "Hiking Boots"};
paper_crumbs[373] = {type: FEET, cost: 280, is_member: true, name: "Rubber Boots"};
paper_crumbs[374] = {type: FEET, cost: 0, is_member: false, name: "Pirate Boots"};
paper_crumbs[375] = {type: FEET, cost: 200, is_member: true, name: "Pink Sandals"};
paper_crumbs[376] = {type: FEET, cost: 200, is_member: true, name: "Brown Sandals"};
paper_crumbs[377] = {type: FEET, cost: 260, is_member: true, name: "Blue Rollerskates"};
paper_crumbs[378] = {type: FEET, cost: 260, is_member: true, name: "Pink Rollerskates"};
paper_crumbs[379] = {type: FEET, cost: 100, is_member: true, name: "Wool Socks"};
paper_crumbs[380] = {type: FEET, cost: 250, is_member: true, name: "Fuzzy Boots"};
paper_crumbs[381] = {type: FEET, cost: 280, is_member: true, name: "Green Rubber Boots"};
paper_crumbs[382] = {type: FEET, cost: 200, is_member: true, name: "Pink Flippers"};
paper_crumbs[383] = {type: FEET, cost: 160, is_member: true, name: "Blue Flower Flipflops"};
paper_crumbs[384] = {type: FEET, cost: 150, is_member: true, name: "Green Flipflops"};
paper_crumbs[385] = {type: FEET, cost: 250, is_member: true, name: "Cleats"};
paper_crumbs[386] = {type: FEET, cost: 250, is_member: true, name: "Pink Sneakers"};
paper_crumbs[387] = {type: FEET, cost: 250, is_member: true, name: "Orange Sneakers"};
paper_crumbs[388] = {type: FEET, cost: 200, is_member: true, name: "Stardust Slippers"};
paper_crumbs[500] = {type: FLAG, cost: 20, is_member: true, name: "Canada"};
paper_crumbs[501] = {type: FLAG, cost: 20, is_member: true, name: "USA"};
paper_crumbs[502] = {type: FLAG, cost: 20, is_member: true, name: "Australia"};
paper_crumbs[503] = {type: FLAG, cost: 20, is_member: true, name: "United Kingdom"};
paper_crumbs[504] = {type: FLAG, cost: 20, is_member: true, name: "Belgium"};
paper_crumbs[505] = {type: FLAG, cost: 20, is_member: true, name: "Brazil"};
paper_crumbs[506] = {type: FLAG, cost: 20, is_member: true, name: "China"};
paper_crumbs[507] = {type: FLAG, cost: 20, is_member: true, name: "Denmark"};
paper_crumbs[508] = {type: FLAG, cost: 20, is_member: true, name: "Finland"};
paper_crumbs[509] = {type: FLAG, cost: 20, is_member: true, name: "France"};
paper_crumbs[510] = {type: FLAG, cost: 20, is_member: true, name: "Germany"};
paper_crumbs[511] = {type: FLAG, cost: 20, is_member: true, name: "Israel"};
paper_crumbs[512] = {type: FLAG, cost: 20, is_member: true, name: "Japan"};
paper_crumbs[513] = {type: FLAG, cost: 20, is_member: true, name: "Korea"};
paper_crumbs[514] = {type: FLAG, cost: 20, is_member: true, name: "Netherlands"};
paper_crumbs[515] = {type: FLAG, cost: 20, is_member: true, name: "Norway"};
paper_crumbs[516] = {type: FLAG, cost: 20, is_member: true, name: "Poland"};
paper_crumbs[517] = {type: FLAG, cost: 20, is_member: true, name: "Russia"};
paper_crumbs[518] = {type: FLAG, cost: 20, is_member: true, name: "Spain"};
paper_crumbs[519] = {type: FLAG, cost: 20, is_member: true, name: "Sweden"};
paper_crumbs[520] = {type: FLAG, cost: 20, is_member: true, name: "Switzerland"};
paper_crumbs[521] = {type: FLAG, cost: 20, is_member: true, name: "Turkey"};
paper_crumbs[522] = {type: FLAG, cost: 20, is_member: true, name: "Mexico"};
paper_crumbs[523] = {type: FLAG, cost: 20, is_member: true, name: "New Zealand"};
paper_crumbs[524] = {type: FLAG, cost: 20, is_member: true, name: "Ireland"};
paper_crumbs[525] = {type: FLAG, cost: 20, is_member: true, name: "Portugal"};
paper_crumbs[526] = {type: FLAG, cost: 20, is_member: true, name: "South Africa"};
paper_crumbs[527] = {type: FLAG, cost: 20, is_member: true, name: "India"};
paper_crumbs[528] = {type: FLAG, cost: 20, is_member: true, name: "Italy"};
paper_crumbs[529] = {type: FLAG, cost: 20, is_member: true, name: "Belize"};
paper_crumbs[530] = {type: FLAG, cost: 20, is_member: true, name: "Egypt"};
paper_crumbs[531] = {type: FLAG, cost: 20, is_member: true, name: "Hungary"};
paper_crumbs[532] = {type: FLAG, cost: 20, is_member: true, name: "Antarctica"};
paper_crumbs[533] = {type: FLAG, cost: 20, is_member: true, name: "Argentina"};
paper_crumbs[534] = {type: FLAG, cost: 20, is_member: true, name: "Jamaica"};
paper_crumbs[550] = {type: FLAG, cost: 0, is_member: false, name: "Shamrock"};
paper_crumbs[551] = {type: FLAG, cost: 0, is_member: false, name: "Music Note"};
paper_crumbs[552] = {type: FLAG, cost: 0, is_member: false, name: "Plant"};
paper_crumbs[553] = {type: FLAG, cost: 0, is_member: false, name: "Pizza Slice"};
paper_crumbs[554] = {type: FLAG, cost: 0, is_member: false, name: "Balloon"};
paper_crumbs[555] = {type: FLAG, cost: 0, is_member: false, name: "Mining Lantern"};
paper_crumbs[556] = {type: FLAG, cost: 0, is_member: false, name: "Beach Ball"};
paper_crumbs[557] = {type: FLAG, cost: 0, is_member: false, name: "Sun"};
paper_crumbs[558] = {type: FLAG, cost: 0, is_member: false, name: "Horse Shoe"};
paper_crumbs[559] = {type: FLAG, cost: 0, is_member: false, name: "Astro"};
paper_crumbs[560] = {type: FLAG, cost: 0, is_member: false, name: "Hockey"};
paper_crumbs[561] = {type: FLAG, cost: 0, is_member: false, name: "Soccer"};
paper_crumbs[562] = {type: FLAG, cost: 0, is_member: false, name: "Pencil"};
paper_crumbs[563] = {type: FLAG, cost: 0, is_member: false, name: "Lighthouse"};
paper_crumbs[564] = {type: FLAG, cost: 0, is_member: false, name: "Telescope"};
paper_crumbs[565] = {type: FLAG, cost: 0, is_member: false, name: "Pirate Flag"};
paper_crumbs[566] = {type: FLAG, cost: 0, is_member: false, name: "Pumpkin"};
paper_crumbs[567] = {type: FLAG, cost: 0, is_member: false, name: "Jet Pack"};
paper_crumbs[568] = {type: FLAG, cost: 0, is_member: false, name: "Life Ring"};
paper_crumbs[569] = {type: FLAG, cost: 0, is_member: false, name: "Bonfire"};
paper_crumbs[570] = {type: FLAG, cost: 50, is_member: false, name: "Christmas Tree Pin"};
paper_crumbs[571] = {type: FLAG, cost: 0, is_member: false, name: "Candy Cane"};
paper_crumbs[572] = {type: FLAG, cost: 0, is_member: false, name: "Apple"};
paper_crumbs[573] = {type: FLAG, cost: 0, is_member: false, name: "Cactus"};
paper_crumbs[574] = {type: FLAG, cost: 0, is_member: false, name: "Teddy Bear"};
paper_crumbs[575] = {type: FLAG, cost: 0, is_member: false, name: "Ice Block"};
paper_crumbs[576] = {type: FLAG, cost: 0, is_member: false, name: "Shrimp Pin"};
paper_crumbs[577] = {type: FLAG, cost: 0, is_member: false, name: "Pot of Gold"};
paper_crumbs[578] = {type: FLAG, cost: 0, is_member: false, name: "Cardboard Box"};
paper_crumbs[579] = {type: FLAG, cost: 0, is_member: false, name: "Microphone"};
paper_crumbs[580] = {type: FLAG, cost: 0, is_member: false, name: "Gem"};
paper_crumbs[581] = {type: FLAG, cost: 0, is_member: false, name: "Tulip"};
paper_crumbs[582] = {type: FLAG, cost: 0, is_member: false, name: "Starfish"};
paper_crumbs[583] = {type: FLAG, cost: 0, is_member: false, name: "Surfboard"};
paper_crumbs[584] = {type: FLAG, cost: 0, is_member: false, name: "Picnic Basket"};
paper_crumbs[585] = {type: FLAG, cost: 0, is_member: false, name: "Water Droplet"};
paper_crumbs[586] = {type: FLAG, cost: 0, is_member: false, name: "Cart"};
paper_crumbs[587] = {type: FLAG, cost: 0, is_member: false, name: "Butterfly"};
paper_crumbs[588] = {type: FLAG, cost: 0, is_member: false, name: "Tent"};
paper_crumbs[589] = {type: FLAG, cost: 0, is_member: false, name: "Baseball"};
paper_crumbs[590] = {type: FLAG, cost: 0, is_member: false, name: "Jellyfish"};
paper_crumbs[591] = {type: FLAG, cost: 0, is_member: false, name: "Circus Tent"};
paper_crumbs[592] = {type: FLAG, cost: 0, is_member: false, name: "Ping Pong Paddle"};
paper_crumbs[593] = {type: FLAG, cost: 0, is_member: false, name: "Hairbrush"};
paper_crumbs[594] = {type: FLAG, cost: 0, is_member: false, name: "Spider"};
paper_crumbs[595] = {type: FLAG, cost: 0, is_member: false, name: "UFO"};
paper_crumbs[596] = {type: FLAG, cost: 0, is_member: false, name: "Needle"};
paper_crumbs[597] = {type: FLAG, cost: 0, is_member: false, name: "Holly"};
paper_crumbs[598] = {type: FLAG, cost: 0, is_member: false, name: "Wreath"};
paper_crumbs[599] = {type: FLAG, cost: 0, is_member: false, name: "Snow Shovel"};
paper_crumbs[600] = {type: FLAG, cost: 0, is_member: false, name: "Sombrero"};
paper_crumbs[601] = {type: FLAG, cost: 0, is_member: false, name: "Rowboat"};
paper_crumbs[602] = {type: FLAG, cost: 0, is_member: false, name: "Anchor"};
paper_crumbs[603] = {type: FLAG, cost: 0, is_member: false, name: "Golden Wheel"};
paper_crumbs[604] = {type: FLAG, cost: 0, is_member: false, name: "Aqua Grabber"};
paper_crumbs[605] = {type: FLAG, cost: 0, is_member: false, name: "Book"};
paper_crumbs[606] = {type: FLAG, cost: 0, is_member: false, name: "Crayon"};
paper_crumbs[607] = {type: FLAG, cost: 0, is_member: false, name: "Pyramid"};
paper_crumbs[608] = {type: FLAG, cost: 0, is_member: false, name: "Treasure Chest"};
paper_crumbs[609] = {type: FLAG, cost: 0, is_member: false, name: "Captain\'s Quarters Key"};
paper_crumbs[610] = {type: FLAG, cost: 0, is_member: false, name: "Goblet"};
paper_crumbs[611] = {type: FLAG, cost: 0, is_member: false, name: "Anvil"};
paper_crumbs[612] = {type: FLAG, cost: 0, is_member: false, name: "Icecream Cone"};
paper_crumbs[613] = {type: FLAG, cost: 0, is_member: false, name: "Basketball"};
paper_crumbs[614] = {type: FLAG, cost: 0, is_member: false, name: "Firework Rocket"};
paper_crumbs[615] = {type: FLAG, cost: 0, is_member: false, name: "Treble Clef"};
paper_crumbs[701] = {type: HAND, cost: 400, is_member: true, name: "Flame Surfboard"};
paper_crumbs[702] = {type: HAND, cost: 400, is_member: true, name: "Daisy Surfboard"};
paper_crumbs[703] = {type: HAND, cost: 800, is_member: true, name: "Silver Surfboard"};
paper_crumbs[711] = {type: HAND, cost: 300, is_member: true, name: "Yellow Arrow Wakeboard"};
paper_crumbs[712] = {type: HAND, cost: 300, is_member: true, name: "Pink Striped Wakeboard"};
paper_crumbs[720] = {type: BODY, cost: 500, is_member: true, name: "Blue Football Jersey"};
paper_crumbs[721] = {type: BODY, cost: 500, is_member: true, name: "Red Football Jersey"};
paper_crumbs[722] = {type: BODY, cost: 300, is_member: true, name: "Referee Jersey"};
paper_crumbs[750] = {type: HAND, cost: 0, is_member: false, name: "Blue Puffle"};
paper_crumbs[751] = {type: HAND, cost: 0, is_member: true, name: "Pink Puffle"};
paper_crumbs[752] = {type: HAND, cost: 0, is_member: true, name: "Black Puffle"};
paper_crumbs[753] = {type: HAND, cost: 0, is_member: true, name: "Green Puffle"};
paper_crumbs[754] = {type: HAND, cost: 0, is_member: true, name: "Purple Puffle"};
paper_crumbs[755] = {type: HAND, cost: 0, is_member: false, name: "Red Puffle"};
paper_crumbs[756] = {type: HAND, cost: 0, is_member: true, name: "Yellow Puffle"};
paper_crumbs[800] = {type: OTHER, cost: 0, is_member: false, make_secret_agent: true, name: "Spy Phone"};
paper_crumbs[801] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 1 Medal"};
paper_crumbs[802] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Letter from Aunt Arctic"};
paper_crumbs[803] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 2 Medal"};
paper_crumbs[804] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Letter from G"};
paper_crumbs[805] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 3 Medal"};
paper_crumbs[806] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Card from Dancing Penguin"};
paper_crumbs[807] = {type: OTHER, cost: 0, is_member: false, name: "Forest Map"};
paper_crumbs[808] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 4 Medal"};
paper_crumbs[809] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Handy Penguin Award"};
paper_crumbs[810] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 5 Medal"};
paper_crumbs[811] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Box of Pizza"};
paper_crumbs[812] = {type: OTHER, cost: 0, is_member: false, name: "Coins For Change Card"};
paper_crumbs[813] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 6 Medal"};
paper_crumbs[814] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Magnet Blueprints"};
paper_crumbs[815] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 7 Medal"};
paper_crumbs[816] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Blue Pennant"};
paper_crumbs[817] = {type: OTHER, cost: 0, is_member: false, is_medal: true, name: "Mission 8 Medal"};
paper_crumbs[818] = {type: OTHER, cost: 0, is_member: false, is_gift: true, name: "Cool Gift"};
paper_crumbs[901] = {type: PHOTO, cost: 60, is_member: false, name: "Heart Background"};
paper_crumbs[902] = {type: PHOTO, cost: 60, is_member: false, name: "Flower Background"};
paper_crumbs[903] = {type: PHOTO, cost: 60, is_member: false, name: "Nightime Background"};
paper_crumbs[904] = {type: PHOTO, cost: 60, is_member: false, name: "Clouds Background"};
paper_crumbs[905] = {type: PHOTO, cost: 60, is_member: false, name: "Cut-out Background"};
paper_crumbs[906] = {type: PHOTO, cost: 60, is_member: false, name: "Target Background"};
paper_crumbs[907] = {type: PHOTO, cost: 60, is_member: false, name: "Camo Background"};
paper_crumbs[908] = {type: PHOTO, cost: 60, is_member: false, name: "Lined Paper Background"};
paper_crumbs[909] = {type: PHOTO, cost: 60, is_member: false, name: "Pink Hawaiian Background"};
paper_crumbs[910] = {type: PHOTO, cost: 60, is_member: false, name: "Blue Hawaiian Background"};
paper_crumbs[911] = {type: PHOTO, cost: 60, is_member: false, name: "Oasis Background"};
paper_crumbs[912] = {type: PHOTO, cost: 60, is_member: false, name: "Beach Background"};
paper_crumbs[913] = {type: PHOTO, cost: 60, is_member: false, name: "Western Sunset Background"};
paper_crumbs[914] = {type: PHOTO, cost: 60, is_member: false, name: "Corral Background"};
paper_crumbs[915] = {type: PHOTO, cost: 60, is_member: false, name: "Saloon Background"};
paper_crumbs[916] = {type: PHOTO, cost: 60, is_member: false, name: "Stagecoach Background"};
paper_crumbs[917] = {type: PHOTO, cost: 60, is_member: false, name: "Band Background"};
paper_crumbs[918] = {type: PHOTO, cost: 60, is_member: false, name: "Soccer Background"};
paper_crumbs[919] = {type: PHOTO, cost: 60, is_member: false, name: "Hockey Background"};
paper_crumbs[920] = {type: PHOTO, cost: 60, is_member: false, name: "Basketball Background"};
paper_crumbs[921] = {type: PHOTO, cost: 60, is_member: false, name: "Gymnastic Background"};
paper_crumbs[922] = {type: PHOTO, cost: 60, is_member: false, name: "Blue Vines Background"};
paper_crumbs[923] = {type: PHOTO, cost: 60, is_member: false, name: "Brick Background"};
paper_crumbs[924] = {type: PHOTO, cost: 60, is_member: false, name: "Underwater Background"};
paper_crumbs[925] = {type: PHOTO, cost: 60, is_member: false, name: "Puffle Background"};
paper_crumbs[926] = {type: PHOTO, cost: 60, is_member: false, name: "Lighthouse Background"};
paper_crumbs[927] = {type: PHOTO, cost: 60, is_member: false, name: "Autumn Leaves Background"};
paper_crumbs[928] = {type: PHOTO, cost: 60, is_member: false, name: "Pumpkin Patch Background"};
paper_crumbs[929] = {type: PHOTO, cost: 60, is_member: false, name: "Igloo Background"};
paper_crumbs[930] = {type: PHOTO, cost: 60, is_member: false, name: "Launchpad Background"};
paper_crumbs[931] = {type: PHOTO, cost: 60, is_member: false, name: "Zigzag Background"};
paper_crumbs[932] = {type: PHOTO, cost: 60, is_member: false, name: "Winter Background"};
paper_crumbs[933] = {type: PHOTO, cost: 60, is_member: false, name: "Gift Wrap Background"};
paper_crumbs[934] = {type: PHOTO, cost: 60, is_member: false, name: "Christmas Background"};
paper_crumbs[935] = {type: PHOTO, cost: 60, is_member: false, name: "Snowflakes Background"};
paper_crumbs[936] = {type: PHOTO, cost: 60, is_member: false, name: "Ice Fishing Background"};
paper_crumbs[937] = {type: PHOTO, cost: 60, is_member: false, name: "Disco Background"};
paper_crumbs[938] = {type: PHOTO, cost: 60, is_member: false, name: "Mexican Background"};
paper_crumbs[939] = {type: PHOTO, cost: 60, is_member: false, name: "Aurora Background"};
paper_crumbs[940] = {type: PHOTO, cost: 60, is_member: false, name: "Snowman Background"};
paper_crumbs[941] = {type: PHOTO, cost: 60, is_member: false, name: "Lace Background"};
paper_crumbs[942] = {type: PHOTO, cost: 60, is_member: false, name: "Melting Background"};
paper_crumbs[943] = {type: PHOTO, cost: 60, is_member: false, name: "Springtime Background"};
paper_crumbs[944] = {type: PHOTO, cost: 60, is_member: false, name: "Pizza Splat Background"};
paper_crumbs[945] = {type: PHOTO, cost: 60, is_member: false, name: "Sea Monster Background"};
paper_crumbs[946] = {type: PHOTO, cost: 60, is_member: false, name: "Music Score Background"};
paper_crumbs[947] = {type: PHOTO, cost: 60, is_member: false, name: "Piano Keys Background"};
paper_crumbs[948] = {type: PHOTO, cost: 60, is_member: false, name: "Instruments Background"};
paper_crumbs[949] = {type: PHOTO, cost: 60, is_member: false, name: "Bookshelves Background"};
paper_crumbs[950] = {type: PHOTO, cost: 60, is_member: false, name: "Balloon Arch Background"};
paper_crumbs[951] = {type: PHOTO, cost: 60, is_member: false, name: "Hydro Hopper Background"};
paper_crumbs[952] = {type: PHOTO, cost: 60, is_member: false, name: "Picnic Background"};
paper_crumbs[953] = {type: PHOTO, cost: 60, is_member: false, name: "Surfboards Background"};
paper_crumbs[954] = {type: PHOTO, cost: 60, is_member: false, name: "Fish Background"};
paper_crumbs[955] = {type: PHOTO, cost: 60, is_member: false, name: "Campfire Background"};
paper_crumbs[956] = {type: PHOTO, cost: 60, is_member: false, name: "Jigsaw Background"};
paper_crumbs[957] = {type: PHOTO, cost: 60, is_member: false, name: "Water Balloon Background"};
paper_crumbs[958] = {type: PHOTO, cost: 60, is_member: false, name: "Splash Background"};
paper_crumbs[959] = {type: PHOTO, cost: 60, is_member: false, name: "Rockhopper Background"};
paper_crumbs[960] = {type: PHOTO, cost: 60, is_member: false, name: "Map Background"};
paper_crumbs[961] = {type: PHOTO, cost: 60, is_member: false, name: "Tent Background"};
paper_crumbs[962] = {type: PHOTO, cost: 60, is_member: false, name: "Lemonade Stand Background"};
paper_crumbs[963] = {type: PHOTO, cost: 60, is_member: false, name: "Fireflies Background"};
paper_crumbs[964] = {type: PHOTO, cost: 60, is_member: false, name: "Camping Background"};
paper_crumbs[965] = {type: PHOTO, cost: 60, is_member: false, name: "Baseball Background"};
paper_crumbs[966] = {type: PHOTO, cost: 60, is_member: false, name: "Apples Background"};
paper_crumbs[967] = {type: PHOTO, cost: 60, is_member: false, name: "Dock Jumping Background"};
paper_crumbs[968] = {type: PHOTO, cost: 60, is_member: false, name: "Wakeboard Background"};
paper_crumbs[969] = {type: PHOTO, cost: 60, is_member: false, name: "Sunset Background"};
paper_crumbs[970] = {type: PHOTO, cost: 60, is_member: false, name: "Teddy Bear Background"};
paper_crumbs[971] = {type: PHOTO, cost: 60, is_member: false, name: "Spooky Trees Background"};
paper_crumbs[972] = {type: PHOTO, cost: 60, is_member: false, name: "Igloo Door Background"};
paper_crumbs[973] = {type: PHOTO, cost: 60, is_member: false, name: "Candy Background"};
paper_crumbs[974] = {type: PHOTO, cost: 60, is_member: false, name: "Football Background"};
paper_crumbs[975] = {type: PHOTO, cost: 60, is_member: false, name: "Mountaintop Background"};
paper_crumbs[976] = {type: PHOTO, cost: 60, is_member: false, name: "Jetpack Background"};
paper_crumbs[977] = {type: PHOTO, cost: 60, is_member: false, name: "Snapshots Background"};
paper_crumbs[978] = {type: PHOTO, cost: 60, is_member: false, name: "Christmas Trees Background"};
paper_crumbs[979] = {type: PHOTO, cost: 60, is_member: false, name: "Plaid Background"};
paper_crumbs[980] = {type: PHOTO, cost: 60, is_member: false, name: "Blossom Background"};
paper_crumbs[981] = {type: PHOTO, cost: 60, is_member: false, name: "Blue Stars Background"};
paper_crumbs[982] = {type: PHOTO, cost: 60, is_member: false, name: "Bamboo Background"};
paper_crumbs[983] = {type: PHOTO, cost: 60, is_member: false, name: "Sunflowers Background"};
paper_crumbs[984] = {type: PHOTO, cost: 60, is_member: false, name: "Space Background"};
paper_crumbs[985] = {type: PHOTO, cost: 60, is_member: false, name: "Emotes Background"};
paper_crumbs[986] = {type: PHOTO, cost: 60, is_member: false, name: "Snow Forts Background"};
paper_crumbs[987] = {type: PHOTO, cost: 60, is_member: false, name: "Adventure Background"};
paper_crumbs[988] = {type: PHOTO, cost: 60, is_member: false, name: "Castle Background"};
paper_crumbs[989] = {type: PHOTO, cost: 60, is_member: false, name: "Tabard Background"};
paper_crumbs[990] = {type: PHOTO, cost: 60, is_member: false, name: "Twelfth Fish Background"};
paper_crumbs[991] = {type: PHOTO, cost: 60, is_member: false, name: "Fresco Waves Background"};
paper_crumbs[992] = {type: PHOTO, cost: 60, is_member: false, name: "Volcanic"};
paper_crumbs[993] = {type: PHOTO, cost: 60, is_member: false, name: "Sports Equipment Background"};
paper_crumbs[994] = {type: PHOTO, cost: 60, is_member: false, name: "Karaoke Background"};
paper_crumbs[995] = {type: PHOTO, cost: 60, is_member: false, name: "Cityscape Background"};
var player_colours = new Object();
player_colours[0] = "0x003366";
player_colours[1] = "0x003366";
player_colours[2] = "0x009900";
player_colours[3] = "0xFF3399";
player_colours[4] = "0x333333";
player_colours[5] = "0xCC0000";
player_colours[6] = "0xFF6600";
player_colours[7] = "0xFFCC00";
player_colours[8] = "0x660099";
player_colours[9] = "0x996600";
player_colours[10] = "0xFF6666";
player_colours[11] = "0x006600";
player_colours[12] = "0x0099CC";
player_colours[13] = "0x8AE302";
var frame_hacks = new Object();
frame_hacks[25] = [{head: 0, face: 133, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 39}, {head: 0, face: 134, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 39}, {head: 0, face: 0, neck: 0, body: 722, hand: 0, feet: 0, secret_frame: 39}, {head: 428, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 39}, {head: 0, face: 124, neck: 315, body: 766, hand: 0, feet: 0, secret_frame: 39}, {head: 0, face: 123, neck: 302, body: 765, hand: 0, feet: 0, secret_frame: 39}, {head: 464, face: 0, neck: 0, body: 785, hand: 0, feet: 0, secret_frame: 39}, {head: 0, face: 0, neck: 195, body: 0, hand: 0, feet: 0, secret_frame: 48}, {head: 0, face: 0, neck: 0, body: 0, hand: 716, feet: 0, secret_frame: 49}, {head: 666, face: 0, neck: 0, body: 788, hand: 716, feet: 0, secret_frame: 49}, {head: 666, face: 0, neck: 0, body: 0, hand: 716, feet: 0, secret_frame: 49}, {head: 0, face: 0, neck: 0, body: 789, hand: 716, feet: 0, secret_frame: 49}, {head: 666, face: 0, neck: 0, body: 789, hand: 716, feet: 0, secret_frame: 49}, {head: 0, face: 0, neck: 0, body: 788, hand: 716, feet: 0, secret_frame: 49}];
frame_hacks[26] = [{head: 0, face: 0, neck: 0, body: 212, hand: 0, feet: 0, secret_frame: 32}, {head: 0, face: 0, neck: 171, body: 0, hand: 0, feet: 0, secret_frame: 32}, {head: 0, face: 0, neck: 171, body: 212, hand: 0, feet: 0, secret_frame: 32}, {head: 0, face: 0, neck: 193, body: 0, hand: 0, feet: 0, secret_frame: 32}, {head: 0, face: 0, neck: 193, body: 212, hand: 0, feet: 0, secret_frame: 32}, {head: 424, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 33}, {head: 424, face: 0, neck: 0, body: 240, hand: 0, feet: 0, secret_frame: 33}, {head: 424, face: 0, neck: 0, body: 263, hand: 0, feet: 0, secret_frame: 33}, {head: 0, face: 0, neck: 0, body: 262, hand: 0, feet: 0, secret_frame: 34}, {head: 0, face: 0, neck: 0, body: 250, hand: 0, feet: 0, secret_frame: 34}, {head: 422, face: 0, neck: 0, body: 250, hand: 0, feet: 0, secret_frame: 34}, {head: 407, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 35}, {head: 407, face: 0, neck: 0, body: 0, hand: 753, feet: 0, secret_frame: 35}, {head: 431, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 35}, {head: 431, face: 0, neck: 0, body: 0, hand: 753, feet: 0, secret_frame: 35}, {head: 403, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 36}, {head: 429, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 36}, {head: 674, face: 0, neck: 0, body: 0, hand: 0, feet: 0, secret_frame: 36}, {head: 403, face: 0, neck: 0, body: 0, hand: 752, feet: 0, secret_frame: 36}, {head: 429, face: 0, neck: 0, body: 0, hand: 752, feet: 0, secret_frame: 36}, {head: 674, face: 0, neck: 0, body: 0, hand: 752, feet: 0, secret_frame: 36}, {head: 403, face: 0, neck: 0, body: 770, hand: 0, feet: 0, secret_frame: 36}, {head: 429, face: 0, neck: 0, body: 770, hand: 0, feet: 0, secret_frame: 36}, {head: 674, face: 0, neck: 0, body: 770, hand: 0, feet: 0, secret_frame: 36}, {head: 403, face: 0, neck: 0, body: 770, hand: 752, feet: 0, secret_frame: 36}, {head: 429, face: 0, neck: 0, body: 770, hand: 752, feet: 0, secret_frame: 36}, {head: 674, face: 0, neck: 0, body: 770, hand: 752, feet: 0, secret_frame: 36}, {head: 0, face: 0, neck: 0, body: 292, hand: 325, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 292, hand: 0, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 297, hand: 325, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 297, hand: 0, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 274, hand: 325, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 274, hand: 0, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 292, hand: 345, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 274, hand: 345, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 297, hand: 345, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 0, hand: 325, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 0, hand: 345, feet: 0, secret_frame: 37}, {head: 0, face: 0, neck: 0, body: 0, hand: 327, feet: 0, secret_frame: 38}, {head: 404, face: 0, neck: 0, body: 0, hand: 327, feet: 0, secret_frame: 38}, {head: 433, face: 0, neck: 0, body: 0, hand: 327, feet: 0, secret_frame: 38}, {head: 434, face: 0, neck: 0, body: 0, hand: 327, feet: 0, secret_frame: 38}, {head: 474, face: 0, neck: 0, body: 247, hand: 0, feet: 0, secret_frame: 40}, {head: 474, face: 0, neck: 0, body: 247, hand: 0, feet: 354, secret_frame: 40}, {head: 0, face: 0, neck: 0, body: 287, hand: 0, feet: 0, secret_frame: 41}, {head: 433, face: 0, neck: 0, body: 287, hand: 0, feet: 0, secret_frame: 41}, {head: 0, face: 0, neck: 0, body: 0, hand: 335, feet: 0, secret_frame: 42}, {head: 0, face: 0, neck: 0, body: 0, hand: 337, feet: 0, secret_frame: 42}, {head: 0, face: 0, neck: 0, body: 0, hand: 340, feet: 0, secret_frame: 43}, {head: 0, face: 0, neck: 180, body: 0, hand: 340, feet: 0, secret_frame: 43}, {head: 495, face: 0, neck: 0, body: 0, hand: 340, feet: 0, secret_frame: 43}, {head: 495, face: 0, neck: 180, body: 0, hand: 340, feet: 0, secret_frame: 43}, {head: 0, face: 0, neck: 0, body: 0, hand: 233, feet: 0, secret_frame: 44}, {head: 0, face: 0, neck: 0, body: 0, hand: 234, feet: 0, secret_frame: 44}, {head: 0, face: 0, neck: 0, body: 0, hand: 338, feet: 0, secret_frame: 44}, {head: 0, face: 0, neck: 0, body: 0, hand: 343, feet: 0, secret_frame: 44}, {head: 0, face: 0, neck: 0, body: 0, hand: 730, feet: 0, secret_frame: 44}, {head: 0, face: 0, neck: 0, body: 0, hand: 731, feet: 0, secret_frame: 44}, {head: 495, face: 0, neck: 0, body: 0, hand: 233, feet: 0, secret_frame: 44}, {head: 495, face: 0, neck: 0, body: 0, hand: 234, feet: 0, secret_frame: 44}, {head: 495, face: 0, neck: 0, body: 0, hand: 338, feet: 0, secret_frame: 44}, {head: 495, face: 0, neck: 0, body: 0, hand: 343, feet: 0, secret_frame: 44}, {head: 495, face: 0, neck: 0, body: 0, hand: 730, feet: 0, secret_frame: 44}, {head: 495, face: 0, neck: 0, body: 0, hand: 731, feet: 0, secret_frame: 44}, {head: 0, face: 0, neck: 0, body: 293, hand: 0, feet: 0, secret_frame: 45}, {head: 495, face: 0, neck: 0, body: 293, hand: 0, feet: 0, secret_frame: 45}, {head: 0, face: 0, neck: 0, body: 299, hand: 0, feet: 0, secret_frame: 46}, {head: 465, face: 0, neck: 0, body: 299, hand: 0, feet: 0, secret_frame: 46}, {head: 0, face: 0, neck: 0, body: 798, hand: 0, feet: 0, secret_frame: 50}, {head: 0, face: 0, neck: 0, body: 0, hand: 727, feet: 0, secret_frame: 51}, {head: 0, face: 0, neck: 0, body: 0, hand: 727, feet: 385, secret_frame: 51}, {head: 0, face: 0, neck: 0, body: 775, hand: 727, feet: 0, secret_frame: 51}, {head: 0, face: 0, neck: 0, body: 775, hand: 727, feet: 385, secret_frame: 51}, {head: 0, face: 0, neck: 0, body: 778, hand: 727, feet: 0, secret_frame: 51}, {head: 0, face: 0, neck: 0, body: 778, hand: 727, feet: 385, secret_frame: 51}, {head: 0, face: 0, neck: 0, body: 846, hand: 0, feet: 0, secret_frame: 52}, {head: 0, face: 0, neck: 214, body: 846, hand: 0, feet: 0, secret_frame: 52}, {head: 0, face: 0, neck: 216, body: 846, hand: 0, feet: 0, secret_frame: 52}];
var global_path = new Object();
var root_path = shell.getRootPath();
var global_content = shell.getGlobalContentPath();
var game_content = shell.getGameContentPath();
var mission_content = shell.getMissionContentPath();
global_path.puffle_cookie = global_content + "/puffle/icons/cookie1.swf";
global_path.puffle_food = global_content + "/puffle/icons/food1.swf";
global_path.puffle_bath = global_content + "/puffle/icons/bath1.swf";
global_path.puffle_gum = global_content + "/puffle/icons/gum1.swf";
global_path.binoculars = global_content + "/binoculars/200801.swf";
global_path.telescope = global_content + "/telescope/empty.swf";
global_path.clothing_sprites = global_content + "/clothing/sprites/";
global_path.clothing_photos = global_content + "/clothing/photos/";
global_path.clothing_paper = global_content + "/clothing/paper/";
global_path.clothing_icons = global_content + "/clothing/icons/";
global_path.clothing_book1 = global_content + "/clothing/books/news1.swf";
global_path.map = global_content + "/content/map2.swf";
global_path.igloo_map = global_content + "/content/igloo_map2.swf";
global_path.archives = global_content + "/content/archives60.swf";
global_path.penguin = global_content + "/penguin/22.swf";
global_path.music = global_content + "/music/";
global_path.igloo_music = global_content + "/content/igloo_music2.swf";
global_path.puffle0 = global_content + "/puffle/sprites/blue1.swf";
global_path.puffle1 = global_content + "/puffle/sprites/pink1.swf";
global_path.puffle2 = global_content + "/puffle/sprites/black1.swf";
global_path.puffle3 = global_content + "/puffle/sprites/green1.swf";
global_path.puffle4 = global_content + "/puffle/sprites/purple1.swf";
global_path.puffle5 = global_content + "/puffle/sprites/red1.swf";
global_path.puffle6 = global_content + "/puffle/sprites/yellow1.swf";
global_path.puffle0_icon = global_content + "/puffle/icons/blue1.swf";
global_path.puffle1_icon = global_content + "/puffle/icons/pink1.swf";
global_path.puffle2_icon = global_content + "/puffle/icons/black1.swf";
global_path.puffle3_icon = global_content + "/puffle/icons/green1.swf";
global_path.puffle4_icon = global_content + "/puffle/icons/purple1.swf";
global_path.puffle5_icon = global_content + "/puffle/icons/red1.swf";
global_path.puffle6_icon = global_content + "/puffle/icons/yellow1.swf";
global_path.igloo_art = global_content + "/igloo/igloos/";
global_path.igloo_icons = global_content + "/igloo/icons/";
global_path.igloo_flooring = global_content + "/igloo/flooring/";
global_path.wall_box_animation = global_content + "/igloo/assets/wall_box_animation.swf";
global_path.room_box_animation = global_content + "/igloo/assets/room_box_animation.swf";
global_path.furniture_icons = global_content + "/furniture/icons/";
global_path.furniture_sprites = global_content + "/furniture/sprites/";
global_path.town = global_content + "/rooms/town60.swf";
global_path.coffee = global_content + "/rooms/coffee60.swf";
global_path.book = global_content + "/rooms/book60.swf";
global_path.dance = global_content + "/rooms/0718/dance60.swf";
global_path.lounge = global_content + "/rooms/lounge60.swf";
global_path.shop = global_content + "/rooms/shop60.swf";
global_path.dojo = global_content + "/rooms/dojo60.swf";
global_path.boiler = global_content + "/rooms/boiler60.swf";
global_path.plaza = global_content + "/rooms/plaza/squidzoid60.swf";
global_path.pet = global_content + "/rooms/pet60.swf";
global_path.stage = global_content + "/rooms/stages/squidzoid60.swf";
global_path.pizza = global_content + "/rooms/pizza60.swf";
global_path.village = global_content + "/rooms/village60.swf";
global_path.lodge = global_content + "/rooms/lodge60.swf";
global_path.attic = global_content + "/rooms/attic60.swf";
global_path.sport = global_content + "/rooms/sport60.swf";
global_path.mtn = global_content + "/rooms/mtn60.swf";
global_path.forts = global_content + "/rooms/forts60.swf";
global_path.rink = global_content + "/rooms/0709/rink60.swf";
global_path.dock = global_content + "/rooms/dock60.swf";
global_path.beach = global_content + "/rooms/beach60.swf";
global_path.light = global_content + "/rooms/light60.swf";
global_path.beacon = global_content + "/rooms/beacon60.swf";
global_path.forest = global_content + "/rooms/forest60.swf";
global_path.agent = global_content + "/rooms/agent61.swf";
global_path.berg = global_content + "/rooms/berg60.swf";
global_path.cove = global_content + "/rooms/cove60.swf";
global_path.cave = global_content + "/rooms/pins/20080718_cave60.swf";
global_path.mine = global_content + "/rooms/mine60.swf";
global_path.shack = global_content + "/rooms/shack60.swf";
global_path.aqua = game_content + "/sub/game9.swf";
global_path.astro = game_content + "/astro/game45.swf";
global_path.beans = game_content + "/beans/game20.swf";
global_path.book1 = game_content + "/book1/game4.swf";
global_path.book2 = game_content + "/book2/game2.swf";
global_path.cart = game_content + "/mine/game17.swf";
global_path.fish = game_content + "/fish/game34.swf";
global_path.hydro = game_content + "/hydro/game39.swf";
global_path.jetpack = game_content + "/jetpack/game33.swf";
global_path.pizzatron = game_content + "/pizza/game8.swf";
global_path.roundup = game_content + "/roundup/game41.swf";
global_path.thinice = game_content + "/thinice/game6.swf";
global_path.waves = game_content + "/waves/game10.swf";
global_path.mancala = game_content + "/mancala/game34.swf";
global_path.four = game_content + "/four/game7.swf";
global_path.sled = game_content + "/sled/sled34.swf";
global_path.mission1 = game_content + "/quests/q1/quest105.swf";
global_path.mission2 = game_content + "/quests/q2/quest207.swf";
global_path.mission3 = game_content + "/quests/q3/quest305.swf";
global_path.mission4 = game_content + "/quests/q4/quest405.swf";
global_path.mission5 = game_content + "/quests/q5/quest506.swf";
global_path.mission6 = game_content + "/quests/q6/quest605.swf";
global_path.mission7 = game_content + "/quests/q7/quest704.swf";
global_path.mission8 = game_content + "/quests/q8/quest802.swf";
var servers = new Object();
servers[100] = {name: "Blizzard", ip: "64.224.215.12", is_safe: false, port: 3724};
servers[101] = {name: "Ice Berg", ip: "64.224.215.13", is_safe: false, port: 3724};
servers[102] = {name: "White Out", ip: "64.224.215.14", is_safe: false, port: 3724};
servers[103] = {name: "Slushy", ip: "64.224.215.8", is_safe: false, port: 3724};
servers[104] = {name: "Flurry", ip: "64.224.215.10", is_safe: false, port: 3724};
servers[105] = {name: "Snow Angel", ip: "64.224.215.11", is_safe: false, port: 3724};
servers[106] = {name: "Snow Day", ip: "64.224.215.17", is_safe: false, port: 3724};
servers[107] = {name: "Frostbite", ip: "64.224.215.18", is_safe: false, port: 3724};
servers[108] = {name: "Icicle", ip: "64.224.215.16", is_safe: false, port: 3724};
servers[109] = {name: "Tundra", ip: "64.224.215.9", is_safe: false, port: 3724};
servers[110] = {name: "Snow Cone", ip: "64.224.215.19", is_safe: false, port: 3724};
servers[111] = {name: "Alpine", ip: "64.224.215.20", is_safe: false, port: 3724};
servers[112] = {name: "Ice Breaker", ip: "64.224.215.15", is_safe: false, port: 9875};
servers[113] = {name: "Snow Globe", ip: "64.224.215.25", is_safe: false, port: 3724};
servers[114] = {name: "Snow Fort", ip: "64.224.215.23", is_safe: false, port: 3724};
servers[115] = {name: "Mammoth", ip: "64.224.215.21", is_safe: false, port: 3724};
servers[116] = {name: "Grizzly", ip: "64.224.215.27", is_safe: false, port: 3724};
servers[117] = {name: "Winter Land", ip: "64.224.215.28", is_safe: false, port: 3724};
servers[118] = {name: "Snow Ball", ip: "64.224.215.22", is_safe: true, port: 3724};
servers[119] = {name: "Ice Pack", ip: "64.224.215.24", is_safe: true, port: 3724};
servers[120] = {name: "Freezer", ip: "64.224.215.29", is_safe: false, port: 3724};
servers[121] = {name: "Avalanche", ip: "64.224.215.30", is_safe: false, port: 3724};
servers[122] = {name: "Powder Ball", ip: "64.224.215.31", is_safe: false, port: 3724};
servers[123] = {name: "Summit", ip: "64.224.215.43", is_safe: false, port: 9875};
servers[124] = {name: "Flippers", ip: "64.224.215.40", is_safe: false, port: 9875};
servers[125] = {name: "Yeti", ip: "64.224.215.26", is_safe: false, port: 3724};
servers[126] = {name: "Sub Zero", ip: "64.224.215.32", is_safe: false, port: 3724};
servers[127] = {name: "Ice Cold", ip: "64.224.215.34", is_safe: false, port: 3724};
servers[128] = {name: "Crystal", ip: "64.224.215.32", is_safe: false, port: 6112};
servers[129] = {name: "Snow Bank", ip: "64.224.215.33", is_safe: false, port: 6112};
servers[130] = {name: "Ice Palace", ip: "64.224.215.34", is_safe: false, port: 6112};
servers[131] = {name: "Tuxedo", ip: "64.224.215.35", is_safe: false, port: 3724};
servers[132] = {name: "Abominable", ip: "64.224.215.35", is_safe: false, port: 6112};
servers[133] = {name: "Half Pipe", ip: "64.224.215.36", is_safe: false, port: 3724};
servers[134] = {name: "Snow Board", ip: "64.224.215.36", is_safe: false, port: 6112};
servers[135] = {name: "Alaska", ip: "64.224.215.37", is_safe: false, port: 3724};
servers[136] = {name: "Thermal", ip: "64.224.215.37", is_safe: false, port: 6112};
servers[137] = {name: "Toboggan", ip: "64.224.215.38", is_safe: false, port: 3724};
servers[138] = {name: "Husky", ip: "64.224.215.38", is_safe: false, port: 6112};
servers[139] = {name: "Snow Plow", ip: "64.224.215.44", is_safe: false, port: 3724};
servers[140] = {name: "Ice Age", ip: "64.224.215.44", is_safe: false, port: 6112};
servers[141] = {name: "Sabertooth", ip: "64.224.215.27", is_safe: false, port: 6112};
servers[142] = {name: "Parka", ip: "64.224.215.22", is_safe: false, port: 6112};
servers[143] = {name: "Hibernate", ip: "64.224.215.28", is_safe: false, port: 6112};
servers[144] = {name: "Sleet", ip: "64.224.215.14", is_safe: false, port: 6112};
servers[145] = {name: "Vanilla", ip: "64.224.215.8", is_safe: false, port: 6112};
servers[146] = {name: "Christmas", ip: "64.224.215.10", is_safe: false, port: 6112};
servers[147] = {name: "Klondike", ip: "64.224.215.11", is_safe: false, port: 6112};
servers[148] = {name: "Icebound", ip: "64.224.215.17", is_safe: false, port: 6112};
servers[149] = {name: "Marshmallow", ip: "64.224.215.18", is_safe: false, port: 6112};
servers[150] = {name: "White House", ip: "64.224.215.25", is_safe: false, port: 6112};
servers[151] = {name: "Fjord", ip: "64.224.215.23", is_safe: false, port: 6112};
servers[152] = {name: "Big Foot", ip: "64.224.215.21", is_safe: false, port: 6112};
servers[153] = {name: "Ice Cream", ip: "64.224.215.19", is_safe: true, port: 9875};
servers[154] = {name: "Bubblegum", ip: "64.224.215.13", is_safe: true, port: 9875};
servers[155] = {name: "Rocky Road", ip: "64.224.215.12", is_safe: false, port: 6112};
servers[156] = {name: "Rainbow", ip: "64.224.215.9", is_safe: false, port: 6112};
servers[157] = {name: "Arctic", ip: "64.224.215.15", is_safe: false, port: 3724};
servers[158] = {name: "Shiver", ip: "64.224.215.16", is_safe: false, port: 6112};
servers[159] = {name: "Matterhorn", ip: "64.224.215.24", is_safe: false, port: 6112};
servers[160] = {name: "Bobsled", ip: "64.224.215.29", is_safe: false, port: 6112};
servers[161] = {name: "Ice Box", ip: "64.224.215.30", is_safe: false, port: 6112};
servers[162] = {name: "Bunny Hill", ip: "64.224.215.31", is_safe: false, port: 6112};
servers[163] = {name: "Walrus", ip: "64.224.215.41", is_safe: false, port: 6112};
servers[164] = {name: "Deep Snow", ip: "64.224.215.38", is_safe: false, port: 9875};
servers[165] = {name: "Altitude", ip: "64.224.215.26", is_safe: true, port: 6112};
servers[200] = {name: "North Pole", ip: "64.224.215.39", is_safe: false, port: 3724};
servers[201] = {name: "Glacier", ip: "64.224.215.40", is_safe: false, port: 3724};
servers[202] = {name: "Aurora", ip: "64.224.215.41", is_safe: false, port: 3724};
servers[203] = {name: "Mukluk", ip: "64.224.215.42", is_safe: false, port: 3724};
servers[204] = {name: "Great White", ip: "64.224.215.43", is_safe: false, port: 3724};
servers[205] = {name: "Snow Shoe", ip: "64.224.215.42", is_safe: false, port: 6112};
servers[206] = {name: "Yukon", ip: "64.224.215.40", is_safe: false, port: 6112};
servers[207] = {name: "Polar Bear", ip: "64.224.215.41", is_safe: false, port: 9875};
servers[208] = {name: "Canoe", ip: "64.224.215.39", is_safe: true, port: 6112};
servers[209] = {name: "Chinook", ip: "64.224.215.43", is_safe: false, port: 6112};
servers[210] = {name: "Wool Socks", ip: "64.224.215.32", is_safe: false, port: 9875};
servers[211] = {name: "Snowbound", ip: "64.224.215.33", is_safe: false, port: 3724};
servers[212] = {name: "Ice Rink", ip: "64.224.215.34", is_safe: true, port: 9875};
servers[213] = {name: "Ice Pond", ip: "64.224.215.35", is_safe: false, port: 9875};
servers[214] = {name: "Snowfall", ip: "64.224.215.36", is_safe: false, port: 9875};
servers[215] = {name: "Caribou", ip: "64.224.215.37", is_safe: false, port: 9875};
servers[300] = {name: "Deep Freeze", ip: "64.224.215.9", is_safe: false, port: 9875};
servers[301] = {name: "Cold Front", ip: "64.224.215.16", is_safe: false, port: 9875};
servers[302] = {name: "Frozen", ip: "64.224.215.18", is_safe: false, port: 9875};
servers[303] = {name: "Snow Flake", ip: "64.224.215.17", is_safe: false, port: 9875};
servers[304] = {name: "Frosty", ip: "64.224.215.11", is_safe: false, port: 9875};
servers[306] = {name: "Snow Drift", ip: "64.224.215.8", is_safe: false, port: 9875};
servers[307] = {name: "Mittens", ip: "64.224.215.14", is_safe: false, port: 9875};
servers[308] = {name: "Ice Cave", ip: "64.224.215.27", is_safe: true, port: 9875};
servers[309] = {name: "Boots", ip: "64.224.215.28", is_safe: true, port: 9875};
servers[310] = {name: "Breeze", ip: "64.224.215.19", is_safe: false, port: 6112};
servers[311] = {name: "Crunch", ip: "64.224.215.20", is_safe: false, port: 9875};
servers[312] = {name: "Wind Chill", ip: "64.224.215.12", is_safe: false, port: 9875};
servers[313] = {name: "Iceland", ip: "64.224.215.25", is_safe: false, port: 9875};
servers[314] = {name: "Belly Slide", ip: "64.224.215.23", is_safe: false, port: 9875};
servers[315] = {name: "Sherbet", ip: "64.224.215.21", is_safe: false, port: 9875};
servers[400] = {name: "South Pole", ip: "64.224.215.22", is_safe: false, port: 9875};
servers[401] = {name: "Big Surf", ip: "64.224.215.24", is_safe: false, port: 9875};
servers[402] = {name: "Ice Cube", ip: "64.224.215.29", is_safe: true, port: 9875};
servers[403] = {name: "Antarctic", ip: "64.224.215.30", is_safe: false, port: 9875};
servers[404] = {name: "Kosciusko", ip: "64.224.215.31", is_safe: false, port: 9875};
servers[405] = {name: "Down Under", ip: "64.224.215.42", is_safe: false, port: 9875};
servers[406] = {name: "Beanie", ip: "64.224.215.39", is_safe: false, port: 9875};
servers[407] = {name: "Outback", ip: "64.224.215.26", is_safe: false, port: 9875};
servers[408] = {name: "Bonza", ip: "64.224.215.33", is_safe: true, port: 9875};
servers[409] = {name: "Snowy River", ip: "64.224.215.13", is_safe: false, port: 6112};
servers[410] = {name: "Big Snow", ip: "64.224.215.20", is_safe: false, port: 6112};
servers[411] = {name: "Brumby", ip: "64.224.215.15", is_safe: false, port: 6112};