ID:169329
 
say(msg as text)
world << "[usr]: [msg]"
points += 1
if(30 <= points)
lvl += 1
atk += (rand(1,3))
friend(mob/M as mob in oview(1))
usr << "You befriend [M]!"
world << "[usr] befriends [M]!"
points += 20
if(30 <= points)
lvl += 1
atk += (rand(1,3))
fight(mob/M as mob in oview(1))
world << "[usr] fights [M]!"
if(M/atk <= atk)
points += 50
if(30 <= points)
lvl += 1
atk += (rand(1,3))
del(M)
world << "[usr] has won against [M]"
else
del(usr)
world << "[usr] has lost against [M]"

its just somethin i put in there and im not sure if itll work or not but when i compile it it says it all works just wonderin
the code is a little confusing.. it needs a little fixing.

if(points<=30) // >.> if who's points is less that 30? you need to be more precisly..


            say(var/msg as text)//notice how I changed this
world << "[usr]: [msg]"
points += 1
if(30 <= points)
lvl += 1 // once again: who is gaining a level. I think you want 'usr'.
atk += (rand(1,3)) //same



            fight(mob/M as mob in oview(1))
world << "[usr] fights [M]!"
if(M.atk <= atk)//same problem as above..
points += 50
if(30 <= points)
lvl += 1
atk += (rand(1,3))
del(M)
world << "[usr] has won against [M]"
else
del(usr)
world << "[usr] has lost against [M]"


I took the care to edit it a little:
            say(var/msg as text)
world << "[usr]: [msg]"
usr.points += 1
if(usr.points>=30)
usr.lvl += 1
usr.atk += (rand(1,3))
friend(mob/M as mob in oview(1))
usr << "You befriend [M]!"
world << "[usr] befriends [M]!"
usr.points += 20
if(usr.points <= 30)
usr.lvl += 1
usr.atk += (rand(1,3))
fight(mob/M as mob in oview(1))
world << "[usr] fights [M]!"
if(M.atk <= usr.atk)
usr.points += 50
if(points >= 30)
usr.lvl += 1
usr.atk += (rand(1,3))
del(M)
world << "[usr] has won against [M]"
else
del(usr)
world << "[usr] has lost against [M]"


thats a little better =)
so always be sure to put who is getting 'atk' and 'points'
and also please post your codes in DM tags:

put the code in here

=)

O-matic

In response to O-matic
well im gonna try it but im pretty sure im going to get an error on undefined variable but the chat isnt what i was talkin about it was the exp part and you reversed part of my code it wasnt
if(points <= 30)


it was

if(30 <= points)


and i just tried it and here are all the errors i got

jrsrpg.dm:8:error:lvl :duplicate definition
jrsrpg.dm:4:error:lvl :previous definition
jrsrpg.dm:9:error:atk :duplicate definition
jrsrpg.dm:5:error:atk :previous definition
jrsrpg.dm:73:error:atk :duplicate definition
jrsrpg.dm:74:error:lvl :duplicate definition
jrsrpg.dm:120:error:atk :duplicate definition
jrsrpg.dm:28:error:usr.lvl:undefined type: usr.lvl
jrsrpg.dm:29:error:usr.atk:undefined type: usr.atk
jrsrpg.dm:35:error:usr.lvl:undefined type: usr.lvl
jrsrpg.dm:36:error:usr.atk:undefined type: usr.atk
jrsrpg.dm:41:error:M.atk:undefined type: M.atk
jrsrpg.dm:41:error:usr.atk:undefined type: usr.atk
jrsrpg.dm:41:error:<= :bad variable definition
jrsrpg.dm:41:error:if :invalid variable name: reserved word
jrsrpg.dm:49:error:del :duplicate definition
jrsrpg.dm:46:error:del :previous definition
jrsrpg.dm:49:error:usr:bad variable definition
jrsrpg.dm:50:error:<< :duplicate definition
jrsrpg.dm:47:error:<< :previous definition
jrsrpg.dm:50:error:text "[] has lost against []":bad variable definition
jrsrpg.dm:50:error:world:bad variable definition
jrsrpg.dm:107:error:M.atk:undefined type: M.atk
jrsrpg.dm:107:error:usr.atk:undefined type: usr.atk
In response to Darknite9000
sorry I meant:
if(points >= 30)
sorry about that =P.

and as for your errors; copie+pasting from the forums is bad, you should learn form it instead.
here on the forums codes are filled out with spaces.
so retab it, that should fix the errors.

O-matic
In response to O-matic
i didnt c&p it i modified my code so it looked like that one
I think you want this for your point thingie verb:
if(!(points%30))
In response to Ol' Yeller
nope and i got it modified to where it will work now and im about to start modifying the map and after that ill be publishing its alpha version
In response to Darknite9000
Why do you want it so everytime you talk before you talk 30 times you gain a level & all?