Sauf erreur de ma part :
when 70058.use."Beran-Seatou" begin
Ne fonctionnera pas car il doit s'utiliser comme cela :
when 70058.chat."Beran-Seatou" begin
70058 n'étant pas un NPC mais un item, ça ne fonctionnera pas, quoi que, je n'ai jamais testé...
Dans ton cas, tu dois faire quelques choses de similaire à :
when 70058.use begin
local choix_des_maps = select("Map 1", "Map 2", "Map 3", "Fermer")
if choix_des_maps == 4 then
return
end
if choix_des_maps == 1 then
pc.warp(XXX, XXX)
end
if choix_des_maps == 2 then
pc.warp(XXX, XXX)
end
if choix_des_maps == 3 then
pc.warp(XXX, XXX)
end
end
Dans ce cas là, ça ne demande aucune confirmation mais si tu veux ajouter une confirmation :
when 70058.use begin
local choix_des_maps = select("Map 1", "Map 2", "Map 3", "Fermer")
if choix_des_maps == 4 then
return
end
if choix_des_maps == 1 then
say("Etes vous sur de... ?")
local verification = select("Oui", "Non")
if verification == 1 then
pc.warp(XXX, XXX)
else
return
end
end
if choix_des_maps == 2 then
say("Etes vous sur de... ?")
local verification = select("Oui", "Non")
if verification == 1 then
pc.warp(XXX, XXX)
else
return
end
end
if choix_des_maps == 3 then
say("Etes vous sur de... ?")
local verification = select("Oui", "Non")
if verification == 1 then
pc.warp(XXX, XXX)
else
return
end
end
end
C'est clairement optimisable après
Pour compiler, utilise bien le " 203 PRE QC "