LegendDragon
Utente Emerald
Salve ragazzi vorrei bloccare teleporter in una determinata mappa mi potete spiegare gentilmente come fare?
Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
when login with pc.get_map_index() == mappa_da_bloccare beginSalve ragazzi vorrei bloccare teleporter in una determinata mappa mi potete spiegare gentilmente come fare?
when login with pc.get_map_index() == mappa_da_bloccare begin
pc.warp(coordinatevillox, coordinatevilloy)
end
Invece per non fare usare il teleporter dentro quella mappa?
if pc.get_map_index() == mappadabloccare then
Say("Non puoi usare il teleporter in questa mappa")
end
Occhio ho missato il return...grazie mille
if pc.get_map_index() == mappadabloccare then
Say("Non puoi usare il teleporter in questa mappa")
wait()
return
end
Occhio ho missato il return...
Codice:if pc.get_map_index() == mappadabloccare then Say("Non puoi usare il teleporter in questa mappa") wait() return end
quest teleporter_portatile begin
state start begin
when login or levelup with pc.get_level() > 1 begin
set_state( "asd" )
end
end
state asd begin
when letter begin
send_letter( "Teleporter portatile" )
end
when button or info begin
say_title( "Teleporter portatile" )
set_state( "asd" )
local ganja = select("Teleporter Villaggi", "Annulla")
if ganja == 1 then
say_title ( " Teleporter Villaggi" )
say ( "Benvenuto avventuriero." )
say ( "Vuoi viaggiare?" )
say ( "" )
say ( "" )
say ( "" )
local ceso = select ( "Si" , "No" )
if ceso == 2 then
say ( "Mi dispiace sara' per un altra volta." )
return
end
say ( "Bene ora devi scegliere la tua destinazione." )
villaggiz = select ( "Capitale" , "Commercio" , "Annulla" )
if 1 == villaggiz then
rossiz = select ( "Capitale" , "Annulla" )
if 1 == rossiz then
say ( "Ora verrai teletrasportato." )
wait ( )
pc . warp ( 958200 , 1401000 )
end
elseif 2 == villaggiz then
gialliz = select ( "Commercio" , "Annulla" )
if 1 == gialliz then
say ( "Ora verrai teletrasportato." )
wait ( )
pc . warp ( 631600 , 256000 )
end
end
return
end
end
end
end
quest teleporter_portatile begin
state start begin
when letter begin
send_letter( "Teleporter portatile" )
end --when letter
when button or info begin
if pc.get_map_index() == mappa_da_bloccare then
say("Mi dispiace , non puoi usare il teleporter in questa mappa!")
wait()
send_letter( "Teleporter portatile" )
return
end--if pc.get_map_index
say_title ( " Teleporter Villaggi" )
say ( "Benvenuto avventuriero." )
say ( "Scegli la tua destinazione:" )
say("")
say("")
villaggiz = select ( "Capitale" , "Commercio" , "Annulla" )
if 1 == villaggiz then
say("Sei sicuro di voler andare a: Capitale?")
rossiz = select ( "Andiamo!" , "Annulla" )
if 1 == rossiz then
say ( "Ora verrai teletrasportato." )
wait ( )
pc . warp ( 958200 , 1401000 )
else
say("Ok, sarà per un'altra volta!")
wait()
send_letter( "Teleporter portatile" )
end --if rossiz
elseif 2 == villaggiz then
say("Sei sicuro di voler andare a : Commercio")
gialliz = select ( "Andiamo!" , "Annulla" )
if 1 == gialliz then
say ( "Ora verrai teletrasportato." )
wait ( )
pc . warp ( 631600 , 256000 )
else
Say("Ok , sarà per un'altra volta!")
wait()
send_letter( "Teleporter portatile" )
end --if gialliz
else
Say("Ok , sarà per un'altra volta!")
wait()
send_letter( "Teleporter portatile" )
end --if villaggiz
end --button or info
end --state start end
end--quest end
changelog:
-rimosso l'inutile cambio di state della quest
-rimossa ripetizione inutile delle domande cosa vuoi fare , dove andiamo , capitale, vuoi andare alla capitale
-formattazione del codice migliorata
-commento indicativo della chiamata dell'end
-aggiunto il check della mappa (cambia mappa_da_bloccare con il map index della mappa da bloccare)
-aggiunto il resend della letterina se scegli di uscire in qualsiasi punto dello script
Codice:quest teleporter_portatile begin state start begin when letter begin send_letter( "Teleporter portatile" ) end --when letter when button or info begin if pc.get_map_index() == mappa_da_bloccare then say("Mi dispiace , non puoi usare il teleporter in questa mappa!") wait() send_letter( "Teleporter portatile" ) return end--if pc.get_map_index say_title ( " Teleporter Villaggi" ) say ( "Benvenuto avventuriero." ) say ( "Scegli la tua destinazione:" ) say("") say("") villaggiz = select ( "Capitale" , "Commercio" , "Annulla" ) if 1 == villaggiz then say("Sei sicuro di voler andare a: Capitale?") rossiz = select ( "Andiamo!" , "Annulla" ) if 1 == rossiz then say ( "Ora verrai teletrasportato." ) wait ( ) pc . warp ( 958200 , 1401000 ) else say("Ok, sarà per un'altra volta!") wait() send_letter( "Teleporter portatile" ) end --if rossiz elseif 2 == villaggiz then say("Sei sicuro di voler andare a : Commercio") gialliz = select ( "Andiamo!" , "Annulla" ) if 1 == gialliz then say ( "Ora verrai teletrasportato." ) wait ( ) pc . warp ( 631600 , 256000 ) else Say("Ok , sarà per un'altra volta!") wait() send_letter( "Teleporter portatile" ) end --if gialliz else Say("Ok , sarà per un'altra volta!") wait() send_letter( "Teleporter portatile" ) end --if villaggiz end --button or info end --state start end end--quest end
Controlla nella cartella object se hai l'output di compilazioneNon viene visualizzata + la quest in game
Non viene visualizzata + la quest in game
quest teleporter_portatile begin
state start begin
when login begin
send_letter( "Teleporter portatile" )
end --when letter
when button or info begin
if pc.get_map_index() == mappa_da_bloccare then
say("Mi dispiace , non puoi usare il teleporter in questa mappa!")
wait()
send_letter( "Teleporter portatile" )
return
end--if pc.get_map_index
say_title ( " Teleporter Villaggi" )
say ( "Benvenuto avventuriero." )
say ( "Scegli la tua destinazione:" )
say("")
say("")
villaggiz = select ( "Capitale" , "Commercio" , "Annulla" )
if 1 == villaggiz then
say("Sei sicuro di voler andare a: Capitale?")
rossiz = select ( "Andiamo!" , "Annulla" )
if 1 == rossiz then
say ( "Ora verrai teletrasportato." )
wait ( )
pc . warp ( 958200 , 1401000 )
else
say("Ok, sarà per un'altra volta!")
wait()
send_letter( "Teleporter portatile" )
end --if rossiz
elseif 2 == villaggiz then
say("Sei sicuro di voler andare a : Commercio")
gialliz = select ( "Andiamo!" , "Annulla" )
if 1 == gialliz then
say ( "Ora verrai teletrasportato." )
wait ( )
pc . warp ( 631600 , 256000 )
else
Say("Ok , sarà per un'altra volta!")
wait()
send_letter( "Teleporter portatile" )
end --if gialliz
else
Say("Ok , sarà per un'altra volta!")
wait()
send_letter( "Teleporter portatile" )
end --if villaggiz
end --button or info
end --state start end
end--quest end
Mi ha già confermato che l ultimo mio aggiustamento ha completato lo script. Ora non ha più problemi. Solo che non ha chiuso la.discussione e nemmeno aggiornato lo stato...mi fa piacere vedere che esistono ancora i miei vecchi script