ID:269028
 
world
New()
..()
var/savefile/S = new("timer.ss")
S["time"] >> mutetimer

Del()
TSave()
..()

proc
TSave()
var/savefile/S = new("timer.ss")
S["time"] << mutetimer
mob
proc
AI_Spam()
src.PlayerMute = 1
Mute.Add(src.key)
Mute.Add(src.IP)
world<<"<b><font size = 1><font color = silver>{AI}<font color = green> Quest For The Dragonballs - <font color = blue>Smart AI:<font color = white> [src] has been muted.</b>"
time = time * 10
src.mutetimer = [time]
Mute.Remove(src.key)
Mute.Remove(src.IP)


I think im doign alright so far im trying to make a ticker to count down the time and have it saved so if theres a reboot, problem is i cant make a ticker -_-
Behold my ticker!!!
this is a basic ticker, hope it helps.
var
ticks = 0
world
New()
..()
Tick()
proc
Tick()
ticks ++
if(ticks == 1)
world << "1"
if(ticks == 2)
world << "2"
if(ticks == 3)
world << "3"
if(ticks == 4)
world << "4"
ticks = 0
spawn(600)
Tick()
In response to Madcrackfiend
Couldn't you do, world << ticker, if(ticker>=4)ticker=0?
In response to Hell Ramen
I dont see why you couldn't, I just only displayed the
number because I edited it from some code of mine that told
you the season. That and this way allowes you to do things
on ticks other than 4 easier also.
In response to Madcrackfiend
No, it's inefficient crappy code. It doesn't let you do anything easier. Even if you wanted to do something on specific ticks, your way is less efficient then the other way.
In response to Madcrackfiend
Madcrackfiend wrote:
Behold my ticker!!!
this is a basic ticker, hope it helps.
> var
> ticks = 0
> world
> New()
> ..()
> Tick()
> proc
> Tick()
> ticks ++
> if(ticks == 1)
> world << "1"
> if(ticks == 2)
> world << "2"
> if(ticks == 3)
> world << "3"
> if(ticks == 4)
> world << "4"
> ticks = 0
> spawn(600)
> Tick()
>


That sucks, never ever suggest that again.

proc
Ticker(Ticker=10) //default is 10, or 10 seconds.
while(Ticker)
world<<Ticker
--Ticker
sleep(10) //one second
In response to Madcrackfiend
Thats not quite constructive critisism you two. While I
don't mind and even welcome you showing him a better way.
I would like for you to at least explain your thinking a
little. Why is my code so ineficent as to turn it into
crap when It has done everything I have ever asked of it
and has the expandability to do so much more I haven't
even though of yet?
In response to Madcrackfiend
Because, Mad, you could write your snippet in about 2/3 lines of code instead of the amount you did, and still retain it's functionality- make it more efficient, quicker, and less sloppy.
In response to Elation
I understand that. But more efficent? C'mon, did you even try to use teh governator's sugestion? He never told you where to call the proc at, his ticker only counts down from 10 to one and then stops, to expand it you would have to go in and add several lines of code. Granted his does happen faster than mine because I forgot to change sleep600) to sleep(10). But its not up to me to tell mr solo how long he should wait before ticks.

I will give you the sloppy point though, it is a little messy if all your going to do with it is output the ticks to the world. But I stand by both the efficency And functionallity of my work.
In response to Madcrackfiend
Madcrackfiend wrote:
I understand that. But more efficent? C'mon, did you even try to use teh governator's sugestion? He never told you where to call the proc at, his ticker only counts down from 10 to one and then stops, to expand it you would have to go in and add several lines of code. Granted his does happen faster than mine because I forgot to change sleep600) to sleep(10). But its not up to me to tell mr solo how long he should wait before ticks.

I will give you the sloppy point though, it is a little messy if all your going to do with it is output the ticks to the world. But I stand by both the efficency And functionallity of my work.

He shouldn't have to tell him that stuff. It is sorta implied. Also, what chuck said did was perfectly fine. He subtracted down, just like Dranzer asked for.
In response to N1ghtW1ng
Then I have been bested.
In response to Elation
mob
proc
AI_Spam()
src.PlayerMute = 1
Mute.Add(src.key)
Mute.Add(src.IP)
world<<"<b><font size = 1><font color = silver>{AI}<font color = green> Quest For The Dragonballs - <font color = blue>Smart AI:<font color = white> [src] has been muted.</b>"
src.mutetimer = Ticker(Ticker=10)
src.PlayerMute = 0
Mute.Remove(src.key)
Mute.Remove(src.IP)
world<<"<b><font size = 1><font color = silver>{AI}<font color = green> Quest For The Dragonballs - <font color = blue>Smart AI:<font color = white> [src] has been unmuted.</b>"



I got it working awsome but it still wont save -_-
In response to Dranzer_Solo
Im not seeing you try to save it anywhere. The proc looks fine to me, but you kinda have to tell dm to save stuff. Or should I be telling you this because its implied?
In response to Madcrackfiend
world
New()
..()
var/savefile/S = new("timer.ss")
S["time"] >> mutetimer

Del()
TSave()
..()

proc
TSave()
var/savefile/S = new("timer.ss")
S["time"] << mutetimer


i tired this but it didnt work
In response to Madcrackfiend
You were right that time =P. He didn't post anywhere about attempting to save.
In response to N1ghtW1ng
Actuly you where BOTH wrong cause i did post this same code at the very top so HAHAHAHAHAHA
In response to Dranzer_Solo
Indeed he did. Well played mr solo.
In response to Dranzer_Solo
I didn't read from the beggining =P
In response to N1ghtW1ng
Lets get back ontopic :P