* HP/SMP Bar * -Made by Pests * * Only difference between the HpBar and SmpBar * is that the SmpBar is always the same color * * x1!,x2!,y1!,y2! - Coords for the bar * current! - current hp/smp he has * max! - the maximum hp/smp they can have * * x2! - x1! = width * y2! - y1! = height #Method HpBar(x1!, x2!, y1!, y2!, current!, max!) { #FillRect(x1!, y1!, x2!, y2!) #fill! = current! / max! #difference! = x2! - x1! #howmuch! = difference! * fill! #fillwhat! = howmuch! + x1! #color(1) #if(fill! <= .70){ #ColorRGB(255,255,0) } #if(fill! <= .30){ #Color(4) } #FillRect(x1!, y1!, fillwhat!, y2!) #colorRGB(255,255,255) #drawrect(x1!,y1!,x2!,y2!) } #Method SmpBar(x1!, x2!, y1!, y2!, current!, max!) { #FillRect(x1!, y1!, x2!, y2!) #fill! = current! / max! #difference! = x2! - x1! #howmuch! = difference! * fill! #fillwhat! = howmuch! + x1! #color(1) #FillRect(x1!, y1!, fillwhat!, y2!) #colorRGB(255,255,255) #drawrect(x1!,y1!,x2!,y2!) } #clear() #HpBar(50, 150, 25, 35, 50, 100) #SmpBar(50, 150, 100, 110, 3, 100) #wait(a$)