if map == 1 or map == 3 or map == 21 or map == 23 or map == 41 or map == 43 then
local sub_set = 0
if pc.get_level() >= 10 then
local CTRL = true
while(CTRL) do
sub_set = select("Údolí orků ", "Velká poušť ", "Ledová země ", "DALŠÍ OBLASTI ","ZRUŠIT ")
if sub_set == 5 then
return
notice("Teleportér: Tak zatím nashledanou.")
end
if sub_set == 4 then
say_title(mob_name(npc.get_race())..": ")
say_size(350,380)
say("Tak kam tě mám přesunout?")
say_reward("Cena za přesun je "..cost.." Yangů. ")
sub_set = select("Ohnivá země ", "Zelený les", "Červený les", "Červený les", "Červený les", "Červený les", "Červený les", "ZRUŠIT")
if sub_set == 4 then
return
notice("Teleportér: Tak zatím nashledanou.")
end
end
end
end
Take a look at the sub_set index: the second choice will replace the first; you should update the sub_set index:
"sub_set = select("Ohnivá země ", "Zelený les", "Červený les", "Červený les", "Červený les", "Červený les", "Červený les", "ZRUŠIT")+5"
So you'll can use sub_set[a] where { a=>1 & a<=5 } means the answers in the first select(), and { a => 6 & a <=13} will represent the second selection function.
NOTE: You'll need to add "CTRL = false" where you want to break the cycle (f.e., if {sub_set => 1 and sub_set<=3} or {sub_set => 6 and sub_set <= 12} then CTRL = false end), otherwise you'll follow in a loop.
[€dit]: if you want an assembly-like code, you can use the goto token, user documented here.
Example:
local x = 3
local y = 5
::restart::
if (x+3y) < 100 then
x = x+1
y = y+1
goto restart
else
print("now x+3y is >= than 100")
end