How can I change required level from Dark Lord? My Server Files are 1.00l of Mu Alliance. Sorry but I don't find link "Search" in this forum...
Thanks beforehand!
Printable View
How can I change required level from Dark Lord? My Server Files are 1.00l of Mu Alliance. Sorry but I don't find link "Search" in this forum...
Thanks beforehand!
Can someone help me?
Sorry for my bad English!
where is search link on forum?
Run this in your Muonline Database:
CREATE TRIGGER [prevent_DL] ON [dbo].[Character]
FOR INSERT
AS
--declarations of variables
DECLARE @Acc varchar(10), @Max INT, @Min INT
SET @Min = 0
DECLARE LISTA CURSOR LOCAL FOR
SELECT AccountID FROM INSERTED
WHERE (Class=64)
OPEN LISTA
FETCH NEXT FROM LISTA INTO @Acc
WHILE @@FETCH_STATUS = 0
BEGIN
SET @Max = (SELECT MAX(cLevel) FROM [Character] WHERE (AccountID=@Acc))
IF (@Max < @Min) --if his max level is less than our minimun requiered: KILL!!!!
BEGIN
ROLLBACK TRANSACTION
END
FETCH NEXT FROM LISTA INTO @Acc
END
--gracefully ending the procedure
CLOSE LISTA
DEALLOCATE LISTA
SET @Min = 0--->>>>>Level to make DL, PUT WHAT LEVEL YOU WHANT.
How to list all sql triggers?