[SQL] Model Switch Procedure

03/20/2015 13:36 ​Exo#1

How to make the models?
Create a 1:1 copy of the item, change the bsr path at the itemdata_*.txt

I wasn't going to release anything for a while since I am hella busy these days with some real life issues but, some guys wanted this and I saw that other shared stuff and the ideas people have in mind are absolutely giving no sense, I will share this. Whoever wants to use it, go ahead.
Just wanted to let all he goddamn nubs know that the stupid OldID - NewID in the way everyone is doing it, IS A COMPLETE FAIL.

PHP Code:
DECLARE @DEGREE VARCHAR(2) = '10' //ModelType

SELECT MS1.RefItemID
FROM   exBotConfigs
.._AvailableModelSwitchs MS
JOIN   Fayox_Shard
.._Items IT
ON     MS
.RefItemID IT.RefItemID
JOIN   exBotConfigs
.._AvailableModelSwitchs MS1
ON     
CASE 
       
WHEN (PATINDEX('%SKIN%',MS.CodeName128))= //Normal Item Detected
           
THEN (MS.CodeName128 '_SKIN_'+@DEGREE)
       ELSE (
LEFT(MS.CodeName128,(PATINDEX('%SKIN%',MS.CodeName128)+ 4)) + @DEGREE//Previously Switched
           
END MS1.CodeName128   
WHERE ID64 
221347 
The tab looks like that
RefItemID CodeName128
1 ITEM_CODE

-Models must be in this form [NORMALCODE_SKIN_DEGREE]
Now turn this to an update statement and enjoy.
A peek from the table
[Only registered and activated users can see links. Click Here To Register...]
The whole idea was first made by Elamidas, thanks guys!
Credits: da indian hoe
03/20/2015 13:58 Storxy_#2
oOoH,i think your procedure better than this.(you made my day -_-)
just a kid trying to act like pro -_-
[Only registered and activated users can see links. Click Here To Register...]
03/20/2015 13:59 ​Exo#3
Quote:
Originally Posted by Storxy_ View Post
oOoH,i think your procedure better than this.(you made my day -_-)
Actually this is mine, not his!
03/20/2015 14:01 Storxy_#4
Quote:
Originally Posted by Exo View Post
Actually this is mine, not his!
iknow that well, its a joke :D
[Only registered and activated users can see links. Click Here To Register...]
03/20/2015 14:12 _Miss_AngeL_#5
Quote:
Originally Posted by Aeron* View Post
@STORXY_ PLEASE LEARN
why do you ask stroxy to learn ? and you did it the same way he did it with alot of shits.
you made the same , Old>new -_-
03/20/2015 14:16 ​Exo#6
Quote:
Originally Posted by _Miss_AngeL_ View Post
why do you ask stroxy to learn ? and you did it the same way he did it with alot of shits.
you made the same , Old>new -_-
The whole thing can't be done with out updating the RefID of course but, the way you built that table and that procedure is not the best way, the table is huge, the same procedure won't work when switching between models since you defined the id with the Item and not the model. Unlike mine, it will work with both normal/model items. Also your theory won't work in case you want to add more models, you will have to redesign the table and add another column and the new model ids again.
03/20/2015 14:16 Storxy_#7
Quote:
Originally Posted by _Miss_AngeL_ View Post
why do you ask stroxy to learn ? and you did it the same way he did it with alot of shits.
you made the same , Old>new -_-
trying to escape from his shit procedure
he removed the reply.
03/20/2015 14:18 ​Exo#8
@MissAngel, either you be more mature and discuss the whole thing in a proper way or you just ignore this thread and stop starting endless fights that won't get we anywhere.
03/20/2015 14:23 temo152#9
storxy and exo tried to help the community so aeron what have you done? just giving some bullshits
03/20/2015 14:45 polizey112#10
Good job man keep that shit up :D
03/20/2015 20:13 _Miss_AngeL_#11
Quote:
Originally Posted by Royalblade* View Post
bahahahahhaahah this sucks so hard, words cannot describe.


Code:
UPDATE	IT
		SET		RefItemID = R1.ID
		FROM	SRO_VT_SHARD.dbo._Items IT
		JOIN	SRO_VT_ROYAL.dbo._MultiModelPossibleItems R
		ON		IT.RefItemID = R.ID
		JOIN	SRO_VT_ROYAL.dbo._MultiModelPossibleItems R1
		ON		CASE 
					WHEN (PATINDEX('%LOOK%',R.Codename128)) = 0 
						THEN (R.Codename128 + '_LOOK' + @NewDegree) 
					ELSE (LEFT(R.Codename128,(PATINDEX('%_LOOK%',R.Codename128)-1)) + '_LOOK' + @NewDegree)  
				END = R1.Codename128
		WHERE	ID64 = @ItemID
That's how I'm doing it. Codename based since its included in the index, thus it'll be in RAM anyways. Which makes it more than fast enough.
huh ? can you explain how those codes looked like the same of yours ?
actually you who coopied them from somewhere..
03/20/2015 20:48 ​Exo#12
Quote:
Originally Posted by _Miss_AngeL_ View Post
huh ? can you explain how those codes looked like the same of yours ?
actually you who coopied them from somewhere..
Who said I created the Model Switch thing? If I am not mistaking I saw it or smth like it while being in a meeting with Akasch. No, it's not copied, I don't copy stuff and would never copy akasch I owe him too much already. Just as I told you, this is the most logical way to do it this is why they match.

This is faster, more customizable and smaller than yours.

The whole code is just a simple join and a string replacement, there's nothing to copy there. The idea of doing it that way belongs to him, he was the first one to do it like that.
And in case you didn't notice, I gave credits to Akasch for the whole thing.
03/20/2015 20:53 _0x0000#13
nice sharing thanks
03/20/2015 22:01 Justin1337*#14
Nice work, thanks Exo.
03/20/2015 22:56 Royalblade*#15
Quote:
Originally Posted by Exo View Post
Who said I created the Model Switch thing? If I am not mistaking I saw it or smth like it while being in a meeting with Akasch. No, it's not copied, I don't copy stuff and would never copy akasch I owe him too much already. Just as I told you, this is the most logical way to do it this is why they match.

This is faster, more customizable and smaller than yours.

The whole code is just a simple join and a string replacement, there's nothing to copy there. The idea of doing it that way belongs to him, he was the first one to do it like that.
And in case you didn't notice, I gave credits to Akasch for the whole thing.
This.