Does anyone know how to edit the chance of getting Legendary Medicine's from Kasham? Is it possible? Post here or PM me if you know, please. Thanks!
Printable View
Does anyone know how to edit the chance of getting Legendary Medicine's from Kasham? Is it possible? Post here or PM me if you know, please. Thanks!
I found where to edit the chance of Kasham giving you Legenday Medicine's but I don't know what to edit if someone knows.
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 >= 70
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
Ok, I have figured it out. "if @RandomNumber % 100 >= 70" is the only line you have to change. Actually the 70 is all you have to change. By default I guess it's set to 30/70 meaning you would have a 30% chance of winning and 70% chance of losing.
By the default settings on a 3.8 server I am running.
It gave me 2 Legendary medicine out of 6 tries so it does work.
Put a limit on legendary medicine in your special item limit table then retry.