MCP Buttens

free(?!) clues!

MCP Buttens

Postby Blacktopnl » 20 Jun 2014, 19:53

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
Last edited by Blacktopnl on 20 Jun 2014, 21:05, edited 1 time in total.
Blacktopnl
 
Posts: 5
Joined: 31 Dec 2013, 04:27

Re: MCP Buttens

Postby pz » 20 Jun 2014, 20:02

Image
Image
User avatar
pz
 
Posts: 45
Joined: 06 Nov 2013, 12:04

Re: MCP Buttens

Postby Blacktopnl » 20 Jun 2014, 21:09

i had two buttons like that, a true and false... never thought of toggle :(
Blacktopnl
 
Posts: 5
Joined: 31 Dec 2013, 04:27


Return to Guides & Strats

Who is online

Users browsing this forum: No registered users and 6 guests