[RELEASE] -

Junior Spellweaver
Joined
Jan 13, 2007
Messages
193
Reaction score
0
Location
New York
CREDITS:
EMISAND - Locator
ThuGie - Some Proc's
LGKeiz - Proc's
I Take no credit's for any procedures or tables. This topic is a Compiled version of every possible table/procedure that allows the locator to be used.

Locator.ini
Code:
;HACKED BY CHINA GAMERS FOR RAGEZONE!
;CONFIGURATIONS BY EMISAND

[DB]
DNS="GunzDB"
USERNAME="YOURUSER"
PASSWORD="YOURPASSWORD"

[NETWORK]
IP="127.0.0.1"
PORT="8900"

[ENV]
ID="1"
LOCATOR_UID_HIGH="5"
LOCATOR_UID_LOW="0"
MAX_ELAPSED_UPDATE_SERVER_STATUS_TIME="1000" 
UDP_LIVE_TIME="10000000" 
MAX_FREE_RECV_COUNT_PER_LIVE_TIME="9" 
BLOCK_TIME="0" 
UPDATE_UDP_MANAGER_ELAPSED_TIME="3" 
MARGIN_OF_ERROR_MIN="500000" 
USE_COUNTRY_CODE_FILTER="no" 
GMT_DIFF="-3"
ELAPSED_TIME_UPDATE_LOCATOR_LOG="3600000"
ELAPSED_TIME_UPDATE_LOCATOR_LOG="10000"
ELAPSED_TIME_UPDATE_COUNTRYCODEFILTER_LOG="10000"
UPDATE_COUNTRY_CODE="66 89 69 77 73 83 65 78 68"

BlockCountryCode
Code:
USE [GunzDB]
GO
/****** Object:  Table [dbo].[IPCountryCode]    Script Date: 02/21/2007 18:30:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[IPCountryCode](
    [CountryCode3] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [IPTo] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [IPFrom] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_IPCountryCode] PRIMARY KEY CLUSTERED 
(
    [CountryCode3] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF

USE [GunzDB]
GO
USE [GunzDB]
GO
/****** Object:  Table [dbo].[BlockCountryCode]    Script Date: 02/21/2007 18:27:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BlockCountryCode](
    [Code ] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [Country] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

/****** Object:  StoredProcedure [dbo].[spIPFltGetBlockCountryCodeList]    Script Date: 02/21/2007 18:26:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spIPFltGetBlockCountryCodeList]
AS
BEGIN
    SELECT * FROM BlockCountryCode(NOLOCK)
END

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spIPFltGetCustomIP]    Script Date: 02/21/2007 18:27:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spIPFltGetCustomIP]
AS
BEGIN
    SELECT * FROM BlockCountryCode(NOLOCK)
END

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spIPFltGetCustomIPList]    Script Date: 02/21/2007 18:27:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spIPFltGetCustomIPList]
AS
BEGIN
    SELECT * FROM BlockCountryCode(NOLOCK)
END

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spIPFltGetIPtoCountry]    Script Date: 02/21/2007 18:27:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spIPFltGetIPtoCountry]
AS
BEGIN
    SELECT * FROM BlockCountryCode(NOLOCK)
END

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spGetIPCountryCode]    Script Date: 02/21/2007 18:29:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[spGetIPCountryCode]
AS
BEGIN
SELECT     CountryCode3, IPTo, IPFrom
FROM         IPCountryCode
ORDER BY CountryCode3
END

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spGetIPtoCountryList]    Script Date: 02/21/2007 18:29:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spGetIPtoCountryList]
AS
BEGIN
    SELECT * FROM BlockCountryCode(NOLOCK)
END
ServerStatus
Code:
USE [GunzDB]
GO
/****** Object:  Table [dbo].[ServerStatus]    Script Date: 02/21/2007 18:28:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ServerStatus](
    [ServerID] [int] NULL,
    [ServerName] [nvarchar](32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [PlayerCount] [int] NULL,
    [MaxPlayer] [int] NULL,
    [CurrPlayer] [int] NULL,
    [Time] [datetime] NULL,
    [IP] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Port] [int] NULL,
    [Opened] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [StatusTime] [int] NULL,
    [UpdateTime] [int] NULL,
    [RecvUDP] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [SendUDP] [varchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [BlockUDP] [int] NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spUpdateLocatorStatus]    Script Date: 02/21/2007 18:28:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[spUpdateLocatorStatus]
@nServerID INT,
@RecvUDP VARCHAR,
@SendUDP VARCHAR,
@BlockUDP INT,
@UpdateTime INT
AS
BEGIN
SET NOCOUNT ON;
-- Update UDP Status
UPDATE ServerStatus
SET RecvUDP = @RecvUDP, SendUDP = @SendUDP, BlockUDP = @BlockUDP, UpdateTime = @UpdateTime
WHERE ServerID = @nServerID

END

USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spStartUpLocatorStatus]    Script Date: 02/21/2007 18:28:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[spStartUpLocatorStatus]
@nServerID int,
@nIP varchar(50),
@nPort int,
@nStatusTime varchar(4000)
AS
-- Remove old server.
DELETE FROM ServerStatus WHERE ServerID = @nServerID
-- Add new server.
INSERT INTO ServerStatus (ServerID,IP,Port,StatusTime) VALUES (@nServerID,@nIP,@nPort,@nStatusTime)
 
Ok, that's ok.

I recovered my Emisand!

If you can't make the locator work, is because you didn't put information at BlockCountryCode Tabla or at ServerStatus table.

This is for all the noobs that can't make it work
 
INSERT INTO BlockCountryCode (Code,Country)VALUES('1','AAA')

if that table is correct and its the right table :p.
just got it from this page.
If i remember correct that table's infomation aint correct though..

atm its 1:53 am cant sleep and not going to start mssql to check :/.
Sorry.
UPDATE ServerStatus SET Opened = 1 WHERE ServerID = 1
to open your server this sould do first open up locator then matchserver
then run that.
ofcouse serverid=1 the 1 is the id of your match/locator server ;)
edit it in the ini set both to 1
 
INSERT INTO BlockCountryCode (Code,Country)VALUES('1','AAA')

if that table is correct and its the right table :p.
just got it from this page.
If i remember correct that table's infomation aint correct though..

atm its 1:53 am cant sleep and not going to start mssql to check :/.
Sorry.
UPDATE ServerStatus SET Opened = 1 WHERE ServerID = 1
to open your server this sould do first open up locator then matchserver
then run that.
ofcouse serverid=1 the 1 is the id of your match/locator server ;)
edit it in the ini set both to 1

Your correct. that isent the right table but, it works. (I Accually dont need to use it. i deleted it and locator works perfectly.) Thanks guys for posting a guide on those things. Another thing.
the BlockCountryCode table is incorrect but it works.
 
Code:
[DB]
* DNS Name for your database
DNS="iGunzDB"
* Username for the database
USERNAME="********"
* Pass for the database
PASSWORD="*******"

[NETWORK]
* Just enter your local ip
IP="127.0.0.1"
* Enter your matchserver port
PORT="6000"

[ENV]
* Enter id from the matchserver ini
ID="1"
* N/A
LOCATOR_UID_HIGH="5"
* N/A
LOCATOR_UID_LOW="0"
* Checks is the matchserver is opened every value ms
* Note it also places the value into the database current value 10 seconds
MAX_ELAPSED_UPDATE_SERVER_STATUS_TIME="10000"
* N/A
UDP_LIVE_TIME="1000"
* N/A
MAX_FREE_RECV_COUNT_PER_LIVE_TIME="9"
* N/A
BLOCK_TIME="3"
* N/A
UPDATE_UDP_MANAGER_ELAPSED_TIME="3000"
* N/A
MARGIN_OF_ERROR_MIN="30000"
* Want to use the countrycode block from database
* set to no because your info probably aint right anyway
USE_COUNTRY_CODE_FILTER="no"
* Uhm time diffrents between ?
GMT_DIFF="-1"
* Updates the log with the latest news
ELAPSED_TIME_UPDATE_LOCATOR_LOG="3600000"
* Again countrycode stuff just never update it ok
ELAPSED_TIME_UPDATE_COUNTRYCODEFILTER_LOG="0"

Here's the ini with a bit of infomation..
Just change the database infomation and the rest sould be set :).
 
for locator.ini, can we use port 6000?

Edit : Why do i always get that eror for the ServerStatus Table? And almsot everywhere else? :

Msg 154, Level 15, State 1, Procedure spUpdateLocatorStatus, Line 17
a USE database statement is not allowed in a procedure, function or trigger.
 
Kochon, Dont mess with the port. otherwise your going to have problems.
Matchserver 1 & Matchserver 2 need to be 6000 & 6001

Did you add your IP address to the ZLocatorList.xml in system.mrs?

It would still show without editing the zloactor.

Close Matchserver
Close Locator
Open Matchserver
Open Locator
Re-Fix the Table.
If it still doesnt work, then i dont know what to tell you.
 
ohk i got my locator top run and say 1 run 0 dead but wen in my client i cant log into them it says "check updates" if this a noob thing 2 ask sorry my bad cheers
 
Actually if your using my procs first start locator so it will create a id in the database then run matchserver it will auto update the servername + maxusers

and then simply run UPDATE ServerStatus SET Opened = 1 WHERE ServerID = 1
 
Back