Author Topic: Time to strut your stuff :)  (Read 4533 times)

0 Members and 1 Guest are viewing this topic.

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Time to strut your stuff :)
« on: August 13, 2013, 08:57:22 PM »
0
I put this post here because I noticed that this sub-forum is especially active - and because I've had nothing but pleasant encounters here  - with good answers to my generally lame questions...

I'm putting together yet another EUO menu for my new chars on SP, and really want to jazz them up a bit with colors instead of just boring text. My brain hurts from reading about Menu Image Create in the UO Docs...
And let's face it - In the heat of battle, you can find a color quicker than you can find some silly text label...

Would love to get some input or examples here.... Here's your chance to "Strut Your Stuff".

Holy crap... Check this out:  http://www.aljazeera.com/news/asia/2013/08/20138141115513658.html  

 ::)                                        These guys have no idea how bad a Karma hit they took for that...


« Last Edit: August 13, 2013, 09:04:38 PM by Grandewd »

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Time to strut your stuff :)
« Reply #1 on: August 13, 2013, 09:03:05 PM »
0


Here's what I mean


Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +272
  • Referrals: 1
    • View Profile
Re: Time to strut your stuff :)
« Reply #2 on: August 13, 2013, 09:38:05 PM »
0
http://cloford.com/resources/colours/500col.htm
Bookmark that link.

The "Access" Numbers are how you use these with EUO.

In order to change the Color of a button on a menu, you change the Font background Color Before you Create the Button

Menu Font BGColor 2037680 ; < This would be Indian Red
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Time to strut your stuff :)
« Reply #3 on: August 14, 2013, 12:03:40 AM »
0
http://cloford.com/resources/colours/500col.htm
Bookmark that link.

The "Access" Numbers are how you use these with EUO.

In order to change the Color of a button on a menu, you change the Font background Color Before you Create the Button

Menu Font BGColor 2037680 ; < This would be Indian Red


Oh yea... this is gonna be so kewl...

I'll post my results...

Thx for pointing me in the right direction manwinc .

 ;D

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Time to strut your stuff :)
« Reply #4 on: August 15, 2013, 05:06:22 PM »
0


Ok, thx to manwinc's kind assistance - I've put together a sample "mega" menu that I'll be using for many tasks.  My question is this:  Would a menu with this many buttons be slow to respond, due to having to loop thru all of them waiting for a button press?



Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • 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: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Time to strut your stuff :)
« Reply #5 on: August 15, 2013, 06:24:38 PM »
0
There's a few things you can do to speed things up.  Instead of going through a whole bunch of "if" statements comparing #MENUBUTTON, suppose you name your functions that run each button as the value that comes back as #MENUBUTTON, then your handler becomes very easy:
Code: [Select]
if #MENUBUTTON <> N/A
{
  set %function #MENUBUTTON
  set #MENUBUTTON N/A
  gosub %function
}

Does that make sense?  This will make things pretty snappy, especially if you kick your #LPC up to 100.  Don't go too high, because that effects the speed of surrounding scripts.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +272
  • Referrals: 1
    • View Profile
Re: Time to strut your stuff :)
« Reply #6 on: August 15, 2013, 06:40:21 PM »
0
Yeah, what tm said. You can actually just gosub #menbutton
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

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: +556
  • Referrals: 0
    • View Profile
Re: Time to strut your stuff :)
« Reply #7 on: August 15, 2013, 06:52:04 PM »
0
Curious to see the end result of this mega display of button.   

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Time to strut your stuff :)
« Reply #8 on: August 15, 2013, 07:12:49 PM »
0
Ok guys.... I've been using an if loop in my scripts (below) for years, without ever bothering to try and understand exactly what it's doing.  I copied/pasted it from someone else's script years ago, and since it works - just never looked at it.  And now that I am lookin' at it - in relation to what you 2 said about using functions - I feel so freekin' dumb... I don't think I understand exactly how MY loop works (much less incorporating your function example)... What confuses me the most, is that there is no "actual" sub #menubutton - and don't understand this part at all.

Could you tell me how to change this - to something that's more efficient?

Code: [Select]
set #menubutton n/a
loop:
if #menubutton <> n/a
{
gosub #menubutton
set #menubutton n/a
}
goto loop

« Last Edit: August 15, 2013, 07:15:18 PM by Grandewd »

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +272
  • Referrals: 1
    • View Profile
Re: Time to strut your stuff :)
« Reply #9 on: August 15, 2013, 07:24:07 PM »
0
Ditch the Goto Training wheels and put a nice repeat until in that bad boy.

Repeat
Until 1 = 2

Repeat
until Penguins

Repeat
until Broked

if you Don't use a Comparison (= >= > < <= <> in notin), then it automatically assumes you are putting = #True

if %Test
Do this

is the same thing as

if %Test = #True
Do this
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Time to strut your stuff :)
« Reply #10 on: August 16, 2013, 08:28:30 AM »
0
Heres an expanded version of what was meant above... with the added bonus of an end script button detection

Code: [Select]
; define menu
menu Button BUTTONNAME_HealMyself 292 388 75 41 heal me
menu Button BUTTONNAME_EV 292 388 75 41 cast an ev
menu Button BUTTONNAME_HaltScript 292 388 75 41 Halt script
set #menuButton N/A

; Read Menu
set %EndScript #false
Repeat
  If #MenuButton <> N/A
     {
     gosub #menuButton
     set #menuButton N/A   
     }
until %EndScript = #true
halt  ; End script when Button "Halt Script" Pressed

; button Subs
sub ButtonNAme_HaltScript
  set %EndScript #true
return

sub ButtonName_EV
  ; Do the stuff to cast an ev
return

sub ButtonName_HealMyself
  ; Do the stuff to Healmyself
return

Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Tags: