[Tutorial] Changing Starting Bounty
Well, I saw a lot of people posting on how to change the starting bounty so here is how...
First you want to login into your MSSQL.
Next open up your Gunz Database.
Then you will see....
Database Diagrams
Tables
Views
Synonyms
Programmability
Security
Go into the Programmability archive
Now you will see...
Stored Procedures
Functions
Database Triggers
Assenblies
Types
Rules
Defaults
Go into the Stored Procedures Archive.
Now you will see a list of tables.
Scroll down untill you find the table called spInsertChar, then right click it and click modify.
In the table scroll down a bit untill you see the following code or something like it...
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.
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, 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.
Re: [Tutorial] Changing Starting Bounty
Re: [Tutorial] Changing Starting Bounty
nice there is already other tuts but noobs are too stupid to use the search button >.>
Re: [Tutorial] Changing Starting Bounty
Re: [Tutorial] Changing Starting Bounty
Nice or you can just go to your "Analizer Query", choose GunzDB's database and run this scrip:
(Before run it change the value with your own selection, where say: Here the EXP you want)
THIS IS FOR SQL 2000
This will put the exp and bounty you want on your char created!
PHP Code:
ALTER PROC [dbo].[spInsertChar]
@AID int,
@CharNum smallint,
@Name varchar(24),
@Sex tinyint,
@Hair int,
@Face int,
@Costume int
AS
SET NOCOUNT ON
BEGIN TRAN
IF EXISTS (SELECT CID FROM Character where (AID=@AID AND CharNum=@CharNum) OR (Name=@Name))
BEGIN
ROLLBACK TRAN
return(-1)
END
DECLARE @CharIdent int
DECLARE @ChestCIID int
DECLARE @LegsCIID int
DECLARE @MeleeCIID int
DECLARE @PrimaryCIID int
DECLARE @SecondaryCIID int
DECLARE @Custom1CIID int
DECLARE @Custom2CIID int
DECLARE @ChestItemID int
DECLARE @LegsItemID int
DECLARE @MeleeItemID int
DECLARE @PrimaryItemID int
DECLARE @SecondaryItemID int
DECLARE @Custom1ItemID int
DECLARE @Custom2ItemID int
SET @SecondaryCIID = NULL
SET @SecondaryItemID = NULL
SET @Custom1CIID = NULL
SET @Custom1ItemID = NULL
SET @Custom2CIID = NULL
SET @Custom2ItemID = NULL
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, HERE the EXP u want, HERE Bounty u want, 0, 0, 0, 0, 0, 0, 0, GETDATE(), 0, 0)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @CharIdent = @@IDENTITY
/* Melee */
SET @MeleeItemID =
CASE @Costume
WHEN 0 THEN 1
WHEN 1 THEN 2
WHEN 2 THEN 1
WHEN 3 THEN 2
WHEN 4 THEN 2
WHEN 5 THEN 1
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @MeleeItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @MeleeCIID = @@IDENTITY
/* Primary */
SET @PrimaryItemID =
CASE @Costume
WHEN 0 THEN 5001
WHEN 1 THEN 5002
WHEN 2 THEN 4005
WHEN 3 THEN 4001
WHEN 4 THEN 4002
WHEN 5 THEN 4006
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @PrimaryItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @PrimaryCIID = @@IDENTITY
/* Secondary */
IF @Costume = 0 OR @Costume = 2 BEGIN
SET @SecondaryItemID =
CASE @Costume
WHEN 0 THEN 4001
WHEN 1 THEN 0
WHEN 2 THEN 5001
WHEN 3 THEN 4006
WHEN 4 THEN 0
WHEN 5 THEN 4006
END
IF @SecondaryItemID <> 0 BEGIN
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @SecondaryItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @SecondaryCIID = @@IDENTITY
END
END
SET @Custom1ItemID =
CASE @Costume
WHEN 0 THEN 30301
WHEN 1 THEN 30301
WHEN 2 THEN 30401
WHEN 3 THEN 30401
WHEN 4 THEN 30401
WHEN 5 THEN 30101
END
/* Custom1 */
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @Custom1ItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @Custom1CIID = @@IDENTITY
/* Custom2 */
IF @Costume = 4 OR @Costume = 5
BEGIN
SET @Custom2ItemID =
CASE @Costume
WHEN 0 THEN 0
WHEN 1 THEN 0
WHEN 2 THEN 0
WHEN 3 THEN 0
WHEN 4 THEN 30001
WHEN 5 THEN 30001
END
IF @Custom2ItemID <> 0
BEGIN
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @Custom2ItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @Custom2CIID = @@IDENTITY
END
END
IF @Sex = 0 /* 남자일 경우 */
BEGIN
/* Chest */
SET @ChestItemID =
CASE @Costume
WHEN 0 THEN 21001
WHEN 1 THEN 21001
WHEN 2 THEN 21001
WHEN 3 THEN 21001
WHEN 4 THEN 21001
WHEN 5 THEN 21001
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @ChestItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @ChestCIID = @@IDENTITY
/* Legs */
SET @LegsItemID =
CASE @Costume
WHEN 0 THEN 23001
WHEN 1 THEN 23001
WHEN 2 THEN 23001
WHEN 3 THEN 23001
WHEN 4 THEN 23001
WHEN 5 THEN 23001
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @LegsItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @LegsCIID = @@IDENTITY
END
ELSE
BEGIN /* 여자일 경우 */
/* Chest */
SET @ChestItemID =
CASE @Costume
WHEN 0 THEN 21501
WHEN 1 THEN 21501
WHEN 2 THEN 21501
WHEN 3 THEN 21501
WHEN 4 THEN 21501
WHEN 5 THEN 21501
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @ChestItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @ChestCIID = @@IDENTITY
/* Legs */
SET @LegsItemID =
CASE @Costume
WHEN 0 THEN 23501
WHEN 1 THEN 23501
WHEN 2 THEN 23501
WHEN 3 THEN 23501
WHEN 4 THEN 23501
WHEN 5 THEN 23501
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @LegsItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @LegsCIID = @@IDENTITY
END
UPDATE Character
SET chest_slot = @ChestCIID, legs_slot = @LegsCIID, melee_slot = @MeleeCIID,
primary_slot = @PrimaryCIID, secondary_slot = @SecondaryCIID, custom1_slot = @Custom1CIID,
custom2_slot = @Custom2CIID,
chest_itemid = @ChestItemID, legs_itemid = @LegsItemID, melee_itemid = @MeleeItemID,
primary_itemid = @PrimaryItemID, secondary_itemid = @SecondaryItemID, custom1_itemid = @Custom1ItemID,
custom2_itemid = @Custom2ItemID
WHERE CID=@CharIdent
IF 0 = @@ROWCOUNT BEGIN
ROLLBACK TRAN
RETURN (-1)
END
COMMIT TRAN
GO
Edited: Hope make you happy ^^
Date: 31-10-2008
y: avoid complain Hehe
Peace!
Re: [Tutorial] Changing Starting Bounty
yh but my method is still ez, I updated the text cuz I made a mistake on a part
Re: [Tutorial] Changing Starting Bounty
U can modify the starter items too in here :P.. thats cool xD
Re: [Tutorial] Changing Starting Bounty
Re: [Tutorial] Changing Starting Bounty
Quote:
Originally Posted by
elche27
Nice or you can just go to your "Analizer Query", choose GunzDB's database and run this scrip:
(Before run it change the value on red with your own selection)
THIS IS FOR SQL 2000
This will put the exp and bounty you want on your char created!
Code:
ALTER PROC [dbo].[spInsertChar]
@AID int,
@CharNum smallint,
@Name varchar(24),
@Sex tinyint,
@Hair int,
@Face int,
@Costume int
AS
SET NOCOUNT ON
BEGIN TRAN
IF EXISTS (SELECT CID FROM Character where (AID=@AID AND CharNum=@CharNum) OR (Name=@Name))
BEGIN
ROLLBACK TRAN
return(-1)
END
DECLARE @CharIdent int
DECLARE @ChestCIID int
DECLARE @LegsCIID int
DECLARE @MeleeCIID int
DECLARE @PrimaryCIID int
DECLARE @SecondaryCIID int
DECLARE @Custom1CIID int
DECLARE @Custom2CIID int
DECLARE @ChestItemID int
DECLARE @LegsItemID int
DECLARE @MeleeItemID int
DECLARE @PrimaryItemID int
DECLARE @SecondaryItemID int
DECLARE @Custom1ItemID int
DECLARE @Custom2ItemID int
SET @SecondaryCIID = NULL
SET @SecondaryItemID = NULL
SET @Custom1CIID = NULL
SET @Custom1ItemID = NULL
SET @Custom2CIID = NULL
SET @Custom2ItemID = NULL
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, how much EXP u want, how much Bounty u want , 0, 0, 0, 0, 0, 0, 0, GETDATE(), 0, 0)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @CharIdent = @@IDENTITY
/* Melee */
SET @MeleeItemID =
CASE @Costume
WHEN 0 THEN 1
WHEN 1 THEN 2
WHEN 2 THEN 1
WHEN 3 THEN 2
WHEN 4 THEN 2
WHEN 5 THEN 1
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @MeleeItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @MeleeCIID = @@IDENTITY
/* Primary */
SET @PrimaryItemID =
CASE @Costume
WHEN 0 THEN 5001
WHEN 1 THEN 5002
WHEN 2 THEN 4005
WHEN 3 THEN 4001
WHEN 4 THEN 4002
WHEN 5 THEN 4006
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @PrimaryItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @PrimaryCIID = @@IDENTITY
/* Secondary */
IF @Costume = 0 OR @Costume = 2 BEGIN
SET @SecondaryItemID =
CASE @Costume
WHEN 0 THEN 4001
WHEN 1 THEN 0
WHEN 2 THEN 5001
WHEN 3 THEN 4006
WHEN 4 THEN 0
WHEN 5 THEN 4006
END
IF @SecondaryItemID <> 0 BEGIN
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @SecondaryItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @SecondaryCIID = @@IDENTITY
END
END
SET @Custom1ItemID =
CASE @Costume
WHEN 0 THEN 30301
WHEN 1 THEN 30301
WHEN 2 THEN 30401
WHEN 3 THEN 30401
WHEN 4 THEN 30401
WHEN 5 THEN 30101
END
/* Custom1 */
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @Custom1ItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @Custom1CIID = @@IDENTITY
/* Custom2 */
IF @Costume = 4 OR @Costume = 5
BEGIN
SET @Custom2ItemID =
CASE @Costume
WHEN 0 THEN 0
WHEN 1 THEN 0
WHEN 2 THEN 0
WHEN 3 THEN 0
WHEN 4 THEN 30001
WHEN 5 THEN 30001
END
IF @Custom2ItemID <> 0
BEGIN
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @Custom2ItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @Custom2CIID = @@IDENTITY
END
END
IF @Sex = 0 /* 남자일 경우 */
BEGIN
/* Chest */
SET @ChestItemID =
CASE @Costume
WHEN 0 THEN 21001
WHEN 1 THEN 21001
WHEN 2 THEN 21001
WHEN 3 THEN 21001
WHEN 4 THEN 21001
WHEN 5 THEN 21001
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @ChestItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @ChestCIID = @@IDENTITY
/* Legs */
SET @LegsItemID =
CASE @Costume
WHEN 0 THEN 23001
WHEN 1 THEN 23001
WHEN 2 THEN 23001
WHEN 3 THEN 23001
WHEN 4 THEN 23001
WHEN 5 THEN 23001
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @LegsItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @LegsCIID = @@IDENTITY
END
ELSE
BEGIN /* 여자일 경우 */
/* Chest */
SET @ChestItemID =
CASE @Costume
WHEN 0 THEN 21501
WHEN 1 THEN 21501
WHEN 2 THEN 21501
WHEN 3 THEN 21501
WHEN 4 THEN 21501
WHEN 5 THEN 21501
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @ChestItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @ChestCIID = @@IDENTITY
/* Legs */
SET @LegsItemID =
CASE @Costume
WHEN 0 THEN 23501
WHEN 1 THEN 23501
WHEN 2 THEN 23501
WHEN 3 THEN 23501
WHEN 4 THEN 23501
WHEN 5 THEN 23501
END
INSERT INTO CharacterItem (CID, ItemID) Values (@CharIdent, @LegsItemID)
IF 0 <> @@ERROR BEGIN
ROLLBACK TRAN
RETURN (-1)
END
SET @LegsCIID = @@IDENTITY
END
UPDATE Character
SET chest_slot = @ChestCIID, legs_slot = @LegsCIID, melee_slot = @MeleeCIID,
primary_slot = @PrimaryCIID, secondary_slot = @SecondaryCIID, custom1_slot = @Custom1CIID,
custom2_slot = @Custom2CIID,
chest_itemid = @ChestItemID, legs_itemid = @LegsItemID, melee_itemid = @MeleeItemID,
primary_itemid = @PrimaryItemID, secondary_itemid = @SecondaryItemID, custom1_itemid = @Custom1ItemID,
custom2_itemid = @Custom2ItemID
WHERE CID=@CharIdent
IF 0 = @@ROWCOUNT BEGIN
ROLLBACK TRAN
RETURN (-1)
END
COMMIT TRAN
GO
you should really put stuff in code tags. Added code tags in the quote for convince.
Re: [Tutorial] Changing Starting Bounty
Quote:
Originally Posted by
Mambo
U can modify the starter items too in here :P.. thats cool xD
Yep, You can.
Re: [Tutorial] Changing Starting Bounty
wtf i can't find "spInsertChar" at my database...
Re: [Tutorial] Changing Starting Bounty
its in there.
look in GunzDB > Programmability > Stored Procedures.
Re: [Tutorial] Changing Starting Bounty
Since it's a procedure when a char is made it isn't a table, just a script.
Re: [Tutorial] Changing Starting Bounty
this is the easyest thing you can do on ur database >.<
Re: [Tutorial] Changing Starting Bounty
Quote:
Originally Posted by
Kingston
this is the easyest thing you can do on ur database >.<
Who cares? Most people that are new to GunZ Developing don't know how to do this. So I decided to help them.