Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

SQL Script to make your Server Post Messages

Junior Spellweaver
Joined
Apr 27, 2015
Messages
176
Reaction score
107
This will be my last SQL script for a while. I think I have posted enough examples how to use basic SQL commands to make things happen. I would like to see other people posting useful information, specially getting siege wars working, or someone explaining how to create new game content.

So here is the SQL script that will make your server post a message at preset times. You can modify figures to see the end result. First time you run it all message will be displayed at one time, but after that they will display at the correct intervals.
EndTime should be obvious what it means.
IntervalTime is the time in minutes when the message will be displayed again.
NextTime can be an offset in time to the IntervalTime

My example is each hour messages will being displaying from the first message, and every 4 minutes after it will display the next message.

Code:
/****** Interval Time apears to be Minutes
 ****** Also the NextTime can be used to offset the following messages
 ****** if you using the same Interval time  ******/


USE ROM_ImportDB
GO
TRUNCATE TABLE [dbo].[BroadcastingTable]
GO
INSERT INTO [ROM_ImportDB].[dbo].[BroadcastingTable]
([WorldID], [StartTime],            [EndTime],              [IntervalTime], [NextTime],             [Message]) VALUES
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:00:00', N'SYSTEM - If you have a game issue then suck it up and fix it yourself.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:04:00', N'SYSTEM - If you need a zone opened please MSG a GM'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:08:00', N'SYSTEM - PreDesigned, Statted+Runed Gear is available on request, MSG GM'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:12:00', N'SYSTEM - Do you have an Event you would like enabled ?. Well GM can fix that. Let him know what you want.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:16:00', N'SYSTEM - MicroMacro is Allowed for running one toon at one time and for testing.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:20:00', N'SYSTEM - Romio allowed anywhere.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:24:00', N'SYSTEM - Model Folders allowed, TIP: Do not use when questing.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:28:00', N'SYSTEM - It cost money for power bills to keep this server running, please donate to keep it running.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:32:00', N'SYSTEM - Botting dailys and mini games allowed, BUT gold farm botting allowed on ONE TOON AT A TIME ONLY ok.'),
(1,         N'2000-01-01 00:00:00', N'2015-12-31 00:00:00', 60,             N'2015-01-01 00:36:00', N'SYSTEM - Current Event is --Crafting--');
GO

If you can get the hang of this then you can also use similar coding for users doing a cash donation via a webpage and the game sending them diamonds. It isn't hard when you can combine PHP and SQL. I will leave someone else to figure it out for now. I am reluctant to share that info cause I feel it can cause problems with people thinking it is a way to make a quick buck of mates.

<-- like
 
Newbie Spellweaver
Joined
Mar 22, 2017
Messages
84
Reaction score
7
How could i use your Script?

I tested to modify it and execute it in MS SQL. But it tells me the Synthax is wrong.
When i paste your original script the same error occurs.

Could you help me please?
 
Junior Spellweaver
Joined
Sep 29, 2014
Messages
149
Reaction score
66
try to paste it without all the N'. often it worked then for me!

btw, I co-developed some sql scripts you will find of drewww and he used an older version of sql server. often you just can delete these
N' and then it should work
 
Last edited:
Back
Top