Mudanças entre as edições de "Predefinição:NaviLink"

De History Reborn Wiki
Ir para navegação Ir para pesquisar
Etiqueta: Revertido
Etiqueta: Revertido
Linha 1: Linha 1:
<includeonly><span class="naviText" data-map="{{{map}}}" data-x="{{{x|}}}" data-y="{{{y|}}}">{{{text|({{{map}}})}}}</span><span class="naviCopied">Copiado!</span></includeonly><noinclude>
<includeonly>{{ #if:{{{prefix|}}} | {{{prefix}}} }}<span class="navi-copy" style="display: inline-block;"><span>{{{1}}}</span><span>{{{2}}}</span><span>{{{3}}}</span></span>{{ #if:{{{postfix|}}} | {{{postfix}}} }}</includeonly><noinclude>__NOTOC__
NaviLink is used to automatically copy the navi command with the map name and its coordinates when the text is clicked.
== Description ==
The purpose of this template is to turn a set of coordinates into a copyable link for use with the in-game syntax.


== Syntax ==


<code><nowiki>{{NaviLink|map=|x=|y=|text=}}</nowiki></code>
==Usage==
<pre>{{Navi|MapName|X|Y}}</pre>
* '''MapName''' is the map to be used.
* '''X''' is the X coordinate.
* '''Y''' is the Y coordinate.


; Parameters
; map : The name of the map, it's the name that is involved in parenthesis.
; x : The '''X''' coordinate, it's the first coordinate you get when using <code>/where</code>.
; y : The '''Y''' coordinate, it's the second coordinate you get when using <code>/where</code>.
; text : Optional. Text to show instead of the default text <code>(<map> <x>,<y>)</code>.


To get the name of the map and the coordinates you can use <code>/where</code> inside a map.
=== Example ===
 
{|class=wikitable
== Example ==
! Code Used
Let's use an example of Abyss Lake, typing <code>/where</code> there we get:
|-
 
|<code>Visit the mora npc <nowiki>{{Navi|mora|120|212}} and select the first dialogue option.</nowiki></code>
[[File:Where-example.png]]
|-
 
! Result
The name of the map is '''abyss_01''', the X coordinate is '''261''' and the Y coordinate is '''272'''.
|-
 
| Visit the mora npc {{Navi|mora|120|212}} and select the first dialogue option.
With all the data in our hands, using <code><nowiki>{{NaviLink|map=abyss_01|x=261|y=272}}</nowiki></code> will result into: {{NaviLink|map=abyss_01|x=261|y=272}}.
|}
 
[[Category:Templates]]</noinclude>
You can also use the template without an X, Y. <code><nowiki>{{NaviLink|map=abyss_01}}</nowiki></code> will look like this: {{NaviLink|map=abyss_01}}.
 
Alternatively, using <code><nowiki>{{NaviLink|map=abyss_01|x=261|y=272|text=somewhere in Abyss Lake 1F}}</nowiki></code> will result into: {{NaviLink|map=abyss_01|x=261|y=272|text=somewhere in Abyss Lake 1F}}.
 
Clicking the text will copy the navi command into the clipboard, which can then be pasted using <code>CTRL+V</code> in game.
</noinclude>

Edição das 06h01min de 25 de março de 2022

Description

The purpose of this template is to turn a set of coordinates into a copyable link for use with the in-game syntax.


Usage

{{Navi|MapName|X|Y}}
  • MapName is the map to be used.
  • X is the X coordinate.
  • Y is the Y coordinate.


Example

Code Used
Visit the mora npc {{Navi|mora|120|212}} and select the first dialogue option.
Result
{{{prefix}}} }}mora120212{{ #if: | {{{postfix}}} }} and select the first dialogue option.