HelpByte Code help, getproperty

Posts 1–9 of 9 · Page 1 of 1
Byte Code help, getproperty
since nobody seems to reply on my other topic http://www.mpgh.net/forum/showthread...=1#post9278998, i hope someone has a look in here:

i am trying to get something like this
Code:
     getlocal0
     getproperty QName(PackageNamespace("", "#0"), "props_")
     getproperty QName(PackageNamespace("", "#0"), "id_")
     pushstring "Loot Bag 4"
     equals
     initproperty QName(PackageNamespace("", "#0"), "bluebag")

     getlocal0
     getproperty QName(PackageNamespace("", "#0"), "props_")
     getproperty QName(PackageNamespace("", "#0"), "id_")
     pushstring "Loot Bag 5"
     equals
     initproperty QName(PackageNamespace("", "#0"), "whitebag")
in the "com\company\assembleegameclient\objects\Container .class.asasm" class init, but i dont know which local var(s?) to get, or what else to do to achieve this...i added the traits...change localcount? maxstack??

help appreciated
Quote Originally Posted by infern000 View Post
since nobody seems to reply on my other topic http://www.mpgh.net/forum/showthread...=1#post9278998, i hope someone has a look in here:

i am trying to get something like this
Code:
     getlocal0
     getproperty QName(PackageNamespace("", "#0"), "props_")
     getproperty QName(PackageNamespace("", "#0"), "id_")
     pushstring "Loot Bag 4"
     equals
     initproperty QName(PackageNamespace("", "#0"), "bluebag")

     getlocal0
     getproperty QName(PackageNamespace("", "#0"), "props_")
     getproperty QName(PackageNamespace("", "#0"), "id_")
     pushstring "Loot Bag 5"
     equals
     initproperty QName(PackageNamespace("", "#0"), "whitebag")
in the "com\company\assembleegameclient\objects\Container .class.asasm" class init, but i dont know which local var(s?) to get, or what else to do to achieve this...i added the traits...change localcount? maxstack??

help appreciated
Can you confirm that the previous code was working? The fact that this is not drawing the containers at all makes me think that an issue is being created in the second part of the code where you jump to line 124. Make the jump go to the end to to a new Skip placeholder after your second bit of added code instead

Edit: also I can confirm that you do not want to modify your maxstack or localcount. If you overstep either of those then rabcdasm will fail to reassemble your client.

Edit2: I lost a Prot testing this lol
what do you mean with "previous code"? the 19.0 version was definitely working presuming you edited the XML...

nothing works whenever i attempted not editing the xml. the snipped posted above does NOT work!!, is just an idea that LOOKS like it might work.

sorry about your loss

edit: yes the L124 was fixed via
DONE:
pushtrue
returnvalue
long before that...

anyway since realm is down i cant be sure about anything anymore at this moment, will try more
Quote Originally Posted by infern000 View Post
since nobody seems to reply on my other topic http://www.mpgh.net/forum/showthread...=1#post9278998, i hope someone has a look in here:

i am trying to get something like this
Code:
     getlocal0
     getproperty QName(PackageNamespace("", "#0"), "props_")
     getproperty QName(PackageNamespace("", "#0"), "id_")
     pushstring "Loot Bag 4"
     equals
     initproperty QName(PackageNamespace("", "#0"), "bluebag")

     getlocal0
     getproperty QName(PackageNamespace("", "#0"), "props_")
     getproperty QName(PackageNamespace("", "#0"), "id_")
     pushstring "Loot Bag 5"
     equals
     initproperty QName(PackageNamespace("", "#0"), "whitebag")
in the "com\company\assembleegameclient\objects\Container .class.asasm" class init, but i dont know which local var(s?) to get, or what else to do to achieve this...i added the traits...change localcount? maxstack??

help appreciated
Considering the traits you added are these:

Code:
trait slot QName(PrivateNamespace(""), "bluebag") type QName(PackageNamespace(""), "Boolean") value False() end
trait slot QName(PrivateNamespace(""), "whitebag") type QName(PackageNamespace(""), "Boolean") value False() end
You should be able to do your thing by doing this:
Code:
     getlocal0
     getlocal0
     getproperty QName(PackageNamespace(""), "props_")
     getproperty QName(PackageNamespace(""), "id_")
     pushstring "Loot Bag 4"
     equals
     setproperty QName(PackageNamespace(""), "bluebag")

     getlocal0
     getlocal0
     getproperty QName(PackageNamespace(""), "props_")
     getproperty QName(PackageNamespace(""), "id_")
     pushstring "Loot Bag 5"
     equals
     setproperty QName(PackageNamespace(""), "whitebag")
(Added colors to give an idea of the stack)
Quote Originally Posted by Knorrex View Post
Considering the traits you added are these:

Code:
trait slot QName(PrivateNamespace(""), "bluebag") type QName(PackageNamespace(""), "Boolean") value False() end
trait slot QName(PrivateNamespace(""), "whitebag") type QName(PackageNamespace(""), "Boolean") value False() end
You should be able to do your thing by doing this:
Code:
     getlocal0
     getlocal0
     getproperty QName(PackageNamespace(""), "props_")
     getproperty QName(PackageNamespace(""), "id_")
     pushstring "Loot Bag 4"
     equals
     setproperty QName(PackageNamespace(""), "bluebag")

     getlocal0
     getlocal0
     getproperty QName(PackageNamespace(""), "props_")
     getproperty QName(PackageNamespace(""), "id_")
     pushstring "Loot Bag 5"
     equals
     setproperty QName(PackageNamespace(""), "whitebag")
(Added colors to give an idea of the stack)
great, i can confirm this works...i might zip it as a mod and add it to release
the only thing that bugs me, it plays the sound everytime the bag comes into view.
Quote Originally Posted by infern000 View Post
the only thing that bugs me, it plays the sound everytime the bag comes into view.
Its exactly how it works game. When you are too far from a bag its deleted from the client.
So if you see the bag again it is as if he was just dropped
thanks, cannot wait to test this
No, i mean only the blu and whitebags play the sound AGAIN when i see them again. the default ones do not. maybe it has to do because i increased the range to 20 for those 2 and kept the default bags default...

 
bagsounds3
Code:
#set psounds1 "_-dx"                                       ; PackageNamespace of sounds, check getlex above "loot_appears", first
#set psounds2 "_-0bN"                                       ; PackageNamespace of sounds, check getlex above "loot_appears", second


;----------------------------------
; CODE
;----------------------------------
;insert after:
;     setlocal            4
;
;and before:
;     getlocal            6
;     dup
;
;in the method that plays "loot_appears"

      getlocal0
      getproperty         QName(PackageNamespace(""), "bluebag")
      convert_b
      iffalse             NOTBLU

      getlocal            4
      pushbyte            20
      lessthan
      iffalse             DONE

      getlex              QName(PackageNamespace($"psounds1"), $"psounds2")
      pushstring          "enter_realm"						;feel free to change the sounds to what u like
      callpropvoid        QName(PackageNamespace(""), "play"), 1

      jump                DONE

NOTBLU:
      getlocal0
      getproperty         QName(PackageNamespace(""), "whitebag")
      convert_b
      iffalse             NOTWHITE

      getlocal            4
      pushbyte            20
      lessthan
      iffalse             DONE

      getlex              QName(PackageNamespace($"psounds1"), $"psounds2")
      pushstring          "level_up"						;feel free to change the sounds to what u like
      callpropvoid        QName(PackageNamespace(""), "play"), 1

      jump                DONE

DONE:
      pushtrue
      returnvalue

NOTWHITE:
so, does anybody have any idea why it plays them again, but not the normal ones?
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?