Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 00:40

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

Advertisement



Automatic Alias Name for JOB

Discussion on Automatic Alias Name for JOB within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
lepitismak's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 479
Received Thanks: 63
Automatic Alias Name for JOB

Anyone can help me how i can set for when char enter in job, alias name go same name of char?

bump
lepitismak is offline  
Old 02/10/2017, 01:43   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 972
Received Thanks: 453
Edit the sro_client xD
leo2111 is offline  
Old 02/10/2017, 09:35   #3
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,188
do it via a trigger.

on update

check if jobtype > 0

update NickName16 to CharName16

Trigger Example:
Code:
BEGIN
if((select top 1 JobType from Inserted) > 0)
BEGIN
Update _Char set NickName16 = (select CharName16 from _Char where CharID=(select top 1 CharID from Inserted)) where CharID=(select top 1 CharID from Inserted)
END
END
didn't test it. but it should work
B1Q is offline  
Thanks
1 User
Old 02/10/2017, 11:42   #4
 
lepitismak's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 479
Received Thanks: 63
Quote:
Originally Posted by B1QB0SS :3 View Post
do it via a trigger.

on update

check if jobtype > 0

update NickName16 to CharName16

Trigger Example:
Code:
BEGIN
if((select top 1 JobType from Inserted) > 0)
BEGIN
Update _Char set NickName16 = (select CharName16 from _Char where CharID=(select top 1 CharID from Inserted)) where CharID=(select top 1 CharID from Inserted)
END
END
didn't test it. but it should work


Would this be inserted in the addnewchar procedure?
lepitismak is offline  
Old 02/10/2017, 14:12   #5
 
"Abner"'s Avatar
 
elite*gold: 0
Join Date: Sep 2016
Posts: 30
Received Thanks: 13
Hello @,


An easier way to do this is to replace the following code in _AddNewChar:
Code:
    INSERT INTO _Char (RefObjID, CharName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize,      
                LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID)      
    VALUES (**RefCharID, **CharName, **CharScale, 20, 20, **StartRegionID, **StartPos_X, **StartPos_Y, **StartPos_Z, **DefaultTeleport, 45,      
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)
With this code:
Code:
    INSERT INTO _Char (RefObjID, CharName16, NickName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize,      
                LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID)      
    VALUES (**RefCharID, **CharName, **CharName, **CharScale, 20, 20, **StartRegionID, **StartPos_X, **StartPos_Y, **StartPos_Z, **DefaultTeleport, 45,      
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)



ps: replace every "**" with @, idk why epvp changes it to a [mention] -_-


best,




Abner
"Abner" is offline  
Old 02/10/2017, 21:15   #6
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,188
Quote:
Originally Posted by "Abner" View Post
Hello @,


An easier way to do this is to replace the following code in _AddNewChar:
Code:
    INSERT INTO _Char (RefObjID, CharName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize,      
                LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID)      
    VALUES (**RefCharID, **CharName, **CharScale, 20, 20, **StartRegionID, **StartPos_X, **StartPos_Y, **StartPos_Z, **DefaultTeleport, 45,      
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)
With this code:
Code:
    INSERT INTO _Char (RefObjID, CharName16, NickName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize,      
                LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID)      
    VALUES (**RefCharID, **CharName, **CharName, **CharScale, 20, 20, **StartRegionID, **StartPos_X, **StartPos_Y, **StartPos_Z, **DefaultTeleport, 45,      
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)



ps: replace every "**" with @, idk why epvp changes it to a [mention] -_-


best,




Abner

didn't think about it. that should work too
B1Q is offline  
Old 02/11/2017, 04:21   #7
 
lepitismak's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 479
Received Thanks: 63
Quote:
Originally Posted by "Abner" View Post
Hello @,


An easier way to do this is to replace the following code in _AddNewChar:
Code:
    INSERT INTO _Char (RefObjID, CharName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize,      
                LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID)      
    VALUES (**RefCharID, **CharName, **CharScale, 20, 20, **StartRegionID, **StartPos_X, **StartPos_Y, **StartPos_Z, **DefaultTeleport, 45,      
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)
With this code:
Code:
    INSERT INTO _Char (RefObjID, CharName16, NickName16, Scale, Strength, Intellect, LatestRegion,PosX, PosY, PosZ, AppointedTeleport, InventorySize,      
                LastLogout, CurLevel, MaxLevel, RemainGold, RemainStatPoint, RemainSkillPoint, HP, MP, JobLvl_Trader, JobLvl_Hunter, JobLvl_Robber, WorldID)      
    VALUES (**RefCharID, **CharName, **CharName, **CharScale, 20, 20, **StartRegionID, **StartPos_X, **StartPos_Y, **StartPos_Z, **DefaultTeleport, 45,      
                GetDate(), 1, 1, 0, 0, 0, 200,200, 1, 1, 1, 1)



ps: replace every "**" with @, idk why epvp changes it to a [mention] -_-


best,




Abner

i need a way for block any changes if player try to change alias name.
can help me with that?
lepitismak is offline  
Old 02/11/2017, 06:34   #8
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 1,999
Received Thanks: 1,188
create a trigger on _CharTriJob

after update

Rollback Transaction :3

EDIT:

that was a ******* joke don't do it
B1Q is offline  
Old 02/11/2017, 14:11   #9
 
lepitismak's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 479
Received Thanks: 63
Quote:
Originally Posted by B1QB0SS :3 View Post
create a trigger on _CharTriJob

after update

Rollback Transaction :3
great thx i will try it
lepitismak is offline  
Closed Thread


Similar Threads Similar Threads
ART/GFX Shop by Sorvage alias SorV alias SorVRocK
01/06/2013 - elite*gold Trading - 1 Replies
http://s7.directupload.net/images/130106/cootkv3c. png Ich hab mich entschieden. Dass ich den ersten 5 die sich melden. Etwas aus der liste kostenlos anfertige. Referenzen/Speedarts: https://www.youtube.com/user/SorVRocKGFX Avatar + Signatur Packs



All times are GMT +1. The time now is 00:41.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.