Page 1 of 1

MCP Buttens

PostPosted: 20 Jun 2014, 19:53
by Blacktopnl
I have been playing around with some custom butters for my MCP but i need some help,

I use the actual LoadOgreMCP.iss/MCPcommands.xml to adjust and customise buttons, i know bad idea because any chance will be wiped in next session. but i'm not skilled enough to make my own in the MCPCommandsCustom.xml, i can only build on the brilliance of another :)

this is what i made:

Move behind mob on/off one butten:

Code: Select all
function CLOSE(string _ButtonName)
{
   if ${UIElement[ogremcp].FindUsableChild[${_ButtonName},button].Text.Equal[CLOSE]}
    {
      relay all OgreBotAtom aExecuteAtom all a_UplinkControllerFunctionAutoType checkbox_settings_movebehind true
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button].Font:SetColor[FFFF0000]
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button]:SetText[B-MOB]
    }
   else
    {
      relay all OgreBotAtom aExecuteAtom all a_UplinkControllerFunctionAutoType checkbox_settings_movebehind false
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button].Font:SetColor[FF00FF00]
       UIElement[ogremcp].FindUsableChild[${_ButtonName},button]:SetText[CLOSE]
    }
}

MCPCommands.XML

  <Set Name="CLOSE">
    <Set Name="Code">
      <Setting Name="One">Script:QueueCommand[call CLOSE ${_ButtonName}]</Setting>
    </Set>
    <Set Name="Description">
      <Setting Name="One">Simple Button to move from and behind mob.</Setting>
    </Set>
  </Set>






2 purse activation cycle 1 button:
Code: Select all
function PurseA(string _ButtonName)
{
   if ${UIElement[ogremcp].FindUsableChild[${_ButtonName},button].Text.Equal[PurseA]}
    {
      relay all OgreBotAtom a_QueueCommand UseItemFromUplink "TOONNAME" Ahrmatal's Ringmail Purse
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button].Font:SetColor[FF00CCFF]
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button]:SetText[PurseB]
    }
   else
    {
      relay all OgreBotAtom a_QueueCommand UseItemFromUplink "TOONNAME" Ahrmatal's Ringmail Purse
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button].Font:SetColor[FFFF00FF]
      UIElement[ogremcp].FindUsableChild[${_ButtonName},button]:SetText[PurseA]
    }
}



I tryed to add a 3rd one to with a *or* but that didn't work,

My goal is to get this to work in the MCPCommandsCustom.xml so i dont have to copy/past all of it every time i load the bot

Re: MCP Buttens

PostPosted: 20 Jun 2014, 20:02
by pz
Image

Re: MCP Buttens

PostPosted: 20 Jun 2014, 21:09
by Blacktopnl
i had two buttons like that, a true and false... never thought of toggle :(