
Originally Posted by
maat7043
EDIT: Anyone care to explain how the strings are handled now?
I updated the aim notifications a while ago, even commented the code, not sure what problem you had with it.. It explains nicely.
I found it in my archives (13.0 maybe?):
Code:
#set privNs "com.company.assembleegameclient.game:_-hw"
#set mouseUp "_-1V0" ; mouseup maybe? right after mousedown trait slot
#set spiral "_-1FN"
#set textObjPackage "_-0pf"
#set textObjClass "_-1TT"
#set stringCrPkg "_-0w4"
#set stringCrClass "_-Ns"
;call spiral-effect
getlocal0
getproperty QName(PackageNamespace("", "#0"), "gs_")
getproperty QName(PackageNamespace("", "#0"), "map")
getproperty QName(PackageNamespace("", "#0"), "player_")
callpropvoid QName(PackageNamespace("", "#0"), $"spiral"), 0
;get mapOverlay to call addStatusText on at the end
getlocal0
getproperty QName(PackageNamespace("", "#0"), "gs_")
getproperty QName(PackageNamespace("", "#0"), "map")
getproperty QName(PackageNamespace("", "#0"), "mapOverlay_")
;create text object
findpropstrict QName(PackageNamespace($"textObjPackage"), $"textObjClass") ;arg0
getlocal0
getproperty QName(PackageNamespace("", "#0"), "gs_")
getproperty QName(PackageNamespace("", "#0"), "map")
getproperty QName(PackageNamespace("", "#0"), "player_") ;arg1
pushint 65280 ;arg2
pushshort 2000 ;arg3
constructprop QName(PackageNamespace($"textObjPackage"), $"textObjClass"), 3 ;call
coerce QName(PackageNamespace($"textObjPackage"), $"textObjClass") ;convert
dup ;store it as addStatusText arg1
;create string
findpropstrict QName(PackageNamespace($"stringCrPkg"), $"stringCrClass")
;choose the string
getlocal0
getproperty QName(PrivateNamespace("*", $"privNs"), $"mouseUp")
iffalse AA_OFF
pushstring "Auto-Aim: On"
jump AA_CONT
AA_OFF:
pushstring "Auto-Aim: Off"
AA_CONT:
constructprop QName(PackageNamespace($"stringCrPkg"), $"stringCrClass"), 1
;change the string in the text object
callpropvoid QName(PackageNamespace("", "#0"), "setStringBuilder"), 1
;draw the text to the screen (arg0=mapOverlay objectRef, arg1=text objectRef)
callpropvoid QName(PackageNamespace("", "#0"), "addStatusText"), 1
This can be used for almost anything that has this problem..
---------- Post added at 04:00 PM ---------- Previous post was at 03:50 PM ----------
I found the thread, you even thanked the post it seems..
http://www.mpgh.net/forum/599-realm-...ml#post7848240