Cesque, i modeled parts of my bs after xorlaks, you should take a look, but its quite simple realy, all you do is add if's and randoms to make it work, heres my AI: (note, donot copy or i will eat you! i spent to much time on this!)
#Method EnemyTurn(enemy!)
{
#SaveScreen()
#SetImageTransparent(enemyflash[enemy!]$,enemyposX[enemy!]!,enemyposY[enemy!]!,enemyX[enemy!]!,enemyY[enemy!]!,0,0,0)
#Delay(.07)
#RestoreScreen()
#SetImageTransparent(enemyflash[enemy!]$,enemyposX[enemy!]!,enemyposY[enemy!]!,enemyX[enemy!]!,enemyY[enemy!]!,0,0,0)
#Delay(.07)
#RestoreScreen()
#SetImageTransparent(enemyflash[enemy!]$,enemyposX[enemy!]!,enemyposY[enemy!]!,enemyX[enemy!]!,enemyY[enemy!]!,0,0,0)
#Delay(.07)
#RestoreScreen()
:rechoose
#Random(90,enechoice!)
#If (enechoice!>=85)
{
#If (enemyhp[enemy!]!<=20)
{
#If (enemypotion[enemy!]!>=1)
{
#enemypotion[enemy!]!=enemypotion[enemy!]!-1
#enemyhp[enemy!]!=enemyhp[enemy!]!+50
#If (enemyhp[enemy!]!>enemythp[enemy!]!){#enemyhp[enemy!]!=enemythp[enemy!]!}
#Wav("Potion.wav")
#BorderColor(20,200,20)
#Delay(.1)
#BorderColor(0,0,0)
#BorderColor(20,200,20)
#Delay(.1)
#BorderColor(0,0,0)
#BorderColor(20,200,20)
#Delay(.1)
#BorderColor(0,0,0)
#Branch (:battlecontinue)
}
#If (enemypotion[enemy!]!=0){#Branch (:rechoose)}
}
#If (enemyhp[enemy!]!>20){#Branch (:rechoose)}
}
#If (enechoice!>=75)
{
#If (enemymagic[enemy!]$=""){#Branch (:rechoose)}
#If (enemymagic[enemy!]$~="")
{
#If (enemymp[enemy!]!<enemymptake[enemy!]!)
{
#Window("")
#Line1("<enemyspecial[enemy!]$>!")
#Delay(.8)
#RestoreScreen()
#Delay(.5)
#Window("")
#Line1("Not enough Mp!")
#Delay(1.5)
#RestoreScreen()
#Branch (:battlecontinue)
}
#If (enemymp[enemy!]!>=enemymptake[enemy!]!)
{
#SaveScreen()
#ms$=""+enemymagic[enemy!]$+".wav"
#m1$="Magic_"+enemy[enemy!]$+""+enemymagic[enemy!]$+"1.bmp"
#m2$="Magic_"+enemy[enemy!]$+""+enemymagic[enemy!]$+"2.bmp"
#m3$="Magic_"+enemy[enemy!]$+""+enemymagic[enemy!]$+"3.bmp"
#m4$="Magic_"+enemy[enemy!]$+""+enemymagic[enemy!]$+"4.bmp"
#setimagetransparent(m1$,enemymposX[1]!,enemymposY[1]!,enemymX[1]!,enemymY[1]!,255,255,255)
#Delay(.05)
#setimagetransparent(m2$,enemymposX[1]!,enemymposY[1]!,enemymX[1]!,enemymY[1]!,255,255,255)
#Delay(.05)
#setimagetransparent(m3$,enemymposX[1]!,enemymposY[1]!,enemymX[1]!,enemymY[1]!,255,255,255)
#Delay(.05)
#Wav(ms$)
#setimagetransparent(m4$,enemymposX[1]!,enemymposY[1]!,enemymX[1]!,enemymY[1]!,255,255,255)
#Delay(.05)
#RestoreScreen()
#Kail_Hp!=Kail_Hp!-enemyspecial[enemy!]!
#Branch (:statrefresh)
#Color(4)
#SaveScreen()
#Text(enemyspecial[enemy!]!,9,6)
#Delay(1)
#RestoreScreen()
}
}
}
#If (enechoice!>=70)
{
#If (enemyhp[enemy!]!<=15)
{
#Random(3,enerun!)
#CastLit(enemy!,enemy$)
#If (enerun!<=2)
{
#Window("")
#Line1("<enemy[enemy$]$> failed to run!")
#Delay(2)
#RestoreScreen()
#Kill(enemy$)
#Branch (:battlecontinue)
}
#If (enerun!=3)
{
#Window("")
#Line1("<enemy[enemy$]$> ran!")
#Delay(2)
#RestoreScreen()
#enemyhp[enemy!]!=0
#Kill(enemy$)
#Wav("ran.wav")
#Branch (:battlecontinue)
}
}
#If (enemyhp[enemy!]!>15){#Branch (:rechoose)}
}
#If (enechoice!<70)
{
#Random(15,miss!)
#If (miss!<=13)
{
:reattack
#If (eneP!<=KailD!)
{
#eneP!=eneP!+5
#Branch (:reattack)
}
#If (eneP!>KailD!)
{
#attack!=eneP!-KailD!
#Kail_Hp!=Kail_Hp!-attack!
}
#Wav("Hit.wav")
#SaveScreen()
#setimagetransparent("KailHit.bmp",480,129,64,64,0,0,255)
#Color(4)
#FontSize(12)
#Text(40,17,attack!)
#Delay(1)
#RestoreScreen()
#eneP!=enemyattack[enemy!]!*2
#KailD!=Kail_Defence!
#Kill(miss!)
#Branch (:battlecontinue)
}
#If (miss!>=14)
{
#Wav("miss.wav")
#ColorRGB(255,255,255)
#FontSize(12)
#SaveScreen()
#Text(40,17,"Miss")
#Delay(1)
#RestoreScreen()
#Kill(miss!)
#Branch (:battlecontinue)
}
}
}*for enemy method