AreePiola~ Novato
Mensajes : 20
Fecha de inscripción : 13/09/2011
Edad : 28
| Tema: [Aporte] Scrip para SQL cambiar lvl de creacion DL y MG Sáb Sep 17, 2011 5:10 pm | |
| Hola aca les dejo como poner un Script de lvl de creacion del MG y DL. Es decir si en tus files se pueden crear un DL y un MG a lvl 1 con este Script se los van a poder hacer a lvl 220 1º Vamos a Inicio-->Programas-->Microsof Sql Server-->Analizador de consultas. - Citación :
- USE MuOnline
IF EXISTS (SELECT Name FROM sysobjects WHERE name = 'DarkLordPreserve' AND type = 'TR') DROP TRIGGER DarkLordPreserve GO
CREATE TRIGGER DarkLordPreserve ON Character INSTEAD OF INSERT AS BEGIN DECLARE @CharnameExist varchar(10), @MaxCharLevel smallint, @InsAccountID varchar(10), @InsName nvarchar(50), @InscLevel smallint, @InsLevelUpPoint int, @InsClass tinyint, @InsExperience int, @InsStrength smallint, @InsDexterity smallint, @InsVitality smallint, @InsEnergy smallint, @InsMoney int, @InsLife real, @InsMaxLife real, @InsMana real, @InsMaxMana real, @InsMapNumber smallint, @InsMapPosX smallint, @InsMapPosY smallint, @InsMapDir tinyint, @InsMDate smalldatetime, @InsLDate smalldatetime, @InsDbVersion tinyint
SELECT @InsAccountID = AccountID, @InsName = Name, @InscLevel = cLevel, @InsLevelUpPoint = LevelUpPoint, @InsClass = Class, @InsExperience = Experience, @InsStrength = Strength, @InsDexterity = Dexterity, @InsVitality = Vitality, @InsEnergy = Energy, @InsMoney = Money, @InsLife = Life, @InsMaxLife = MaxLife, @InsMana = Mana, @InsMaxMana = MaxMana, @InsMapNumber = MapNumber, @InsMapPosX = MapPosX, @InsMapPosY = MapPosY, @InsMapDir = MapDir, @InsMDate = MDate, @InsLDate = LDate, @InsDbVersion = DbVersion FROM inserted
-- Find Max Level SELECT @MaxCharLevel = MAX(cLevel) FROM Character WHERE (AccountId = @InsAccountID)
-- Get one Random Character Name from DB SELECT TOP 1 @CharnameExist = Name FROM Character
-- Put DarkLord Class Number Here IF (@InsClass = 64) BEGIN -- Put desired minimum level of character that has to exist here IF (@MaxCharLevel < 220) BEGIN SET @InsName = @CharnameExist END IF (@MaxCharLevel IS NULL) BEGIN SET @InsName = @CharnameExist END END
-- Insert the Query INSERT INTO Character ( AccountID, Name, cLevel, LevelUpPoint, Class, Experience, Strength, Dexterity, Vitality, Energy, Money, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MapDir, MDate,LDate,DbVersion ) VALUES ( @InsAccountID, @InsName, @InscLevel, @InsLevelUpPoint, @InsClass, @InsExperience, @InsStrength, @InsDexterity, @InsVitality, @InsEnergy, @InsMoney, @InsLife, @InsMaxLife, @InsMana, @InsMaxMana, @InsMapNumber, @InsMapPosX, @InsMapPosY, @InsMapDir, @InsMDate, @InsLDate, @InsDbVersion ) END |
|