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
ID:169329
Jul 4 2005, 7:34 am
|
|
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 |
In response to Darknite9000
|
|
sorry I meant:
if(points >= 30)
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
|
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?
|
I took the care to edit it a little:
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