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

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

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

楼层直达
feng6687

ZxID:1384984

等级: 列兵
举报 只看楼主 使用道具 楼主   发表于: 2008-05-01 0
1000级升级奖励点数和丹药制作成功几率,吃丹药奖励点数的修改法
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
ask5201314

ZxID:1298558

等级: 大尉
就是给人稳笨!
举报 只看该作者 沙发   发表于: 2008-05-01 0
哇!太多E文了!
http://www.3393.com/adLink.php?comID=368579
kaiserbass1

ZxID:1371241

等级: 准尉
举报 只看该作者 板凳   发表于: 2008-05-03 0
看不懂
pengbo2k

ZxID:1108106

等级: 中尉
举报 只看该作者 地板   发表于: 2008-05-04 0
这个是什么东东?
xiet1108

ZxID:1390877

等级: 上等兵
[url=http://www.91cool.net/][i
举报 只看该作者 4楼  发表于: 2008-05-04 0
不懂不懂,请求说明
sk小前

ZxID:1329055

等级: 中尉
獨愛Cs ~You are my 300$
举报 只看该作者 5楼  发表于: 2008-05-04 0
看不懂
╰皒菛Dé故亊.僅泚?
sk小前

ZxID:1329055

等级: 中尉
獨愛Cs ~You are my 300$
举报 只看该作者 6楼  发表于: 2008-05-04 0
根本看不懂
╰皒菛Dé故亊.僅泚?
ben8243

ZxID:1404572

等级: 新兵
举报 只看该作者 7楼  发表于: 2008-05-04 0
云里雾里.不明
« 返回列表
发帖 回复