on handleSpecialMessages(Data)
ln1 = Data.line[1]
Data = doSpecialCharConversion(Data)
if ln1 contains "OPEN_UIMAKOPPI" then
openUimakoppi()
else
if ln1 contains "CLOSE_UIMAKOPPI" then
closeUimaKoppi()
else
if ln1 contains "PH_TICKETS_BUY" then
put(Data)
member("JumpTICKETS").text = Data.getPropRef(#line, 2).getProp(#word, 1)
if the movieName contains "pellehyppy" then
openHyppylippu()
end if
else
if ln1 contains "PH_TICKETS" then
put(Data)
member("JumpTICKETS").text = ln1.getProp(#word, 2)
else
if ln1 contains "PH_NOTICKETS" then
if the movieName contains "pellehyppy" then
openHyppylippu()
end if
else
if ln1 contains "JUMPDATA" then
goJumper = void()
gPellePlayer = void()
sprite(40).undefined = []
if the frameLabel contains "jumpingplace" then
gPellePlayer = new(script("PellePlayerParent"), Data.getProp(#line, 2), Data.getProp(#line, 3))
go("jumpplay")
else
if the frameLabel contains "pool_b" then
gPellePlayer = new(script("PellePlayerParent"), Data.getProp(#line, 2), Data.getProp(#line, 3))
end if
end if
else
if ln1 contains "JUMPLIFTDOOR_OPEN" then
sendSprite(gElevatorDoorSprite, #open)
else
if ln1 contains "JUMPLIFTDOOR_CLOSE" then
sendSprite(gElevatorDoorSprite, #close)
else
if ln1 contains "JUMPINGPLACE_OK" then
go("jumpingplace")
else
if ln1 contains "FLAT_RESULTS" then
s1 = ""
s2 = ""
s3 = ""
s4 = ""
oldDelim = the itemDelimiter
if ln1 contains "BUSY" then
member("flat_results.description").text = AddTextToField("MostPopularRooms")
else
if ln1 contains "FAVORITE" then
member("flat_results.description").text = AddTextToField("FavoriteRooms")
else
member("flat_results.description").text = AddTextToField("SearchResults")
end if
end if
member("flat_results.doorstatus").text = ""
member("flat_results.names").text = ""
member("flat_results.load").text = ""
member("flats_go").text = ""
gFlats = []
the itemDelimiter = "/"
i = 2
repeat while i <= the number of line in Data
flat = Data.line[i]
if flat.length > 1 then
ownerName = flat.item[3]
if ownerName = "-" then
ownerName = ""
else
ownerName = "(" & ownerName & ")"
end if
doorMode = flat.item[4]
if doorMode = "open" then
else
if doorMode = "password" then
if the platform contains "mac" then
else
end if
else
if the platform contains "mac" then
else
end if
end if
end if
add(gFlats, [Data.line[i]])
end if
i = 1 + i
end repeat
the itemDelimiter = oldDelim
member("flat_results.load").text = s1
member("flat_results.names").text = s2
member("flat_results.doorstatus").text = s3
member("flats_go").text = s4
else
if ln1 contains "NOFLATS" then
put(Data)
if not the movieName contains "entry" then
return()
end if
member("flat_results.doorstatus").text = ""
member("flat_results.names").text = ""
member("flat_results.load").text = ""
member("flats_go").text = ""
gFlats = []
else
if ln1 contains "FLATINFO" then
p = keyValueToPropList(Data, "\r")
if voidp(gProps) then
gProps = []
end if
put(gProps)
setaProp(gProps, #doorMode, symbol(getaProp(p, "doormode")))
setaProp(gProps, #showOwnerName, getaProp(p, "showOwnerName") = "true")
setaProp(gProps, #superuser, getaProp(p, "allsuperuser") = "true")
sFrame = "roominfochange"
goContext(sFrame, gPopUpContext2)
else
if ln1 contains "YOUAREOWNER" then
gIAmOwner = 1
else
if ln1 contains "FLAT_LETIN" then
if the movieName contains "entry" then
member("flat_load.status").text = AddTextToField("DoorOpenLoading")
end if
if gChosenFlatDoorMode = "closed" then
goContext("flat_locked_opens", gPopUpContext2)
end if
if gChosenFlatDoorMode = "x" then
goContext("flat_password_ok", gPopUpContext2)
end if
updateStage()
gIAmOwner = 0
gFlatLetIn = 1
member("loading_txt").text = AddTextToField("LoadingRoom")
setBanner()
hiliter = 0
NowinUnit = "Private Room:" && member("goingto_roomname").text
member(getmemnum("room.info")).text = AddTextToField("Room") && member("goingto_roomname").text & "\r" & AddTextToField("Owner") && gChosenFlatOwner
startLoading()
goContext("FLAT_LOADING", gPopUpContext2)
else
if ln1 contains "DOORBELL_RINGING" then
openRingbellAlert(Data.line[2])
else
if ln1 contains "FLATPROPERTY" then
ln2 = Data.line[2]
oldDelim = the itemDelimiter
the itemDelimiter = "/"
parType = ln2.item[1]
parValue = ln2.item[2]
the itemDelimiter = oldDelim
put(parType, parValue)
if parType = "wallpaper" then
setWallPaper(integer(parValue))
else
if parType = "floor" then
setFloor(integer(parValue))
end if
end if
else
if ln1 contains "STUFFTYPES" then
s = ""
oldDelim = the itemDelimiter
the itemDelimiter = "/"
gpStuffTypes = []
i = 2
repeat while i <= the number of line in Data
ln = Data.line[i]
addProp(gpStuffTypes, ln.item[2], [ln.item[1], ln.item[4], ln.item[5], 0])
i = 1 + i
end repeat
the itemDelimiter = oldDelim
else
if ln1 contains "ACTIVE_OBJECTS" or ln1 contains "ACTIVEOBJECT_ADD" then
i = 2
repeat while i <= the number of line in Data
ln = Data.line[i]
if ln.length > 4 then
createActiveObject(ln)
end if
i = 1 + i
end repeat
else
if ln1 contains "STUFFDATAUPDATE" then
tSaveDelim = the itemDelimiter
the itemDelimiter = "/"
tid = Data.getPropRef(#line, 2).getProp(#item, 1)
ttype = Data.getPropRef(#line, 2).getProp(#item, 2)
tProp = Data.getPropRef(#line, 2).getProp(#item, 3)
tValue = Data.getPropRef(#line, 2).getProp(#item, 4)
the itemDelimiter = tSaveDelim
tObj = sprite(getaProp(gpObjects, ttype & tid)).getProp(#scriptInstanceList, 1)
tObj.updateStuffdata(tProp, tValue)
else
if ln1 contains "ACTIVEOBJECT_UPDATE" then
oldDelim = the itemDelimiter
the itemDelimiter = ","
objectName = Data.word[1].item[1]
if offset("*", objectName) > 0 then
objectName = objectName.char[1..offset("*", objectName) - 1] & objectName.char[offset("*", objectName) + 2..objectName.length]
end if
spr = getaProp(gpObjects, objectName)
if spr > 0 then
sendSprite(spr, #die)
end if
createActiveObject(Data.line[2], 1)
the itemDelimiter = oldDelim
gChosenStuffSprite = getObjectSprite(objectName)
else
if ln1 contains "ACTIVEOBJECT_REMOVE" then
objectName = Data.line[2]
if offset("*", objectName) > 0 then
objectName = objectName.char[1..offset("*", objectName) - 1] & objectName.char[offset("*", objectName) + 2..objectName.length]
end if
put("rem:", objectName)
spr = getaProp(gpObjects, objectName)
if spr > 0 then
sendSprite(spr, #die)
end if
else
if ln1 contains "ITEMMSG" then
itemId = integer(ln1.word[2])
o = getaProp(gpInteractiveItems, itemId)
if objectp(o) then
processItemMessage(o, Data)
end if
else
if ln1 contains "OPEN_GAMEBOARD" then
openGameBoard(Data.line[2..the number of line in Data])
else
if ln1 contains "CLOSE_GAMEBOARD" then
closeGameBoard(Data.line[2..the number of line in Data])
else
if ln1 contains "STRIPUPDATED" or ln1 contains "ADDSTRIPITEM" then
if not the movieName contains "private" then
exit
end if
sendFuseMsg("GETSTRIP new")
gChosenStripLevel = "new"
else
if ln1 contains "TRADE_ITEMS" then
if not objectp(gTraderWindow) then
gConfirmPopUp = new(script("PopUp Context Class"), 2000000000, 871, 887, point(0, 0))
displayFrame(gConfirmPopUp, "tradeItem_dialog")
sprite(882).initTrade()
sendFuseMsg("GETSTRIP new")
end if
if objectp(gTraderWindow) then
if gTraderWindow.pClosing then
sprite(882).initTrade()
sendFuseMsg("GETSTRIP new")
else
tradeItems(gTraderWindow, Data)
end if
end if
else
if ln1 contains "TRADE_ACCEPT" then
if objectp(gTraderWindow) then
tradeAccept(gTraderWindow, Data)
end if
else
if ln1 contains "TRADE_CLOSE" then
if objectp(gTraderWindow) then
tradeClose(gTraderWindow, Data)
end if
else
if ln1 contains "TRADE_COMPLETED" then
if objectp(gTraderWindow) then
tradeCompleted(gTraderWindow, Data)
end if
else
if ln1 contains "CATALOGURL" then
gWaitCatStart = the ticks
loadCatalog(Data.line[2])
gWaitCatalog = 1
else
if ln1 contains "ITEMS" then
handleAddItems(Data.line[2..the number of line in Data])
else
if ln1 contains "ADDITEM" then
oldDelim = the itemDelimiter
createItem(Data.line[2..the number of line in Data])
the itemDelimiter = oldDelim
else
if ln1 contains "UPDATEITEM" then
oldDelim = the itemDelimiter
createItem(Data.line[2..the number of line in Data], 1)
the itemDelimiter = oldDelim
else
if ln1 contains "STRIPINFO" then
if goUserStrip = void() then
goUserStrip = new(script("UserStrip Class"))
end if
handleStripData(goUserStrip, Data.line[2..the number of line in Data])
if label(gWorldType & "_hand_open") > the frame then
goToFrame(gWorldType & "_hand_open")
else
if label(gWorldType & "_hand_open") < the frame and label(gWorldType & "_hand_open_b") > the frame then
goToFrame(gWorldType & "_hand_open_b")
else
prepareHandItems(goUserStrip)
end if
end if
else
if ln1 contains "FLATCREATED" then
put("FLATCREATED")
id = Data.word[1]
gChosenFlatId = id
gFloorHost = Data.word[2]
gFloorPort = Data.word[3]
if getmemnum("roomkiosk.roomname") > 0 then
s = "roomkiosk.description" & field(0)
s = "room_password" & field(0)
s = s & "\r" & "allsuperuser=" & getaProp(gProps, #superuser)
sendEPFuseMsg("SETFLATINFO /" & id & "/" & s)
roomName = Data.line[3]
if roomName.length < 2 then
roomName = field(0)
end if
member("goingto_roomname").text = Data.line[3]
NowinUnit = "Private Room:" && member("goingto_roomname").text
member(getmemnum("room.info")).text = AddTextToField("Room") && member("goingto_roomname").text & "\r" & AddTextToField("Owner") && gMyName
s = member("roomkiosk.confirmtext").text
-- UNK_5A 21
-- UNK_5A 21
member("roomkiosk.confirmtext").text = s
goContext("confirm")
end if
else
if ln1 contains "ALLUNITS" then
UnitsIDNum = 0
the itemDelimiter = ","
gUnits = []
sort(gUnits)
num = 1
put(Data)
i = 2
repeat while i <= the number of line in Data
unit = Data.line[i]
if unit.length > 5 and not unit contains "Floor1" then
newUnit(unit, num)
num = num + 1
else
if unit contains "Floor1" then
member("privaterooms.load").text = unit.item[2]
end if
end if
i = 1 + i
end repeat
else
if ln1 contains "UNITUPDATED" then
the itemDelimiter = ","
unit = Data.line[2]
name = unit.item[1]
l = getaProp(gUnits, name)
if name contains "Floor1" then
if the movieName contains "entry" then
member("privaterooms.load").text = unit.item[2]
end if
else
if l = void() then
nothing()
else
num = l.getAt(5)
activeUsers = integer(unit.item[2])
maxUsers = integer(unit.item[3])
host = unit.item[4]
port = integer(unit.item[5])
description = unit.item[6]
UnitPropL = getaProp(gUnits, name)
UnitPropL.activeUsers = activeUsers
UnitPropL.maxUsers = maxUsers
UnitPropL.host = host
UnitPropL.port = port
UnitPropL.description = description
setProp(gUnits, name, UnitPropL)
if not name contains "Floor" then
setUnitActiveUsers(name)
else
member("privaterooms.load").text = unit.item[2]
end if
end if
end if
else
if ln1 contains "UNITMEMBERS" then
s = Data.line[2..the number of line in Data]
s2 = ""
i = 1
repeat while i <= the number of line in s
i = 1 + i
end repeat
if getmemnum("publicroom_peoplelist") > 0 then
end if
if the movieName contains "cr_entry" then
-- UNK_5A 22
end if
else
if ln1 contains "REMOVEITEM" then
itemId = integer(Data.line[2])
sendAllSprites(#itemDie, itemId)
else
if ln1 contains "FLATINFO" then
the itemDelimiter = "="
i = 2
repeat while i <= the number of line in Data
ln = Data.line[i]
sfield = ln.item[1]
sdata = ln.item[2]
if getmemnum("flatinfoshow." & sfield) > 0 then
member("flatinfoshow." & sfield).text = sdata
end if
put(sfield, sdata)
if sfield = "image" then
pictureUrl = sdata
put(pictureUrl)
end if
if sfield = "isOpen" then
if sdata = "true" then
member("flatinfoshow.open_info").text = "Door is open"
sprite(20).visible = 1
else
member("flatinfoshow.open_info").text = "Door is closed"
sprite(20).visible = 0
end if
end if
if sfield = "host" then
gFloorHost = sdata.char[offset("/", sdata) + 1..sdata.length]
end if
if sfield = "port" then
gFloorPort = sdata
end if
i = 1 + i
end repeat
the itemDelimiter = ","
else
if ln1 contains "ADVERTISEMENT" then
put("GOT AD", Data)
gAd = new(script("FUSE Advertisement Class"), Data.line[2..the number of line in Data])
else
if ln1 contains "OPLOGO" then
handleOpLogoMessage(Data)
else
if ln1 contains "SYSTEMBROADCAST" then
ShowAlert("MessageFromAdmin", Data.line[2])
else
if ln1 contains "PURCHASE_NOBALANCE" then
ShowAlert("nobalance", "You don't have enough credits!")
else
if ln1 contains "PURCHASE_OK" then
ShowAlert("BuyingOK")
else
if ln1 contains "PURCHASE_ERROR" then
ShowAlert("purchasingerror", "Purchasing error")
else
if ln1 contains "ORDERINFO_ERROR" then
put(Data)
else
if ln1 contains "ORDERINFO" then
gPurchaseCode = Data.line[2]
price = integer(value(Data.line[3]))
description = Data.line[5]
gConfirmPopUp = new(script("PopUp Context Class"), 2000020000, 851, 870, point(0, 0))
if price > gCredits then
displayFrame(gConfirmPopUp, "purchase_confirm_nocredits")
else
displayFrame(gConfirmPopUp, "purchase_confirm")
end if
else
if ln1 contains "WALLETBALANCE" then
if the movieName contains "entry" and the frame < 100 or the movieName contains "cr_entry" then
nothing()
else
puppetSound(1, "cash1")
end if
gCredits = integer(value(Data.line[2]))
member("habbo_credits").text = integer(value(Data.line[2])) && AddTextToField("Credit(s)")
member("credits_amount_e").text = "You have" && integer(value(Data.line[2])) && "Habbo Credits in your purse."
else
if ln1 contains "DOORFLAT" then
gChosenTeleport.startTeleport(Data)
else
if ln1 contains "DOORNOTINSTALLED" then
gChosenTeleport.error(Data)
else
if ln1 contains "DOORDELETED" then
gChosenTeleport.error(Data)
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
exit
end