mob
var{hp=210;maxhp=210;str=38;def=26;dex=29;agi=28;exp=0;exptolevel=10;level=1;inbattle=0;magic=100;race=null;staff=null;unequip=0;maxmagic=100;trance =0;maxtrance=3500;gold=1500}
mob
verb
Attack(mob/M in oview(1))
set category="Orders"
inbattle=1
sleep(10)
view()<<"<font color=red font size=1>[usr] attacks [M]!</font>"
usr.trance +=5
while(M)
var{h=50+usr.dex;h2=h-M.agi}
if(h2>100)h2=100
if(h2<0)h= 0
var{h3=rand(1,100);e=rand(usr.str);dc=e-M.def}
if(h3<=h2)
if(dc>0){view(3)<<"<font color=teal font size=1><B>[usr] attacks [M], [dc] Damage.</font>";M.hp-=dc;M.DeathCheck()}
else{view(3)<<"<B><font color=red font size=1>[usr]'s attack failed on [M]."}
else{view(3)<<"<B><font color=blue font size=1>>[usr] attacks [M], but misses.</font>"}
sleep(6)
if(!usr.inbattle||!M.inbattle)return
var{f=50+usr.dex;f2=f-M.agi}
if(f2>100)f2=100
if(f2<0)f= 0
var{f3=rand(1,100);j=rand(usr.str,usr.dex);de=j-M.def}
if(f3<=f2)
if(de>0){view(3)<<"<B><font color=red font size=1>>[M] Attacks [usr], [de] Damage.";usr.hp-=de;usr.DeathCheck()}
else{view(3)<<"<B><font color=purple font size=1>>[M]'s attack failed on [usr]."}
else{view(3)<<"<B><font color=silver font size=1>>You attack [usr] but miss!"}
sleep(6)
Run()
set category="Orders"
if(!usr.inbattle){usr<<"You cannot, yet.";return}
switch(rand(1,2))
if(1){view(3)<<"<font color=red font size=1>[usr] Tried to run, but failed."}
if(2){view(3)<<"<font color=green font size=1><b>[usr] Ran the battle!";usr.inbattle=0;for(var/mob/M in oview(1))M.inbattle=0}
sleep(20)
proc
DeathCheck()
if(src.hp<=0)
usr<<"<font color=green font size=1><b>You killed [src]!"
usr<<"<font color=white font size=1>Experience + [src.exp]"
usr<<"<font color=white font size=1>Gold + [src.gold]"
usr.gold+=src.gold
usr.exp+=src.exp
usr.inbattle=0
src.inbattle=0
usr.Levelup()
src.loc = locate(0,0,0)
src.lose +=1
if(src.hp<=0)
src.hp=src.maxhp
src.inbattle=0
usr.inbattle=0
usr.win +=1
Levelup()
if(usr.exp>usr.exptolevel)
usr.exp=0
usr.exptolevel=usr.exptolevel/1
usr<<"<font color=red font size=1><tt><b><i>You gain a level!"
usr.level+=1
world<<"<font color=white font size=1><tt><b>[usr.name] is now a level [usr.level]!"
usr.maxtrance +=rand(500,1000)
usr.exptolevel +=rand(500,1000)
usr.maxhp+=rand(970,1000)
usr.agi+=rand(50,80)
usr.dex+=rand(50,80)
usr.str+=rand(50,150)
usr.def+=rand(50,150)
usr.maxmagic +=200
usr.chance+=rand(1,3)
if(usr.level ==10)
usr.exptolevel +=5000
usr.exp =0
usr.maxhp+=rand(1500,2000)
usr.maxtrance += rand(1500,2000)
usr.agi+=rand(100,200)
usr.dex+=rand(100,200)
usr.str+=rand(100,200)
usr.def+=rand(100,200)
usr.maxmagic +=500
usr.chance+=rand(9,10)
if(usr.level ==25)
usr.exptolevel +=10000
usr.exp =0
usr.maxhp+=rand(3500,4500)
usr.maxtrance += rand(3500,5000)
usr.agi+=rand(900,1000)
usr.dex+=rand(900,1000)
usr.str+=rand(900,1000)
usr.def+=rand(900,1000)
usr.maxmagic +=750
usr.chance+=rand(9,10)
if(usr.level ==50)
usr.exptolevel +=50000
usr.exp =0
usr.maxhp+=rand(6000,7500)
usr.maxtrance += rand(5000,9000)
usr.agi+=rand(2500,3000)
usr.dex+=rand(2500,3000)
usr.str+=rand(2500,3000)
usr.def+=rand(2500,3000)
usr.maxmagic +=1500
usr.chance+=rand(15,25)
if(usr.level ==75)
usr.exptolevel +=200000
usr.exp =0
usr.maxhp+=rand(10000,15000)
usr.maxtrance += rand(10000,15000)
usr.agi+=rand(6000,10000)
usr.dex+=rand(6000,10000)
usr.str+=rand(6000,10000)
usr.def+=rand(6000,10000)
usr.maxmagic +=3000
usr.chance+=rand(20,50)
if(usr.level ==90)
usr.exptolevel +=1000000
usr.exp =0
usr.maxhp+=rand(30000,50000)
usr.maxtrance += rand(20000,50000)
usr.agi+=rand(20000,50000)
usr.dex+=rand(20000,50000)
usr.str+=rand(20000,50000)
usr.def+=rand(20000,50000)
usr.maxmagic +=6500
usr.chance+=rand(20,50)
if(usr.level ==99)
usr.exptolevel +=5000000
usr.exp =0
usr.maxhp+=rand(1000000,3000000)
usr.maxtrance += rand(100000,200000)
usr.agi+=rand(100000,150000)
usr.dex+=rand(100000,150000)
usr.str+=rand(100000,150000)
usr.def+=rand(100000,150000)
usr.maxmagic +=10000
usr.chance+=rand(25,60)
usr<<"<font color=purple font size=1><b><i>Congratulations, you have made it to level 99. Be sure to save your progress. You are now welcome to join the other level 99's (if MasterLink2003 approves). If you can make it to level 100 you will get your own house and even more. Good luck!"
usr<<'a.mid'
if(usr.level ==100)
usr.exptolevel +=99999999999
usr.exp =0
usr.maxhp+=rand(6000000,9000000)
usr.maxtrance += rand(300000,600000)
usr.agi+=rand(300000,400000)
usr.dex+=rand(300000,400000)
usr.str+=rand(300000,400000)
usr.def+=rand(300000,400000)
usr.maxmagic +=15000
usr.chance+=rand(65,100)
mob
var
lose = 0
win = 0
chance = 0
items = 0
ID:170810
Dec 12 2004, 9:40 pm
|
|
Ok I am trying to make things easier on my game, of course by macoring anyways. I am not sure if this is in the right category but I'll post it here anyways. Here is my attack code (in full).
|
Dec 12 2004, 9:44 pm
|
|
Uhhh, what are you asking exactly? How to make a macro for your attack? If that's want you're wanting it's this easy-
|
In response to Artekia
|
|
Yes, that is what I was asking. Thank you.
(Edit: Now when I put this in, there was an error. attack.dm:176:error:return "Attack":instruction not allowed here) |
In response to MasterLink2003
|
|
Put it in a .dms
|
In response to Artekia
|
|
Allright I put it in a .dms but it still does'nt work when I attack a mob, though?
|
In response to MasterLink2003
|
|
yeah i made one too still doesn't work
|
In response to Jiamind
|
|
Is it on (MACRO) mode?
Sorry, for pointing out the obvious. >_> |
In response to Hell Ramen
|
|
most of the time yeah but no action when i press they key
|
In response to Jiamind
|
|
//this is a .dm file //this is a .dms file Should work |