mob/verb/Chao()
set hidden = 1
loopyloop
sleep(20) //wait 2 minutes
var/mob/M
for(M as mob in world)
M.Hunger -= 1
M.Thirst -= 1
goto loopyloop
mob/var//this gives all the characters the same vars
Gold = 200//Change the number to what you want for when they start out
weapon_equiped = 0
shield_equiped = 0
Str = 9//i made this to show you when ou equip something yor Str will go up and vice versa when you unequip it
Hp = 22// This lets a character have 22 hit pionts when they log on
MaxHp = 22//This gives the character a max amount of hp
Level = 1//This puts the gusy level at one when they log in unless its saved
Exp = 0//This is the exp of the character
MaxExp = 36//This is the Max Exp of the Character
Def = 5
Bracelet = 0
Super = 0
Hunger = 100
MaxHunger = 100
Thirst = 100
MaxThirst = 100
time = 12
SlimeName
Slime = 0
damage
0 errors 0 warnings.
But there is an error! Ok, when I enter the verb in the game look what it says!
runtime error: Cannot read null.Hunger
proc name: Chao (/mob/verb/Chao)
source file: Loopes.dm,7
ID:149701
Mar 4 2002, 7:24 pm
|
|
You don't need to define M twice... So you can get rid of the "var/mob/M" line...since you obviously need the for() loop to include all mobs in the world (actually...you should combine that into the for() loop definition... I'll show you what I mean at the end of this post)... Also...anything that needs to be done in a for() loop needs to be indented underneath it... Thirdly...sleep(20) doesn't last 2 minutes... It only lasts two seconds...lol the number in sleep() is in tenths of seconds... So 20/10 of a second is 2 seconds... For two minutes, it should be sleep(1200) (which would equal 1200/10 seconds...or 120 seconds... 120/60 equals 2 minutes...)
So after all of the fixes are made...it should look like the following...
(Your code should look like the above... Don't just copy and paste that, though, since the indentation will be messed up...)