=========================================
=Editing New Character
=========================================
open up SQL Server Manager
login, expand the GunzDB database.
Expand Programmability, expand Stored Procedures, right click on dbo.spInstertChar, click Modify.
---------1------------
Change starting level
search for this line;
look at this part; @cnt,1,....Code:VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace,@nHair,NULL,0,500000,0,0,0,0,0,0,0,0,0,0,0,0,@cnt,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,getdate(),getdate(),0)
The 1 is the characters level, so change it to whatever.
-----------2------------
changing starting bounty
credits to xzeenon;
Code:INSERT INTO Character (AID, Name, CharNum, Level, Sex, Hair, Face, XP, BP, FR, CR, ER, WR, GameCount, KillCount, DeathCount, RegDate, PlayTime, DeleteFlag) Values (@AID, @Name, @CharNum, 1, @Sex, @Hair, @Face, 0, 0, 0, 0, 0, 0, 0, 0, 0, GETDATE(), 0, 0) IF 0 <> @@ERROR BEGIN ROLLBACK TRAN RETURN (-1) END See after @Face, the following: " 0, 0, 0, 0, 0, 0, 0, 0, 0,"? Well let's say you want people to start with 60000 bounty you would change it to look like this... " 0, 60000, 0, 0, 0, 0, 0, 0, 0," never change it to 99999 because i have done it before on an old database and it messed it up.. you can try if you want. but anyway here is the finished product. INSERT INTO Character (AID, Name, CharNum, Level, Sex, Hair, Face, XP, BP, FR, CR, ER, WR, GameCount, KillCount, DeathCount, RegDate, PlayTime, DeleteFlag) Values (@AID, @Name, @CharNum, 1, @Sex, @Hair, @Face, 0, 60000, 0, 0, 0, 0, 0, 0, 0, GETDATE(), 0, 0) IF 0 <> @@ERROR BEGIN ROLLBACK TRAN RETURN (-1) END Anyway when you modify that hit execute and done! Characters when created will have 60000 bounty! Anyways hope you appreciate this.
-------------3---------------
changing your startup items
there are so many different spots, you will have to update them all. *the spots are in the same .dbo)
look at the first one;
chest_itemid = whatever you want, as long as its in your zitem.xml ;)Code:UPDATE Character SET chest_itemid = 21501, legs_itemid = 23501, chest_slot = @ciid3, legs_slot = @ciid4 WHERE CID = @charid
same goes with them all, except don't edit chest_slot = @ciid3, etc..
==================================================
=Misc stuff
==================================================
----------4-----------------
small fix for plevelers
credits; makintosh
Code:Difficulty: Intermediate SQL Knowledge The kill/death interval can be changed so if you wanted to you could autoban a player that happens to kill 10 players in under 2 seconds or whatever values you wish. Basically whatever you deem impossible for the average player. Script can also be modified to ban swappers too ;) Not recommended for small servers. Not really a fix, just autobans powerlevelers. Please backup your database first before putting in code. First modify your Character table and add in these two columns (Don't save it!) Name: LevelTime Datatype: datetime Name: PlvlCount Datatype: INT (Uncheck Allow Null) When your in MSSQL Manager click on the arrow beside LevelTime column. Below youll see properties. In properties set "Default or binding value" to zero. Then Save the table. Secondly you must modify your spInsertChar proc, In SQL Manager drop down "Programmability" -> "Procedures" and right-click then modify spInsertChar. Once in spInsertChar proc, find the line Code: VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,........... at the end of this line you should see: Code: NULL) change it too: Code: NULL, getdate(),0) Then run the following query below: spUpdateCharInfoData Code: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[spUpdateCharInfoData] @nAddedXP BIGINT, @nAddedBP BIGINT, @nAddedKillCount INT, @nAddedDeathCount INT, @nCID INT AS DECLARE @CurrTime datetime DECLARE @DATEDIFF INT DECLARE @OldTime datetime DECLARE @AID INT DECLARE @Count INT SET NOCOUNT ON; -- //BEGIN POWERLEVEL AUTOBAN// SELECT @OldTime = (SELECT LevelTime FROM Character WHERE CID = @nCID) SELECT @CurrTime = getdate() SELECT @DATEDIFF = DATEDIFF(second, @CurrTime, @OldTime) -- ============================================= -- Author: Mackintosh www.daemonsring.net -- Description: This piece of code will autoban powerlevelers -- depending on how fast they kill/die by creating timestamps -- between deaths. -- ============================================= -- If player, kills someone within under 2 seconds enter if statement. IF((abs(@DATEDIFF)) < 2) BEGIN UPDATE Character SET @Count = PlvlCount = PlvlCount+1, LevelTime = @CurrTime WHERE CID = @nCID -- If player has killed 5 people in under 2 seconds, autoban. IF(@Count > 5) BEGIN SELECT @AID=AID FROM Character WHERE CID = @nCID UPDATE Accounts SET UGradeID = 253 -- 253 (Ban User) WHERE AID = @AID END END -- //END POWERLEVL AUTOBAN// ELSE BEGIN UPDATE Character SET XP = XP+@nAddedXP, BP = BP+@nAddedBP, KillCount = KillCount+@nAddedKillCount, DeathCount = DeathCount+@nAddedDeathCount, PlvlCount = 0, LevelTime = @CurrTime WHERE CID = @nCID END The above method may seem very inefficient but with the buety of timestamps we can now display, Whos Online and much more other useful information about the server. I'll probably write a whos online script tommorow. As for clan war procs having troubles with the Emblem will probably release an incomplete version tommorow.
--------------5---------------
hacking a server
click this link;
http://www.trust-me-its-a-real-website.burninhell;D
thats it, cant think of no more.
credits;
xzeenon - change starting bounty
mackintosh - fix plevelers


Reply With Quote


