Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 03:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



string find and replace

Discussion on string find and replace within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2015
Posts: 56
Received Thanks: 1
Post string find and replace

[Closed]





Hello to all. I need little guide how to change string of item in DB or how to do this
Lets starts
We have StringResourse table, and ItemResourse table
In table ItemResourse exists columns - name_id and tooltip_id.
Question: how to find note of this item in StringResourse. Thanks for answers!
P.S. I think we need to find It in column name for example item_xxxxxxx
Where xxxxxx- is ID of something

for example I have item - fireworks - id of this item - 10801319
But then I select
my code:
its give me 0 string
In game name and description of item is ??????????
Databases official 6.2 by Pyrok (korean I think) and find item by name is unreal for me
how can I fix this one?
Gordor1 is offline  
Old 10/27/2016, 18:47   #2
Moderator


 
ThunderNikk's Avatar
 
elite*gold: 1
Join Date: Dec 2012
Posts: 4,779
Received Thanks: 1,461
the item ID is only for the item table...the name_id and tooltip_id are the codes you want to look for in the string resource.

You can do an SQL join statement which I could help you with if I were not at work.
ThunderNikk is offline  
Thanks
1 User
Old 10/27/2016, 18:57   #3
 
elite*gold: 0
Join Date: Jan 2015
Posts: 56
Received Thanks: 1
Quote:
Originally Posted by thndr View Post
the item ID is only for the item table...the name_id and tooltip_id are the codes you want to look for in the string resource.

You can do an SQL join statement which I could help you with if I were not at work.
Im looked for DB diagram. Where are no connections between tables...

Quote:
Originally Posted by thndr View Post
the item ID is only for the item table...the name_id and tooltip_id are the codes you want to look for in the string resource.

You can do an SQL join statement which I could help you with if I were not at work.
Waiting for your answer
Gordor1 is offline  
Old 10/27/2016, 19:14   #4
 
TheSuperKiller's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 278
Received Thanks: 73
this is the logic of the query, not the actual query, it has been ages since my last time dealing with Rappelz stuff:

update stringresource set string ="name of the item" where code = (select name_id or tooltipId from itemresource where itemId = 123234543)

you can make this more complex by putting if statements to insert the data if the string does not exist in stringresource table, in which I do believe that this is your case "where you don't even have the entry in stringresource table".

and I'm pretty sure that there are so many queries out there, MAKE YOUR OWN OR LEARN SOME BASIC DB STUFF.
TheSuperKiller is offline  
Thanks
1 User
Old 10/27/2016, 20:16   #5
 
elite*gold: 0
Join Date: Jan 2015
Posts: 56
Received Thanks: 1
Quote:
Originally Posted by TheSuperKiller View Post
this is the logic of the query, not the actual query, it has been ages since my last time dealing with Rappelz stuff:

update stringresource set string ="name of the item" where code = (select name_id or tooltipId from itemresource where itemId = 123234543)

you can make this more complex by putting if statements to insert the data if the string does not exist in stringresource table, in which I do believe that this is your case "where you don't even have the entry in stringresource table".



and I'm pretty sure that there are so many queries out there, MAKE YOUR OWN OR LEARN SOME BASIC DB STUFF.
Problem not in writing sql request. I dont know how this tables is connected. About your answer: I have writed code similar of yours, but in DB no string with this name_id or tooltip_id
Gordor1 is offline  
Old 10/27/2016, 20:19   #6
 
SilentWisdom's Avatar
 
elite*gold: 0
Join Date: Jul 2015
Posts: 477
Received Thanks: 633
The table connection is simple:

dbo.ItemResource fields name_id, tooltip_id reach out to dbo.stringresource field code.

So when the GS reads an item and that item has name_id 12345678 it is going to seek the entry in stringresource with code 12345678 and take the 'value' from that entry.
SilentWisdom is offline  
Thanks
1 User
Old 10/27/2016, 20:22   #7
 
elite*gold: 0
Join Date: Jan 2015
Posts: 56
Received Thanks: 1
Quote:
Originally Posted by thndr View Post
the item ID is only for the item table...the name_id and tooltip_id are the codes you want to look for in the string resource.

You can do an SQL join statement which I could help you with if I were not at work.
Quote:
Originally Posted by SilentWisdom View Post
The table connection is simple:

dbo.ItemResource fields name_id, tooltip_id reach out to dbo.stringresource field code.

So when the GS reads an item and that item has name_id 12345678 it is going to seek the entry in stringresource with code 12345678 and take the 'value' from that entry.
OK. But this request retuns null. How client have name and tooltip strings?
Sorry for my stupidity

And last. String in DB is Korean, but client have names on its language(ENG for example)
How its works? I know that in Resourse exists file with all string? Question - why String on DB is needed?
Gordor1 is offline  
Old 10/27/2016, 21:04   #8
 
SilentWisdom's Avatar
 
elite*gold: 0
Join Date: Jul 2015
Posts: 477
Received Thanks: 633
Below is an example of how to search by an English item name.

Code:
/*Define what columns to select and from which join*/
SELECT ITEMRES.id, STRINGRES.value, TOOLTIP.value, ITEMRES.model_00

/*Define where to select data and join it*/
FROM 
dbo.ItemResource ITEMRES
LEFT JOIN
dbo.StringResource STRINGRES
ON 
STRINGRES.code = ITEMRES.name_id
LEFT JOIN 
dbo.StringResource TOOLTIP
ON
TOOLTIP.code = ITEMRES.tooltip_id
WHERE STRINGRES.value LIKE '%Yak Leather%'
"How client have name and tooltip strings"

Well most important database tables have a internal counterpart in the client called an 'rdb' or Rappelz Database.

"Why string on DB is needed?"

This is for the clients benefit as it obviously can't effectively request data from the servers database table without obvious security implications.
SilentWisdom is offline  
Thanks
1 User
Old 10/27/2016, 21:20   #9
 
elite*gold: 0
Join Date: Jan 2015
Posts: 56
Received Thanks: 1
Quote:
Originally Posted by SilentWisdom View Post
Below is an example of how to search by an English item name.

Code:
/*Define what columns to select and from which join*/
SELECT ITEMRES.id, STRINGRES.value, TOOLTIP.value, ITEMRES.model_00

/*Define where to select data and join it*/
FROM 
dbo.ItemResource ITEMRES
LEFT JOIN
dbo.StringResource STRINGRES
ON 
STRINGRES.code = ITEMRES.name_id
LEFT JOIN 
dbo.StringResource TOOLTIP
ON
TOOLTIP.code = ITEMRES.tooltip_id
WHERE STRINGRES.value LIKE '%Yak Leather%'
"How client have name and tooltip strings"

Well most important database tables have a internal counterpart in the client called an 'rdb' or Rappelz Database.

"Why string on DB is needed?"

This is for the clients benefit as it obviously can't effectively request data from the servers database table without obvious security implications.
Now, IF Im add new string for name of item(its not exists) name will be correct? Or I should find and edit rdb file too?

Quote:
Originally Posted by SilentWisdom View Post
Below is an example of how to search by an English item name.

Code:
/*Define what columns to select and from which join*/
SELECT ITEMRES.id, STRINGRES.value, TOOLTIP.value, ITEMRES.model_00

/*Define where to select data and join it*/
FROM 
dbo.ItemResource ITEMRES
LEFT JOIN
dbo.StringResource STRINGRES
ON 
STRINGRES.code = ITEMRES.name_id
LEFT JOIN 
dbo.StringResource TOOLTIP
ON
TOOLTIP.code = ITEMRES.tooltip_id
WHERE STRINGRES.value LIKE '%Yak Leather%'
"How client have name and tooltip strings"

Well most important database tables have a internal counterpart in the client called an 'rdb' or Rappelz Database.

"Why string on DB is needed?"

This is for the clients benefit as it obviously can't effectively request data from the servers database table without obvious security implications.
TY very much. Can I find program that can edit string in rdb?
Gordor1 is offline  
Old 10/27/2016, 22:02   #10
 
SilentWisdom's Avatar
 
elite*gold: 0
Join Date: Jul 2015
Posts: 477
Received Thanks: 633
As good practice you should always do your edits to the database table (string) and then save them to the rdb and add to the client. This ensures the db always reflects the data inside the rdb, otherwise you could forget changes you've made etc..etc.. And the stringresource has not changes across the epics so any rdb editor can save the changes you make to your dbo.stringresource.
SilentWisdom is offline  
Thanks
1 User
Old 10/27/2016, 22:37   #11
 
elite*gold: 0
Join Date: Jan 2015
Posts: 56
Received Thanks: 1
THX to all! A have finded solution
Gordor1 is offline  
Reply

Tags
database, resource, string


Similar Threads Similar Threads
Replace Part of an string
01/10/2016 - Flyff Private Server - 14 Replies
Hi elitepvpers, I am working on reducing some file sizes so i removed all II_PART_F etc and altered mdldyna.inc however in Spec_Item it will load only the Male Icons. Now what i have in mind is to make an function to replace the male icon with female if you are an female char. For the first test i have left the sex of the char out.
" durch string.Replace ersetzen
09/30/2013 - .NET Languages - 9 Replies
Hallo, ich habe folgendes Problem: Ich möchte string.Replace in einem String alle Anführungszeichen mit " & Chr(34) & " ersetzen. Mein Code sieht jetzt so aus: input.Replace(Chr(34), Chr(34) & " Chr(34) " & Chr(34)) Nur funktioniert das jetzt nicht so, wie ich das will. Hat einer eine Idee, wie ich das umsetzen kann? MfG Edit: Funktioniert doch so, wie oben geschrieben. Keine Ahnung wo der Fehler lag.
Brauche hilfe string replace :S
06/13/2013 - C/C++ - 9 Replies
Hi, unzwar habe ich eine Aufgabe, Legen Sie nun in Ihrem Projekt zwei weitere Dateien an: "stringOperations.h" und "stringOperations.cpp". In diesen Dateien deklarieren bzw. definieren Sie Funktionen, die den Umgang mit Strings und der Standard-Library <string> einüben. a) Erweitern Sie ihr Projekt um eine Funktion mit der Deklaration int myreplace(string & text, const string &findString, const string &replaceString); welche in einem String text alle Vorkommen des Strings findString...
C# Find string between two stings !
07/26/2012 - .NET Languages - 10 Replies
now i have a richtextbox1 that has alot of text what i want to achieve is search for as example "First" and "Second" in the textbox then get the strings located between them i tried to use this but its hell slow while((a9 = richtextbox1.Text) != null) { if ( line.Contains("word") ) {



All times are GMT +2. The time now is 03:47.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.