StarMedia
Va asteptam in grupul nostru de pe facebook: Click

Distribuiţi
Vezi subiectul anteriorIn josVezi subiectul urmator
avatar
sKiLeTu
Extreme
Extreme
Mesaje : 960
Varsta : 23
Localizare : Moldova,Chisinau,Truseni
Sunt pe forum din : 29/12/2009

[Guide] Disable Dark Lord / Change Create Level

la data de Mier 09 Feb 2011, 20:48
Full credits go to: anhnga
(script is not by me, I just found it hidden on the forum)

Open your Enterprise Manager, select the MuOnline database, at the top of your screen go to Tools -> SQL Query Analyzer and copy and paste the following:
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 < 300)
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

This script works well for those who don't have the WZ_CreateCharacter stored procedure (like me!)

300 - change this to the minimum level you want players to have before they can create a DL.
Vezi subiectul anteriorSusVezi subiectul urmator
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum