- Joined
- Apr 30, 2008
- Messages
- 2,868
- Reaction score
- 214
You can ask your help here, and most of the answers will be here too.
No credits for me, I searched around the whole Shaiya section for these answers.
I might have missed some, and if i did please add them here, and I will add it to this post.
Please check the whole thread, before asking a question.
Twilight's fixes -
No credits for me, I searched around the whole Shaiya section for these answers.
I might have missed some, and if i did please add them here, and I will add it to this post.
Please check the whole thread, before asking a question.
Ports said:(you only need to port forward if you are behind a router )
1433 - SQL (for remote connections like link server used by session)
30800 - ps_login.exe
30810 - ps_game.exe
30900 - ps_session.exe
30901 - ps_userLog.exe, ps_userLog.exe, ps_userLog.exe
30911 - ps_dbAgent.exe
30912 - ps_gameLog.exe
40900 - PSM_Agent.exe
Twilight's fixes -
Q : error( GOT SQL 2005 EXPRESS EDITION / WIN XP SP3 32 BIT)
-How to fix DC/Rollback?
-after I buy something from cash shop I get client error?
-"disconnected from server , ERROR 0
-I tried to run PSGMTool.exe, but I couldn't get it to work, I always get the same error message "GM Server connetion failed".
Is the solution quoted above a solution for the problem with PSGMTool.exe or it's only to make the Store Procedures to work?
Answer said:
-How to fix DC/Rollback?
Answer said:In the beginning it is necessary to define the second process caused blocking - both access
Example
You must be registered to see links
After definition of blocking function to add an option
with (UPDLOCK)
Example
Select *From DeadLoack with (UPDLOCK)
This function will not be blocked. Another will expect end.
-after I buy something from cash shop I get client error?
Answer said:1. Unpack saf (ZeroSignal Python tools)
2. Generate csv or sql from Cash.SData
3. Delete all rows from ProductList table
4. exec import from csv or exec sql script for add new items in ProductList table
5. If error or crash check logs and edit store proc... i think problem RPC game.
-"disconnected from server , ERROR 0
Answer said:Stop all servises.Close PSMServer_Mgr.exe
and run again...
and use command Game-> /nprotectoff
-I tried to run PSGMTool.exe, but I couldn't get it to work, I always get the same error message "GM Server connetion failed".
Is the solution quoted above a solution for the problem with PSGMTool.exe or it's only to make the Store Procedures to work?
Answer said:PSGMTool.exe - I have no this file (I do not see the big necessity for it), is probable in the beginning is necessary DSN after that there is a verification using usp_GMTool_Login or (_2, _3)
My opinion at present:
.htaccess + php + store procs [/qoute]
-No View
help me..!!
Answer said:... enable in game options game/player
Answer said:sod78's fixes -
-How to connect successfully with out disconnect issue?
Answer said:Basically all you need is to go into the game command console and execute /nprotectoff
-How to increase exp level?
Answer said:use /exp2xenable <exp level>
Eg. /exp2xenable 100 = 100x exp
-Complete mobs, items, skills, etc database. Just restore itYou must be registered to see links
-Error DBAGENT
2009-04-20 16:27:31 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Procedure Usp_Save_Char_Item_Add_E has no parameters and arguments were supplied., SQL STATE: 42000, NATIVE ERROR: 8146 (0x1FD2)
2009-04-20 16:27:31 ::CreateCharacter 18 Tester retVal=-1, qerr=-1, {?=call Usp_Save_Char_Item_Add_E(18,2677679008296009728, 0,5, 12006,12,6, 2400, 0,0,0,0,0,0, '',1,'2009-04-20 16:27:31','S')}
2009-04-20 16:27:31 err=0, , SQL STATE: 00000, NATIVE ERROR: 0 (0x0)
and can't create character.
Answer said:Thats the missing stored procedures Reflax was refering to, u will need to re-create that for PS_GameData db.
That procedure should insert into 'charitems' table from the looks of it.
-Here's the complete PS_GameData which contains all the needed stored procedures.
Just restore that to your original PS_GameData
You must be registered to see links
-And here's the english version of server manager
You must be registered to see links
Main Thread's fixes -
-how use gm command /getitem?
Answer said:/getitem Type TypeID Count
see PS_GameDefs->Items
-I need gm commands please
Answer said:
-my server not working proc usp_AdjustMobsMoney help plz?
<by AngryBvr>AngryBvr said:I think the best approach to solve this problem is not to use ups_AdjustMobsMoney SP, and just modifiy the usp_Read_Mobs_R SP in this way:
In this way you avoid altering any table data, and to vary the money that monters drop you only need to change the value of @Multiplier.Code:ALTER PROC [dbo].[usp_Read_Mobs_R] AS DECLARE @Multiplier AS INT SET @Multiplier = 10 SELECT MobID, MobName, [Level], [Exp], AI, ( CASE WHEN (Money1 * @Multiplier) > 32767 THEN 32767 ELSE (Money1 * @Multiplier) END ) AS Money1, ( CASE WHEN (Money2 * @Multiplier) > 32767 THEN 32767 ELSE (Money2 * @Multiplier) END ) AS Money2, QuestItemID, HP, SP, MP, Dex, Wis, Luc, [Day], [Size], Attrib, Defense, Magic, ResistState1, ResistState2, ResistState3, ResistState4, ResistState5, ResistState6, ResistState7, ResistState8, ResistState9, ResistState10, ResistState11, ResistState12, ResistState13, ResistState14, ResistState15, ResistSkill1, ResistSkill2, ResistSkill3, ResistSkill4, ResistSkill5, ResistSkill6, NormalTime, NormalStep, ChaseTime, ChaseStep, ChaseRange, AttackType1, AttackTime1, Attackrange1, Attack1, Attackplus1, Attackattrib1, Attackspecial1, Attackok1, Attacktype2, Attacktime2, Attackrange2, Attack2, Attackplus2, Attackattrib2, Attackspecial2, Attackok2, Attacktype3, Attacktime3, Attackrange3, Attack3, Attackplus3, Attackattrib3, Attackspecial3, Attackok3 FROM Mobs ORDER BY MobID ASC
If you have already used ups_AdjustMobsMoney SP, you need to restore Mobs Table data to its initial state to make your server work againg.
-can giv me some guide for Microsoft Sql Server 2005 ??
Answer said:Database from first post you just need atach it in sql 2005 and the others 2 from reflax you need restore. This way you will have all data in tables.
-database server bug pass login. For example, ID. 1234. PASS 1234. Server can be accessed by entering anything.
Answer said:Just delete all the rows you don't want in the ps_userdata database...
tables Users_Master and Users_Detail.
That will fix your problem
-i set AdminLevel = 255 but Account is default user.
Answer said:PSMServer_Mgr.exe -> Login01->Command:
/help - allcommands
//adminopen
-wat ever password i type it logs me in
no matter wat password i type correct or wrong.
orAnswer/Twilight said:just edit
usp_Try_GameLogin_Taiwan
Answer/reflax said:i swear people are lazy lol
add this
DECLARE @InPassword2 varchar(32)
change your query to match this
SELECT @UserUID=UserUID, @Status=Status, @InPassword2=Pw, @Leave=Leave FROM Users_Master WHERE UserID = @UserID
somewhere in there add this
IF ( @InPassword <> @InPassword2 )
BEGIN
SET @Status = -1
END
presto... or you can use bits of their code and add md5 passwords instead to make it more secure.
- Error = 2009-05-03 16:13:32 PS_SESSION__system log start (Session)
2009-05-03 16:13:35 userlog connect failed
2009-05-03 16:13:35 initserver() failed
2009-05-03 16:13:35 3 1 SService::ServiceCtrlDispatcher(): m_pService->Init()
2009-05-03 16:13:35 PS_SESSION__system log end (Session)
2009-05-03 16:13:35 3 1 SService::ServiceCtrlDispatcher(): service shutdown
2009-05-03 18:23:23 PS_USERLOG__system log start (UserLog)
2009-05-03 18:23:39 DB userlog connect error, Server=127.0.0.1 DBName=PS_UserData, User=sa, Pass=987654
2009-05-03 18:23:39 3 1 SService::ServiceCtrlDispatcher(): m_pService->Init()
2009-05-03 18:23:39 PS_USERLOG__system log end (UserLog)
2009-05-03 18:23:39 3 1 SService::ServiceCtrlDispatcher(): service shutdown
Answer said:to fix ur problem, go to PSM_Client\bin\config , dbAgent config, copy the hashed password (the numbers after ur "sa, ") , now go to all the rest of the files in same folder, and delete the other numbers and paste the one u just copied....
the problem is that the svr manager doesn't do his job properly xd, and gl after taht ;d
-How to add Points "charactor" in database?
Answer/Destroyer6666 said:u can add points for item store in PS_UserData -> dbo.Users_Master -> Point
its in the table after ModiDate!
-I am trying to start the server, but I get the following error in the "PSM_Client\Bin\Log\PS_DBAGENT__system.log__*" files:
Answer/Twilight said:Check GameData=10.3.20.43, PS_GameData, sa,
if local server db set 127.0.0.1 or (local) or enable remote connection
-every time i can not create a char, its always telling me "name already in use"
Answer/HASKOMAN said:GO TO
SQL Database - PS_GameData - CHAR - design table and change Maketime in varchar
xd you have the same problem I've had but I am a good programmer
CHANGE MY SCRYPT
go to USP_SAVE_CHAR_ITEM_ADD_E
/****** Object: Stored Procedure dbo.usp_Save_Char_Item_Add_E Script Date: 2008-6-7 18:31:57 ******/
/****** Object: Stored Procedure dbo.usp_Save_Char_Item_Add_E Script Date: 2008/3/15 下午 05:25:52 ******/
/****** 偃羹: 盪濰 煎衛盪 dbo.usp_Save_Char_Item_Add_E 蝶觼董 陳瞼: 2006-04-11 螃 10:57:16 ******/
CREATE Proc usp_Save_Char_Item_Add_E
@CharID int,
@ItemUID bigint,
@Bag tinyint,
@Slot tinyint,
@ItemID int,
@Type tinyint,
@TypeID tinyint,
@Quality int,
@Gem1 tinyint,
@Gem2 tinyint,
@Gem3 tinyint,
@Gem4 tinyint,
@Gem5 tinyint,
@Gem6 tinyint,
@Craftname varchar(20) = '',
@Count tinyint,
@Maketime varchar(20)='01/01/1999',
@Maketype char(1)
AS
--SET NOCOUNT ON
IF(@Quality >= 5000)
BEGIN
SET @Quality=0
END
INSERT INTO CharItems
(CharID, bag, slot, ItemID, Type, TypeID, ItemUID, quality, gem1, gem2, gem3, gem4,
gem5, gem6, craftname, [count], maketime, maketype)
VALUES(@CharID, @Bag, @Slot, @ItemID, @Type, @TypeID, @ItemUID, @Quality, @Gem1, @Gem2, @Gem3, @Gem4,
@Gem5, @Gem6, @Craftname, @Count, @Maketime, @Maketype)
IF(@@ERROR = 0)
BEGIN
RETURN 1
END
ELSE
BEGIN
RETURN -1
END
--SET NOCOUNT OFF
GO
and
go to usp_Read_Char_Items_Detail_R
CHANGE MY SCRYPT
/****** Object: Stored Procedure dbo.usp_Read_Char_Items_Detail_R Script Date: 2008-6-7 18:31:57 ******/
/****** Object: Stored Procedure dbo.usp_Read_Char_Items_Detail_R Script Date: 2008/3/15 下午 05:25:51 ******/
CREATE Proc usp_Read_Char_Items_Detail_R
@CharID int
AS
/******SET NOCOUNT ON******/
SELECT ItemID, Type, TypeID, ItemUID, Bag, Slot, Quality,
Gem1, Gem2, Gem3, Gem4, Gem5, Gem6, Craftname, [Count], Maketype ,
'2009' AS MakeTime_YYYY,
'01' AS MakeTime_MM,
'01' AS MakeTime_DD,
'00' AS MakeTime_HH,
'00' AS MakeTime_MI,
'00' AS MakeTime_SS
FROM CharItems
WHERE CharID = @CharID AND Del = 0
/******SET NOCOUNT OFF******/
GO
and restarts all the service and good luck
I've spend 4 days but I've successfully with these changes it is sufficient to look for or just the error ^ ^
And you can create characters now
Releases
-by phprap
sql tools - link >You must be registered to see links
-by Limpamesa
For know how many player is online
In PS_GameData, table Chars, add field LoginStatus as tinyint (default = 0)
In usp_Read_Chars_Detail2_R, change:
UPDATE Chars SET JoinDate=GETDATE(), LoginStatus = 1 WHERE CharID=@CharID
usp_Save_Char_LeaveDate_R, change:
UPDATE Chars SET LeaveDate=GETDATE() , LoginStatus = 0 WHERE CharID=@CharID
===========
total players online:
SELECT COUNT(LoginStatus) AS PlayersON
FROM dbo.CHARS where LoginStatus = 1
==========
Who's online:
SELECT CharID, CharName,Level, JoinDate, LeaveDate, LoginStatus
FROM CHARS
WHERE (LoginStatus = 1)
-by Mazdik
TOP players
Whos onlineCode:<?php $sql_server = "127.0.0.1"; $sql_user = "sa"; $sql_pass = "123456"; $sql_data = "PS_GameData"; $conn=mssql_connect($sql_server,$sql_user,$sql_pass); $xadb = mssql_select_db($sql_data,$conn) or die("$uwebmsg_cerr"); $toplvlq = "SELECT * FROM CHARS ORDER BY Level DESC"; $toplvlr = mssql_query($toplvlq); $toplvl_num = 0; echo "<p><b>TOP PLAYERS<b></p><p>"; echo "<Table width=100% border=1><TR><TD><B>RANK NUMBER</B></td><TD><B>PLAYER NAME</B></td><TD><B>PLAYER LEVEL</B></td></tr>"; while ($toplvlrow = mssql_fetch_array($toplvlr)) { $toplvl_num++; echo "<TR><TD>$toplvl_num</td><TD>".$toplvlrow[CharName]."</td><TD>".$toplvlrow[Level]."</td>"; if ($toplvl_num >= 100) break; } echo "</table></p>"; ?>
Code:<?php $sql_server = "127.0.0.1"; $sql_user = "sa"; $sql_pass = "123456"; $sql_data = "PS_GameData"; $conn=mssql_connect($sql_server,$sql_user,$sql_pass); $xadb = mssql_select_db($sql_data,$conn) or die("$uwebmsg_cerr"); $toplvlq = "SELECT * FROM CHARS WHERE (LoginStatus = 1) ORDER BY Level DESC"; $toplvlr = mssql_query($toplvlq); $toplvl_num = 0; echo "<p><b>TOP PLAYERS<b></p><p>"; echo "<Table width=100% border=1><TR><TD><B>RANK NUMBER</B></td><TD><B>PLAYER NAME</B></td><TD><B>PLAYER LEVEL</B></td></tr>"; while ($toplvlrow = mssql_fetch_array($toplvlr)) { $toplvl_num++; echo "<TR><TD>$toplvl_num</td><TD>".$toplvlrow[CharName]."</td><TD>".$toplvlrow[Level]."</td>"; if ($toplvl_num >= 100) break; } echo "</table></p>"; ?>
-By ZeroSignal
ZeroSignal said:I managed to do the Monster Name translation on the Database, by extracting the name from the Monster.SData file.
Note that this will also need to be adapted for the Cash.SData, Skill.SData, and Item.SData binary files.
This was coded in Python:
Main.pyCode:import struct import re # Open SData File. input = open("Monster.SData", mode='rb') # Open SQL File for writing. output = open("Monster.SData.txt.sql", mode='w') # Unpack binary into 4-byte integer. file_header = struct.unpack('i', input.read(4)) # The total amount of records. record_total = file_header[0] print 'Monster records: ' + str(record_total) monster = [] for i in range(record_total): monster.append({}) # Length of monster name string. data = struct.unpack('i', input.read(4)) name_len = data[0] # Read Monster name string, stripping NULL Terminator. monster[i]['name'] = input.read(name_len)[:-1] # Other Data we don't need. input.read(31) # Sanitize string by adding escape char quotes. sanitize_name = monster[i]['name'].replace('\'', '\'\'') # Generate update SQL String. sql = "UPDATE Mobs SET MobName = '" + sanitize_name + "' WHERE MobID = " + str(i) +";\n" # Write the SQL to a file. output.write(sql)
-Zero's three goals.
By Zero.
Code here
1. To be able to get all the SData binary files (including English names) reflected in the Server Database. I think it's best to create Comma Separated Extracts as they produce best results and can easily be imported.
2. To add re-combine functionality to the DATA.SAF Extractor. This is actually a fairly big task and not trivial at all.
3. To make programs to convert the SData files to CSV Files that can be edited, and be re-combined back into the SAF format. Pretty Easy as partly demonstrated below.
4. Make the DATA.SAF Extractor be able to create Update Patch Files. Fairly Difficult as it will need to compare DIFF changes.
-By ZeroSignal
Got the full specification of the Item.SData file said:Read Me :[/B]
Note - It will still need to have functionality to extract the complete Item.SData into a file that easily can be edited (most likely CSV). And a re-combine function to make it back into an SData binary file.Code:Item.py Needs to have the Item.SData in the same folder. USAGE 1: >python Item.py csv_complete TODO USAGE 2: >python Item.py csv_import Creates an Items.import.csv file which can be used to import into PS_GameDefs.dbo.Items. File Format: Delimited File type: ANSI Row delimiter: {CR}{LF} First row has column names: enabled Text Qualifier: Double Quote {"} Column Delimiter: Comma USAGE 3: >python Item.py sql_update_lang Creates Items.update.sql file which has Update Queries that can be used to update the names into the language of the Item.SData file.
You must be registered to see linksGot the full specification of the Item.SData file said:Sod78's tips :
Here :Sod78 said:I just realised that Shaiya is full of quests lol. Just a few tips, u can play with admin account.
/char on/off to switch the invisibility.
/attack on/off to turn switch the mobs attack on you.
To get items
/getitem <Type> <TypeID>
Eg. /getitem 25 19 = Mini Healing Potion
Eg. /getitem 42 1 = Level 40 Horse Mount
Some Examples::
25 <Type> is potion, the second arguments will be the potion <TypeID>
Mini Healing Potion 25 19
Healing Potion 25 20
Great Healing Potion 25 21
Mini Stamina Potion 25 22
Stamina Potion 25 23
Grain Stamina Potion 25 24
Mini MP Potion 25 25
MP Potion 25 26
Great MP Potion 25 27
42<Type> is Mount
Lvl 40 Horse Mount 42 1
Lvl 40 Leopard Mount 42 2
Lvl 40 Basilisk Mount 42 3
Lvl 40 Lion Mount 42 4
Etc Mount goes from 42 1 to 42 24
To summon/create the mobs, use /mmake <Type> <ID>
I will attach untranslated items and mobs list which was distributed in CN language. so feel free to translate and experiment with it.You must be registered to see links
Sod78 said:Few more tips regarding user creation for those planning to revise a better php / asp script for it. To enable the user to obtain all modes (Hard, Ultimate), just insert into the PS_GameData, UserMaxGrow table.
<RowID> <ServerID> <UserUID> <Country> <MaxGrow> <Del>
- RowID - Auto
- ServerID - 1 (default if you use the server files configuration)
- UserUID - Same reference to the PS_UserData db, User_Master table
- Country - 0/1 (0 - Light, 1 - Dark)
- MaxGrow - 3 (All modes available)
- Del - 0
Other Fixes :
All services show a red X
This is most likely to your Shaiya Agent Client service (D:\SHAIYA_SERVER\SERVER\PSM_Client\PSM_Agent.exe) not being installed and/or not running. Get it installed and started, and restart PSMServer_Mgr.exe if needed.
All services show a green x
This means your services are not installed, or are not being recognized as being installed.
Services go to a green arrow, but then back to pause
This usually means the services were unable to connect to the database. Check your logs in D:\SHAIYA_SERVER\SERVER\PSM_Client\Bin\Log and D:\SHAIYA_SERVER\SERVER\PSM_Client\Log. These logs help tell you of problems with services starting, so keep that in mind for future problems.
Check notice board
Usually caused by connecting to the wrong IP address, or Windows Firewall blocking the client.
Can also be cause by using the wrong game client, thus connecting to the wrong IP address.
Failed to connect to game server, after selecting server and clicking ok
May be caused by Windows Firewall blocking the client trying to connect to the server.
Can also be caused by the incorrect IP address entered in D:\SHAIYA_SERVER\SERVER\PSM_Client\Bin\Config\ps_g ame.ini on the line that starts with GamePublicIP=
It could possibly also be from incorrect IP addresses in other .ini files.
Disconnect after selecting game server and clicking ok
Most likely you have incorrect or missing data in your database. There could be many causes of this. I'd suggest using the SQL profiler to trace what happens in this case and look for error messages in the logs. If there is an error message present in the logs try to find which SQL query that you traced with the profiler caused it.
Disconnect after less than 2 minutes of being connected to the server
Usually caused by forgetting to run the /nprotectoff command. Normally this needs to be run every time the server services are restarted, which includes server reboots, etc.
Disconnect when targetting mobs, or doing other specific activities
Most likely you have incorrect or missing data in your database. There could be many causes of this. I'd suggest using the SQL profiler to narrow down the problem.
Disconnect when buying an item from the item mall.
The Distributed Transaction Coordinator service may not be running, it is required to use the statement: BEGIN DISTRIBUTED TRANSACTION
Credits : abrasive
More to be added, just don't have time right now~
(on page 10 on thread)
Last edited: