summaryrefslogtreecommitdiff
path: root/world/map/npc/functions
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2015-01-27 13:18:55 -0500
committermekolat <mekolat@gmail.com>2015-01-27 13:18:55 -0500
commitaf5304828c259d500f7c6d93b5ffa735bc1695f5 (patch)
tree5ec1959e201ae8f9aa6340b7e7b86c616cd6ff93 /world/map/npc/functions
parent034a1c899c49bb6d11bd4080bb27d068ba72e3bc (diff)
downloadserverdata-af5304828c259d500f7c6d93b5ffa735bc1695f5.tar.gz
serverdata-af5304828c259d500f7c6d93b5ffa735bc1695f5.tar.bz2
serverdata-af5304828c259d500f7c6d93b5ffa735bc1695f5.tar.xz
serverdata-af5304828c259d500f7c6d93b5ffa735bc1695f5.zip
make selim use the dynamic menu
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r--world/map/npc/functions/dynamic_menu.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/world/map/npc/functions/dynamic_menu.txt b/world/map/npc/functions/dynamic_menu.txt
index 2205cff7..a2a735d6 100644
--- a/world/map/npc/functions/dynamic_menu.txt
+++ b/world/map/npc/functions/dynamic_menu.txt
@@ -28,12 +28,14 @@ L_pick_choice_loop:
goto L_choice_init_done;
set @current, @items[@i];
set @current_name$, @item_names$[@i];
+ set @current_index, @i;
set @i, @i + 1;
if (countitem(@current) == 0)
goto L_pick_choice_loop;
set @choice_v[@c], @current;
set @choice_n$[@c], @current_name$;
+ set @choice_i[@c], @current_index;
set @c, @c + 1;
goto L_pick_choice_loop;
@@ -125,6 +127,7 @@ L_MenuItems1:
L_choice_join:
set @menu, @menu - 1;
set @item, @choice_v[@menu];
+ set @index, @choice_i[@menu];
if (@menu >= @c)
set @item, 0;
goto L_Clean;
@@ -136,8 +139,9 @@ L_Clean:
set @i, 0;
set @current, 0;
set @current_name$, "";
- cleararray @choice_v, "", getarraysize(@choice_v);
+ cleararray @choice_v, 0, getarraysize(@choice_v);
cleararray @choice_n$, "", getarraysize(@choice_n$);
+ cleararray @choice_i, 0, getarraysize(@choice_i);
return;
L_ArrayLengthMismatch:
@@ -175,12 +179,14 @@ L_pick_choice_loop:
goto L_choice_init_done;
set @current$, @items$[@i];
set @current_name$, @item_names$[@i];
+ set @current_index, @i;
set @i, @i + 1;
if (countitem(@current$) == 0)
goto L_pick_choice_loop;
set @choice_v$[@c], @current$;
set @choice_n$[@c], @current_name$;
+ set @choice_i[@c], @current_index;
set @c, @c + 1;
goto L_pick_choice_loop;
@@ -272,6 +278,7 @@ L_MenuItems1:
L_choice_join:
set @menu, @menu - 1;
set @item$, @choice_v$[@menu];
+ set @index, @choice_i[@menu];
if (@menu >= @c)
set @item$, "";
goto L_Clean;
@@ -280,11 +287,13 @@ L_Clean:
set @menu, 0;
set @items_nr, 0;
set @c, 0;
+ set @current_index, 0;
set @i, 0;
set @current$, 0;
set @current_name$, "";
cleararray @choice_v$, "", getarraysize(@choice_v$);
cleararray @choice_n$, "", getarraysize(@choice_n$);
+ cleararray @choice_i, 0, getarraysize(@choice_i);
return;
L_ArrayLengthMismatch: