Code: Select all
{
callfunc "MultiWarpTowel";
Good catch.
and the patch
https://github.com/themanaworld/tmwa-se ... ta/pull/97
Code: Select all
{
callfunc "MultiWarpTowel";
Code: Select all
set @warpTowelName$, $@warpTowels$[rand(getarraysize($@warpTowels$))];
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
Is it this one?wushin wrote:P.S. o11c fixed the bug during dying the towel.
But: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.
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;
Won't this always give random towel?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;
}