mob
proc
deathcheck()
if(src.hp>=0)
src << "<font color=blue>You have been defeated by [usr.monname]</font>"
src.battle=0
src.mmhp=0
src.mmstr=0
src.mmdef=0
src.mmagi=0
src.mmend=0
src.mmkno=0
src.mmwis=0
src.mmexp=0
src.mmgold=0
src.hp=src.mhp
src.win=1
else
startbattle()
return
deathcheck2()
if(src.mmhp>=0)
src << "You have killed the [usr.monname]"
src << "<font color=blue>You recieve [usr.mmexp] exp!</font>"
src << "<font color=blue>You recieve [usr.mmgold] gold!</font>"
src.exp += src.mmexp
src.gold += src.mmgold
src.battle=0
src.mmhp=0
src.mmstr=0
src.mmdef=0
src.mmagi=0
src.mmend=0
src.mmkno=0
src.mmwis=0
src.mmexp=0
src.mmgold=0
src.win=1
src.Levelup()
else
startbattle()
return
mob
verb
Fight_monsters()
if(src.battle==1)
src << "You are already in a fight"
else
src.monster = input("Choose a monster to fight.","Monsters",usr.monster) in list("Muffin - Lv1","Dog - Lv2","Cancel")
src.monsters()
mob
proc
monsters()
if(src.monster=="Muffin - Lv1")
src.battle=1
mmhp=10
mmstr=5
mmmstr=5
mmdef=5
mmmdef=5
mmagi=5
mmmagi=5
mmend=5
mmmend=5
mmkno=5
mmmkno=5
mmwis=5
mmmwis=5
mmexp=5
mmgold=10
monname="Muffin"
src << "You attack a wild muffin!"
src.startbattle()
if(src.monster=="Dog - Lv2")
src.battle=1
mmhp=20
mmstr=10
mmmstr=10
mmdef=10
mmmdef=10
mmagi=10
mmmagi=10
mmend=10
mmmend=10
mmkno=10
mmmkno=10
mmwis=10
mmmwis=10
mmexp=10
mmgold=20
monname="Dog"
src << "You attack a wild Dog!"
src.startbattle()
if(src.monster=="Cancel")
src.battle=0
return
startbattle()
if(src.win==1)
src.win=0
return
else
src.action = input("What type of action do you want to take?.","Battle",src.action) in list("Attack","Defend","Run")
if(src.action=="Attack")
src.attack()
if(src.action== "Defend")
src.defend()
if(usr.action=="Run")
src.runaway()
attack()
if(src.agi>= src.mmagi)
src.str-=src.mmdef
src.mmhp-=src.str
src<<"You attack [monname] for [str] damage."
src.str=src.mstr
src.deathcheck()
src.deathcheck2()
monsterattack()
return
else
src<<"Your attack fails."
src.deathcheck()
src.deathcheck2()
monsterattack()
return
defend()
if(src.mmend>= src.end)
src<<"[monname] saw through your defence."
src.defend=0
src.deathcheck()
src.deathcheck2()
monsterattack()
return
else
src<<"You pull up your defence perfectly."
src.defend=1
src.deathcheck()
src.deathcheck2()
monsterattack()
return
runaway()
if(src.agi>= src.mmagi)
src<<"You flee the battle."
src.win=1
else
src<<"[monname] blocks your way."
src.deathcheck()
src.deathcheck2()
monsterattack()
return
monsterattack()
if(src.mmagi>= src.agi && src.defend==0)
src.def-=src.mmstr
src.hp-=src.mmstr
src<<"You got attacked by [monname] for [str] damage."
src.mmstr=src.mmmstr
src.deathcheck()
src.deathcheck2()
return
else
src<<"[monname] missed their attack."
src.defend=0
src.deathcheck()
src.deathcheck2()
return
Problem description: it doesent know when to make the battle cease and when the battle does end this is what happens: You attack a wild muffin!
You attack Muffin for 15 damage.
You have been defeated by Muffin
You have killed the Muffin
You recieve 0 exp!
You recieve 0 gold!
Muffin missed their attack.
You have been defeated by Muffin
You have killed the Muffin
You recieve 0 exp!
You recieve 0 gold!
[note: i would have used the old [M] thing but i just cant seem to get the monster into the battle, when i tryed i used var/mob/M = new mob/npc/muffin or so forth to make a new mob called muffin, but i didnt kow how to add it to the battle process.
please help me, im going to bed now (8:39 am in the morning just got done with work..), feel free to post to this, ill get back to yall later.
V.B. out