Page 2 of 2
Re: Bugs in Towel system ?
Posted: 27 Apr 2014, 23:04
by wushin
ok, I see this now.
Because we open with it, if you have 2 towels and warp, it does the random even if the cooldown isn't up.
Good catch.
and the patch
https://github.com/themanaworld/tmwa-se ... ta/pull/97
Re: Bugs in Towel system ?
Posted: 07 May 2014, 09:42
by Jahuu
Hi.
Because of the random towel usage, when you got more than one, I ended up in Sages Nikolai`s Mansion, without money in hand (all in bank) and now i do not know if ill make it to other part of the world - there is a lot of wolfs on the path and I`m lvl 29.
I think, for low levels it can be end of the game and it is some kind of a bug.
P.S.
My first post

Re: Bugs in Towel system ?
Posted: 07 May 2014, 11:58
by wushin
You should always die towards safety. I guess we will remove the random towel and warp though.
Re: Bugs in Towel system
Posted: 10 May 2014, 03:13
by Aritos
Code: Select all
set @warpTowelName$, $@warpTowels$[rand(getarraysize($@warpTowels$))];
Then why this list:
1 White Hitchhiker's Towel = 2 Diamond Powders
1 Red Hitchhiker's Towel = 2 Ruby Powders
1 Yellow Hitchhiker's Towel = 2 Topaz Powders
1 Orange Hitchhiker's Towel = 1 Ruby Powder + 1 Topaz Powder
1 Pink Hitchhiker's Towel = 1 Ruby Powder + 1 Diamond Powder
wushin wrote:P.S. o11c fixed the bug during dying the towel.
Is it this one?
Re: Bugs in Towel system ?
Posted: 10 May 2014, 09:06
by wushin
The random is only triggered if more than one towel is on you. In the next patch that won't happen. In the next patch it just deletes excess towels.
Re: Bugs in Towel system ?
Posted: 10 May 2014, 14:23
by Aritos
wushin wrote:The random is only triggered if more than one towel is on you. In the next patch that won't happen. In the next patch it just deletes excess towels.
But:
L_DyeTowel:
delitem @towelReq$[@towelCheckCount], 1;
callfunc "MultiWarpTowel";
delitem "BottleOfWater", 1;
getitem @warpTowelName$, 1;
mes "He takes your towel, the water and the gem powder, then he turns away and does something you can't see. After a few minutes, he turns to you again.";
next;
mes "[Stranger]";
mes "\"Done! It'll use its color after being used, but just come back and I can dye it again for you.\"";
goto L_Close;
unction|script|MultiWarpTowel|,
{
setarray $@warpTowels$, "HitchhikersTowel", "WhiteHitchhikersTowel", "RedHitchhikersTowel", "GreenHitchhikersTowel", "BlueHitchhikersTowel", "YellowHitchhikersTowel", "PurpleHitchhikersTowel", "OrangeHitchhikersTowel", "PinkHitchhikersTowel", "TealHitchhikersTowel", "LimeHitchhikersTowel";
set @towel_count, 0;
set @towel_loop, 0;
goto L_CountTowelLoop;
L_CountTowelLoop:
set @towel_count, (@towel_count + countitem($@warpTowels$[@towel_loop]));
delitem $@warpTowels$[@towel_loop], countitem($@warpTowels$[@towel_loop]);
goto L_DelLoopAgain;
L_DelLoopAgain:
if((@towel_loop + 1) == getarraysize($@warpTowels$))
goto L_Return;
set @towel_loop, (@towel_loop + 1);
goto L_CountTowelLoop;
L_Return:
if (@towel_count > 0)
set @warpTowelName$, $@warpTowels$[rand(getarraysize($@warpTowels$))];
cleararray $@warpTowels$, "", getarraysize($@warpTowels$);
return;
}
Won't this always give random towel?
Re: Bugs in Towel system ?
Posted: 10 May 2014, 15:59
by wushin
https://github.com/themanaworld/tmwa-se ... a/pull/102
Please read current PRs if you wish to understand the code correctly.