- Joined
- Sep 2, 2006
- Messages
- 1,965
- Reaction score
- 33
PERFECT CLIENT + DB
Filebeam - Free Fast File Hosting
Hey, This is my Download Center Made For GunZ Hope You Enjoy And Hope It Helps Rate Also Please
If you want something added feel free to pm me ;0
[FONT SIZE=5]CLAN WAR + CLANS
Filebeam - Free Fast File Hosting
Hey, This is my Download Center Made For GunZ Hope You Enjoy And Hope It Helps Rate Also Please
If you want something added feel free to pm me ;0
[FONT SIZE=5]CLAN WAR + CLANS
Working Clans & Clan War, By Buga and Alduath's GetClanInfo
Ok everyone, being Clans is the one thing people are really missing, Ill release what I have built in just today, It updates Points and the like, but it doesnt update Ranking, and I believe thats all it wont update.
I'll give you the tables, and the PROCs. I apologize for anything I may have done wrong in them, and your free to distribute them so long as you include Alduath's and I's credit.
If something particular doesn't work, tell me and I'll try to fix it.
If you found something nice, please share.
Here they are:
Tables
Clan Table:
Clanwar Log Table(Have two unknowns, I didn't research them at the time):Code:USE [GunzDB] GO /****** Object: Table [dbo].[Clans] Script Date: 03/09/2007 21:02:52 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Clans]( [CLID] [int] IDENTITY(1,1) NOT NULL, [Level] [int] NULL, [Name] [varchar](50) NULL, [ClanMaster] [varchar](50) NULL, [EmblemUrl] [varchar](50) NULL, [TotalPoint] [int] NULL, [Point] [int] NULL, [Wins] [int] NULL, [Losses] [int] NULL, [MemberCount] [int] NULL, [Ranking] [int] NULL, [EmblemChecksum] [int] NULL ) ON [PRIMARY] GO SET ANSI_PADDING OFF
ProceduresCode:USE [GunzDB] GO /****** Object: Table [dbo].[WinTheClanGame] Script Date: 03/09/2007 21:07:49 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[WinTheClanGame]( [ClanOne] [int] NULL, [ClanTwo] [int] NULL, [IsDraw] [int] NULL, [ClanOnePoint] [int] NULL, [ClanTwoPoint] [int] NULL, [ClanOneName] [nvarchar](max) NULL, [ClanTwoName] [nvarchar](max) NULL, [ClanOneScore] [int] NULL, [ClanTwoScore] [int] NULL, [Unknown] [int] NULL, [Unknown2] [int] NULL, [ClanOneMembers] [nvarchar](max) NULL, [ClanTwoMembers] [nvarchar](max) NULL ) ON [PRIMARY]
Add Clan Member:
Clan Create(I didn't test this, but it looks correct):Code:USE [GunzDB] GO /****** Object: StoredProcedure [dbo].[spAddClanMember] Script Date: 03/09/2007 21:10:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spAddClanMember] @nCLID INT, @nCID INT, @nLevel INT AS DECLARE @nName varchar(50) SELECT @nName = Name FROM Clans WHERE CLID = @nCLID UPDATE Character SET ClanName = @nName, CLID = @nCLID, ClanGrade = @nLevel WHERE CID = @nCID DECLARE @nCount INT SELECT @nCount = MemberCount From Clans WHERE CLID = @nCLID UPDATE Clans SET MemberCount = @nCount+1 WHERE CLID = @nCLID SELECT 1 Ret
GetCharClan:Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spCreateClan] @nClanName varchar(50), @nMaster varchar(50), @nUser1 INT, @nUser2 INT, @nUser3 INT, @nUser4 INT AS INSERT INTO Clans (Name,ClanMaster,TotalPoint,Point,Wins,Losses,MemberCount,Ranking) VALUES(@nClanName,@nMaster,1000,1000,0,0,5,0) UPDATE Character SET ClanName = @nClanName WHERE CID = @nMaster OR CID = @nUser1 OR CID = @nUser2 OR CID = @nUser3 OR CID = @nUser4 DECLARE @nV INT SELECT @nV = CLID FROM Clans WHERE Name = @nClanName UPDATE Character SET CLID = @nV WHERE CID = @nMaster OR CID = @nUser1 OR CID = @nUser2 OR CID = @nUser3 OR CID = @nUser4 UPDATE Character SET ClanGrade = 1 WHERE CID = @nMaster SELECT 1 Ret,CLID FROM Clans WHERE Name = @nClanName
GetClanInfo(made by Alduath, but I made it one line, and it works, but it doesnt for him apparently):Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spGetCharClan] @nCID INT AS SELECT CLID FROM Character WHERE CID = @nCID
GetCLIDFromClanName:Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spGetClanInfo] @nCLID INT AS SET NOCOUNT ON; SELECT CLID, Level, Name, ClanMaster, TotalPoint, Point, Wins, Losses, MemberCount, Ranking, EmblemUrl, EmblemChecksum FROM Clans WHERE CLID=@nCLID --SELECT EmblemChecksum FROM Clans WHERE CLID=@nCLID
RemoveClanMemberCode:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spGetCLIDFromClanName] @nClanName varchar(50) AS SELECT CLID FROM Clans WHERE Name = @nClanName
RemoveClanMemberByName:Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spRemoveClanMember] @nCLID INT, @nCID INT AS UPDATE Character SET ClanName = NULL, CLID = NULL, ClanGrade = 0 WHERE CID = @nCID DECLARE @nCount INT SELECT @nCount = MemberCount From Clans WHERE CLID = @nCLID UPDATE Clans SET MemberCount = @nCount-1 WHERE CLID = @nCLID
UpdateCharClanContPoint(Not certain this is correct):Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spRemoveClanMemberFromCharName] @nCLID INT, @nCID INT, @nCharName nchar(10) AS UPDATE Character SET ClanName = NULL, CLID = NULL, ClanGrade = 0 WHERE CID = @nCID DECLARE @nCount INT SELECT @nCount = MemberCount From Clans WHERE CLID = @nCLID UPDATE Clans SET MemberCount = @nCount-1 WHERE CLID = @nCLID SELECT 1 Ret
UpdateClanGrade:Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spUpdateCharClanContPoint] @nCLID INT, @nCID INT, @nContPoint INT AS BEGIN UPDATE Character SET ClanContPoint = @nContPoint WHERE CID = @nCID END
WinTheGame:Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spUpdateClanGrade] @nCLID INT, @nCID INT, @nLEVEL INT AS UPDATE Character SET ClanGrade = @nLEVEL WHERE CID = @nCID
Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE PROC [dbo].[spWinTheClanGame] @nClanOne INT, @nClanTwo INT, @nIsDraw INT, @nClanOnePoint INT, @nClanTwoPoint INT, @nClanOneName nvarchar(MAX), @nClanTwoName nvarchar(MAX), @nClanOneScore INT, @nClanTwoScore INT, @nJ INT, @nK INT, @nClanOneMembers nvarchar(MAX), @nClanTwoMembers nvarchar(MAX) AS INSERT INTO WinTheClanGame VALUES(@nClanOne,@nClanTwo,@nIsDraw,@nClanOnePoint,@nClanTwoPoint,@nClanOneName,@nClanTwoName,@nClanOneScore,@nClanTwoScore,@nJ,@nK,@nClanOneMembers,@nClanTwoMembers) DECLARE @nPoints INT SELECT @nPoints = Point FROM Clans WHERE CLID = @nClanOne DECLARE @nWins INT SELECT @nWins = Wins FROM Clans WHERE CLID = @nClanOne UPDATE Clans SET Point = @nPoints + 1, Wins = @nWins+1 WHERE CLID = @nClanOne SELECT @nPoints = Point FROM Clans WHERE CLID = @nClanTwo DECLARE @nLosses INT SELECT @nLosses = Losses FROM Clans WHERE CLID = @nClanTwo UPDATE Clans SET Point = @nPoints + 1, Losses = @nLosses+1 WHERE CLID = @nClanTwo
=====Guides=====
Setting up a GunZ Server - Complete Tutorial
What you are going to need:
* Server files (Password = ragezone.com) - MEGAUPLOAD - The leading online storage and file delivery service or fileWind.com - Free 500MB File Hosting
* SQL Database (Password = Mythical) - http://forum.ragezone.com/attachments/34821d1167111748-gunzdb.rar
* Client - gunz_FULL.zip - FileFront.com
* Legacy Gamers Patch (For IP Input) - RapidShare: 1-Click Webhosting
* Microsoft SQL Server Management Studio Express
* Microsoft SQL Server 2005
* MRS Unpacker - http://forum.ragezone.com/attachments/34913d1167290286-mrs.rar
* WinRAR
(Downloads which have no link can easily be searched for to find the program)
Before you do anything, you are going to need to install Microsoft SQL Server Management Studio Express and Microsoft SQL Server 2005.
Step 1 - Setting up the Database and ODBC:
Creating/Connecting the Database
Open Server Management Studio Express* (SMSE). Within the Object Explorer Panel you will notice the 'Database' folder, right click it, click 'New Database...'.
A 'New Database' form will open, and in the text input type 'GunzDB' and click OK, your database has been created.
The next thing you are going to want to do is restore the Database. Click File> Open> File... and locate your GunzDB.sql file and open it. You are going to have to connect to the database engine, the settings are alright so all you need to do is click 'Connect'. Now right click on 'File' and allow the 'SQL Editor' tool bar to show.
In the toolbar there is a drop-down menu with the 'master' database selected, click on the arrow and select the 'GunzDB' database and click the button next to the drop-down menu, 'Execute'. A message showing 'Command(s) completed successfully.' should notify you that you have done this all correctly.
Creating the ODBC
Click Start> Run> and in the windows input type 'odbcad32'. You should already be in the 'User DSN' tab so click on 'Add'. Another window should pop-up. You'll have to scroll all the way down to the bottom and select 'SQL Server' then click 'Finish'.
Another window/form will pop-up needing information for your new Data Source. For the name, type 'GunzDB', for the description you may type whatever you like, but for the SQL server you which to connect to, you must go back into SMSE*, look in the SQL Editor tool bar and click the 2nd icon which will disconnect you from data engine. Now click the 1st icon which will re-connect you, but make sure to copy the 'Server name' this time, then click 'Connect'.
Now having that in hand, you can go back to creating your ODBC and in the 'Server' text input, paste in your server name. Click next since the settings are currently fine. Now in the next part, click on the tick box and select 'GunzDB' from the drop-down menu and click 'Next' and finally click 'Finish'.
If you would like to check your data source, click 'Test Data Source...' in the window or you can just click 'OK' to finish. Now to completely finish it, click 'OK' again.
Step 2 - Patching GunZ:
Install your GunZ game to a directory of your choice. Now open the Legacy Gamers patch and find the directory where you installed your GunZ game into, and run the patch. After that is done, this step is complete.
Step 3 - Configuring the Server:
Place the server files in your C:\ drive and extract them into a folder with the name 'GunzServer'. Once in the folder, go to the 'Locator' folder and then open the 'Locator.ini' file. Somewhere in the file you should see these lines of code:
You can either change the '217.0.0.0' to your actual IP or localhost which is '127.0.0.1'. Besides that everything else is fine.
Make your way to the MatchServer folder and run 'MatchServer.exe', once loaded you may minimize it.
Step 4 - Creating an Account (Manually):
Bring up SMSE and expand the 'Database' folder if it hasn't already been done. Expand 'GunzDB', expand 'Tables' and right click on 'dbo.Accounts' and 'Open table'.
You do not need to worry about the AID field as that is an automatic generation of account number. In the UserID field, type your account ID, in the Password field, type your account password and in the UGradeID, type in your account grade.
After you have typed all of that in, press enter and on the SQL Editor toolbar click 'Execute' (The exclamation mark symbol).
Step 5 - Configuring 'config.xml' to connect to your server:
With that all done, go to the folder where you installed GunZ/Legacy Gamers Patch and find the file 'config.xml'. Right click on it and open with notepad, or similar. You will see this portion of code:
You are going to need to change the 'legacygamers.com' section to the IP you wrote in the 'Locator.ini', if you wrote the localhost IP just change it to read:
Then save the file, File> Save and close it.
Step 6 - Unpacking 'system.mrs':
Extract 'mrs.rar' into your GunZ directory. Create a folder called 'MRS' inside your GunZ directory and place the files 'mrs.exe, zlib.dll and system.mrs' into that folder.
Now, you will need to open WinRAR, direct yourself to the 'MRS' folder in your hard drive. Highlight 'system.mrs' and click the 'Add' button. A window will pop-up, select RAR for the archive format and click 'OK'. Now go back to your 'MRS' folder and create a new 'Text File' with any name you like, but in the file type:
Now save it and change the file extension to '.bat' from '.txt'. Now run that file and a folder named 'system' should come up. Go into that folder and copy the file 'zitem.xml'.
Go back to your 'MatchServer' folder and paste the 'zitem.xml' over the one that is in there. You might need to run your MatchServer.exe again for it to take changes.
Step 7 - Logging in
Run your GunZ client and type the account ID and account password that you used when you made your account in SMSE, you should login.
Congratulations, you have made your GunZ server, enjoy!
Credits:
LGKeiz and Legacy Gamers
Mythical
China
Whoever created the MRS Unpacker
Anyone else who had input into creating these files
(If I missed anything or you need any help, just post here and I'll fix it/help you)
Questions & Awnsers
of problems and the awnsers for them on the forum, credits for taking the time to do it goes to BEPETEMISH. Developer of DaVD Gunz.
1. Questions awnsered about standard editing:
* 1.1 How to add Quest Mode?
* 1.2 How to change the starting level and bounty?
* 1.3 How to add premium items?
* 1.4 How to change weapon values?
* 1.5 How to change login background?
* 1.6 How to change the loading screen? (corrupt image files fixed)
* 1.7 How to pack and unpack .mrs?
2. Questions awnsered about server control:
* 2.1 What are the GM Commands?
* 2.2 How to make a Register Website?
* 2.3 How to Upgrade to match server(14 Jul 2006, english version)?
Q. 1.1 How to add Quest Mode?
A.
* <Part 1: Activate quest; credits to: Buga>
Hi I know that too many people has problems with Quest, Here i have the Solution.
First You need to add a Field at Character TABLE.
The Column you have to ADD is QuestItemInfo and is VARCHAR (MAX)
How to add the table:
Go to the SQL SERVER MANAGEMENT STUDIO.
Connect to the server
Expand your DB
Expand at tables,
Right Click at Fields
And select New Field
So there you have to put the name (QuestItemInfo), then the type of data: varchar (MAX) , and then you check the box that says Allow NULL data.
You are done with the Field
Pictures to as extra support: (tnx to emisand)
Picture 1
Picture 2
Then you need to Install this procedure:
How to install:Code:CREATE PROCEDURE [dbo].[spSelectCharQuestItemInfoByCID] @nCID INT AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; SELECT QuestItemInfo FROM Character Where CID = @nCID END
Go to Procedures and Right Click there and select New Query, there u paste this code and click at Execute.
* <Part 2.1: Working out the bugs, Editing config.ini; Credits to: emisand>
Go to your match server folder,
Open config.ini,
you will see this line ;MODE="test",
delete the ; so you will get MODE="test",
now save it.
* <Part 2.2: Solve nomsg bug; Credits to: AT.H.K>
download this gunz.exe:
Gunz.rar
Put this gunz.exe in the gunz client folder instead of the origional. (back-up your origional)
On to the database:
Collapse the GunDB , Programmability then Stored Procedures like so:
Now right click dbo.spInsertChar and press modify like this :
Ok so thats done a window to the right of it will pop up:
And DELETE all the text like it shows in that picture ^ .
and PASTE this in it
Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[spInsertChar] @nAID INT, @nCharIndex INT, @szName nvarchar(32), @nSex INT, @nHair INT, @nFace INT, @nCostume INT AS BEGIN SET NOCOUNT ON; DECLARE @cnt INT SELECT @cnt=COUNT(*) FROM Character WHERE AID = @nAID DECLARE @cid INT SELECT @cid=COUNT(*) FROM Character INSERT INTO Character VALUES(@nAID,@szName,@cnt,50,@nSex,@nCostume,@nFace,@nHair,NULL,0,100000,0,0,0,0,0,0,0,0,0,0,0,0,@cnt,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,null) END
* <Part 2.3: Quest doesn't show up as match type?>
Open ChannelRule.xml
Let all channel rules look like this:
What you do here is adding GAMETYPE 7, game type 7 is quest mode. So add quest to the channels you want, you don't need to give all channels quest available.Code:<CHANNELRULE id="0" name="novice"> <MAP name="Mansion"/> <MAP name="Prison"/> <MAP name="Prison II"/> <MAP name="Station"/> <MAP name="Battle Arena"/> <MAP name="Town"/> <MAP name="Snow_Town"/> <MAP name="Ruin"/> <MAP name="Dungeon"/> <MAP name="Castle"/> <MAP name="Island"/> <MAP name="Garden"/> <MAP name="Factory"/> <MAP name="Port"/> <MAP name="Lost Shrine"/> <MAP name="Stairway"/> <MAP name="Hall"/> <MAP name="Catacomb"/> <MAP name="Shower Room"/> <GAMETYPE id="0" /> <GAMETYPE id="1" /> <GAMETYPE id="2" /> <GAMETYPE id="3" /> <GAMETYPE id="4" /> <GAMETYPE id="5" /> <GAMETYPE id="6" /> <GAMETYPE id="7" /> <GAMETYPE id="8" /> </CHANNELRULE>
* <Part 2.4: Character walks out screen; Credits to: emisand>
Add the table:
Go to the SQL SERVER MANAGEMENT STUDIO.
Connect to the server
Expand your DB
Expand at tables,
Right Click at Columns
And select New Column
So there you have to put the name (QuestItemInfo), then the type of data: varchar (MAX) , and then you check the box that says Allow NULL data.
You are done with the Field
Q. 1.2 How to change the starting level and bounty?
A.
<Editing; credits to: Bepetemish>
Open your database,
browse to spInsterChar, (its under Stored Procedures)
right click it and choose "modify"
find the part
50 = starting levelCode:VALUES(@nAID,@szName,@cnt,50,@nSex,@nCostume,@nFac e,@nHair,NULL,0,100000,0,0,0,0,0,0,0,0,0,0,0,0,@cn t,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,NULL)
100000 = starting bounty
Note that you will start naked so you need to give peaple starting money so they can buy their gear.
Q. 1.3 How to add Premium Items?
A.
* <Part 1: Editing shop.xml; Credits to: hunter1577 and zozole003>
Go to your match server folder, (mine is located in C:\gunzserver\match server\)
Make a back-up of shop.xml
Open shop.xml
Delete everything inside
Now paste this:
Code:<?xml version="1.0" encoding="euc-kr" ?> <XML id="shop"> <!--
Last edited: