ID:276469
 
mob
Verb
Say(msg as text)
world << "[usr], [msg]"
Awesome! Keep on going!
In the future:

 mob
Verb
Say(msg as text)
world << "[usr], [msg]"


use the dm tag. put "dm" in angle brackets (<>) at the start of the ode, and put "/dm" in angle brackets at the end. easy. That makes your posts easy to read.

Bold, Underline, and Italix can also be done with similar tags.

Good. Now try a larger game... like a "tank battle" style game. that's real easy.

--Vito
Also for posting on the forums you can have a little code window like this:

mob/var/hi=0


This makes it easier to see the code, to do this first do <*dm> and after you are done with the code do </*dm>

Note: Take away the *

->Calus CoRPS<-
In response to Vito Stolidus
Vito Stolidus wrote:
Bold, Underline, and Italix can also be done with similar tags.

It's Italic, not Italix.. :P

O-matic
In response to N1ghtW1ng
Yea,thats good!

Hey,um guys what do you think of my Attact erb
mob
verb
Attack()
var/damage=rand(1,Strength)
src.HP-=damage


i skipped all the chater in the attack proc but if I included like usr<<"you hit blah" and so on would this be a decent Attack verb or a sucky one?



In response to Tainted Spirit
mob
verb
Attack()
var/damage=rand(1,Strength)
src.HP-=damage


That's a very interesting attack verb.. when you press the verb, the client using the verb will get the damage! Yay for origanility!

Nah, seriously, this is better:
mob
verb
Attack(mob/M as mob in oview(1))
var/damage=rand(1,usr.Strength)
M.HP-=damage


Always define the target!

Edit: Whoops, made a small mistake in the code, fixed!
O-matic
In response to O-matic
The following is my actual first attempt at coding(I've read the DM Guide and skimmed over the referance, also looked at many demos):
mob/verb/Attack_Someone(mob/M in oview(1))
if(usr.paralyzed||usr.frozen)
return
var/def=rand(1,M.defense)
def=def*M.speed
if(def>=40)
def=def*10
def=def/rand(1,20)
var/atk=usr.attack
atk=atk*usr.speed
if(atk>40)
atk=atk*10
atk=atk/rand(1,20)
if(def>=atk)
view(5)<<"[M.name] dodged [usr.name]'s attack!"
return
var/dam=def-atk
M.hp-=dam
usr.energy-=dam/usr.endurance/2
view(5)<<"[usr.name] inflicts [dam] damage to [M.name]!"
M.hpcheck()
mob/var
hp=100
atk=10
def=2
speed=2
energy=100
endurance=0
mob/proc/hpcheck()
if(src.hp<=0)
world<<"[src.name] has died!"
del src
In response to Lord X Kage
mob
verb/Attack(mob/M in oview(1))
var {def=round(rand(1,M.def)*M.speed);atk=usr.atk;dam=round(def-atk)}
if(usr.paralyzed||usr.frozen) return
if(def>=40) {def=round(def*10/rand(1,20));atk=round(atk*usr.speed)}
if(atk>40) atk=round(atk*10/rand(1,20))
if(def>=atk) {view(5)<<"[M] dodged [usr]'s attack!";return}
M.hp-=dam
usr.energy-=round(dam/usr.endurance/2)
view(5)<<"[usr] inflicts [dam] damage to [M]!"
M.hpcheck()
var {hp=100;atk=10;def=2;speed=2;energy=100;endurance=0;paralyzed;frozen}
proc/hpcheck()
if(src.hp<=0) {world<<"[src] has died!";del src}

This thread is a bit meaningless.