ID:172957
 
When ever i attack it lists both me and the person im attacking how do i make it so it doesnt list me

mob
verb
Attack(mob/Trg as mob in view(1))
set category = "Battle"
set name = "Attack"
src.random = rand(1,10)
if(src.hp > 1)
if(src.random == 1)
view(6) << "[src.name] kicks [Trg.name]!"
Trg.hp -= round(src.str/3)
sleep(20)
deathcheckplayer()
deathcheckmon()
if(src.random == 2)
view(6) << "[src.name] punches [Trg.name]!"
Trg.hp -= src.str/4
sleep(20)
deathcheckplayer()
deathcheckmon()
if(src.random == 3)
view(6) << "[src.name] misses [Trg.name]!"
// Nothing happens and no power is lost.
if(src.random == 4 && Trg.agility >= src.agility)
view(6) << "[Trg.name] is to fast for [src.name] and he misses."
if(src.random == 5 && src.def>= Trg.def)
view(6) << "[Trg.name] is like a brick and [src.name] attacks do nothing."
if(src.random == 10 && Trg.luck >= src.luck)
view(6) << "[Trg.name] seems like hes to lucky to be hit by [src.name] so he misses."
N1ghtW1ng wrote:
When ever i attack it lists both me and the person im attacking how do i make it so it doesnt list me

mob
> verb
> Attack(mob/Trg as mob in view(1))
> set category = "Battle"
> set name = "Attack"
> src.random = rand(1,10)
> if(src.hp > 1)
> if(src.random == 1)
> view(6) << "[src.name] kicks [Trg.name]!"
> Trg.hp -= round(src.str/3)
> sleep(20)
> deathcheckplayer()
> deathcheckmon()
> if(src.random == 2)
> view(6) << "[src.name] punches [Trg.name]!"
> Trg.hp -= src.str/4
> sleep(20)
> deathcheckplayer()
> deathcheckmon()
> if(src.random == 3)
> view(6) << "[src.name] misses [Trg.name]!"
> // Nothing happens and no power is lost.
> if(src.random == 4 && Trg.agility >= src.agility)
> view(6) << "[Trg.name] is to fast for [src.name] and he misses."
> if(src.random == 5 && src.def>= Trg.def)
> view(6) << "[Trg.name] is like a brick and [src.name] attacks do nothing."
> if(src.random == 10 && Trg.luck >= src.luck)
> view(6) << "[Trg.name] seems like hes to lucky to be hit by [src.name] so he misses."


Attack(mob/Trg as mob in oview(1))
In response to Goku72
oh ok thanks, shoulda thought of that....
Again, why is random a mob var? It should be a local var to the proc, not a mob var at all.

Lummox JR
In response to Lummox JR
yea i just changed that, it was src.random and made it random with no src. that wat u meant right?