Question about //! stuff

SanKakU

Member
Reaction score
21
this is what i'm used to seeing:
[ljass]//! external ObjectMerger w3a Adef AIDS anam "State Detection" ansf "(AIDS)" aart "" arac 0[/ljass]
or perhaps some normal textmacro stuff.

but there are other //! commands as well. what are they?

the following is a sample of code using a lot of commands about which i don't know what they are.
i believe in this text macro it is using the object merger...
but i don't really know. could someone please explain what all these things are? like i setvalue, externalblock extention=lua ConstantMerger $FILENAME$
and so on. someone said something about lua before and it sounded good what he said about it. so i'm guessing this has something to do with that.
JASS:
   //! textmacro Status__CreateAbilities
                // For reflecting piercing.
                //! externalblock extension=lua ConstantMerger $FILENAME$
                //! i setvalue("Misc","DefendDeflection","1")
                //! endexternalblock
                
                // Start externalblock
                //! externalblock extension=lua ObjectMerger $FILENAME$
                
                ////////////////////
                // Status Effects //
                ////////////////////
                
                // Stun (X500, firebolt)
                //! i setobjecttype("buffs")
                //! i createobject("BPSE","B500")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"ftip","Stunned")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"fube","This unit is stunned; it cannot move, attack or cast spells.")
                //! i makechange(current,"ftat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("ACfb","A500")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Stun")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"amat","")
                //! i makechange(current,"amsp",0)
                //! i makechange(current,"Htb1",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"invulnerable,vulnerable")
                //! i makechange(current,"abuf",1,"B500")
                //! i makechange(current,"aher",1)
                //! i makechange(current,"arlv",6)
                
                // Silence (X501, soulburn)
                //! i setobjecttype("buffs")
                //! i createobject("BNso","B501")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftip","Silence")
                //! i makechange(current,"fube","This unit is Silenced; it cannot cast spells.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNSilence.blp")
                //! i makechange(current,"ftat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("ANso","A501")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Silence")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"Nso1",1,0)
                //! i makechange(current,"Nso3",1,0)
                //! i makechange(current,"Nso2",1,99999)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B501")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"alev",1)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"invulnerable,vulnerable")
                
                // Disarm (Both) (X502, drunkenhaze)
                //! i setobjecttype("buffs")
                //! i createobject("BNdh", "B502")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftip","Disarmed")
                //! i makechange(current,"fube","This unit is Disarmed; it cannot attack.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNBattleStations.blp")
                //! i makechange(current,"ftat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("ANdh","A502")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Disarm (Both)")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"amat","")
                //! i makechange(current,"amac",0)
                //! i makechange(current,"amsp",0)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"alev",1)
                //! i makechange(current,"Nsi2",1,0)
                //! i makechange(current,"Nsi3",1,0)
                //! i makechange(current,"aare",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B502")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                
                // Disarm (Melee) (X503, drunkenhaze)
                //! i setobjecttype("buffs")
                //! i createobject("BNdh", "B503")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftip","Disarmed (Melee)")
                //! i makechange(current,"fube","This unit is Disarmed; it cannot use melee attacks.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNBattleStations.blp")
                //! i makechange(current,"ftat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("ANdh","A503")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Disarm (Melee)")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"amat","")
                //! i makechange(current,"amac",0)
                //! i makechange(current,"amsp",0)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"alev",1)
                //! i makechange(current,"Nsi2",1,0)
                //! i makechange(current,"Nsi3",1,0)
                //! i makechange(current,"aare",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B503")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                
                // Disarm (Range) (X504, drunkenhaze)
                //! i setobjecttype("buffs")
                //! i createobject("BNdh", "B504")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftip","Disarmed (Ranged)")
                //! i makechange(current,"fube","This unit is Disarmed; it cannot use ranged attacks.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNBattleStations.blp")
                //! i makechange(current,"ftat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("ANdh","A504")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Disarm (Range)")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"amat","")
                //! i makechange(current,"amac",0)
                //! i makechange(current,"amsp",0)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"alev",1)
                //! i makechange(current,"Nsi2",1,0)
                //! i makechange(current,"Nsi3",1,0)
                //! i makechange(current,"aare",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B504")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                
                // Entangle (X505 - X506, ensnare)
                //! i setobjecttype("buffs")
                //! i createobject("Beng","B505")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftip","Immobilised")
                //! i makechange(current,"fube","This unit is immobilised; it cannot move or fly.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNWirtsOtherLeg.blp")
                //! i makechange(current,"ftat","")
                
                //! i createobject("Bena","B506")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftip","Immobilised")
                //! i makechange(current,"fube","This unit is immobilised; it cannot move or fly.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNWirtsOtherLeg.blp")
                //! i makechange(current,"ftat", "")
                
                //! i setobjecttype("abilities")
                //! i createobject("ACen","A505")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Immobilise")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"amat","")
                //! i makechange(current,"amsp",0)
                //! i makechange(current,"aher",1)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"alev",1)
                //! i makechange(current,"areq","")
                //! i makechange(current,"Ens1",1,-1)
                //! i makechange(current,"Ens2",1,-1)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B505,B506")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                
                // Invisibility (X507)
                //! i setobjecttype("abilities")
                //! i createobject("Apiv","A507")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Invisibility")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"ahdu",1,0.5)
                //! i makechange(current,"adur",1,0.5)
                
                // Ghost (X508)
                //! i setobjecttype("abilities")
                //! i createobject("Agho","A508")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Ghost")
                //! i makechange(current,"ansf","(Status System)")
                
                // Doom (X509, doom)
                //! i setobjecttype("buffs")
                //! i createobject("BNdo","B509")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftat","")
                //! i makechange(current,"fube","This unit has been stricken with Doom; it cannot cast spells.")
                
                //! i setobjecttype("abilities")
                //! i createobject("ANdo","A509")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Doom")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"Ndo1",1,0)
                //! i makechange(current,"Ndo2",1,0)
                //! i makechange(current,"Ndo3",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B509")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                
                // Spell Immunity (X50A - X50B)
                //! i setobjecttype("abilities")
                //! i createobject("Amim","A50A")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Spell Immunity")
                //! i makechange(current,"ansf","(Status System)")
                
                //! i createobject("Aspb","A50B")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Spell Immunity")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50A")
                
                // Hex (X50C, hex)
                //! i setobjecttype("buffs")
                //! i createobject("BOhx","B50C")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"feat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("AOhx","A50C")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Hex")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"asat","")
                //! i makechange(current,"alev",1)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B50C")
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                
                // Unlocust (X50D, crowform)
                //! i setobjecttype("abilities")
                //! i createobject("Amrf","A50D")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Unlocust")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"Eme3",1,-1)
                //! i makechange(current,"Eme4",1,-1)
                //! i makechange(current,"acas",1,0)
                //! i makechange(current,"adur",1,0)
                
                // Never Miss (X50E - X50F)
                //! i setobjecttype("abilities")
                //! i createobject("ACct","A50E")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Never Miss")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"Ocr1",1,100)
                //! i makechange(current,"Ocr2",1,0)
                //! i makechange(current,"Ocr5",1,1)
                //! i makechange(current,"atar",1,"notself")
                
                //! i createobject("Aspb","A50F")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Never Miss")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50E")
                
                // Always Miss (X50G - X50H)
                //! i setobjecttype("abilities")
                //! i createobject("ACbh","A50G")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Always Miss")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"Hbh1",1,0)
                //! i makechange(current,"Hbh4",1,100)
                //! i makechange(current,"atar",1,"notself")
                
                //! i createobject("Aspb","A50H")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Always Miss")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50G")
                
                // Untouchable (X50I - X50J)
                //! i setobjecttype("abilities")
                //! i createobject("ACes","A50I")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Untouchable")
                //! i makechange(current,"ansf","(Status System)")
                
                //! i createobject("Aspb","A50J")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Untouchable")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50I")
                
                // Banish (X50K, banish)
                //! i setobjecttype("buffs")
                //! i createobject("BNdo","B50K")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"ftat","")
                //! i makechange(current,"fefl","")
                
                //! i setobjecttype("abilities")
                //! i createobject("AHbn","A50K")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Banish")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"aefs","")
                //! i makechange(current,"alev",1)
                //! i makechange(current,"arlv",6)
                //! i makechange(current,"Hbn1",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"abuf",1,"B50K")
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"notself")
                
                // Phase (X50L, windwalk)
                //! i setobjecttype("buffs")
                //! i createobject("BOwk","B50L")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"ftip","Phase")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"fube","This unit is Phasing; it can walk through other units.")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNMirrorImage.blp")
                
                //! i setobjecttype("abilities")
                //! i createobject("ANwk","A50L")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Phase")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aefs","")
                //! i makechange(current,"Owk3",1,0)
                //! i makechange(current,"Owk4",1,0)
                //! i makechange(current,"Owk2",1,0)
                //! i makechange(current,"Owk1",1,-1)
                //! i makechange(current,"abuf",1,"B50L")
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"aher",0)
                /*
                // Double Attack (X50M - X50O)
                //! i setobjecttype("abilities")
                //! i createobject("ACsa","A50M")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Double Attack")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"amat","")
                //! i makechange(current,"Hfa1",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"invulnerable,vulnerable")
                
                //! i createobject("AIll","A50N")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Double Attack")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"amat","")
                //! i makechange(current,"asat","")
                //! i makechange(current,"atat","")
                //! i makechange(current,"Iob2",1,100)
                //! i makechange(current,"Iob3",1,100)
                //! i makechange(current,"Iob4",1,100)
                //! i makechange(current,"Idam",1,0)
                //! i makechange(current,"Iobu",1,"A50M")
                //! i makechange(current,"atar",1,"invulnerable,vulnerable")
                
                //! i createobject("Aspb","A50O")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Double Attack")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50N")
                */
                
                // Resistant Skin (X50P - X50Q)
                //! i setobjecttype("abilities")
                //! i createobject("ACrk","A50P")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Resistant Skin")
                //! i makechange(current,"ansf","(Status System)")
                
                //! i createobject("Aspb","A50Q")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Resistant Skin")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50P")
                
                // Reflect Piercing (X50R - X50S)
                //! i setobjecttype("abilities")
                //! i createobject("Aegr","A50R")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Reflect Piercing")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"Def6",1,100)
                //! i makechange(current,"Def1",1,1)
                //! i makechange(current,"Def7",1,0)
                //! i makechange(current,"Def5",1,0)
                
                //! i createobject("Aspb","A50S")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Reflect Piercing")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"spb5",1,"")
                //! i makechange(current,"spb4",1,1)
                //! i makechange(current,"spb3",1,1)
                //! i makechange(current,"spb1",1,"A50R")
                
                // Disable (X50T, creepthunderbolt (hurlboulder))
                //! i setobjecttype("buffs")
                //! i createobject("BPSE","B50T")
                //! i makechange(current,"frac","other")
                //! i makechange(current,"ftip","Disabled")
                //! i makechange(current,"fube","This unit is Disabled; it cannot do anything.")
                //! i makechange(current,"fnsf","(Status System)")
                //! i makechange(current,"fart","ReplaceableTextures\\CommandButtons\\BTNReplay-Pause.blp")
                //! i makechange(current,"ftat","")
                
                //! i setobjecttype("abilities")
                //! i createobject("ACtb","A50T")
                //! i makechange(current,"aart","")
                //! i makechange(current,"arac","other")
                //! i makechange(current,"anam","Disable")
                //! i makechange(current,"ansf","(Status System)")
                //! i makechange(current,"aani","")
                //! i makechange(current,"amat","")
                //! i makechange(current,"amsp",0)
                //! i makechange(current,"Ctb1",1,0)
                //! i makechange(current,"aran",1,99999)
                //! i makechange(current,"acdn",1,0)
                //! i makechange(current,"ahdu",1,0)
                //! i makechange(current,"adur",1,0)
                //! i makechange(current,"amcs",1,0)
                //! i makechange(current,"atar",1,"invulnerable,vulnerable")
                //! i makechange(current,"abuf",1,"B50T")
                //! i makechange(current,"aher",1)
                //! i makechange(current,"arlv",6)
                
                
                ////////////////////
                // Status Bonuses //
                ////////////////////
                //! i setobjecttype("abilities")
                
                //! i myChar={}
                //! i myChar[1]="A"
                //! i myChar[2]="B"
                //! i myChar[3]="C"
                //! i myChar[4]="D"
                //! i myChar[5]="E"
                //! i myChar[6]="F"
                //! i myChar[7]="G"
                //! i myChar[8]="H"
                //! i myChar[9]="I"
                //! i myChar[10]="J"
                //! i myChar[11]="K"
                //! i myChar[12]="L"
                //! i myChar[13]="M"
                //! i myChar[14]="N"
                //! i myChar[15]="O"
                //! i myChar[16]="P"
                //! i myChar[17]="Q"
                //! i myChar[18]="R"
                //! i myChar[19]="S"
                //! i myChar[20]="T"
                //! i myChar[21]="U"
                //! i myChar[22]="V"
                //! i myChar[23]="W"
                //! i myChar[24]="X"
                //! i myChar[25]="Y"
                //! i myChar[26]="Z"
                
                //! i myBin={}
                //! i myBin[1]=1
                //! i myBin[2]=2
                //! i myBin[3]=4
                //! i myBin[4]=8
                //! i myBin[5]=16
                //! i myBin[6]=32
                //! i myBin[7]=64
                //! i myBin[8]=128
                //! i myBin[9]=256
                //! i myBin[10]=512
                //! i myBin[11]=1024
                //! i myBin[12]=2048
                //! i myBin[13]=4096
                //! i myBin[14]=8192
                //! i myBin[15]=16384
                //! i myBin[16]=32768
                //! i myBin[17]=65536
                //! i myBin[18]=131072
                //! i myBin[19]=262144
                //! i myBin[20]=524288
                //! i myBin[21]=1048576
                //! i myBin[22]=2097152
                //! i myBin[23]=4194304
                //! i myBin[24]=8388608
                //! i myBin[25]=16777216
                //! i myBin[26]=33554432
                
                // Armor (10 = 1023 max)
                //! i for i=1,10 do
                    //! i createobject(&quot;AId1&quot;,&quot;A5A&quot;..myChar<i>)
                    //! i makechange(current,&quot;Idef&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Armor Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i end
                //! i createobject(&quot;AId1&quot;,&quot;A5A@&quot;)
                //! i makechange(current,&quot;Idef&quot;,1,-myBin[11])
                //! i makechange(current,&quot;anam&quot;,&quot;Armor Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                
                
                // Damage (15 = 32767 max)
                //! i for i=1,15 do
                    //! i createobject(&quot;AItg&quot;,&quot;A5B&quot;..myChar<i>)
                    //! i makechange(current,&quot;Iatt&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Damage Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i end
                //! i createobject(&quot;AItg&quot;,&quot;A5B@&quot;)
                //! i makechange(current,&quot;Iatt&quot;,1,-myBin[16])
                //! i makechange(current,&quot;anam&quot;,&quot;Damage Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                
                // Str/Agi/Int (10 = 1023 max)
                //! i for i=1,10 do
                    //! i createobject(&quot;AIs1&quot;,&quot;A5C&quot;..myChar<i>)
                    //! i makechange(current,&quot;Istr&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Strength Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                    
                    //! i createobject(&quot;AIa1&quot;,&quot;A5D&quot;..myChar<i>)
                    //! i makechange(current,&quot;Iagi&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Agility Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                    
                    //! i createobject(&quot;AIi1&quot;,&quot;A5E&quot;..myChar<i>)
                    //! i makechange(current,&quot;Iint&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Intelligence Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i end
                //! i createobject(&quot;AIs1&quot;,&quot;A5C@&quot;)
                //! i makechange(current,&quot;Istr&quot;,1,-myBin[11])
                //! i makechange(current,&quot;anam&quot;,&quot;Strength Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i createobject(&quot;AIa1&quot;,&quot;A5D@&quot;)
                //! i makechange(current,&quot;Iagi&quot;,1,-myBin[11])
                //! i makechange(current,&quot;anam&quot;,&quot;Agility Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i createobject(&quot;AIi1&quot;,&quot;A5E@&quot;)
                //! i makechange(current,&quot;Iint&quot;,1,-myBin[11])
                //! i makechange(current,&quot;anam&quot;,&quot;Intelligence Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                
                // Attack Speed (9 = 511% max)
                //! i for i=1,9 do
                    //! i createobject(&quot;AIsx&quot;,&quot;A5F&quot;..myChar<i>)
                    //! i makechange(current,&quot;Isx1&quot;,1,myBin<i>*0.01)
                    //! i makechange(current,&quot;anam&quot;,&quot;Attack Speed Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i end
                //! i createobject(&quot;AIsx&quot;,&quot;A5F@&quot;)
                //! i makechange(current,&quot;Isx1&quot;,1,-myBin[10]*0.01)
                //! i makechange(current,&quot;anam&quot;,&quot;Attack Speed Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                
                // Max HP (20 = 1048575 max)
                //! i for i=1,20 do
                    //! i createobject(&quot;AIl2&quot;,&quot;A5G&quot;..myChar<i>)
                    //! i makechange(current,&quot;Ilif&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Health Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i end
                //! i createobject(&quot;AIl2&quot;,&quot;A5G@&quot;)
                //! i makechange(current,&quot;Ilif&quot;,1,-myBin[21])
                //! i makechange(current,&quot;anam&quot;,&quot;Health Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                
                // Max Mana (20 = 1048575 max)
                //! i for i=1,20 do
                    //! i createobject(&quot;AImz&quot;,&quot;A5H&quot;..myChar<i>)
                    //! i makechange(current,&quot;Iman&quot;,1,myBin<i>)
                    //! i makechange(current,&quot;anam&quot;,&quot;Mana Bonus&quot;)
                    //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                //! i end
                //! i createobject(&quot;AImz&quot;,&quot;A5H@&quot;)
                //! i makechange(current,&quot;Iman&quot;,1,-myBin[21])
                //! i makechange(current,&quot;anam&quot;,&quot;Mana Bonus&quot;)
                //! i makechange(current,&quot;ansf&quot;,&quot;(Status System)&quot;)
                
                // End externalblock
                //! endexternalblock
            //! endtextmacro</i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i>


edit: why aren't the spoiler tags working?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
This is lua script for creating objects. Yeah, it is much faster than Object Merger.
 

SanKakU

Member
Reaction score
21
This is lua script for creating objects. Yeah, it is much faster than Object Merger.

i didn't ask for this explanation. i didn't say, "could someone please explain what this textmacro is doing?"
i told you, i sortof understand that already, and all you told me is what i already understsand...

i said, "could someone please explain what all these things are?"

there's a big difference. in other words...

could someone please give me some instructions on how to use this lua script for creating objects?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
JASS:
                //! i setobjecttype(&quot;buffs&quot;) 
//Create a buff
                //! i createobject(&quot;BPSE&quot;,&quot;B500&quot;) 
//Create a buff with rawcode &#039;B500&#039; from buff &#039;BPSE&#039;.
                //! i makechange(current,&quot;frac&quot;,&quot;other&quot;) 
//Change the data &quot;frac&quot;(Find this string in Object editor, like Art-Caster(????)..
                //! i makechange(current,&quot;ftip&quot;,&quot;Stunned&quot;)
 //Change the data...
                //! i makechange(current,&quot;fnsf&quot;,&quot;(Status System)&quot;)
                //! i makechange(current,&quot;fube&quot;,&quot;This unit is stunned; it cannot move, attack or cast spells.&quot;)
                //! i makechange(current,&quot;ftat&quot;,&quot;&quot;)
 

SanKakU

Member
Reaction score
21
how is that any different from what i already use to make objects with object merger? i don't understand that.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
how is that any different from what i already use to make objects with object merger? i don't understand that.

This is dynamic creation, instead of manually entering things.
 

tooltiperror

Super Moderator
Reaction score
231
Of course, there are other [LJASS]//![/LJASS] commands, most notably being the most important one, inject. Put a text file named "vJASS.txt" in your JassHelper folder, and then use [LJASS]//! import "vJASS.txt"[/LJASS] and it just imports it right there! This way, I can just use [LJASS]//! import MySpell[/LJASS] even on a mac.
 

SanKakU

Member
Reaction score
21
Of course, there are other [LJASS]//![/LJASS] commands, most notably being the most important one, inject. Put a text file named "vJASS.txt" in your JassHelper folder, and then use [LJASS]//! import "vJASS.txt"[/LJASS] and it just imports it right there! This way, I can just use [LJASS]//! import MySpell[/LJASS] even on a mac.

please show me the full example.
 

tooltiperror

Super Moderator
Reaction score
231
For example, let's say you wanted to create a file for your maps that would automatically erase visibility.

Just put the attached text file in your JassHelper folder, then put [LJASS]//! inject "ExecutableTestMap"[/LJASS] somewhere in your script, likely in the map header. You can replace anything in the text file with any vJASS, ZINC, or any scripting. I believe you can also use external tools like the object merger inside text files, but I can't test it.

If you are too lazy, here are the contents of the ExecutableTestMap.txt file:

JASS:

//! tooltiperror
 library TestMap initializer onInit
    private function onInit takes nothing returns nothing
        call BJDebugMsg(&quot;This is a test map.&quot;)
        //Disable visibility and such...
    endfunction
 endlibrary
 

Jesus4Lyf

Good Idea™
Reaction score
397
how is that any different from what i already use to make objects with object merger? i don't understand that.
That's the tricky part. For one, doing an externalblock object merger is faster than multiple object merger lines because it only calls it once, as passes it through as a big block.

Another is it does allow you to do more dynamic stuff when combined with textmacros.
Example.
JASS:
    //! textmacro BuffType takes IDENTIFIER
        struct $IDENTIFIER$ extends BuffStruct
            implement BuffStruct
            //! i itemIdentifier=&quot;$IDENTIFIER$&quot;
            private static method onInit takes nothing returns nothing
                //! i sysIdsUsed=sysIdsUsed+1
                // Defaults.
                //! i buffName=&quot;$IDENTIFIER$&quot;
                //! i buffIcon=&quot;&quot;
                //! i buffDescription=&quot;&quot;
                //! i buffAlignment=&quot;NEUTRAL&quot;
    //! endtextmacro

No one can teach you this stuff. I found it out myself by long, hard study, and through understanding the order things are run at compile-time, and understanding the difference between compile-time and run-time, was able to mutilate the two together and provide a reasonable interface despite it.

So if you're asking specifically about the external block stuff, it passes anything with [LJASS] //! i [/LJASS] into whatever externalblock you're currently in. It allows you to use full LUA syntax inside, and different functions are exported but are not documented so far as I'm aware. Study LUA and what other people do, keep in mind the "externalblock" principle and read about it in the JassHelper manual, and look at the functions used in BuffStruct/Status to see if you can achieve the effect you want.

It's not easy. ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top