Author Topic: Hitech's Master Control  (Read 18726 times)

0 Members and 1 Guest are viewing this topic.

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #15 on: March 06, 2017, 04:31:53 PM »
+1
nice work ghost ty for help

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Hitech's Master Control
« Reply #16 on: March 06, 2017, 04:36:20 PM »
+1
you make the menu and inside your  action sub, you can change the colour of the button if you want too.

You need as many sub as you have button.  This way your main loop  is smaller.   

Hitech  forget to ask,   what your LPC for your slave.    I have try a few number for 50, 100, 150, 200 and 250.  Im at 200 now and still not sure is the best speed.
« Last Edit: March 06, 2017, 04:41:58 PM by The Ghost »

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #17 on: March 06, 2017, 04:56:25 PM »
+1
ty TrailMyx,

its longer then i want but its shorter then i had.

im thinking maybe something like s7's craft file for my button locations, but i forgot what that looks like so i need to study more

« Last Edit: March 13, 2017, 08:51:09 PM by Hitechs »

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #18 on: March 06, 2017, 05:30:58 PM »
+1
@ ghost my lpc is at 25 on slave script, but its built for that speed with castin, scan journals and targeting ect..

if i changed it i would have to change alot of other things

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #19 on: March 06, 2017, 05:58:47 PM »
+1
im not geting the #results back from the sub, could someone take a look?

(script in first post works and is the result im looking for without all the if's)

something dumb im over looking, im sure

script runs and you can f7 through it {its just a menu, no client needed)

« Last Edit: March 13, 2017, 08:51:56 PM by Hitechs »

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #20 on: March 06, 2017, 06:24:31 PM »
+1
i guess im just returning 1 var from a sub?

to use this setup ... i would need to put all numbers together and parse them apart?

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Hitech's Master Control
« Reply #21 on: March 06, 2017, 06:25:56 PM »
+1
you have this in your main loop, so it go the that sub,

  if #MENUBUTTON <> #false 
        gosub menuButtonAction

it should be this
if #MENUBUTTON <> #false
  gosub #menubutton


This is how I would use it. 
Code: easyuo
  1.  
  2. gosub ControlMenu
  3.  
  4.  ;----------------------------------------------
  5. ;------------ Control Panel -------------------
  6.  
  7. repeat
  8.  
  9. if #MENUBUTTON <> #false
  10.   gosub #menubutton
  11.  
  12. until #FALSE
  13.  
  14.  
  15.  
  16. sub ev
  17.  
  18. Event sysmessage  Ev Sub
  19. ev1:
  20. onhotkey %evkey %2ndkey
  21.          goto ev1
  22. if !ev = n
  23.    {
  24.    set !naturefury n
  25.    set !ev y
  26.    }
  27. else
  28.     set !ev n
  29. set #menubutton N/A
  30. return
  31.  
  32. sub wither
  33. Event sysmessage  Wither Sub
  34. wither1:
  35. onhotkey %witherkey %2ndkey
  36.          goto wither1
  37. if !wither = n
  38.    set !wither y
  39. else
  40.     set !wither n
  41. set #menubutton N/A
  42. return
  43.  
  44. sub fury
  45. Event sysmessage  Fury Sub
  46. naturesfury1:
  47. onhotkey %naturefurykey %2ndkey
  48.          goto naturesfury1
  49. if !naturefury = n
  50. {
  51.    set !naturefury y
  52.    set !ev n
  53. }
  54. else
  55.     set !naturefury n
  56. set #menubutton N/A
  57. return
  58. ;-------------------------------------------------------------
  59. ;sub ContolMenu
  60. ;-------------------------------------------------------------
  61. sub ControlMenu
  62. set #lpc 500
  63.         menu Clear
  64.         menu Window title Hitech's Master Control
  65.         menu Window Color Black
  66.         menu Window Size 175 360   ;--175 360 ;360 360
  67.         menu Font Transparent #true
  68.         menu Font Align Right
  69.         menu Font Name MS Sans Serif
  70.         menu Font Size 9
  71.         menu Font Style
  72.         menu Font Color White
  73.         Menu font BGColor Blue
  74.  
  75.   menu Button Expand 120 10 50 23 Expand
  76.   menu Button reset 15 10 50 23 Reset
  77.   menu Button pause 25 310 50 23 Pause
  78.   menu Button stop 95 310 50 23 Stop
  79.         ;------------------------------------------
  80.   menu Button ev 15 45 40 23 EV
  81.   menu Button fury 60 45 50 23 FURY
  82.   menu Button wither 15 80 50 23 WITHER
  83.   menu Button wildfire 65 80 50 23 WILDFIRE
  84.   menu Button fireball 15 110 50 23 FIREBALL
  85.   menu Button lightning 65 110 50 23 LIGHTNING
  86.   menu Button wordofdeath 15 140 100 23 WORD OF DEATH
  87.   menu Button corpseskin 10 210 100 23 CORPSE SKIN
  88.   menu Button wisp 120 210 50 23 WISP
  89.   menu Button followmain 10 240 85 23 FOLLOW MAIN
  90.    menu Button loot 110 240 50 23 loot
  91.    menu Button flamestrike 15 170 85 23 FLAMESTRIKE
  92.  menu Button lichform 180 10 55 23 lichform
  93.  menu Button wraithform 240 10 55 23 wraithform
  94.  menu Button humanform 240 40 55 23 humanform
  95.  menu Button recallluna 180 40 55 23 recallluna
  96.  menu Button mount 180 70 55 23 mount
  97.  menu Button Voyage 180 100 55 23 Voyage
  98.  menu Button invis 180 130 55 23 invis
  99.  menu Button heal 240 70 55 23 heal
  100.  menu Button healpet 10 270 70 23 heal Pet
  101.  menu Button crossHeal 90 270 70 23 crossHeal
  102.   menu Button boss 120 170 30 23 boss
  103.     menu Button rez 120 80 30 23 rez
  104.     menu Button panic 120 40 30 23 panic
  105.      menu Button belfry 120 105 30 23 belfry
  106.      menu Button renew 120 130 30 23 renew
  107.  if !heal = y
  108.     {
  109.     menu delete heal
  110.     menu font BGcolor red
  111.     menu font color white
  112.     menu Button heal 240 70 55 23 heal
  113.     }
  114. if !followmain = y
  115.     {
  116.     menu delete followmain
  117.     menu font BGcolor red
  118.     menu font color white
  119.     menu Button followmain 10 240 85 23 FOLLOW MAIN
  120.     }
  121. if !crossHeal = y
  122.     {
  123.     menu delete crossHeal
  124.     menu font BGcolor red
  125.     menu font color white
  126.     menu Button crossHeal 90 270 70 23 crossHeal
  127.     }
  128.         Menu font BGColor 6113163
  129.         menu Font Color 74112139
  130.         menu Shape Shape1 287 5 1 270 3 7 1 82139139 7 82139139
  131.         menu Shape Shape2 174 5 114 1 3 7 1 82139139 7 82139139
  132.         menu Shape Shape3 174 33 114 1 3 7 1 82139139 7 82139139
  133.         menu Shape Shape4 174 147 114 1 3 7 1 82139139 7 82139139
  134.         menu Shape Shape5 174 274 114 1 3 7 1 82139139 7 82139139
  135.   menu Shape Shape6 174 5 1 350 3 7 1 82139139 7 82139139
  136.   menu Shape Shape7 5 40 164 3 3 7 1 Black 7 White
  137.   menu Shape Shape8 179 312 176 3 3 7 1 Black 7 White
  138.         menu Shape Shape9 20 63 93 1 3 7 1 white 7 White
  139.   menu Shape Shape10 20 63 1 50 3 7 1 white 7 white
  140.   menu Shape Shape11 112 63 1 50 3 7 1 white 7 white
  141.   menu Shape Shape12 20 112 93 1 3 7 1 white 7 white
  142.  ;menu Shape Shape13 174 5 3 322 3 7 1 Black 7 82139139
  143.  ;menu Shape Shape14 179 200 67 3 3 7 1 Black 7 White
  144.  ;menu Shape Shape15 179 300 67 3 3 7 1 Black 7 White
  145.   menu Font Size 10
  146.         menu Font Color 6113163
  147.         menu Text Hitech 132 340 Script by Hitech
  148.   menu Font Size 9
  149.         menu Font Color red
  150.         menu Text var1 100 15 #SCNT ;--- time since reset
  151.         for %m 0 13
  152.   {
  153.   set %x 115 + ( %m * 2 )
  154.   set %y 45 + ( %m * 6 )
  155.   set %length 54 - ( %m * 4 )
  156.         menu Shape EUOShape2 %x %y %length 3 3 7 1 Black 7 82139139
  157.         }
  158.         for %m 0 14
  159.   {
  160.   set %x 141 - ( %m * 2 )
  161.   set %y 110 + ( %m * 6 )
  162.   set %length 2 + ( %m * 4 )
  163.         menu Shape EUOShape3 %x %y %length 3 3 7 1 Black 7 82139139
  164.         }
  165.         menu Shape EUOShape4 10 47 3 151 3 7 1 Black 7 82139139
  166.         menu Shape EUOShape5 5 200 164 3 3 7 1 Black 7 White
  167.         menu Shape EUOShape6 5 295 164 3 3 7 1 Black 7 White
  168. for %m 0 4
  169.   {
  170.   set %1 200 + ( %m * 5 )
  171.   set %2 40 - ( %m * 10 )
  172.  menu shape Design 303 %1 40 %2 5 7 2 82139139 7 1
  173.  }
  174.   for %m 0 3
  175.   {
  176.   set %1 12 + ( %m * 5 )
  177.   set %2 40 - ( %m * 10 )
  178.  menu shape Design 297 %1 40 %2 1 7 2 82139139 7 1
  179.   }
  180.    for %m 0 2
  181.   {
  182.   set %1 40 + ( %m * 5 )
  183.   set %2 20 - ( %m * 10 )
  184.  menu shape Design 310 %1 40 %2 1 7 2 82139139 7 1
  185.   }
  186.      for %m 0 3
  187.   {
  188.   set %1 5 + ( %m * 5 )
  189.   set %2 30 - ( %m * 10 )
  190.  menu shape Design 320 %1 40 %2 1 7 2 82139139 7 1
  191.   }
  192.      for %m 0 3
  193.   {
  194.   set %1 225 + ( %m * 5 )
  195.   set %2 40 - ( %m * 10 )
  196.  menu shape Design 317 %1 40 %2 1 7 2 82139139 7 1
  197.   }
  198.      for %m 0 2
  199.   {
  200.   set %1 255 + ( %m * 5 )
  201.   set %2 20 - ( %m * 10 )
  202.  menu shape Design 294 %1 40 %2 1 7 2 82139139 7 1
  203.   }
  204.   set #lpc %lpc
  205.   if %menushow1 = #true
  206.       return
  207.   menu window transparent 0
  208.   menu show
  209.   for %i 1 65
  210.   {
  211.     menu window transparent %i
  212.   }
  213. set %menushow1 #true
  214. return
  215.  
  216. ;------------------------------------
  217.  
  218.  

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #22 on: March 06, 2017, 06:26:54 PM »
+1
ty ... how many vars can i return from a sub?

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Hitech's Master Control
« Reply #23 on: March 06, 2017, 06:30:35 PM »
+1
for each button I have a sub,  to heal my pet I have a button call Heal pet  and this is calling your healing sub.   

I never try to set VAR inside a sub.  U can control a combo box if that count for a variable.

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #24 on: March 06, 2017, 06:32:21 PM »
+1
i understand your way, im trying to learn a diffrent way,

this fixes my issue,
but i will have to add the var to each sub, and its a sub i dont even want lol

Code: [Select]
;----------------------------------------

sub menuButtonAction
;--- menu Button {name} {x} {y} {width} {height} {text}
gosub sub_ , #menubutton
;display %1 %2 %3 %4 %5
menu delete button #menubutton
     if ! . #menubutton = #false
           {
            set ! . #menubutton #true
            menu font BGcolor red
            menu font color white
            ;menu Button #menubutton 120 105 30 23 #menubutton ;----- hmm location of each button ???
            menu Button #menubutton %x %y %w %h #menubutton ;--- maybe pass the location with gosub
             }
        else
            {
            set ! . #menubutton #false
            menu font BGcolor blue
            menu font color white
            ;menu Button #menubutton 120 105 30 23 #menubutton
            menu Button #menubutton %x %y %w %h #menubutton ;--- maybe pass the location with gosub
             }
       set #menubutton #false
        }

return

;---------------------------
;--- menu Button {name} {x} {y} {width} {height} {text}

;------------------------------------------
sub sub_EV
set %x 15
set %y 45
set %w 40
set %h 23
set %t ev
  return 15 45 40 23 EV

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Hitech's Master Control
« Reply #25 on: March 06, 2017, 09:37:44 PM »
+1
yeh, unfortunately you can only return one item at a time in the #result variable.  You can separate items with delimeters, but then you'll have to parse them, and you don't want to parse in EUO since it's so slow.
« Last Edit: March 06, 2017, 10:22:31 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #26 on: March 06, 2017, 10:45:55 PM »
+1
Ic... I did get a parser working
Was good training

Nice to make progress
« Last Edit: March 13, 2017, 08:52:42 PM by Hitechs »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Hitech's Master Control
« Reply #27 on: March 07, 2017, 08:24:50 AM »
+2
I personally don't mind parsing at all, especially if it cleans up the code a bunch.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Hitech's Master Control
« Reply #28 on: March 11, 2017, 03:26:31 PM »
+2
updated to 2.0 (just a script rewrite)

No new features or menu designs

new script added to first post

stuff to work on/add in the future:
- investage other / cleaner ways to control button actions
- follow master chr into dungeons, caves, ant holes and gates
- new button layout / menu design
- shadowguard rooms / roof stuff
- uoxl
- more things that might be useful

buttons to look into adding to the menu:
- tamers only - all kill , target boss
- accept party
- pick up gold from ground
- bag of send gold when over weight
- drop powerscrolls on ground
- other tamer, mage , weaver or necro spells that will help
- skill masterys
- heal like a mofo (or ur going to die)
- run away
- more stuff i will think of later

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Hitech's Master Control
« Reply #29 on: March 11, 2017, 04:24:27 PM »
+2
nice work code look slick,  I'm a newbie with  parsing , so  I have no idea how to use those.  It one think in EUO that I can't get my mind to understand.

I will need to follow where you going with those parsing. you pick my curiosity.
Quote
- follow master chr into dungeons, caves, ant holes and gates
I have the same issue. 
-  I  try  a menu with arrow to make them walk in the direction I wanted.  It did give me a few headache in fel. 
- I try to hard coded the location I that I often go to and have to move on his own. Not stable enough.   



This is the menu Version 5. 

To give you an idea of what I run,   Each Bot have his own action button.  Mage 1 is usually my tamer/disco and mage 2 is me necro mage.  in the expand section it turn on the All mage option.   

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
G-Bot 5.0 menu.JPG

Tags: