Page 3 of 10 FirstFirst 12345 ... LastLast
Results 21 to 30 of 91

Thread: UberBar

  1. Default

    Fixed the nerve issue on standard skins since I doubt anybody's using mine ><.

    Still to do:
    - Capped character support (I'll probably just grab gibs code. I'm a damn theif and I have no capped characters to test it out on).
    - Pulse timer. I would really like to get it in since it was the original reason for making it ><.

  2. Default

    So does this now properly display nerve damage like SF or is it a line of text like gibs that indicates nerve damage?

  3. Default

    It looks just like SF.

  4. Default

    Werd.

  5. Default

    I have no capped characters, so I'm curious about something...

    When you're capped, does the regular SF experience bar stay at 100% or something? What's the need of all the math in the value function?

    *edit*
    OHHH... So the bar just says:
    23541234890123 experience
    with a full bar, right?
    Last edited by Deathravin; 04-05-2010 at 11:17 AM.

  6. #26

    Default

    I think the experience bar counts down to the next training point.

  7. Default

    Nah, somebodys just going to need to give me a capped character so I can test this stuff out...

    how about a nice sorcerer?

  8. Default

    Alright... well I was making a GTK version to be used with wizard. I got this far before my brain started melting. I'm pretty sure I can do the exp since login, avg and pulse, and the TNL no problem...

    But how the heck can I put the little damage icons where they're supposed to go?
    And am I even doing this right?

    Code:
    =begin
    
      So I was thinkin to myself the other day,
        'Hey, I want an uberbar for Wizard, and I think other people do too.'
      So here it is. Stay classy San Diego.
    
    =end
    
    no_kill_all
    no_pause_all
    hide_me
    
    Settings.load
    window_width = 168
    window_height = 232
    window_position = Settings['window_position']
    window_decorated = Settings['window_decorated']
    minbar_height = 19
    minbar_width = 84
    
    oldHP = oldMP = oldST = oldSP = oldXP = oldMD = oldSN = oldEN = oldIN = oldWO = uberBar_pulse = uberBar_health = uberBar_mana = uberBar_stamina = uberBar_spirit = uberBar_exp = uberBar_mind = uberBar_stance = uberBar_encumb = uberBar_table = uberBar = done = window_close = nil
    capped = false
    capped = true if Char.level == 100
    
    # random arrays
    #areas = ["nsys","leftArm","rightArm","rightLeg","leftLeg","head","rightFoot","leftFoot","rightHand","leftHand","rightEye","leftEye","back","neck","chest","abdomen"]
    debug = true
    
    # XP watcher variables
    xpnFirstTime = Time.now		# Time UB was first run
    if capped then xpnFirst = 100 - ((((XMLData.next_level_text.delete(' experience').to_i / 2500 + 1) * 2500 - XMLData.next_level_text.delete(' experience').to_i) * 100) / 2500)	# First experience
    else ; xpnFirst = XMLData.next_level_text.delete(' until next level').to_i ; end	# First experience
    xpnTotal = 0			# Zero total xp to start
    xpnCur = xpnFirst		# Current exp to go
    xpnOld = xpnFirst		# Last round exp to go
    xpnHour = 0			# average Experience per hour
    xpnLast = 0			# Last Experience gain
    
    
    Gtk.queue {
    
      uberBar = Gtk::Window.new
      uberBar.title = 'UberBar'
      uberBar.signal_connect('delete_event') { window_close = true }
      uberBar.border_width = 2
      
      uberBar_table = Gtk::Table.new 12, 2, true
      uberBar.add uberBar_table
      
      uberBar_damage = Gtk::Image.new "#{$script_dir}uberBar/Health.bmp"
      uberBar_damage.height_request = minbar_height * 7
      uberBar_damage.width_request = minbar_width
      uberBar_table.attach uberBar_damage, 0, 1, 0, 8
      
      uberBar_damage_larm = Gtk::Image.new "#{$script_dir}uberBar/Wound1.bmp"
      #uberBar_damage_larm
    
      uberBar_pulse = Gtk::ProgressBar.new
      uberBar_pulse.height_request = minbar_height
      uberBar_pulse.width_request = minbar_width
      uberBar_table.attach uberBar_pulse, 1, 2, 3, 4
    
      uberBar_health = Gtk::ProgressBar.new
      uberBar_health.height_request = minbar_height
      uberBar_health.width_request = minbar_width
      uberBar_table.attach uberBar_health, 1, 2, 4, 5
    
      uberBar_mana = Gtk::ProgressBar.new
      uberBar_mana.height_request = minbar_height
      uberBar_mana.width_request = minbar_width
      uberBar_table.attach uberBar_mana, 1, 2, 5, 6
    
      uberBar_stamina = Gtk::ProgressBar.new
      uberBar_stamina.height_request = minbar_height
      uberBar_stamina.width_request = minbar_width
      uberBar_table.attach uberBar_stamina, 1, 2, 6, 7
    
      uberBar_spirit = Gtk::ProgressBar.new
      uberBar_spirit.height_request = minbar_height
      uberBar_spirit.width_request = minbar_width
      uberBar_table.attach uberBar_spirit, 1, 2, 7, 8
    
      uberBar_exp = Gtk::ProgressBar.new
      uberBar_exp.height_request = minbar_height
      uberBar_exp.width_request = minbar_width
      uberBar_table.attach uberBar_exp, 0, 2, 8, 9
    
      uberBar_mind = Gtk::ProgressBar.new
      uberBar_mind.height_request = minbar_height
      uberBar_mind.width_request = minbar_width
      uberBar_table.attach uberBar_mind, 0, 2, 9, 10
    
      uberBar_stance = Gtk::ProgressBar.new
      uberBar_stance.height_request = minbar_height
      uberBar_stance.width_request = minbar_width
      uberBar_table.attach uberBar_stance, 0, 2, 10, 11
    
      uberBar_encumb = Gtk::ProgressBar.new
      uberBar_encumb.height_request = minbar_height
      uberBar_encumb.width_request = minbar_width
      uberBar_table.attach uberBar_encumb, 0, 2, 11, 12
    
      uberBar.show_all
      #uberBar.decorated = window_decorated unless window_decorated.nil?
      #uberBar.resize(window_width.to_i, window_height.to_i)
      #window_position[0] = [[0, window_position[0].to_i].max, (Gdk.screen_width-window_width.to_i)].min
      #window_position[1] = [[0, window_position[1].to_i].max, (Gdk.screen_height-window_height.to_i)].min
      #uberBar.move(window_position[0].to_i, window_position[1].to_i)
      uberBar.keep_above = true
    
      done = true
    }
    
    wait_until { done }
    
    before_dying {
    	done = false
    	Gtk.queue {
    		window_width = uberBar.allocation.width
    		window_height = uberBar.allocation.height
    		window_decorated = uberBar.decorated?
    		window_position = uberBar.position
    		uberBar.destroy
    		done = true
    	}
    	wait_until { done }
    	Settings['window_width'] = window_width
    	Settings['window_height'] = window_height
    	Settings['window_decorated'] = window_decorated
    	Settings['window_position'] = window_position if (window_position.class == Array) and (window_position[0].to_i > -5) and (window_position[1].to_i > -5)
    	Settings.save
    }
    
    loop {
      wait_while { oldHP == checkhealth and oldMP == checkmana and oldST == checkstamina and oldSP = checkspirit and oldMD == XMLData.mind_text and oldSN == XMLData.stance_text and oldEN == XMLData.encumbrance_text }
      
      if oldHP != checkhealth		then echo "updated health" if debug	; oldHP = checkhealth			; Gtk.queue { uberBar_health.fraction	= percenthealth/100.0 ;			uberBar_health.text	= "#{checkhealth}/#{maxhealth}" } end
      if oldMP != checkmana			then echo "updated mana" if debug	; oldMP = checkmana			; Gtk.queue { uberBar_mana.fraction		= percentmana/100.0 ;		uberBar_mana.text	= "#{checkmana}/#{maxmana}" } end
      if oldST != checkstamina		then echo "updated stamina" if debug	; oldST = checkstamina			; Gtk.queue { uberBar_stamina.fraction	= percentstamina/100.0 ;		uberBar_stamina.text	= "#{checkstamina}/#{maxstamina}" } end
      if oldSP != checkspirit		then echo "updated spirit" if debug	; oldSP = checkspirit			; Gtk.queue { uberBar_spirit.fraction	= percentspirit/100.0 ;			uberBar_spirit.text	= "#{checkspirit}/#{maxspirit}" } end
      if oldMD != XMLData.mind_text		then echo "updated mind" if debug	; oldMD = XMLData.mind_text		; Gtk.queue { uberBar_mind.fraction		= XMLData.mind_value/100.0 ;	uberBar_mind.text	= XMLData.mind_text } end
      if oldSN != XMLData.stance_text	then echo "updated stance" if debug	; oldSN = XMLData.stance_text		; Gtk.queue { uberBar_stance.fraction	= XMLData.stance_value/100.0 ;		uberBar_stance.text	= XMLData.stance_text } end
      if oldEN != XMLData.encumbrance_text	then echo "updated encumbr" if debug	; oldEN = XMLData.encumbrance_text	; Gtk.queue { uberBar_encumb.fraction	= XMLData.encumbrance_value/100.0 ;	uberBar_encumb.text	= XMLData.encumbrance_text } end
    
    }
    UberBar.jpg

    1) Am I doing it right so far? (I mean the GTK part)
    2) Anybody know how to put an smaller bmp on top of that picture? - the real brain melter for me atm
    3) And how the bloody hell do you change the color of the Progress bars?
    Can I not do it because they're pictures from the style? is the style locked somehow? how would I make my own style? where do styles come from? Same as babies?
    I made the bars very plain and look almost like SF, but it would look so much better if I could keep that theme and just change the bloody colors.


    update ideas:
    - Ability to Change the theme - standard SF, standard Wizard, burly dude, hot chick (default)....
    - Get the damn pulse timer working already - I can probably get that done today or tomorrow.
    Last edited by Deathravin; 04-10-2010 at 06:19 PM.

  9. Default

    Use a layout widget and put the images in it. Images put in first show up underneath images put in later. You can see narost for an example. It only has to do this once with the circle, and moves the circle around. You won't need to move anything around, just toggle what's visible when the injuries change.
    Get Lich - Vote for Gemstone (topmudsites.com)

  10. Default

    Ya, I looked at Narost, that's what made my eyes bleed and brain melt... I'll try to take another stab at it.

    Any idea about the colors? Or am I stuck with dumb SF-style bars? (Cause I'm not keeping all of them that dumb green color. It's hard to tell what's what)
    Last edited by Deathravin; 04-10-2010 at 09:39 PM.

Similar Threads

  1. Problem with uberbar
    By zinzimir in forum Miscellaneous Scripts
    Replies: 3
    Last Post: 04-14-2017, 12:14 PM
  2. Issues with uberbar
    By Taelinn in forum The Lich Project
    Replies: 1
    Last Post: 04-20-2015, 10:20 AM
  3. Uberbar and scars?
    By Trouble in forum Miscellaneous Scripts
    Replies: 0
    Last Post: 09-10-2014, 03:42 AM
  4. Uberbar
    By Middian in forum The Lich Project
    Replies: 2
    Last Post: 03-26-2011, 05:41 PM
  5. Uberbar
    By Khariz in forum The Lich Project
    Replies: 1
    Last Post: 06-01-2010, 08:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •