Code: mob/player/POK/verb
Attack()
set category="Combat"
for(var/mob/E in get_step(usr,usr.dir))
if(E.NPC==0)
E.HP-=usr.Str
view()<<"[usr] attacks [E] for [usr.Str] HP!"
if(E.player==1)
if(E.HP<=0)
E<<"You died!"
E.HP=E.MHP
E.MP=E.MMP
E.loc=locate(2,2,1)
E.gold+=E.gold
E.gold=0
usr.Exp+=E.Exp
E.PK=0
return
else
if(E.HP<=0)
usr<<"You killed [E]!"
usr.gold+=E.gold
E.gold=0
usr.Exp+=E.Exp
del E
return
else
usr<<"You can't attack an NPC!"
return
mob
proc
LvlCheck()
if(usr.Exp>=usr.Mexp)
usr<<"You gained a level!"
usr.level+=1
usr.MHP+=rand(1,5)
usr.HP=usr.MHP
usr.MMP+=rand(1,5)
usr.MP=usr.MMP
usr.Str+=rand(1,5)
usr.Exp*=2
usr.Exp=0
usr.Mexp*=2
//here are the characters....
mob/player
P
Emerald_Hero_Boy
icon = 'mobs.dmi'
PO
Emerald_Hero_Girl
icon = 'girl.dmi'
POK
Pikachu
icon = 'Pikachu.dmi'
Problem description:
Wont give Pikachu the Attack Verbs,I want it so only Pikachu can have the Attack Verbs anyone know how to fix this,please help.
ID:263518
Mar 13 2007, 8:01 am
|
|
Also, bolean values can prove to make your code much neater and shorter. Look them up in the DM reference.