ID:178254
 
verb
ActivateBattleMode(mob/M in world)
set category = "Admin"
world<<"Battle Mode has Begun!"
M.verbs+=/mob/AdminFight/verb/Attack
verb
DeActivateBattleMode(mob/M in world)
set category = "Admin"
world<<"Battle Mode has Ended!"
M.verbs-=/mob/AdminFight/verb/Attack
Use the For<s>ce</s>.

The for command is very useful.

mob
verb
ActivateBattleMode()
for(mob/M as mob in world)
M.verbs+=/mob/AdminFight/verb/Attack
world << "Battle Mode has Begun!!!!!"


I think that should work.
In response to spectriplex
woooo, lots of errors, i tried tabbing in every way :-(verb
ActivateBattleMode()
for(mob/M as mob in world)
M.verbs+=/mob/AdminFight/verb/Attack
world << "Battle Mode has Begun!!!!!"

In response to Branks
verb
ActivateBattleMode()
for(mob/M as mob in world)
M.verbs+=/mob/AdminFight/verb/Attack
world << "Battle Mode has Begun!!!!!"
In response to Malver
These are still giving me errors, the for is not working at all.

ERRORS-->
New_GM.dm:622:error:mob:undefined var
New_GM.dm:622:error:M:undefined var
New_GM.dm:623:error:M.verbs:undefined var
New_GM.dm:622:/ :warning: statement has no effect
New_GM.dm:622:error::bad assignment

mob
verb
ActivateBattleMode()
for(mob/M as mob in world)
M.verbs+=/mob/AdminFight/verb/Attack
world << "Battle Mode has Begun!!!!!"
In response to Branks
Sorry for "bumping" but it finally works :-D
I'll show ya, i had to add "set src in world" which had helped.

verb
ActivateBattleMode(mob/M as mob in world)
set category = "Admin"
set src in world
world<<" ======================= "
world<<"<font size=4><font color=aqua>Battle Mode has Ended!"
world<<" ======================= "
M.verbs+=/mob/AdminFight/verb/Attack
In response to Branks
It seems my success was not for real :-(
Everytime i click Activate Battle Mode, it just brings up a box and lets me choose 1 mob to activate on. I want it so it activates for all mobs in my world.

verb
ActivateBattleMode(mob/M as mob in world)
set category = "Admin"
set src in world
world<<" ======================= "
world<<"<font size=4><font color=aqua>Battle Mode has Begun!"
world<<" ======================= "
M.verbs+=/mob/AdminFight/verb/Attack
In response to Branks
Branks wrote:
It seems my success was not for real :-(
Everytime i click Activate Battle Mode, it just brings up a box and lets me choose 1 mob to activate on. I want it so it activates for all mobs in my world.

verb
ActivateBattleMode(mob/M as mob in world)
set category = "Admin"
set src in world
world<<" ======================= "
world<<"<font size=4><font color=aqua>Battle Mode has Begun!"
world<<" ======================= "
M.verbs+=/mob/AdminFight/verb/Attack

What everyone else gave you works just fine. Your problem is either with indentation, or somewhere else.
mob/verb/BattleMode()
[tab]var/mob/M
[tab]for(M in world)
[tab][tab]M.verbs+=/mob/AdminFight/verb/Attack
[tab][tab]M << "Battle mode has begun!"


Alathon\\
In response to Alathon
excellent work Alathon ;-)

now one more thing im trying to do, and thats getting a certain attack to go over my opponent (landing on them.)
The icon is bdagger.dmi
heres the command-->

mob
proc
Blade_Dagger()
proc
Blade_Dagger(mob/M in oview(1))
set category = "Combat"
view() << sound('blade_dagger.wav')
var/damage = rand(10,20)
usr<<"You use <font color=red>Blade Dagger</font color=red> on [M] For [damage]!"
M<<"[usr] uses <font color=red>Blade Dagger</font color=red> on you For [damage]"
usr.mp-=3