Page 2 of 10 FirstFirst 1234 ... LastLast
Results 11 to 20 of 91

Thread: UberBar

  1. #11

    Default

    Is this on the repository yet?

  2. Default

    I've been playing with the best way to code the mana timer here and there, I think the last time I looked at it, I got frustrated and took it all out to start from scratch... And I've had a hectic week, so maybe I'll get to it again in a couple weeks.
    But the rest is working... Just for some reason you can't start it as a fav... not sure why. Even if you have another fav'ed script start it, it still comes up with a funny error.
    Ohwell, It's a work in progress...

    It's on the repository now. And I guess I'll post it here if anybody has any suggestions (or ideas how to make the favs error stop)...

    Code:
    #uberBar.lic
    #Makes you an UBERBAR!
    #Combines XPSF, and many other bars into one bar to rule them all.
    
    def ubWoundsFullDis()
    	displayw = ""
    	areas = [["nsys", "nerves"],["leftArm", "left arm"],["rightArm", "right arm"],["rightLeg", "right leg"],["leftLeg", "left leg"],["head", "head"],["rightFoot", "right foot"],["leftFoot", "left foot"],["rightHand", "right hand"],["leftHand", "left hand"],["rightEye", "right eye"],["leftEye", "left eye"],["back", "back"],["neck", "neck"],["chest", "chest"],["abdomen", "abdomen"]]
    	areas.each do |area|
    		if eval("Wounds.#{area[0]}") > 0 then displayw += "<image id='#{area[0]}' name='Injury#{eval("Wounds.#{area[0]}")}' cmd='cure #{area[1]}' tooltip='cure #{area[1]}' height='0' width='0'/>"
    		elsif eval("Scars.#{area[0]}") > 0 then displayw += "<image id='#{area[0]}' name='Scar#{eval("Scars.#{area[0]}")}' cmd='cure #{area[1]}' tooltip='cure #{area[1]}' height='0' width='0'/>"
    		elsif eval("Wounds.#{area[0]}") == 0 then displayw += "<image id='#{area[0]}' name='#{area[0]}' cmd='cure #{area[1]}' tooltip='cure #{area[1]}' height='0' width='0'/>"
    		elsif eval("Scars.#{area[0]}") == 0 then displayw += "<image id='#{area[0]}' name='#{area[0]}' cmd='cure #{area[1]}' tooltip='cure #{area[1]}' height='0' width='0'/>"
    		end
    	end
    	return displayw
    end
    def ubWoundsChangeDis(location)
    	areas = { "nsys" => "nerves", "leftArm" => "left arm", "rightArm" => "right arm", "rightLeg" => "right leg", "leftLeg" => "left leg", "head" => "head", "rightFoot" => "right foot", "leftFoot" => "left foot", "rightHand" => "right hand", "leftHand" => "left hand", "rightEye" => "right eye", "leftEye" => "left eye", "back" => "back", "neck" => "neck", "chest" => "chest", "abdomen" => "abdomen", }
    	displayw = ""
    	if eval("Wounds.#{location}") > 0 then displayw = "<image id='#{location}' name='Injury#{eval("Wounds.#{location}")}' cmd='cure #{areas[location]}' tooltip='cure #{areas[location]}' height='0' width='0'/>"
    	elsif eval("Scars.#{location}") > 0 then displayw = "<image id='#{location}' name='Scar#{eval("Scars.#{location}")}' cmd='cure #{areas[location]}' tooltip='cure #{areas[location]}' height='0' width='0'/>"
    	else ; displayw = "<image id='#{location}' name='#{location}' cmd='cure #{areas[location]}' tooltip='cure #{areas[location]}' height='0' width='0'/>"
    	end
    	return displayw
    end
    def ubWoundsMash()
    	woundmash = []
    	areas = ["nsys","leftArm","rightArm","rightLeg","leftLeg","head","rightFoot","leftFoot","rightHand","leftHand","rightEye","leftEye","back","neck","chest","abdomen"]
    	areas.each do |area|
    		woundmash.push eval("(Wounds.#{area} * 10) + Scars.#{area}")
    	end
    	return woundmash
    end
    
    # Opening Setup
    openLines = ["<closeDialog id='UberBar'/>",
    	"<openDialog type='dynamic' id='UberBar' title='Uber Bar' target='UberBar' location='main' top='0' left='0' align='nw' height='232' width='190' resident='false'>",
    	"<dialogData id='UberBar'>",
    	"<skin id='ubinjury' name='InjuriesPanel' controls='nsys,leftArm,rightArm,rightLeg,leftLeg,head,rightFoot,leftFoot,rightHand,leftHand,rightEye,leftEye,back,neck,chest,abdomen' top='5' left='5' width='100' height='150' align='nw'/>"]
    tosend = openLines.join
    tosend += ubWoundsFullDis()
    openLines = ["<label id='ublog'	value='Login:'		justify='4' anchor_left='ubinjury'	align='n'		top='5' left='5' height='15' width='50'/>",
    	"<label id='ubhour'	value='AVG/Hr:'		justify='4' anchor_left='ubinjury'	anchor_top='ublog'	top='4' left='5' height='15' width='50'/>",
    	"<label id='ublast'	value='Pulse:'		justify='4' anchor_left='ubinjury'	anchor_top='ubhour'	top='4' left='5' height='15' width='50'/>",
    	"<label id='ublogv'	value='0'		justify='6' anchor_left='ublog'		align='n'		top='5' left='0' height='15' width='50'/>",
    	"<label id='ubhourv'	value='0'		justify='6' anchor_left='ubhour'	anchor_top='ublogv'	top='4' left='0' height='15' width='50'/>",
    	"<label id='ublastv'	value='0'		justify='6' anchor_left='ublast'	anchor_top='ubhourv'	top='4' left='0' height='15' width='50'/>",
    	"<skin id='ubpulse' name='concentrationBar' controls='concentration' anchor_left='ubinjury' anchor_top='ublast' top='9' left='5' width='0' height='15'/><progressBar id='concentration' value='100' text='Pulse Timer' customText='t' anchor_left='ubinjury' anchor_top='ublast' top='9' left='5' width='100' height='15'/>",
    	"<skin id='ubheal' name='healthBar'	controls='health'	anchor_left='ubinjury' anchor_top='ubpulse' top='3' left='5' width='0' height='15'/><progressBar id='health' value='#{percenthealth}' text='#{checkhealth}/#{maxhealth}' customText='t' anchor_left='ubinjury' anchor_top='ubpulse' top='3' left='5' width='100' height='15'/>",
    	"<skin id='ubmana' name='manaBar'	controls='mana'		anchor_left='ubinjury' anchor_top='health' top='3' left='4' width='0' height='15'/><progressBar id='mana' value='#{percentmana}' text='#{checkmana}/#{maxmana}' customText='t' anchor_left='ubinjury' anchor_top='health' top='3' left='4' width='100' height='15'/>",
    	"<skin id='ubstam' name='staminaBar'	controls='stamina'	anchor_left='ubinjury' anchor_top='mana' top='3' left='5' width='0' height='15'/><progressBar id='stamina' value='#{percentstamina}' text='#{checkstamina}/#{maxstamina}' customText='t' anchor_left='ubinjury' anchor_top='mana' top='3' left='5' width='100' height='15'/>",
    	"<skin id='ubspir' name='spiritBar'	controls='spirit'	anchor_left='ubinjury' anchor_top='stamina' top='3' left='5' width='0' height='15'/><progressBar id='spirit' value='#{percentspirit}' text='#{checkspirit}/#{maxspirit}' customText='t' anchor_left='ubinjury' anchor_top='stamina' top='3' left='5' width='100' height='15'/>",
    	"<progressBar id='ubnext' value='#{XMLData.next_level_value}' text='#{XMLData.next_level_text.delete(' until next level')} until #{Char.level+1}'	anchor_top='ubinjury'		top='3' left='4' width='186' height='15'/>",
    	"<progressBar id='ubmind' value='#{XMLData.mind_value}' text='#{XMLData.mind_text}' customText='t' anchor_top='ubnext' top='3' left='4' width='186' height='15'/>",
    	"<progressBar id='ubstnc' value='#{XMLData.stance_value}' text='#{XMLData.stance_text}' anchor_top='ubmind' top='3' left='4' width='186' height='15'/>",
    	"<progressBar id='ubencm' value='#{XMLData.encumbrance_value}' text='#{XMLData.encumbrance_text}' anchor_top='ubstnc' top='3' left='4' width='186' height='15'/>"]
    tosend += openLines.join
    tosend += "</dialogData></openDialog>"
    
    puts(tosend)
    
    
    # random arrays
    areas = ["nsys","leftArm","rightArm","rightLeg","leftLeg","head","rightFoot","leftFoot","rightHand","leftHand","rightEye","leftEye","back","neck","chest","abdomen"]
    debug = false
    # XP watcher variables
    xpnFirstTime = Time.now		# Time UB was first run
    xpnFirst = XMLData.next_level_text.delete(' until next level').to_i	# 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
    
    # Stat Variables
    oldHP = checkhealth
    oldMP = checkmana
    oldST = checkstamina
    oldSP = checkspirit
    oldXP = XMLData.next_level_text
    oldMD = XMLData.mind_text
    oldSN = XMLData.stance_text
    oldEN = XMLData.encumbrance_text
    oldIN = XMLData.injuries.to_s
    oldWO = ubWoundsMash()
    
    loop {
    	wait_while { oldHP == checkhealth and oldMP == checkmana and oldST == checkstamina and oldSP == checkspirit and oldXP == XMLData.next_level_text and oldMD == XMLData.mind_text and oldSN == XMLData.stance_text and oldEN == XMLData.encumbrance_text and oldIN == XMLData.injuries.to_s }
    	nowTime = Time.now
    	doLines = "<dialogData id='UberBar'>"
    	
    	if oldHP != checkhealth			then echo "updated health" if debug	; oldHP = checkhealth		; doLines += "<skin id='ubheal' name='healthBar' controls='health' anchor_left='ubinjury' anchor_top='ubpulse' top='9' left='5' width='0' height='15'/><progressBar id='health' value='#{percenthealth}' text='#{checkhealth}/#{maxhealth}' customText='t' anchor_left='ubinjury' anchor_top='ubpulse' top='4' left='5' width='100' height='15'/>" end
    	if oldMP != checkmana			then echo "updated mana" if debug	; oldMP = checkmana			; doLines += "<skin id='ubmana' name='manaBar' controls='mana' anchor_left='ubinjury' anchor_top='health' top='3' left='4' width='0' height='15'/><progressBar id='mana' value='#{percentmana}' text='#{checkmana}/#{maxmana}' customText='t' anchor_left='ubinjury' anchor_top='health' top='3' left='4' width='100' height='15'/>" end
    	if oldST != checkstamina		then echo "updated stamina" if debug	; oldST = checkstamina		; doLines += "<skin id='ubstam' name='staminaBar' controls='stamina' anchor_left='ubinjury' anchor_top='mana' top='3' left='5' width='0' height='15'/><progressBar id='stamina' value='#{percentstamina}' text='#{checkstamina}/#{maxstamina}' customText='t' anchor_left='ubinjury' anchor_top='mana' top='3' left='5' width='100' height='15'/>" end
    	if oldSP != checkspirit			then echo "updated spirit" if debug	; oldSP = checkspirit		; doLines += "<skin id='ubspir' name='spiritBar' controls='spirit' anchor_left='ubinjury' anchor_top='stamina' top='3' left='5' width='0' height='15'/><progressBar id='spirit' value='#{percentspirit}' text='#{checkspirit}/#{maxspirit}' customText='t' anchor_left='ubinjury' anchor_top='stamina' top='3' left='5' width='100' height='15'/>" end
    	if oldMD != XMLData.mind_text		then echo "updated mind" if debug	; oldMD = XMLData.mind_text		; doLines += "<progressBar id='ubmind' value='#{XMLData.mind_value}' text='#{XMLData.mind_text}' customText='t' anchor_top='ubnext' top='3' left='4' width='186' height='15'/>" end
    	if oldSN != XMLData.stance_text		then echo "updated stance" if debug	; oldSN = XMLData.stance_text	; doLines += "<progressBar id='ubstnc' value='#{XMLData.stance_value}' text='#{XMLData.stance_text}' anchor_top='ubmind' top='3' left='4' width='186' height='15'/>" end
    	if oldEN != XMLData.encumbrance_text	then echo "updated encumbr" if debug	; oldEN = XMLData.encumbrance_text	; doLines += "<progressBar id='ubencm' value='#{XMLData.encumbrance_value}' text='#{XMLData.encumbrance_text}' anchor_top='ubstnc' top='3' left='4' width='186' height='15'/>" end
    	if oldXP != XMLData.next_level_text
    		echo "updated next_level" if debug
    		xpnCur = XMLData.next_level_text.delete(' until next level').to_i
    		xpnLast = xpnOld - xpnCur
    		xpnLast = 0 if xpnLast < 0
    		xpnTotal += xpnLast
    		xpnHour = ((1.00 * xpnTotal) / ((nowTime - xpnFirstTime)/3600.00)).to_i
    		xpnOld = xpnCur
    		oldXP = XMLData.next_level_text
    		doLines += "<progressBar id='ubnext' value='#{XMLData.next_level_value}' text='#{xpnCur} until #{Char.level+1}' anchor_top='ubinjury' top='3' left='4' width='186' height='15'/>"
    		doLines += "<label id='ublogv'	value='#{xpnTotal}' justify='6' anchor_left='ublog' align='n' top='5' left='0' height='15' width='50'/>"
    		doLines += "<label id='ubhourv'	value='#{xpnHour}' justify='6' anchor_left='ubhour' anchor_top='ublogv' top='4' left='0' height='15' width='50'/>"
    		doLines += "<label id='ublastv'	value='#{xpnLast}' justify='6' anchor_left='ublast' anchor_top='ubhourv' top='4' left='0' height='15' width='50'/>"
    	end
    	if oldIN != XMLData.injuries.to_s
    		echo "updated injuries" if debug
    		newWO = ubWoundsMash()
    		newWO.length.times { |n|
    			if oldWO[n] != newWO[n] then doLines += ubWoundsChangeDis(areas[n]) end
    		}
    		oldIN = XMLData.injuries.to_s
    		oldWO = ubWoundsMash()
    	end
    	doLines += "</dialogData>"
    	puts(doLines) if doLines != "<dialogData id='UberBar'></dialogData>"
    }
    I've been going back and forth on making the mind bar green again. I kinda liked it green...

    Oh, and here's that skin, hollar if you want any changes to that either...
    Last edited by Deathravin; 09-18-2009 at 12:48 AM.

  3. #13

    Default

    xp thing is busted for capped chars.... kinda like xpsf was. check out gibsxpsf for fixes you may be able to grab info from it.

  4. #14
    Join Date
    Apr 2005
    Location
    Close enough to Pittsburgh
    Posts
    1,723

    Default

    the exp part is broken for capped characters. I ended up fixing it for xpsf. The problem is that if you're capped, you never get that "XXXX until next" or whatever it is... the fix I patched in, oversimplified, is...
    Code:
    		if $capped
    		data = matchtimeout(60, "experience\'")
    		else
    		data = matchtimeout(60, "until next level'")
    		end
    So, fixing it for capped people is what I'd suggest. I glanced over your code and just didn't want to touch it.



    In memory of Ken "Zzentar" Dumas.

    Gibreficul

    AIM = Lord Gibreficul

  5. #15

    Default

    found a bug as an empath.

    if i take someones nerve wound the whole uberbar window is covered by a HUGE number once I heal down the nerve wound. I cant select specific locations such as left hand, right arm, head, ect to heal it still looks like there is a HUGE area for nerve wound heals. So no matter where I click on the portrait its trying to heal a nerve wound that is no longer there.

  6. Default

    Ya, I guess I have to test it with the default skin. always the little things LOL.

  7. #17

    Default

    Working on a little SF widget myself, sent you a couple of PMs.

  8. #18

    Default

    Is this available to snag up yet? I'd really like to put this on my SF.
    Quote Originally Posted by Geshron View Post
    But perhaps I will attack the town with a sword on LSD, claiming that I was in the Landing and trying to reach Solhaven to help out. Then you can be like "oh THAT's Geshron". I have good ideas.
    Quote Originally Posted by Loagan View Post
    Aww, someone is mad. =( Don't get sand in your vagina.

    Is this still here? 09-04-2009 09:50 AM you've got 17 green bars and 80 posts. go fuck yourself.

  9. Default

    As someone resolutionally challenged (10" screen) I would love to use this, but this is all i get when I try to run it:

    --- Lich: UberBar active.
    --- Error: UberBar: (eval):53:in `start_script': uninitialized constant XMLData
    --- Lich: UberBar has exited.

    I've tried with the skin posted, but no change. I'm new to this so have no clue what to do to get the thing working. Any help? using lich 3.95 and stormfront.

  10. #20
    Join Date
    Apr 2005
    Location
    Close enough to Pittsburgh
    Posts
    1,723

    Default

    I updated uberbar for capped characters, and repoed it as:

    gibs_uberbar.lic

    Enjoy.


    In memory of Ken "Zzentar" Dumas.

    Gibreficul

    AIM = Lord Gibreficul

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
  •