[Tutorial] Introducing new game options - disabling ally projectiles
So, originally I did this with the Thessal Dying Message, but since I am now working on having that auto-activate upon her death, figure I'd release this version for everyone instead. I personally like options and being able to change my client on the fly, without having to make a new .swf, so this is more for finicky people like myself. I find ally-projectiles useful to see in things like Tombs etc, so yeah.
First of all, we have to duplicate a new option in the options menu, so open up _-0q1\Options.class.asasm, go to line 3126 and insert:
This creates a new On/Off button option for our end-user to be able to interact with in-game.
Next, navigate to com\company\assembleegameclient\parameters\Paramet ers.class.asasm and go to line 1559 and insert
Finally, you'll have to add a slightly update code to the Projectiles class located in com\company\assembleegameclient\objects\Projectile s.class.asasm - lines 3148 and 3727
And, of course, for the lazy here is your ModSelector file.
noAllyOptions.zip - Jotti's malware scan
https://www.virustotal.com/file/ad7a...is/1356036405/

First of all, we have to duplicate a new option in the options menu, so open up _-0q1\Options.class.asasm, go to line 3126 and insert:
Code:
;##############################
;####### Ally Options #########
;##############################
; Creates new boolean option in the "Graphics" tab of options menu for enabling/disabling ally projectiles being drawn on screen
; Default value is set in Parameters.class.asasm
getlocal0
findpropstrict QName(PackageNamespace("_-0q1"), "_-0fV")
pushstring "allyProjectiles"
findpropstrict Multiname("Vector", [PackageNamespace("__AS3__.vec")])
getproperty Multiname("Vector", [PrivateNamespace("*", "_-0q1:Options#0"), PackageNamespace("__AS3__.vec"), PrivateNamespace("*", "_-0q1:Options#1"), PackageNamespace(""), PackageNamespace("_-0q1"), PackageInternalNs("_-0q1"), Namespace("http://adobe.com/AS3/2006/builtin"), ProtectedNamespace("_-zE"), StaticProtectedNs("_-zE"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
getlex QName(PackageNamespace(""), "String")
applytype 1
pushbyte 2
construct 1
dup
pushbyte 0
pushstring "On"
setproperty MultinameL([PackageNamespace("")])
dup
pushbyte 1
pushstring "Off"
setproperty MultinameL([PackageNamespace("")])
pushtrue
pushfalse
newarray 2
pushstring "Disable Ally Projectiles"
pushstring "This toggles if the user's see ally "
pushstring "projectiles during game play."
add
pushnull
constructprop QName(PackageNamespace("_-0q1"), "_-0fV"), 6
callpropvoid QName(PrivateNamespace("*", "_-0q1:Options#0"), "_-Y0"), 1
;##############################
;######## End No-Ally #########
;##############################
Next, navigate to com\company\assembleegameclient\parameters\Paramet ers.class.asasm and go to line 1559 and insert
Code:
;##############################
;####### Ally Options #########
;##############################
findpropstrict QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-st")
pushstring "allyProjectiles"
pushtrue
callpropvoid QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-st"), 2
;##############################
;######## End No-Ally #########
;##############################
Code:
getlex QName(PackageNamespace("com.company.assembleegameclient.parameters"), "Parameters")
getproperty QName(PackageNamespace(""), "data_")
getproperty Multiname("allyProjectiles", [PrivateNamespace("*", "com.company.assembleegameclient.map:Map#0"), PackageNamespace(""), StaticProtectedNs("_-MT"), PrivateNamespace("*", "com.company.assembleegameclient.map:Map#1"), PackageNamespace("com.company.assembleegameclient.map"), PackageInternalNs("com.company.assembleegameclient.map"), Namespace("http://adobe.com/AS3/2006/builtin"), ProtectedNamespace("_-MT"), StaticProtectedNs("flash.display:Sprite"), StaticProtectedNs("flash.display:DisplayObjectContainer"), StaticProtectedNs("flash.display:InteractiveObject"), StaticProtectedNs("flash.display:DisplayObject"), StaticProtectedNs("flash.events:EventDispatcher")])
iffalse DRAWTHIS
getlex QName(PackageNamespace(""), "map_")
getproperty QName(PackageNamespace(""), "player_")
getproperty QName(PackageNamespace(""), "objectId_")
getlocal0
getproperty QName(PackageNamespace(""), "ownerId_")
ifeq DRAWTHIS
getlocal0
getproperty QName(PackageNamespace(""), "_-0wz")
iffalse DRAWTHIS
returnvoid
DRAWTHIS:
noAllyOptions.zip - Jotti's malware scan
https://www.virustotal.com/file/ad7a...is/1356036405/

