Save pet

05/29/2013 19:03 Sniteur51#1
Hello, i am skold Co-foundeur and Dev 4story-RA

I have debug Tsavepet :

ALTER PROCEDURE [dbo].[TSavePet]
@dwCharID INT,

@wpetID SMALLINT,
@szName VARCHAR(50),
@timeUse SMALLDATETIME
AS

DECLARE @dwUserID INT

select @dwUserId = dwUserID from tchartable where dwCharID = @dwCharID


BEGIN TRAN TSavePet

IF not EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = @wpetID)
begin
INSERT INTO TpetTABLE(dwuserID, wpetID, szName, timeuse)
VALUES(@dwuserID, @wpetID, @szName, @timeUse)
END
ELSE
IF EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = 3)
BEGIN
UPDATE TpetTABLE SET
szName = @szName, timeuse = @timeUse
WHERE dwuserID = @dwuserID AND wpetID = @wpetID
END

COMMIT TRAN TSavePet

And if you i have this to create a mount at the creation of character but the name of pet change at every creation of character to the acount :

DECLARE @szMountName VARCHAR(50)
SET @szMountName = 'Amis de ' + @szNAME
SET @szMountName = REPLACE(@szMountName, 's''s', 's''')

IF not EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = 3)
begin
INSERT INTO TpetTABLE(dwuserID, wpetID, szName, timeuse)
VALUES(@dwuserID, 3, @szName, 0)
END
ELSE
IF EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = 3)
BEGIN
UPDATE TpetTABLE
SET szName = @szName, timeuse = 0
WHERE dwuserID = @dwuserID AND wpetID = 3
END


Good bye ;-)
05/29/2013 19:33 sniteur#2
Good Job ! :)
05/29/2013 19:37 BESTAMO#3
GOOD still good and the RA team always there to help you I love you and move you make for elitepvpers
05/29/2013 19:45 EliteTuerie#4
Quote:
Originally Posted by Sniteur51 View Post
Hello, i am skold Co-foundeur and Dev 4story-RA

I have debug Tsavepet :

ALTER PROCEDURE [dbo].[TSavePet]
@dwCharID INT,

@wpetID SMALLINT,
@szName VARCHAR(50),
@timeUse SMALLDATETIME
AS

DECLARE @dwUserID INT

select @dwUserId = dwUserID from tchartable where dwCharID = @dwCharID


BEGIN TRAN TSavePet

IF not EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = @wpetID)
begin
INSERT INTO TpetTABLE(dwuserID, wpetID, szName, timeuse)
VALUES(@dwuserID, @wpetID, @szName, @timeUse)
END
ELSE
IF EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = 3)
BEGIN
UPDATE TpetTABLE SET
szName = @szName, timeuse = @timeUse
WHERE dwuserID = @dwuserID AND wpetID = @wpetID
END

COMMIT TRAN TSavePet

And if you i have this to create a mount at the creation of character but the name of pet change at every creation of character to the acount :

DECLARE @szMountName VARCHAR(50)
SET @szMountName = 'Amis de ' + @szNAME
SET @szMountName = REPLACE(@szMountName, 's''s', 's''')

IF not EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = 3)
begin
INSERT INTO TpetTABLE(dwuserID, wpetID, szName, timeuse)
VALUES(@dwuserID, 3, @szName, 0)
END
ELSE
IF EXISTS(SELECT @dwUserID FROM TpetTABLE WHERE dwuserID = @dwuserID AND wpetID = 3)
BEGIN
UPDATE TpetTABLE
SET szName = @szName, timeuse = 0
WHERE dwuserID = @dwuserID AND wpetID = 3
END


Good bye ;-)

GOOD very good DEV
05/29/2013 19:51 spartan26#5
Good job Skold!
05/29/2013 19:51 julianjl#6
Hum it's a basic founction
05/29/2013 20:03 caneca59#7
Stop ! it's copyright of julianjl !!!!! hahahahahahahaha :D
05/29/2013 20:05 Sniteur51#8
yes but i will do not give a hard function where i pass much time. This function is basic but she is pratice. And my i sharing my works do you can say it so much???

So if somebody have a question constructive...
05/29/2013 20:19 EliteTuerie#9
Quote:
Originally Posted by julianjl View Post
Hum it's a basic founction
You act like you know the function and all but you is not you even make a "simple function" as you said so in your team:confused: full unskill and has no staff
05/29/2013 20:36 Konst™#10
You just buyed the files :facepalm: You dont fixxed it by yourself.
05/29/2013 20:46 EliteTuerie#11
Quote:
Originally Posted by Konst™ View Post
You just buyed the files :facepalm: You dont fixxed it by yourself.
Julianj we did not buy to them 3 months ago for 15 euros thus not we fixed ourselves we have a big team all the same not for julianj certain with a team without skill...

we have set ourselves the same and you would not buy if you are in the capcitée to fix it ...

If you are a fan of server julianj go there but do not tell anything in this thread thank you...
05/29/2013 20:50 Sniteur51#12
heu... i come to debug last night for the second time... The first time I have him even to pass has julianjl

i can to explain you why i don't use tsavepet to create a mount when in TcreateChar. but it's right that i would can use tsavpet if i had make a ligne front of exec TsavePet but when i maked this i dont think at this at this moment.

sorry you have reason i so stupid to create function...
05/29/2013 22:17 jibi1996#13
Quote:
Originally Posted by Konst™ View Post
You just buyed the files :facepalm: You dont fixxed it by yourself.
God bless julian, he sucessfuly bought a thing.

Comes saying that is a hacker and could do blah blah, just keep your dev-job julian. And stop trying to get copyright of things you even know how they work.
05/30/2013 23:03 julianjl#14
No lol 4STORYRA is the biggest noob !