Ir para conteúdo
  • 0

[Pedido] Tirar Algumas Coisas Da Barra De Health


Developer Berg

Pergunta

Olá Gente, queria pedir um negocio a vcs, n conseguir fazer, toda vez que eu faço acontece alguns bugs, é pra tirar algumas Skills que tem na minha barra de Health.

que são as seguintes coisas.

 

Pokemon
Tournament
Pesca
Catch

 

e se fosse possível, adicionar uma barra de " Mana " no caso Chakra que eu uso server de narutibia.

 

Print Da Minha Barra De Health.

QOi3DUK.png

 

Script Lua

 

Spoiler
Icons = {}Icons[1] = { tooltip = tr('You are poisoned'), path = '/game_healthinfo/icons/poisoned.png', id = 'condition_poisoned' }Icons[2] = { tooltip = tr('You are burning'), path = '/game_healthinfo/icons/burning.png', id = 'condition_burning' }Icons[4] = { tooltip = tr('You are electrified'), path = '/game_healthinfo/icons/electrified.png', id = 'condition_electrified' }Icons[8] = { tooltip = tr('You are drunk'), path = '/game_healthinfo/icons/drunk.png', id = 'condition_drunk' }Icons[16] = { tooltip = tr('You are protected by a magic shield'), path = '/game_healthinfo/icons/magic_shield.png', id = 'condition_magic_shield' }Icons[32] = { tooltip = tr('You are paralysed'), path = '/game_healthinfo/icons/slowed.png', id = 'condition_slowed' }Icons[64] = { tooltip = tr('You are hasted'), path = '/game_healthinfo/icons/haste.png', id = 'condition_haste' }Icons[128] = { tooltip = tr('You may not logout during a fight'), path = '/game_healthinfo/icons/logout_block.png', id = 'condition_logout_block' }Icons[256] = { tooltip = tr('You are drowing'), path = '/game_healthinfo/icons/drowning.png', id = 'condition_drowning' }Icons[512] = { tooltip = tr('You are freezing'), path = '/game_healthinfo/icons/freezing.png', id = 'condition_freezing' }Icons[1024] = { tooltip = tr('You are dazzled'), path = '/game_healthinfo/icons/dazzled.png', id = 'condition_dazzled' }Icons[2048] = { tooltip = tr('You are cursed'), path = '/game_healthinfo/icons/cursed.png', id = 'condition_cursed' }Icons[4096] = { tooltip = tr('Você está strengthened'), path = '/game_healthinfo/icons/strengthened.png', id = 'condition_strengthened' }Icons[8192] = { tooltip = tr('You may not logout or enter a protection zone'), path = '/game_healthinfo/icons/protection_zone_block.png', id = 'condition_protection_zone_block' }Icons[16384] = { tooltip = tr('You are within a protection zone'), path = '/game_healthinfo/icons/protection_zone.png', id = 'condition_protection_zone' }Icons[32768] = { tooltip = tr('You are bleeding'), path = '/game_healthinfo/icons/bleeding.png', id = 'condition_bleeding' }Icons[65536] = { tooltip = tr('You are hungry'), path = '/game_healthinfo/icons/hungry.png', id = 'condition_hungry' }healthInfoWindow = nilhealthBar = nilmanaBar = nilsoulBar = nilhealthLabel = nilmanaLabel = nilsoulLabel = nilcapLabel = nilfunction init()  connect(LocalPlayer, { onHealthChange = onHealthChange,                         onManaChange = onManaChange,                         onStatesChange = onStatesChange,                         onFreeCapacityChange = onFreeCapacityChange,						 onExperienceChange = onExperienceChange,						 onSkillChange = onSkillChange,						 })  connect(g_game, { onGameEnd = refresh,onGameStart = begingaem })  healthInfoButton = modules.client_topmenu.addRightGameToggleButton('healthInfoButton', tr('Health Information'), '/images/topbuttons/healthinfo', toggle)  healthInfoButton:setOn(true)  healthInfoWindow = g_ui.loadUI('healthinfo', modules.game_interface.getRightPanel())  healthInfoWindow:disableResize()  healthBar = healthInfoWindow:recursiveGetChildById('healthBar')  --manaBar = healthInfoWindow:recursiveGetChildById('manaBar')  healthLabel = healthInfoWindow:recursiveGetChildById('healthLabel')  --manaLabel = healthInfoWindow:recursiveGetChildById('manaLabel')  soulBar = healthInfoWindow:recursiveGetChildById('soulBar')  soulLabel = healthInfoWindow:recursiveGetChildById('soulLabel')  capLabel = healthInfoWindow:recursiveGetChildById('capLabel')  tourLabel = healthInfoWindow:recursiveGetChildById('tourlab')    expLabel = healthInfoWindow:recursiveGetChildById('expeLabel')	expBar = healthInfoWindow:recursiveGetChildById('expbar')  if g_game.isOnline() then    local localPlayer = g_game.getLocalPlayer()    onHealthChange(localPlayer, localPlayer:getHealth(), localPlayer:getMaxHealth())    onManaChange(localPlayer, localPlayer:getMana(), localPlayer:getMaxMana())    onStatesChange(localPlayer, localPlayer:getStates(), 0)    --onSoulChange(localPlayer, 0)    onFreeCapacityChange(localPlayer, localPlayer:getFreeCapacity())	healthInfoWindow:recursiveGetChildById('naem'):setText(localPlayer:getName())	local lavel = healthInfoWindow:recursiveGetChildById('laevl')	lavel:setText(tr('Lvl') .. ':  ' .. localPlayer:getLevel())  end  healthInfoWindow:setup()  refresh()  begingaem()endfunction begingaem()	scheduleEvent(function() refresh() begingaem() end, 1000)endfunction terminate()  disconnect(LocalPlayer, { onHealthChange = onHealthChange,                            onManaChange = onManaChange,                            onStatesChange = onStatesChange,                            onFreeCapacityChange = onFreeCapacityChange,							onExperienceChange = onExperienceChange,onSkillChange = onSkillChange,							})  disconnect(g_game, { onGameEnd = refresh,onGameStart = refresh })  healthInfoWindow:destroy()  healthInfoButton:destroy()  healthInfoWindow = nil  healthInfoButton = nil  healthBar = nil  manaBar = nil  soulBar = nil  tourLabel =nil	expLabel = nil	expBar= nil  healthLabel = nil  manaLabel = nil  soulLabel = nil  capLabel = nil  HealthInfo = nilendfunction setSkillBase(id, value, baseValue)  if id ~= 2 or id ~= 6 then	return  end  if baseValue <= 0 or value < 0 then    return  end  if id == 2 then	  local widget = skillsWindow:recursiveGetChildById("tourlab")	  if value > baseValue then		widget:setColor('#008b00') -- green		skill:setTooltip(baseValue .. ' +' .. (value - baseValue))	  elseif value < baseValue then		widget:setColor('#b22222') -- red		skill:setTooltip(baseValue .. ' ' .. (value - baseValue))	  else		widget:setColor('#bbbbbb') -- default		skill:removeTooltip()	  end	else	  local skill = skillsWindow:recursiveGetChildById(id)	  local widget = skill:getChildById('value')	  if value > baseValue then		widget:setColor('#008b00') -- green		skill:setTooltip(baseValue .. ' +' .. (value - baseValue))	  elseif value < baseValue then		widget:setColor('#b22222') -- red		skill:setTooltip(baseValue .. ' ' .. (value - baseValue))	  else		widget:setColor('#bbbbbb') -- default		skill:removeTooltip()	  end	endendfunction setSkillValue(id, value)  local skill = skillsWindow:recursiveGetChildById(id)  local widget = skill:getChildById('value')  widget:setText(value)endfunction refresh()  local player = g_game.getLocalPlayer()  if not player then return end	healthInfoWindow:recursiveGetChildById('naem'):setText(player:getName())	onExperienceChange(player, player:getExperience(),true)    onSkillChange(player, 2, player:getSkillLevel(2), player:getSkillLevelPercent(2),true)	onSkillChange(player, 6, player:getSkillLevel(6), player:getSkillLevelPercent(6),true)	local outfitCreature=player:getOutfit()	local outfitCreatureBox = healthInfoWindow:recursiveGetChildById('outfitCreatureBox')	local lavel = healthInfoWindow:recursiveGetChildById('laevl')	lavel:setText(tr('Lvl') .. ':  ' .. player:getLevel())	  if outfitCreatureBox then		outfitCreatureBox:setCreature(player)	  end	if g_game.isOnline() then		local localPlayer = g_game.getLocalPlayer()		onHealthChange(localPlayer, localPlayer:getHealth(), localPlayer:getMaxHealth())		onManaChange(localPlayer, localPlayer:getMana(), localPlayer:getMaxMana())		--onStatesChange(localPlayer, localPlayer:getStates(), 0)		--onSoulChange(localPlayer, 0)		onFreeCapacityChange(localPlayer, localPlayer:getFreeCapacity())		healthInfoWindow:recursiveGetChildById('naem'):setText(localPlayer:getName())	  end	--toggleIcon(0)endfunction onExperienceChange(localPlayer, value,hur)	if not hur then		refresh()	end	expLabel:setText(localPlayer:getLevelPercent()..'% ('..value..')')	expBar:setPercent(localPlayer:getLevelPercent())	local lavel = healthInfoWindow:recursiveGetChildById('laevl')	lavel:setText(tr('Lvl') .. ':  ' .. localPlayer:getLevel())endfunction onSkillChange(localPlayer, id, level, percent,hur)  if id == 2 then	tourLabel:setText(tr('Tournament') .. ':  ' .. string.format("%.3d",level))	--setSkillValue('skillId' .. id, level)	--setSkillPercent('skillId' .. id, percent, tr('You have %s percent to go', 100 - percent))	--onBaseSkillChange(localPlayer, id, localPlayer:getSkillBaseLevel(id))	elseif id == 6 then		--onSkillChange(localPlayer, 6, localPlayer:getSkillLevel(6), localPlayer:getSkillLevelPercent(6))		local skill = healthInfoWindow:recursiveGetChildById('fishbar')		local lab = healthInfoWindow:recursiveGetChildById('fishlab')		if skill then			skill:setTooltip(percent.."%")			skill:setPercent(percent)			lab:setText(tr('Fishing') .. ':  '..level)		end	end	if not hur then		refresh()	endendfunction setSkillPercent(id, percent, tooltip)  local skill = skillsWindow:recursiveGetChildById(id)  local widget = skill:getChildById('percent')  widget:setPercent(math.floor(percent))  if tooltip then    widget:setTooltip(tooltip)  endendfunction toggle()  if healthInfoButton:isOn() then    healthInfoWindow:close()    healthInfoButton:setOn(false)  else    healthInfoWindow:open()    healthInfoButton:setOn(true)	refresh()  endendfunction hideLabels()  capLabel:hide()  soulLabel:hide()  local removeHeight = capLabel:getHeight() + capLabel:getMarginTop() + capLabel:getMarginBottom()  healthInfoWindow:setHeight(healthInfoWindow:getHeight() - removeHeight)endfunction onMiniWindowClose()  healthInfoButton:setOn(false)endfunction offline()  healthInfoWindow:recursiveGetChildById('conditionPanel'):destroyChildren()end-- hooked eventsfunction onHealthChange(localPlayer, health, maxHealth)  healthLabel:setText(health .. ' / ' .. maxHealth)  healthBar:setPercent(health / maxHealth * 100)endfunction onManaChange(localPlayer, mana, maxMana)  --manaLabel:setText(mana .. ' / ' .. maxMana)  local percent  if maxMana == 0 then    percent = 100  else    percent = (mana * 100)/maxMana  end  if mana <= 6 and mana > -1 then	for i=1,mana do		healthInfoWindow:recursiveGetChildById('call'..i):setImageSource('pokeball.png')	end	for i=mana+1,6 do		if i ~= 0 then			healthInfoWindow:recursiveGetChildById('call'..i):setImageSource('bolas.png')		end	end  end  --manaBar:setPercent(percent)endfunction onSoulChange(localPlayer, soul)  soulLabel:setText(tr('Catch') .. ': ' .. string.format("%.3d",soul))endfunction onFreeCapacityChange(player, freeCapacity)  capLabel:setText(tr('Cap') .. ': ' .. freeCapacity)endfunction onStatesChange(localPlayer, now, old)  if now == old then return end  local bitsChanged = bit32.bxor(now, old)  for i = 1, 32 do    local pow = math.pow(2, i-1)    if pow > bitsChanged then break end    local bitChanged = bit32.band(bitsChanged, pow)    if bitChanged ~= 0 then      toggleIcon(bitChanged)    end  endendfunction toggleIcon(bitChanged)  local content = healthInfoWindow:recursiveGetChildById('conditionPanel')  local icon = content:getChildById(Icons[bitChanged].id)  if icon then    icon:destroy()  else    icon = g_ui.createWidget('ConditionWidget', content)    icon:setId(Icons[bitChanged].id)    icon:setImageSource(Icons[bitChanged].path)    icon:setTooltip(Icons[bitChanged].tooltip)  endend

 

 

Script Otui.

 

Spoiler
HealthBar < ProgressBar  id: healthBar  height: 15  margin-top: -1  margin-left: 2  background-color: #ff4444  anchors.top: outfitCreatureBox.bottom  anchors.left: parent.left  anchors.right: parent.rightXPBAR < ProgressBar  id: expbar  height: 14  background-color: #44ff44  anchors.top: xplabels.bottom  anchors.left: parent.left  anchors.right: parent.right  margin-top: 4explabel < GameLabel  id: expeLabel  color: white  text-align: center  font: verdana-11px-rounded  anchors.fill: expbar  margin-top: 2  text: 0 / 0  margin-top: 4HealthLabel < GameLabel  id: healthLabel  color: white  text-align: center  font: verdana-11px-rounded  anchors.fill: healthBar  margin-top: 2  text: 0 / 0SoulLabel < GameLabel  id: soulLabel  text-align: right  color: white  font: verdana-11px-rounded  anchors.bottom: parent.bottom  anchors.right: parent.right  anchors.left: parent.horizontalCenter  margin-top: 5  margin-right: 3  text: Catch: 000CapLabel < GameLabel  id: capLabel  color: white  font: verdana-11px-rounded  anchors.bottom: parent.bottom  anchors.left: parent.left  anchors.right: parent.horizontalCenter  margin-top: 5  margin-left: 3  text: Cap:TournamentLabel < GameLabel  id: tourlab  color: white  font: verdana-11px-rounded  anchors.top: prev.bottom  anchors.left: parent.left  anchors.right: parent.right  margin-top: 2  margin-left: 3  text: Tournament: 000Fishlabel < GameLabel  id: fishlab  color: white  font: verdana-11px-rounded  anchors.top: tourlab.bottom  anchors.left: parent.left  anchors.right: parent.horizontalCenter  margin-top: 2  margin-left: 3  text: Fishing:FISHBAR < ProgressBar  id: fishbar  height: 5  background-color: #44ff44  anchors.top: prev.bottom  anchors.left: parent.left  anchors.right: parent.right  margin-top: 1HealthLabel2 < GameLabel  id: hplab  color: white  font: verdana-11px-rounded  anchors.top: outfitCreatureBox.bottom  anchors.left: parent.left  margin-top: 4  margin-left: 3  text: -XPLABB < GameLabel  id: xplabels  color: white  font: verdana-11px-rounded  anchors.top: call1.bottom  anchors.left: parent.left  margin-top: 4  margin-left: 3  !text: tr('Experience')ConditionWidget < UIWidget  size: 18 18  $!first:    margin-left: 2MiniWindow  icon: healthinfo.png  id: healthInfoWindow  !text: tr('Health Info')  height: 253  @onClose: modules.game_healthinfo.onMiniWindowClose()  &save: true  MiniWindowContents    Creature      id: outfitCreatureBox      anchors.top: parent.top      anchors.left: parent.left      margin-top: 5      margin-left: 5      padding: 4 4 4 4      fixed-creature-size: true    HealthBar    HealthLabel    GameLabel      color: white      id: laevla      font: terminus-14px-bold      anchors.top: prev.bottom      anchors.left: parent.left      margin-top: 5      margin-left: 3      text: Pokemon:    GameLabel      id: call1      anchors.top: prev.top      anchors.left: prev.right      margin-top: 1      margin-right: 3      image-source: bolas.png      size: 16 16    GameLabel      id: call2      anchors.top: prev.top      anchors.left: prev.right      margin-right: 3      image-source: bolas.png      size: 16 16    GameLabel      id: call3      anchors.top: prev.top      anchors.left: prev.right      margin-right: 3      image-source: bolas.png      size: 16 16    GameLabel      id: call4      anchors.top: prev.top      anchors.left: prev.right      margin-right: 3      image-source: bolas.png      size: 16 16    GameLabel      id: call5      anchors.top: prev.top      anchors.left: prev.right      margin-right: 3      image-source: bolas.png      size: 16 16    GameLabel      id: call6      anchors.top: prev.top      anchors.left: prev.right      margin-right: 3      image-source: bolas.png      size: 16 16    GameLabel      color: white      id: naem      font: verdana-11px-rounded      anchors.top: parent.top      anchors.left: outfitCreatureBox.right      anchors.right: parent.right      margin-top: 5      margin-left: 3      text: -------    GameLabel      color: white      id: laevl      font: terminus-14px-bold      anchors.top: prev.bottom      anchors.left: outfitCreatureBox.right      anchors.right: parent.right      margin-top: 5      margin-left: 3      text: Lvl: 0000    XPLABB    XPBAR    explabel    Panel      id: conditionPanel      layout:        type: horizontalBox      height: 22      margin-top: 4      padding: 2      anchors.top: prev.bottom      anchors.left: parent.left      anchors.right: parent.right      border-width: 1      border-color: #00000077      background-color: #ffffff11    TournamentLabel    Fishlabel    FISHBAR    SoulLabel    CapLabel

 

Dou Rep + quem me ajudar :D

Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0

amigo porque não baixa o otclient normal de tibia 10.76 eu acho o mais recente já vem tudo configurado certinho

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...