[FUNCTION BARDDIFF]
FLOAT.BARDDIFF=<FLOATVAL ((<MAXHITS>*1.6)+<MAXSTAM>+<MAXMANA>+(<SKILLTOTAL>/10))>
IF (<MAGERY>)
FLOAT.BARDDIFF=<FLOATVAL <FLOAT.BARDDIFF>+100>
ENDIF	
IF (<NPC> == <DEF.brain_dragon>)
FLOAT.BARDDIFF=<FLOATVAL <FLOAT.BARDDIFF>+100>
ENDIF
IF (<TAG0.LIFELEECH>)
FLOAT.BARDDIFF=<FLOATVAL <FLOAT.BARDDIFF>+100>
ENDIF
FLOAT.BARDDIFF=<FLOATVAL <FLOAT.BARDDIFF>+<POISONING>>
IF (<EVAL (<SKILLTOTAL>/10)+<STR>+<DEX>+<INT>> <= 700)
LOCAL.FINALDIFF=<EVAL <FEVAL <FLOAT.BARDDIFF>>/10>
ELSE
FLOAT.BARDDIFF=<FLOATVAL ((<FLOAT.BARDDIFF>-700)*0.275)+700>
LOCAL.FINALDIFF=<EVAL <FEVAL <FLOAT.BARDDIFF>>/10>
ENDIF
IF (<LOCAL.FINALDIFF> > 160)
LOCAL.FINALDIFF=160
ENDIF
IF (!(<ISEMPTY <ARGS>>))
REF1=<ARGS>
	IF (<REF1.MUSICIANSHIP> > 100.0)
	LOCAL.FINALDIFF -= <EVAL ((<REF1.MUSICIANSHIP>/10)-100)/2>
	ENDIF
LOCAL.FINALDIFF -= 17
ENDIF
IF (<LOCAL.FINALDIFF> < 1)
LOCAL.FINALDIFF=1
ENDIF
RETURN <dLOCAL.FINALDIFF>

[EOF]