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")
trait slot QName(PrivateNamespace(""), "bluebag") type QName(PackageNamespace(""), "Boolean") value False() end
trait slot QName(PrivateNamespace(""), "whitebag") type QName(PackageNamespace(""), "Boolean") value False() end
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")

#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: