Guild level 5 after create

12/01/2019 05:41 sonzenbi#1
I remember someone asking about this
Extremely easy
Open Proc SRO_VT_SHARD.._Guild_Create
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values(@GuildName, 1, 0, @FoundationDate,0,0)
Change to
insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values(@GuildName, 5, 0, @FoundationDate,0,0)
FULL PROC
Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_Guild_Create]    Script Date: 12/3/2019 1:13:52 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


--
ALTER PROCEDURE [dbo].[_Guild_Create]
	@GuildName	varchar(64),
	@CreaterID	int
as
	if (exists (select id from _Guild where Name = @GuildName))
	begin
		return -1000
	end
	if (exists (select CharID from _GuildMember where CharID = @CreaterID))
	begin
		return -1001
	end
begin transaction
	
	declare @GuildID	int
	declare @FoundationDate  smalldatetime
	
	set @FoundationDate = GetDate()
	insert _Guild(Name, Lvl, GatheredSP, FoundationDate,Alliance,Booty) values(@GuildName, 5, 0, @FoundationDate,0,0)
	set @GuildID = @@identity
	
	if (@@error <> 0 or @@rowcount = 0 or @GuildID = 0)
	begin
		rollback transaction
		return -5
	end

	--길드장은 퍼미션이 0xffffffff !!
	declare @rvalue int
	exec @rvalue = _Guild_FnAddMember @GuildID, @CreaterID, 0, @FoundationDate,0xffffffff
	if (@@error <> 0 or @rvalue <= 0)
	begin
		rollback transaction
		return @rvalue
	end
	
	-- 길드 창고를 생성하자
	exec @rvalue = _Guild_CreateChest_NoTX @GuildID
	if (@@error <> 0 or @rvalue <= 0)
	begin
		rollback transaction
		return @rvalue
	end

commit transaction
	return @GuildID
Hope it helpful :rolleyes:
12/02/2019 18:57 silkroadntc#2
Very good, boy
12/02/2019 22:37 Genoxid#3
nice query where i have to put it?
12/03/2019 14:00 chipno0p#4
Quote:
Originally Posted by Genoxid View Post
nice query where i have to put it?
It's not a query bro, It's SP modification..
12/03/2019 17:51 thebigbody#5
Quote:
Originally Posted by Genoxid View Post
nice query where i have to put it?
:rolleyes::D
12/13/2019 17:09 C 9#6
its not a query that's a stored procedure if you're going to use it, will replace the current procedure so query on SRO_VT_SHARD...
12/17/2019 23:27 _SGA_#7
easy but might be very useful for some people.
Thanks :)