[Release]Scripts and Fixes

09/13/2013 11:25 Sicarium#16
I share new script and fix.

[Script]Levels 34,61 for others account's characters

[Fix]Storage Shop
09/13/2013 15:07 AllCowsAreBurgers#17
Thanks Man!
Do you can tell me how "[Script]Gifts Item/money for levels " does work?
09/13/2013 15:13 Sicarium#18
Each 10 levels the script send items or money, you can edit my script and set the item who you want :)
09/13/2013 15:18 AllCowsAreBurgers#19
Can u give me an example db?
I canīt speak italian as well :=)
:)
09/13/2013 15:29 Devillos#20
lustig XD ts3 lachflesh HAHAHHAH
09/13/2013 15:36 AllCowsAreBurgers#21
Okkey thatīs only the check table xD
09/13/2013 15:46 Sicarium#22
Code:
/* if the level is >= 1*/
IF(@livello >= 1)
BEGIN
/* i see if item is already in Premi, and if it isn't there i send the gift*/
SELECT * FROM Premi WHERE Verifica = 'Inviato' AND LivelloPremio = 1 AND Personaggio = @szName
IF(@@ROWCOUNT = 0)
BEGIN
    SET @livellopremio = 1 /* level gift*/
    SET @oggetto = 7644 /* item ID*/
    SET @quantita = 1 /* count */
    SET @verifica = 'Inviato' /* Sent*/

    SET @dateCreated = GetDate()
    SET @szTitle = 'Gifts for new characters'
    SET @szMessage = 'We give you 1 exp plus, 1 weapon +11,you can find it on deposit shop, and 100 silver in this letter'
    SET @bLenTitle = DATALENGTH(@szTitle)
    SET @bLenMessage = DATALENGTH(@szMessage)
    SET @szT = RIGHT(master.dbo.fn_sqlvarbasetostr(@bLenTitle), 8)
    SET @szTitle  = @szT + @szTitle
    SET @szM = RIGHT(master.dbo.fn_sqlvarbasetostr(@bLenMessage), 8)
    SET @szMessage = @szM + @szMessage
    EXEC TSavePost @dwPostID OUTPUT, @dwRecvID OUTPUT, 0, @dwCharID, @szName, 'Staff 4story',@szTitle,@szMessage,0,0,0,100,0,@dateCreated

/* number of rows*/
SELECT @numrighe = COUNT(*) FROM TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE

/* number of rows + 1*/
SET @numrighetot= @numrighe + 1

/* send the exp plus into deposit shop*/
SET IDENTITY_INSERT TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE ON
INSERT INTO TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE(dwID, dwUserID, wItemID, bLevel, bCount, bGLevel, dwDuraMax, dwDuraCur, bRefineCur, dEndTime, bGradeEffect,bMagic1, bMagic2, bMagic3, bMagic4, bMagic5, bMagic6,wValue1, wValue2, wValue3, wValue4, wValue5, wValue6, dwTime1, dwTime2, dwTime3, dwTime4, dwTime5, dwTime6,bWorldID,dlID)
VALUES(@numrighetot, @dwUserID, @oggetto, 0, @quantita, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0)
SET IDENTITY_INSERT TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE OFF
SELECT @nomeoggetto = szName FROM TGLOBAL_GSP.DBO.TCASHSHOPITEMCHART WHERE wItemID = @oggetto
INSERT INTO Premi (Personaggio,LivelloPremio,oggetto,Quantita,Verifica)VALUES(@szName ,@livellopremio,@nomeoggetto,@quantita,@verifica)

/* check the class*/
SELECT @bClass = bClass FROM TCHARTABLE WHERE dwCharID = @dwCharID    

/* Weapon for class*/
IF(@bClass = 0)
BEGIN
SET @oggetto = 11224
END
IF(@bClass = 1)
BEGIN
SET @oggetto = 11225
END
IF(@bClass = 2)
BEGIN
SET @oggetto = 11527
END
IF(@bClass >= 3)
BEGIN
SET @oggetto = 11220
END

/* number of rows*/
SELECT @numrighe = COUNT(*) FROM TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE

/* number of rows + 1*/
SET @numrighetot= @numrighe + 1

/* set the count item = 1*/
SET @quantita = 1

/* send the weapon +11 into tcashitemcabinettable*/
SET IDENTITY_INSERT TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE ON
INSERT INTO TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE(dwID, dwUserID, wItemID, bLevel, bCount, bGLevel, dwDuraMax, dwDuraCur, bRefineCur, dEndTime, bGradeEffect,bMagic1, bMagic2, bMagic3, bMagic4, bMagic5, bMagic6,wValue1, wValue2, wValue3, wValue4, wValue5, wValue6, dwTime1, dwTime2, dwTime3, dwTime4, dwTime5, dwTime6,bWorldID,dlID)
VALUES(@numrighetot, @dwUserID, @oggetto, 11, @quantita, 0, 5000,5000 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0,0)
SET IDENTITY_INSERT TGLOBAL_GSP.DBO.TCASHITEMCABINETTABLE OFF

/* get the item's name*/
SELECT @nomeoggetto = szName FROM TGLOBAL_GSP.DBO.TCASHSHOPITEMCHART WHERE wItemID = @oggetto

/* send the log to Premi*/
INSERT INTO Premi (Personaggio,LivelloPremio,oggetto,Quantita,Verifica)VALUES(@szName ,@livellopremio,@nomeoggetto,@quantita,@verifica)

END
END

these days i edit my script and share 1 more easy :)

i added new version of the script in the first page [Script]New Gifts Item/money for levels
09/24/2013 18:20 serbansubs#23
Again delete :| ?
09/24/2013 18:23 AllCowsAreBurgers#24
Why delete?
09/24/2013 18:27 iKonsT#25
Because he is working on a new server and so he wont release things anymore :)