Ulysses

Ulysses Stuff => Suggestions => Topic started by: Fluffedwolf on January 18, 2014, 12:43:47 PM

Title: Interval in Adverts
Post by: Fluffedwolf on January 18, 2014, 12:43:47 PM
It would be much better if the intervals on the advertisements would be like ever so and so instead this message plays after so this message plays after so. It would be much more organized
Title: Re: Interval in Adverts
Post by: Neku on January 18, 2014, 12:54:06 PM
This is actually a great idea!
My adverts always seem to show over each other.
Title: Re: Interval in Adverts
Post by: JamminR on January 18, 2014, 03:02:31 PM
They can already be put into groups.
From the default adverts.txt
Quote
If you want to make it so that one advertisement is shown and then will always be followed by another,
; put them in a table. For example, if you add the following to the bottom of the file, A will always show
; first followed by B.
 "my_group"
; {
; {
; "text" "Advertisement A"
; "time" "200"
; }
; {
; "text" "Advertisement B"
; "time" "300"
; }
; }

I'm pretty sure XGUI allows for grouping.
Title: Re: Interval in Adverts
Post by: Fluffedwolf on January 18, 2014, 03:41:59 PM
As I said it should be so you say you want a message every 200 seconds then you place the interval 200 and each advert goes 200 after another. In ulx the max is 1000.
Title: Re: Interval in Adverts
Post by: JamminR on January 18, 2014, 04:17:03 PM
No, XGUI sets the highest number as 1000.
You can set up manually if you really want it higher, go to your gmod/data/ulx/adverts.txt and edit it.
XGUI does allow the way your asking already, just not as high as it seems you want.
Title: Re: Interval in Adverts
Post by: Storm on January 18, 2014, 05:59:31 PM
I have always had a problem with overlapping adverts. I always thought each was zero-based like 60 means every 60 seconds but do you mean the time represents the time after the last one?
Title: Re: Interval in Adverts
Post by: JamminR on January 18, 2014, 09:55:23 PM
ULX has two types - grouped and non-grouped.
Non grouped are zero based. Will show up at whatever time specified, individually.
Two adverts
Advert 1 at 60 seconds
advert 2 at 65 seconds
Second time, 1 will show up at 120, 2 will show up at 130

Grouped, 2nd add will always show up constant <x> after first>.
They're consecutive.
Title: Re: Interval in Adverts
Post by: Megiddo on January 18, 2014, 10:17:14 PM
JamminR is right. Except, XGUI also allows you to input the value you want for the time rather than using the slider, so there's no need to go to the file to set it higher if that's what you want.
Title: Re: Interval in Adverts
Post by: JamminR on January 18, 2014, 10:43:22 PM
allows you to input the value you want for the time rather than using the slider
I thought we had BOTH input and sliders.
Text input boxes + lazy sliders FTW.
Title: Re: Interval in Adverts
Post by: sabo on January 19, 2014, 08:26:42 AM
Use the lua file in the attachments, put it to garrysmod/lua/autorun/...

This will basically print the adverts one by one, 1st then 2nd then 3rd then 4th ect...

The time between those adverts is configureable at the top.

This way it will never override a previous advert.

The script was made by a friend and given to me, the adverts are my own, feel free to keep/delete them to your liking.

Hope this helps.
Title: Re: Interval in Adverts
Post by: JamminR on January 19, 2014, 09:44:31 AM
Sabo, why replace the functionality of ULX?
Title: Re: Interval in Adverts
Post by: Neku on January 19, 2014, 01:18:57 PM
Er... isn't lenny_ a hack?
Title: Re: Interval in Adverts
Post by: Bytewave on January 19, 2014, 01:20:33 PM
Er... isn't lenny_ a hack?
The code is all legit, soooo... guess not.
Title: Re: Interval in Adverts
Post by: Neku on January 19, 2014, 01:38:13 PM
The code is all legit, soooo... guess not.

...Still not trusting that.

EDIT: Nevermind, I just took a look at the code. Seems clean.
Strange name to give a script though.
Title: Re: Interval in Adverts
Post by: Bytewave on January 19, 2014, 01:53:49 PM
...Still not trusting that.

EDIT: Nevermind, I just took a look at the code. Seems clean.
Strange name to give a script though.
You- you don't trust me? D:
I took a look at the code before I said that. .-.
Title: Re: Interval in Adverts
Post by: Neku on January 19, 2014, 02:00:27 PM
Gotta earn it, Circuit.  ;)
Title: Re: Interval in Adverts
Post by: sabo on January 19, 2014, 02:35:56 PM
Sabo, why replace the functionality of ULX?

Because I didnt like the way ULX handled the adverts, it basically did this.

Every adverts timer started at the same time, all adverts which were set to 200 secs would spit out after 200 secs, all the ones who should print after 300 secs print after 300 secs, now in total 300 seconds passed, 100secs more and all the adverts with 200 secs will print again, so we are at total of 400 secs now, after 200 more seconds pass the adverts which are configured with 200 secs AND the ones with 300 secs will trigger and print so you have a bunch of adverts at the same time, that is not what I wanted, I wanted everything to be after each other, a lot more clean and professional imo.

No offense I still use ULX adverts to spamm important messages such as new commands or important information but I use my script for regular adverts so players dont get bothered or spammed with 1000 adverts at once.
Title: Re: Interval in Adverts
Post by: Bytewave on January 19, 2014, 03:00:24 PM
Gotta earn it, Circuit.  ;)
Dawww... fine... :L
EDIT: Thanks for using my OC's name. c:
Because I didnt like the way ULX handled the adverts, it basically did this.

Every adverts timer started at the same time, all adverts which were set to 200 secs would spit out after 200 secs, all the ones who should print after 300 secs print after 300 secs, now in total 300 seconds passed, 100secs more and all the adverts with 200 secs will print again, so we are at total of 400 secs now, after 200 more seconds pass the adverts which are configured with 200 secs AND the ones with 300 secs will trigger and print so you have a bunch of adverts at the same time, that is not what I wanted, I wanted everything to be after each other, a lot more clean and professional imo.

No offense I still use ULX adverts to spamm important messages such as new commands or important information but I use my script for regular adverts so players dont get bothered or spammed with 1000 adverts at once.
Grouping adverts does fix that, doesn't it..?
Title: Re: Interval in Adverts
Post by: JamminR on January 19, 2014, 03:45:00 PM
Though the code might be good for non-ulx server, I'm still confused why someone should add that to servers that have ULX installed.
ULX already does what is asked in first post.
Title: Re: Interval in Adverts
Post by: Bytewave on January 19, 2014, 04:36:51 PM
Though the code might be good for non-ulx server, I'm still confused why someone should add that to servers that have ULX installed.
ULX already does what is asked in first post.
^Thought so.
Title: Re: Interval in Adverts
Post by: sabo on January 20, 2014, 07:29:49 AM
Though the code might be good for non-ulx server, I'm still confused why someone should add that to servers that have ULX installed.
ULX already does what is asked in first post.

I never looked into ulx groups, way to much work to just get this outcome, instead I just did this lol

Long story short, do what jamminR said or get what I got lol

Title: Re: Interval in Adverts
Post by: Megiddo on January 20, 2014, 08:32:34 AM
Reading the directions is too much work? ;)
Title: Re: Interval in Adverts
Post by: sabo on January 21, 2014, 05:19:03 AM
Reading the directions is too much work? ;)

Yes haha :D

I am one lazy guy ^^
Title: Re: Interval in Adverts
Post by: Bytewave on January 21, 2014, 05:41:21 AM
Yes haha :D

I am one lazy guy ^^
Hay, don't feel bad about it. I am too...
Not reading the readme is a bad idea though... Never knew you couldn't use caps in a ULX group name...
Broke can_target with that. :P