From 6f8f714fd3a534b3b511c05716bf35e2b9d18e0f Mon Sep 17 00:00:00 2001 From: meko Date: Sun, 16 Aug 2015 09:57:05 -0400 Subject: fix colour bug in selim --- world/map/npc/009-2/selim.txt | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'world') diff --git a/world/map/npc/009-2/selim.txt b/world/map/npc/009-2/selim.txt index 474dec3c..c31e74e6 100644 --- a/world/map/npc/009-2/selim.txt +++ b/world/map/npc/009-2/selim.txt @@ -1,21 +1,7 @@ 009-2,32,104,0|script|Selim|326 { - cleararray @items$, "", getarraysize(@items$); - cleararray @item_names$, "", getarraysize(@item_names$); - set @r, 0; - set @j, getarraysize($@DYE_items$); - goto L_CloneArray; // clone the array from DyeConfig - -L_CloneArray: - set @items$[@r], $@DYE_items$[@r]; - set @item_names$[@r], $@DYE_item_names$[@r]; - set @r, @r + 1; - if(@r < @j) goto L_CloneArray; - set @r, 0; - set @j, 0; goto L_Main; - L_Main: mes "[Selim]"; mes "\"Greetings, fair traveler. With what may I help you?\""; @@ -54,6 +40,22 @@ L_ask_dye: "Good bye.", L_Close; L_clothes_choice: + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); + set @r, 0; + set @j, getarraysize($@DYE_items$); + goto L_CloneArray; // clone the array from DyeConfig + +L_CloneArray: + set @items$[@r], $@DYE_items$[@r]; + set @item_names$[@r], $@DYE_item_names$[@r]; + set @r, @r + 1; + if(@r < @j) goto L_CloneArray; + set @r, 0; + set @j, 0; + goto L_clothes_choice2; + +L_clothes_choice2: mes "[Selim]"; mes "\"What can I dye for you today?\""; next; @@ -101,6 +103,8 @@ L_colour: next; set @r, 0; set @j, getarraysize($@DYE_colors$); + cleararray @items$, "", getarraysize(@items$); + cleararray @item_names$, "", getarraysize(@item_names$); callsub S_CloneColors; set @default_choice$, "I have no dye."; callfunc "DynamicItemMenu$"; -- cgit v1.2.3-70-g09d2