Author Topic: First menu Attempt  (Read 3040 times)

0 Members and 1 Guest are viewing this topic.

Offline camotbikTopic starter

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
First menu Attempt
« on: August 13, 2011, 05:44:01 AM »
0
Hello guys, I'm in a process of making my crab fisher and for the first time I'm making a menu for a script. -- Special thanks to Crome for 101 in menus and TrailMyx for his tutorial. I Wouldn't have got this far with out you guys. If you can add something or see a bug in the script, please let me know.

Ok Here they are.





Code: [Select]
set %Crab_ammount 0
set %Apple_Crab_ammount 0
set %Blue_Crab_ammount 0
set %Dungeoness_Crab_ammount 0
set %King_Crab_ammount 0
set %Rock_Crab_ammount 0
set %Snow_Crab_ammount 0
set %Tunnel_Crab_ammount 0
set %Void_Crab_ammount 0
set %Lobster_ammount 0
set %Blood_Lobster_ammount 0
set %Crusty_Lobster_ammount 0
set %Dread_Lobster_ammount 0
set %Fred_Lobster_ammount 0
set %Hummer_Lobster_ammount 0
set %Rock_Lobster_ammount 0
set %Shovel_Lobster_ammount 0
set %Spiney_Lobster_ammount 0
set %Void_Lobster_ammount 0

menu HideEUO
gosub setup_menu
gosub setup_loop
gosub stats_menu
halt

sub setup_menu
menu Clear
menu Window Title Camotbik's crab fisher
menu Window Color BtnFace
menu Window Size 290 165
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Left
menu Text EUOLabel4 4 104 Use bank
menu Text EUOLabel6 4 120 Move to trash
menu Text EUOLabel1 4 136 Use safe spot
menu Font Size 8
menu Text EUOLabel2 108 12 Travel method
menu Text EUOLabel3 108 36 Rune to storage
menu Text EUOLabel5 108 60 Rune to safespot
menu Font Size 8
menu Button EUOButton1 136 92 145 61 START
menu Button EUOButton2 4 4 93 25 Setup runebook
menu Button EUOButton3 4 28 93 25 Setup boat key
menu Button EUOButton4 4 52 93 25 Setup storage
menu Button EUOButton5 4 76 93 25 Setup trashcan
menu Check EUOCheckBox1 76 104 17 13 #false #false
menu Check EUOCheckBox2 76 120 17 13 #false #false
menu Check EUOCheckBox3 76 136 17 13 #false #false
menu Font BGColor Window
menu Combo Create EUOComboBox1 200 8 81
menu Combo Add EUOComboBox1 Recall
menu Combo Add EUOComboBox1 Sacred Journey
menu Combo Create EUOComboBox2 200 32 81
menu Combo Add EUOComboBox2 1
menu Combo Add EUOComboBox2 2
menu Combo Add EUOComboBox2 3
menu Combo Add EUOComboBox2 4
menu Combo Add EUOComboBox2 5
menu Combo Add EUOComboBox2 6
menu Combo Add EUOComboBox2 7
menu Combo Add EUOComboBox2 8
menu Combo Add EUOComboBox2 9
menu Combo Add EUOComboBox2 10
menu Combo Add EUOComboBox2 11
menu Combo Add EUOComboBox2 12
menu Combo Add EUOComboBox2 13
menu Combo Add EUOComboBox2 14
menu Combo Add EUOComboBox2 15
menu Combo Add EUOComboBox2 16
menu Combo Create EUOComboBox3 200 56 81
menu Combo Add EUOComboBox3 1
menu Combo Add EUOComboBox3 2
menu Combo Add EUOComboBox3 3
menu Combo Add EUOComboBox3 4
menu Combo Add EUOComboBox3 5
menu Combo Add EUOComboBox3 6
menu Combo Add EUOComboBox3 7
menu Combo Add EUOComboBox3 8
menu Combo Add EUOComboBox3 9
menu Combo Add EUOComboBox3 10
menu Combo Add EUOComboBox3 11
menu Combo Add EUOComboBox3 12
menu Combo Add EUOComboBox3 13
menu Combo Add EUOComboBox3 14
menu Combo Add EUOComboBox3 15
menu Combo Add EUOComboBox3 16
menu Show 900 270
set #MENUBUTTON N/A
return

sub stats_menu
  menu Clear
  menu Window Title Camotbik's crab fisher
  menu Window Color BtnFace
  menu Window Size 190 265
  menu Font Transparent #true
  menu Font Align Right
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Font Style
  menu Font Color Black
  menu Font BGColor 3DLight
  menu List Create EUOListBox1 -4 0 280 265
  menu List Add EUOListBox1 Stats
  ;menu List Add EUOListBox1 Crab %Crab_ammount
  menu List Add EUOListBox1 Apple Crab %Apple_Crab_ammount
  menu List Add EUOListBox1 Blue Crab %Blue_Crab_ammount
  menu List Add EUOListBox1 Dungeoness Crab %Dungeoness_Crab_ammount
  menu List Add EUOListBox1 King Crab %King_Crab_ammount
  menu List Add EUOListBox1 Rock Crab %Rock_Crab_ammount
  menu List Add EUOListBox1 Snow Crab %Snow_Crab_ammount
  menu List Add EUOListBox1 Tunnel Crab %Tunnel_Crab_ammount
  menu List Add EUOListBox1 Void Crab %Void_Crab_ammount
  ;menu List Add EUOListBox1 Lobster %Lobster_ammount
  menu List Add EUOListBox1 Blood Lobster %Blood_Lobster_ammount
  menu List Add EUOListBox1 Crusty Lobster %Crusty_Lobster_ammount
  menu List Add EUOListBox1 Dread Lobster %Dread_Lobster_ammount
  menu List Add EUOListBox1 Fred Lobster %Fred_Lobster_ammount
  menu List Add EUOListBox1 Hummer Lobster %Hummer_Lobster_ammount
  menu List Add EUOListBox1 Rock Lobster %Rock_Lobster_ammount
  menu List Add EUOListBox1 Shovel-Nose Lobster %Shovel_Lobster_ammount
  menu List Add EUOListBox1 Spiney Lobster %Spiney_Lobster_ammount
  menu List Add EUOListBox1 Void Lobster %Void_Lobster_ammount
  menu Show ;421 270
return

sub setup_loop
  while #MENUBUTTON <> EUOBUTTON1
  {
menuloop:
    if #MENUBUTTON = EUOButton5
    {
      set #MENUBUTTON N/A
      event SysMessage Target trash can
      set #targcurs 1
      while #targcurs <> 0
        wait 1
      set %trash #ltargetid
    }
    if #MENUBUTTON = EUOButton4
    {
      set #MENUBUTTON N/A
      event SysMessage Target storage
      set #targcurs 1
      while #targcurs <> 0
        wait 1
      set %storage #ltargetid
    }
    if #MENUBUTTON = EUOButton3
    {
      set #MENUBUTTON N/A
      event SysMessage Target boat key
      set #targcurs 1
      while #targcurs <> 0
        wait 1
      set %boat_key #ltargetid
    }
    if #MENUBUTTON = EUOButton2
    {
      set #MENUBUTTON N/A
      event SysMessage Target runebook
      set #targcurs 1
      while #targcurs <> 0
        wait 1
      set %runebook #ltargetid
    }
    if #MENUBUTTON = EUOButton1
    {
      set #MENUBUTTON N/A
      menu Get EUOComboBox1
      if #menures = 0
      {
        display please setup your Travel method
        goto menuloop
      }
      if #menures = 1
        set %travel_method r
      if #menures = 2
        set %travel_method c
      menu Get EUOComboBox2
      if #menures = 0
      {
        display please setup your rune to storage
        goto menuloop
      }
      else
        set %homerune_number #MENURES
      menu get EUOCheckBox3
      if #MENURES = #TRUE
      {
        set %use_safe_spot #MENURES
        menu Get EUOComboBox3
        if #menures = 0
        {
          display please setup your rune to a safespot
          goto menuloop
        }
        else
        {
          set %safe_spot_number #MENURES
        }
      }
      if %trash = N/A || if %storage = N/A || if %boat_key = N/A || if %runebook = N/A
      {
        display please setup your id's
        goto menuloop
      }
      menu get EUOCheckBox2
      set %movetotrash #MENURES
      menu get EUOCheckBox1
      set %usebank #MENURES
      return
    }
  }
return
« Last Edit: August 14, 2011, 12:46:27 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline Goliath

  • Sr. Member
  • *
  • Posts: 424
  • Activity:
    0%
  • Reputation Power: 5
  • Goliath has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
Re: First menu Attempt
« Reply #1 on: August 13, 2011, 09:32:37 PM »
0
Looks nice.. I like menus!!

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: First menu Attempt
« Reply #2 on: August 13, 2011, 09:41:33 PM »
0
First of all:
Your Style and Design getting much better everytime you try it out.

Atleast:
Buddy if you wanna give me Credits write me right please:P
Crome! not Chrome...

See ya

Crome

Offline camotbikTopic starter

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: First menu Attempt
« Reply #3 on: August 14, 2011, 12:44:18 AM »
0
Sorry Crome, had an typo.
« Last Edit: August 14, 2011, 12:46:06 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline Neo

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: First menu Attempt
« Reply #4 on: August 14, 2011, 10:24:55 AM »
0
Looks good camotbik...

Good job!

Also, I don't know if you like this, but I've recently tried this out with my crafter and loved it.

You can change your loop to something like:

Code: [Select]
gosub menu
repeat
if #menubutton <> N/A
gosub #menubutton
until #false

Then, you create separate subs for each button, i.e. sub EUOButton1, etc.

Also, you could add the stats menu to the same window as the setup menu, and add an option for the user to pause and change settings, without having to restart the script...

Cheers!
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline Guadah

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: First menu Attempt
« Reply #5 on: August 16, 2011, 07:07:15 PM »
0
I myself am addicted to Menus.  Went a bit nuts when I did a multi-skill trainer and burnt myself out some, but I'm always trying to figure something new out.

What you have up there is looking good brother, keep it up!

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: First menu Attempt
« Reply #6 on: August 17, 2011, 02:46:07 AM »
0
I myself am addicted to Menus.  Went a bit nuts when I did a multi-skill trainer and burnt myself out some, but I'm always trying to figure something new out.

What you have up there is looking good brother, keep it up!
Easyuo offering an very old Menu Designer with an very old easyuo version(only working with that version) u can Create via drag and drop the Menu and then copy from old euox version the Code and use in easyuo. In end you only need to connect variables with your Script.

Crome

Tags: