Add "Private Message" Menu item

Posts 1–14 of 14 · Page 1 of 1
Add "Private Message" Menu item
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
Nice tutorial; this can be very helpful if you don't want to type out their name
u are my hero JustAnoobROTMG thx for this i will add it
Amazing! You did it again jnoob.
How do you find all those man, Icant even find the first folder. Well the first thing u need to change.
Nice. Thanks for the release.
is there a way to change the icon though?
Awesome! But I would like to know how and wich program we need to use :/
awesome. would be nice if constructs could be targeted in the auto aim
Man, I hope all this ooey, gooey goodness gets baked into the next batch of clients released!
Quote Originally Posted by iwantyourkandy View Post
How do you find all those man, Icant even find the first folder. Well the first thing u need to change.
Jnoob mentioned in another thread for Windows, i dont remember the exact name but uses a similar command as Mac with 'grep' which will search for text within files, for Mac I would type:

grep -r "Unlock" ~/Desktop/rabcasm/client_1/*

I dont know if you need an app for this on Windows?
whats the procedure for seeing the source code? a decompiler? can someone explain a bit?
There are tutorials here.
Look for old threads with the [Tutorial] tag.

All you need is RABCDASM ,Astrogrep, and a text editor (NOT notepad).
And playing with.. commandline
Quote Originally Posted by JustAnoobROTMG View Post
There are tutorials here.
Look for old threads with the [Tutorial] tag.

All you need is RABCDASM ,Astrogrep, and a text editor (NOT notepad).
And playing with.. commandline
how do i add this to modselector? idk how to add it
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us