What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

this lua code wont run

Thacai

Member
Joined
Jan 15, 2010
Messages
71
Reaction score
0
I know HB is down, but the last few days i've been trying to execute this: console autointeract 0
to disable click to move.

Lua.DoString("ConsoleExec(autointeract 0");
doesnt seem to work, any ideas ?
 
if i just go ingame and type /console autointeract 0 manually then it works, but will try your ideas when hb is back up :)
 
I know HB is down, but the last few days i've been trying to execute this: console autointeract 0
to disable click to move.

Lua.DoString("ConsoleExec(autointeract 0");
doesnt seem to work, any ideas ?

count the "(" then count the ")" the answer has been given.
 
I'm using this to detect the current user setting:
<int><int>
</int></int>
PHP:
Lua.GetReturnVal<int>("if GetCVar(\"AutolootDefault\") == \"1\" then return 1; else return 0; end", 0)
<int><int>
and this to change the settings:

</int></int>
PHP:
Lua.DoString("SetCVar(\"autoLootDefault\", 0)", "fishingbuddy.lua")
<int><int>

Should work with any CVar..
</int></int>
 
Last edited:
it worked iggi, thanks, small note though it was too soon to put it in Initialize, since appartently HB reenables Click2Move after Initialize() have been runned, so had to do this:

PHP:
public override void Pulse()
        {
            if (!initializeDone)
            {
                Method.DisableClickToMove();
            }
            initializeDone = true;
            base.Pulse();
        }

not pretty, so other options would be appreciated :D
 
Ok bad idea, dont touch pulse() xD

abit of spamming the method seems to work:

PHP:
static int DisableChecked = 0;
public override Composite CombatBehavior
        {
            get
            {
                if (DisableChecked <= 2)
                {
                    Method.DisableClickToMove();
                    DisableChecked++;
                }
                return Behavior;
            }
        }
 
Ok bad idea, dont touch pulse() xD

abit of spamming the method seems to work:

PHP:
static int DisableChecked = 0;
public override Composite CombatBehavior
        {
            get
            {
                if (DisableChecked <= 2)
                {
                    Method.DisableClickToMove();
                    DisableChecked++;
                }
                return Behavior;
            }
        }

That fits a lot better in Pulse than in CombatBehavior. A LOT better.
 
Well suddenly it stopped updating all my auras after i overrided pulse, thats why xD
 
Back
Top