PDA

View Full Version : Một số điều chỉnh cho Server.



akanepro
23-10-09, 01:47 PM
Dưới đây là một số cách điều chỉnh cho server mà 2it cũng áp dụng. Do toàn bằng tiếng Anh nên một số bạn không hiểu nên nhờ các bro dịch dùm. Mình cũng có thể dịch nhưng do đã ngưng chơi và đã xóa Gunz Offline nên không nghịch nữa cho mệt. Các bài viết này được lấy từ forum ragezone.

Cách chỉnh điểm kinh nghiệm:
Vào matchserver trong GunzServer vào phần formula.xml trong đó có dòng cơ bản sau:
<FORMULA_TABLE id="NeedExpLM"> -->Điểm cần để lên cấp
<LM lower="1" upper="20">1</LM>
<LM lower="21" upper="30">1.1</LM>
.....................
<FORMULA_TABLE id="GettingExpLM"> -->Điểm nhận được
<LM lower="1" upper="20">1</LM>
<LM lower="21" upper="30">1</LM>
....................
<FORMULA_TABLE id="GettingBountyLM"> -->Số Bounty nhận được khi thịt 1 thằng
<LM lower="1" upper="20">1</LM>
<LM lower="21" upper="30">1.1</LM>
.....................
Các bạn chỉ cần thay đổi các số màu đỏ trên là chỉnh được điểm theo ý thích.

Cách này là cho phép nói chuyện khi đang duel giống như 2it.

Open up gunz in olly and search for all referenced text strings.
Search for ". . . . .", there should be two of them.
Follow them into the dissassembler. There should be a JNE or JNZ above them. Change them to JMP's.
Now that clan and whispers are done let's find in game chat. Instead of ". . . . ." it's actually "^0. . . . ."
, but you won't find that in referenced text strings.
Remember this:
Code:
004C7204 |. 68 14565F00 PUSH OFFSET Gunz.005F5614
? Lets go to 005F5614.
Let's do a binary search here: type in the ASCII edit box "^0. . . . .". You should come up with the address of the in game chat string.
Right click and find reference to the selected command. You should come up with one entry.
Follow that into the dissassembler and you might find something like this:
Code:
004A9268 |. 8B0D F0325F00 MOV ECX,DWORD PTR DS:[5F32F0]
We want to skip the loading of these variables. To do that look up a few lines for a JE. Change it to a JMP.
Save.

Còn đây là cách tạo 2 server Gunz cũng giống như 2it.

Since a lot of people have requested that feature and i know how to do it, i am making this tutorial, this tutorial is NOT noob friendly, because it need to edit some things via ASM (explained in the tutorial) and change some data in a DLL and compile it.
First of all, i will explain why when you run 2 matchservers in the same PC one of them gets Agent Error, the MatchServer use two ports (only one of those are easily configurable, the TCP Port), one is the 6000 and the other is the port 7777.
The port 6000 are used to recv and send normal packets like the login packet, char list packet, etc..., but the 7777 is a UDP port, is used by the client to receive some information about the peers, when you run another server, you only change the TCP port but not the UDP one, so the client cant get the peer information from the 2nd server because its owned by the first one.
To avoid that problem we need to make two changes, one on the client side part and the other in the server part.
Server Part:
Open up the MatchServer.exe in ollydbg, wait until the analysis has been finished and do this steps.
Right click in the CPU view ( where all the ASM code is shown )
Select Search For -> All Constant
A new dialog will apear, with 3 text boxes, in the 2nd box (the signed one) put 7777 and click ok.
You now will be in the results window, you will see two PUSH 1E61, double click in the first one.
You now will be in the magical line, double click on it to modify the value to PUSH ThePort, be careful because its a hexadecimal number ( 1E61 = 7777 ).
Save that number because you will need it later
Do the same for all of your servers but remember to use a different port on each one.
You are done.
Client Part:
I have attached to the post a example DLL project, download and open it and read the comments.
You also need to change the IP to a different IP in your 2nd server at the ServerStatus table, you cant have the same ip for the two servers in the serverstatus table

Còn đây là thay đổi hình nền khi chọn nhân vật, của 2it là nghĩa địa đó.

What do you need for making a custom login:
The Map you would like to transform into a login map.
A Client (Won't work on Ijji as far as we know, December and July clients can be used [testing on BR]).
A Developer Mode runnable (ROA's GunzLoader.exe) (Download here - Credits to wesman2212 for reuploading)
Notebook or C++ or something like that.. aslong as you can edit .xml
Now, the first thing you do is make a copy of you map.mrs and open it up with a mrs unpacker.
Then you open the file named "<maps name>.RS.XML".
Scroll down and you will see near the end of the document something like this (Delete everything exept spawn_solo_101):
Code:
<DUMMYLIST>
<DUMMY name="spawn_team1_101">
<POSITION>-6093.0756836 -195.6125641 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_101">
<POSITION>-3170.5083008 872.4365234 -795.6045532</POSITION>
<DIRECTION>0.0000001 -0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_101">
<POSITION>6097.8330078 198.5270844 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_102">
<POSITION>5748.6933594 -903.8108521 613.7858887</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_103">
<POSITION>-2217.8510742 892.7770996 -795.6045532</POSITION>
<DIRECTION>0.0000001 -0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_104">
<POSITION>-5000.0000000 1900.0000000 20.0000000</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_105">
<POSITION>4196.6538086 873.2778320 610.5853271</POSITION>
<DIRECTION>0.9999999 0.0000001 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_106">
<POSITION>2872.9782715 -879.1330566 -795.6045532</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_107">
<POSITION>335.1482544 -740.7736816 20.0000000</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_108">
<POSITION>-4440.2216797 -1008.9804077 610.5853271</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_109">
<POSITION>-5000.0000000 -1900.0000000 19.9999847</POSITION>
<DIRECTION>0.9999999 -0.0000002 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_110">
<POSITION>77.8059998 -887.0656128 -319.3572388</POSITION>
<DIRECTION>0.8660254 0.4999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_111">
<POSITION>-3582.3432617 479.1426392 1307.5728760</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_112">
<POSITION>-313.3879395 534.9699097 20.0000000</POSITION>
<DIRECTION>0.9659258 -0.2588190 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_113">
<POSITION>-67.5072098 606.5954590 -597.0026245</POSITION>
<DIRECTION>-0.7071066 -0.7071068 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_114">
<POSITION>-5695.3471680 944.5430908 610.5853271</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_115">
<POSITION>268.6893311 34.2995720 -795.6044922</POSITION>
<DIRECTION>-0.7071068 -0.7071066 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_solo_116">
<POSITION>5000.0000000 -1898.7142334 19.9999847</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_102">
<POSITION>6097.8330078 67.2233810 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_102">
<POSITION>-6093.0756836 -64.3083649 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_103">
<POSITION>6097.8330078 -64.0813065 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_103">
<POSITION>-6093.0756836 66.9958344 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_104">
<POSITION>6097.8330078 -195.3860016 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_104">
<POSITION>-6093.0756836 198.3005219 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_105">
<POSITION>6226.5966797 198.5270844 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_105">
<POSITION>-6225.8081055 -195.6125641 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_106">
<POSITION>6226.5966797 67.2233810 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_106">
<POSITION>-6225.8081055 -64.3083649 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_107">
<POSITION>6226.5966797 -64.0813065 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_107">
<POSITION>-6225.8081055 66.9958344 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team2_108">
<POSITION>6226.5966797 -195.3860016 5.0000000</POSITION>
<DIRECTION>-0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_team1_108">
<POSITION>-6225.8081055 198.3005219 56.9582214</POSITION>
<DIRECTION>0.9999999 0.0000000 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_team_hp03_01">
<POSITION>-5000.0000000 0.0000000 450.0000000</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_team_bullet02_01">
<POSITION>800.0000000 -550.0000000 -267.5876465</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_solo_bullet02_01">
<POSITION>-2217.4497070 775.2012939 -795.6045532</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_solo_ap03_01">
<POSITION>-5000.0000000 0.0000000 158.4726563</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_solo_hp03_01">
<POSITION>264.2125854 30.3530216 -795.6044922</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_solo_hp03_02">
<POSITION>0.0000000 0.0000000 5.0000000</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_solo_ap03_02">
<POSITION>5000.0000000 0.0000000 158.4726563</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_solo_bullet02_02">
<POSITION>800.0000000 -550.0000000 -267.5876465</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_team_ap03_01">
<POSITION>-3000.0000000 0.0000087 -795.6045532</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_team_ap03_02">
<POSITION>3000.0000000 0.0000087 -795.6045532</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_team_hp03_02">
<POSITION>5000.0000000 0.0000332 450.0000000</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
</DUMMY>
<DUMMY name="spawn_item_team_bullet02_02">
<POSITION>-800.0000000 550.0000000 -267.5875854</POSITION>
<DIRECTION>0.0000000 0.9999999 0.0000000</DIRECTION>
When you deleted all the unnecessary spawns, you could now begin adding the Camera Login codes.
here are the codes:
Code:
<DUMMY name="camera_pos 01">
<POSITION>0.0 0.0 0.0</POSITION>
<DIRECTION>0.0 0.0 0.0</DIRECTION>
</DUMMY>
<DUMMY name="camera_pos 02">
<POSITION>0.0 0.0 0.0</POSITION>
<DIRECTION>0.0 0.0 0.0</DIRECTION>
</DUMMY>
hese need to be pasted underneed the spawn_solo_101 (to make things easier I changed spawn_solo_101's data to all zeros)
It will look like this when you added the codes:
Code:
<DUMMY name="spawn_solo_101"> <!-- This is where your char respawns--/>
<POSITION>0.0 0.0 0.0</POSITION>
<DIRECTION>0.0 0.0 0.0</DIRECTION>
</DUMMY>
<DUMMY name="camera_pos 01"> <!--This is where the camera starts in your login--/>
<POSITION>0.0 0.0 0.0</POSITION>
<DIRECTION>0.0 0.0 0.0</DIRECTION>
</DUMMY>
<DUMMY name="camera_pos 02"> <!--This is where the camera ends in your login--/>
<POSITION>0.0 0.0 0.0</POSITION>
<DIRECTION>0.0 0.0 0.0</DIRECTION>
</DUMMY>
Now what you do next is Save this file, and go to your map folder. You'll see Files named after the map's name. you will need to change those file names to "login" (Only of the files RS.XML RS.lm RS.col RS.bsp and RS)
Now those files would be named after this:
login.RS
login.RS.XML
login.RS.bsp
login.RS.col
login.RS.lm
Next step is renaming the name of the map's folder to login aswell.
Here comes to harder part. You will need to past GunzLoader.exe into a clients folder. Make sure that that client has your map in the client's MAP folder.
Now make a shortcut of GunzLoader.exe and put it on your desktop or what ever.
Press right buttin on the shortcut and select properties.
You'll see that the shortcut has the gunzloader.exe as TARGET. Now you will need to edit that by pasting this code behind it (delete the [ ] ):
Code:
[ /game "map" debug "00"]
a space befor /game is requiered to let this work!
Fill in the name of your map where i wrote "map"
Save the change you made and run the shortcut by double clicking it.
Now you will see that A Gunz Client will load. if the loading is done, it will start loading the map.
Then you respawn in the map (map needs lightmap, otherwise it will crash or give an error).
Next step: Find the exact place you want your char to respawn in the login map.
Press F9 and you'll see a bunch of codes on your screen.
Search for "pos" and "dir"
These codes show you where you are located in the map (where the feet of your char are).
open up the Login.RS.XML that you saved last time and scroll down again.
Write the code for "pos" between <POSITION> and </POSITION>
And the code for "dir" between <DIRECTION> and </DIRECTION>
Now for camera 01 and 02, You need to do the same but from an other position ofcorse.
Keep in mind that the Developer Mode gives the coordinations of the position of where your chars FEET are. So for the camera you'll need to count a little bit up to get your camera a bit higher then against the floor.
Note: Don't try to use the camera coordinates in the RS.XML.

Còn nhiều lắm nếu rảnh mình post típ.

zthanhbinhxz
04-07-10, 07:14 AM
=))Thanks..................NHìu