UseBar()
{
self endon( "disconnect" );
while (1) {
self notifyOnPlayerCommand("5", "+actionslot 2");
self waittill("5");
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
useBar updateBar( 10 / 20); // This is the value, The max is 20 and you get 10 off 20. So I think you just add your things in there.
}
}