This menu item allow you to quickly start a private conversation with someone you clicked
1) You must locate the class where the menu is drawn. Easy => look for "Unlock" in files..
You will be in a method dealing with "Unlock", "Lock", "Trade" items..
For me its in _-aa\_-0BN.asasm
2) Add this just before the returnvoid AND AFTER THE LAST LXXX line !!
Code:
;-----------------------------------------------------------------------------
; ADD Private message Shortcut
;-----------------------------------------------------------------------------
findpropstrict QName(PackageNamespace("_-aa"), "_-T6")
getlex QName(PackageNamespace("com.company.util"), "AssetLibrary")
pushstring "lofiInterface2"
pushbyte 3
callproperty QName(PackageNamespace("", "#0"), "_-0U6"), 2
pushint 16777215
pushstring "Private message"
constructprop QName(PackageNamespace("_-aa"), "_-T6"), 3
coerce QName(PackageNamespace("_-aa"), "_-T6")
setlocal3
getlocal3
getlex QName(PackageNamespace("flash.events"), "MouseEvent")
getproperty QName(PackageNamespace("", "#0"), "CLICK")
getlocal0
getproperty QName(PrivateNamespace("*", "_-aa:_-0BN"), "_pmuser")
callpropvoid QName(PackageNamespace("", "#0"), "addEventListener"), 2
findpropstrict QName(ProtectedNamespace("_-81"), "_-0Fn")
getlocal3
callpropvoid QName(ProtectedNamespace("_-81"), "_-0Fn"), 1
;-------------------------------------------------------------------------------------
So if we click on the button, the method "_pmuser" will be called
Lets add it !
3) We have just edited a method.
Copy this code UNDER THE METHOD WE'VE JUST MODIFIED !
(under the end; method)
Code:
;---------------------------------------------------------------------------------
trait method QName(PrivateNamespace("*", "_-aa:_-0BN"), "_pmuser")
method
refid "_-aa:_-0BN/_pmuser"
param QName(PackageNamespace("flash.events"), "Event")
returns QName(PackageNamespace("", "#0"), "void")
body
maxstack 4
localcount 4
initscopedepth 10
maxscopedepth 11
code
; get the gameSprite
getlocal0
getproperty QName(PackageNamespace("", "#0"), "gs_")
setlocal1
;set the beginning of text
pushstring "/tell "
setlocal2
; get player name
getlocal0
getproperty QName(PackageNamespace("", "#0"), "player_")
getproperty QName(PackageNamespace("", "#0"), "name_")
setlocal3
; concat playername to /tell
getlocal2
getlocal3
add
setlocal3
; add a space
getlocal3
pushstring " "
add
setlocal3
;display textbox
getlocal 1
getproperty QName(PackageNamespace("", "#0"), "textBox_")
callpropvoid QName(PrivateNamespace("*", "com.company.assembleegameclient.ui:_-1-J#0"), "_-0WH"), 0
; set text
getlocal 1
getproperty QName(PackageNamespace("", "#0"), "textBox_")
getproperty QName(PrivateNamespace("*", "com.company.assembleegameclient.ui:_-1-J#0"), "_-XO")
getlocal 3
setproperty QName(PackageNamespace("", "#0"), "text")
; Set cursor position?
getlocal1
getproperty QName(PackageNamespace("", "#0"), "textBox_")
getproperty QName(PrivateNamespace("*", "com.company.assembleegameclient.ui:_-1-J#0"), "_-XO")
getlocal1
getproperty QName(PackageNamespace("", "#0"), "textBox_")
getproperty QName(PrivateNamespace("*", "com.company.assembleegameclient.ui:_-1-J#0"), "_-XO")
getproperty QName(PackageNamespace("", "#0"), "length")
getlocal1
getproperty QName(PackageNamespace("", "#0"), "textBox_")
getproperty QName(PrivateNamespace("*", "com.company.assembleegameclient.ui:_-1-J#0"), "_-XO")
getproperty QName(PackageNamespace("", "#0"), "length")
callpropvoid QName(PackageNamespace("", "#0"), "setSelection"), 2
findpropstrict QName(ProtectedNamespace("_-81"), "remove")
callpropvoid QName(ProtectedNamespace("_-81"), "remove"), 0
returnvoid
end ; code
end ; body
end ; method
end ; trait
;-------------------------------------------------------------------------------
If you plan to update this code, remember that you need to update
* _-aa with the folder where your file is
* _-0BN with the file name we are currently editing
* _-T6, _-81, and _-0Fn with the good names . See how the other menu items are build to find new names.
* _-1-J is the class of the "textbox_" in GameSprite class
* _-0WH is a method called in _-1-J file to display the textbox
* _-XO is the textfield property of the _-1-J object
Remember that you cant chat if you are not registered