Author Topic: Advertisements  (Read 2990 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Advertisements
« on: May 31, 2008, 12:02:08 pm »
Script Name: Ads
Script Description: After so much time, the script will announce an advertisement. Each ad may have a specified command to redirect the player to a different server.
Original Author: DorkeyDear (Curt)
Core Version: 2.6.3

Quote from: readme.txt
Installation
  Simply extract contents of .zip file into scripts folder within the 2.6.3 or more recent version of Soldat Dedicated Server.

Creating your own advertisements
  It may seem a bit odd from there. It would probably be easiest to delete everything.
    The first line is how often an advertisement is shown (in ticks, 60 ticks is 1 second).
    The second line is how many advertisements there are.
    The third line is how many lines in the message of advertisement.
    The following lines (number of lines depends on previous line) contains the messages in the advertisement. Be sure to include the command that redirects the player to the server in one of these lines.
    After the messages comes the command to redirect the player. Remember that Soldat prevents commands any shorter than three characters in length. This may be used to your advantage if you are advertising something other than a Soldat server.
    The IP of the server to redirect the player to. The IP must be in w.x.y.z form (w, x, y, and z are numbers)
    The port of the server to redirect the player to.
    The next ad (if needed; repeats from line three but with appropriate information)
  Notes:
    Blank lines are ignored.
    When the script is expecting a number, do not have a 0.
    Passwords are and can not be supported as of server v2.6.3.
  Save the file.
  You can either restart the server, recompile Ads (or whatever it may be named), or use the /loadads command.

Operating System
  With line break issues, there has been a constant included at the top of the script with the line break character(s) used to separate lines in data.txt. The example contains \r\n, which is what windows uses, although you may need to change this depending on your OS.

An example with three servers has been included:
Quote from: data.txt
13500
3
1
Ever play SoldiBall? Try it out: /soldiball
soldiball
67.106.77.193
30087
1
Try out the popular Bombski's MultiMode with /multimode
multimode
85.14.218.119
25073
1
Come and try out MiracleMod using /mmod
mmod
72.232.225.66
23073
« Last Edit: June 01, 2008, 10:44:01 am by DorkeyDear »

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Advertisements
« Reply #1 on: May 31, 2008, 01:40:43 pm »
Good idea. Maybe we should get together with a few mods and do an in-game link web...
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline zop

  • Major
  • *
  • Posts: 81
Re: Advertisements
« Reply #2 on: May 31, 2008, 10:47:00 pm »
nice one! I will try it later. thanks.

http://122.116.167.31:23238:23238/galavela/?inc=player&name=%5BTomato+Bird%5D+Cibo[/size=1]

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Advertisements
« Reply #3 on: June 01, 2008, 05:22:40 am »
MiricalMod? -_-
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline Irlandec

  • Soldier
  • **
  • Posts: 176
Re: Advertisements
« Reply #4 on: June 01, 2008, 05:50:24 am »
Thx for the script! Great for server communities!

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Advertisements
« Reply #5 on: June 01, 2008, 07:29:04 am »
Do we get payed for advertising?

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Advertisements
« Reply #6 on: June 01, 2008, 07:34:53 am »
ill give you 1$ for every year that you run my multimode advert in your server :)

nice script, i just dont get why you would use ticks as interval.. seconds would be just fine.

1 question, does it show a random add every interval, or all the ads? i like saike's idea of getting together with a few servers, but i dont want massive server spam :P

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Advertisements
« Reply #7 on: June 01, 2008, 12:35:54 pm »
nice script, i just dont get why you would use ticks as interval.. seconds would be just fine.
If AppOnIdle is changed to run more often than every second, the script should still work properly, and display the the messages more accurately on time. This can be achieved like on kb, the green dude; but I don't think that would be too necessary for this type of script ^^
1 question, does it show a random add every interval, or all the ads? i like saike's idea of getting together with a few servers, but i dont want massive server spam :P
Lets say I have 3600 for the time interval... every minute, it'll show an ad... going in order, top to bottom.. so minute 1, it'll show ad #1; minute 2, it'll show ad #2, minute 3, ad 3, minute 4, ad 1, minute 5, ad 2, etc. (assuming there are only 3 ads)

Date Posted: June 01, 2008, 11:27:43 am
Note: People who are using these commands must have "[NETWORK] Join=23073" in their client's soldat.ini file, which is a number which I can't get until 2.6.4 afaik.