1000级升级奖励点数和丹药制作成功几率,吃丹药奖励点数的修改法

社区服务
高级搜索
猴岛论坛综合游戏交流1000级升级奖励点数和丹药制作成功几率,吃丹药奖励点数的修改法
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

1000级升级奖励点数和丹药制作成功几率,吃丹药奖励点数的修改法

楼层直达
cscheat

ZxID:1000002

等级: 管理员
举报 只看楼主 使用道具 楼主   发表于: 2007-04-03 0
 CREATE PROCEDURE RMS_INCREASEBONUSQUESTCOUNT
@GameID varchar(14)
AS

set nocount on

declare @IncreaseBonusError int, @InsertLogError int, @STotalBonus int
set @IncreaseBonusError = 1
set @InsertLogError = 1
set @STotalBonus = 0

begin transaction

update tblGameID1 set SBonus = SBonus + 1, STotalBonus = STotalBonus + 1 where GameID = @GameID
set @IncreaseBonusError = @@ERROR

select @STotalBonus = STotalBonus from tblGameID1 where GameID = @GameID

insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 1)
set @InsertLogError = @@ERROR

if @IncreaseBonusError = 0 AND @InsertLogError = 0
begin
commit transaction
end
else
begin
rollback transaction
end
GO


修改红色的1为你想设定的1000级升级奖励点数就可以了

CREATE PROCEDURE RMS_TRYMAKEMYSTERYPILL
@GameID varchar(14),
@WindowKind int,
@WindowIndex int,
@RandomNumber int
AS

set nocount on

declare @ItemCountLimit int, @CurrentItemCount int
set @ItemCountLimit = 0

begin transaction

select @ItemCountLimit = ItemCountLimit from tblSpecialItemLimit1 where ItemKind = 6 and ItemIndex = 66
set @CurrentItemCount = @ItemCountLimit
set @RandomNumber=RAND() * 100000000
set @RandomNumber=@RandomNumber%100
select @CurrentItemCount = count(*) from tblSpecialItem1 where ItemKind = 6 and ItemIndex = 66

if (@WindowKind = 1 and @WindowIndex >= 0 and @WindowIndex < 100) or (@WindowKind = 3 and @WindowIndex >= 0 and @WindowIndex < 8)
begin
declare @MakeMysteryPillError int
set @MakeMysteryPillError = 1
update tblGameID1 set SBonus = SBonus - 1, STotalBonus = STotalBonus - 1 where GameID = @GameID and SBonus >= 1 and STotalBonus >= 1

if @@ROWCOUNT = 1 and @@ERROR = 0
begin
if @ItemCountLimit > @CurrentItemCount
begin
if @RandomNumber % 100 >= 50
begin
insert tblSpecialItem1 (ItemKind, ItemIndex, Position, Map, X, Y, TileKind, GameID, WindowKind, WindowIndex) values (6, 66, 1, 1, 100, 100, 0, @GameID, @WindowKind, @WindowIndex)
set @MakeMysteryPillError = @@ERROR
end
end
end

declare @STotalBonus int
set @STotalBonus = 0
select @STotalBonus = STotalBonus from tblGameID1 where GameID = @GameID

if @MakeMysteryPillError = 0
begin
insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 2)
end
else
begin
insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 3)
end
end

commit transaction

GO


红色的50为100减去该数字就是成功机率,例如设为0就是100%成功,设为100就是0%了

这个是人工丹药

CREATE PROCEDURE RMS_USEARTIFICIALMYSTERYPILL
@GameID varchar(14),
@WindowKind int,
@WindowIndex int
AS

set nocount on

declare @RemoveMysteryPillError int, @IncreaseBonusError int, @InsertLogError int
set @RemoveMysteryPillError = 1
set @IncreaseBonusError = 1
set @InsertLogError = 1

begin transaction

delete tblSpecialItem1 where ID in (select top 1 ID from tblSpecialItem1 where ItemKind = 6 AND ItemIndex = 74 AND Position = 1 AND GameID = @GameID AND WindowKind = @WindowKind AND WindowIndex = @WindowIndex)
if @@ROWCOUNT > 0 and @@ERROR = 0
begin
set @RemoveMysteryPillError = 0
end

update tblGameID1 set Bonus2 = Bonus2 + 2, STotalBonus = STotalBonus + 2 where GameID = @GameID AND STotalBonus < 200
set @IncreaseBonusError = @@ERROR

declare @STotalBonus int
set @STotalBonus = 0
select @STotalBonus = STotalBonus from tblGameID1 where GameID = @GameID

insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 4)
set @InsertLogError = @@ERROR

if @RemoveMysteryPillError = 0 AND @IncreaseBonusError = 0 AND @InsertLogError = 0
begin
commit transaction
end
else
begin
rollback transaction
end


GO


修改红色的2为你想要的数字

这个是传说中的丹药

CREATE PROCEDURE RMS_USEMYSTERYPILL
@GameID varchar(14),
@WindowKind int,
@WindowIndex int
AS

set nocount on

declare @RemoveMysteryPillError int, @IncreaseBonusError int, @InsertLogError int
set @RemoveMysteryPillError = 1
set @IncreaseBonusError = 1
set @InsertLogError = 1

begin transaction

delete tblSpecialItem1 where ID in (select top 1 ID from tblSpecialItem1 where ItemKind = 6 AND ItemIndex = 66 AND Position = 1 AND GameID = @GameID AND WindowKind = @WindowKind AND WindowIndex = @WindowIndex)
if @@ROWCOUNT > 0 and @@ERROR = 0
begin
set @RemoveMysteryPillError = 0
end

update tblGameID1 set Bonus2 = Bonus2 + 4, STotalBonus = STotalBonus + 4 where GameID = @GameID
set @IncreaseBonusError = @@ERROR

declare @STotalBonus int
set @STotalBonus = 0
select @STotalBonus = STotalBonus from tblGameID1 where GameID = @GameID

insert tblBonus2Log1 (GameID, STotalBonus, Kind) values (@GameID, @STotalBonus, 4)
set @InsertLogError = @@ERROR

if @RemoveMysteryPillError = 0 AND @IncreaseBonusError = 0 AND @InsertLogError = 0
begin
commit transaction
end
else
begin
rollback transaction
end

GO
« 返回列表
发帖 回复