ID:262200
 
what i'm trying to do here is call these certain procs when the frst mob logs in
mob
proc
Ponline()
for(var/mob/M in world)
if(ismob(M) && M.client && M.loin == 0)
Playerso += 1
M.loin = 1
SpreadDB()
sleep(10000)
var/y = rand(1,150)
var/x = rand(1,150)
for(var/obj/dragonballs/O in world)
O.loc = locate(x,y,1)
world << "<b>The DB's spread around the world!</b>"
SpreadDB()
Save()
sleep(10000)
client.SaveMob()
src << "<b><font color = blue>Auto Saving</font></b>"
sleep(5)
src << "<b><font color = blue>Auto save complete!</font></b>"
src.Save()
world
proc
Rboot2()
world << "<b>World is rebooting in 1 hour and 30 minutes!</b>"
sleep(125000)
world << "<b>World is rebooting in 5 minutes!</b>"
sleep(4000)
world << "<b>World is rebooting in 1 minute!</b>"
sleep(550)
world << "<b>World is rebooting in 5 seconds!</b>"
sleep(50)
world.Reboot()
mob/var/tmp
loin = 0
mob
Login()
src.oicon = src.icon
..()
sample_report()
CheckA()
Ponline()
Save()
if(Playerso == 1)
world.Rboot2()
SpreadDB()

it makes it to sample_report, CheckA, Ponline, and Save, but for some reason no matter what i do it will not call rboot2 and spreaddb, can anyone help me out please?
This would probably freeze the game. The RBoot2 verb has a some very long sleeps in it. You would probably be better off with the spawn() proc instead of sleep().

Another error I see is your SpreadDB() proc. It'll scatter all the db's in the world to the same location since you defined it only once (before the for loop). You should call the new x and y loc on before each dragonball is spread.

To save CPU on login, you don't need to call the Save() proc. Saving on Login is useless, it'd be better on Logout()

As for your question on why the Rboot2 and SpreadDB is not being called, try changing the the if statement to Playerso is greater or equal to 1 or this. This is because if you have more than one players online (assuming the Playerso var is the players counter), it'll not reach that call with your current if statement.

if(Playerso) //I prefer this way

//or

if(Playerso>=1)