Attack_Up(mob/M)
if(M.attup >> 0)
if(M.mp >= 50)
var
attd = M.attack / M.attup
M << "<font color = blue><b>You summon a burst of attack power!"
if(M.attackdoubled == 0)
M << "<font color = blue><b>Your attack increases!"
attd = round(attd)
M.attack += attd
M.attackdoubled = 1
M.mp -= 50
NPCDeathCheck(M)
else if(M.attackdoubled == 1)
M << "<font color = blue><b>The energy combinding in you suddenly bursts away!"
M.mp -= 50
NPCDeathCheck(M)
else
M << "<font color = blue><b>You don't have enouph MP!"
Battle(M)
else
M << "<font color = blue><b>You don't know this skill!"
Battle(M)
Run(mob/M)
chancetorun = M.agility - src.agility + rand(-20,20)
if(M.diseased == 1)
M << "<font color = blue><b>You are too weak to run!"
Battle(M)
if(chancetorun >> 0)
M << "<b><font color = blue>You start to flee..."
sleep(10)
M << "<b><font color = blue>You successfully run away!"
M.islocked = 0
src.islocked = 0
M.lib = 0
M.battle = 0
if(M.attup >> 0)
attd = M.attack / M.attup
if(M.defup >> 0)
defd = M.defense / M.defup
if(M.lukup >> 0)
lukd = M.luck / M.lukup
if(M.aglup >> 0)
agld = M.agility / M.aglup
if(M.intup >> 0)
intd = M.intelligence / M.intup
if(M.attackdoubled == 1)
M.attackdoubled = 0
M.attack -= attd
if(M.defensedoubled == 1)
M.defensedoubled = 0
M.defense -= defd
if(M.intelligencedoubled == 1)
M.intelligencedoubled = 0
M.intelligence -= intd
if(M.luckdoubled == 1)
M.luckdoubled = 0
M.luck -= lukd
if(M.agilitydoubled == 1)
M.agilitydoubled = 0
M.agility -= agld
else
M << "<b><font color = blue>You start to flee..."
sleep(10)
M << "<b><font color = blue>The enemy cuts off your escape route!"
NPCDeathCheck(M)
First of all, when attup is 1 on the Attack_Up(mob/M) proc, it doubles my attack. Then when it gets to Run(mob/M) or any other of my procs that end combat, it doesn't - my attack from the attd, It /s it by 2/3s. Whats wrong?