Difference between revisions of "Template:Dragon"

From NorCon MUSH
Line 1: Line 1:
{{#get_db_data:
+
{|class="table table-striped" style="background-color: #FFFFFF !important; float:right; width:280px; margin:0 0 1em 1em; text-align:left;" cellpadding=5px
db=norcon
+
|from=dragons
+
|where=name='{{#explode:{{BASEPAGENAME}}| |-1}}'
+
|data=dragon=name,hname=hname,color=color,wing=wing,rider=rider,ename=ename,size=size,clutch=clutch,desc=description,home=weyr,hatchsecs=hatchsecs
+
}}{{#get_db_data:
+
db=norcon
+
|from=clutches
+
|where=id='{{#external_value:clutch}}'
+
|data=dam=dam,sire=sire,weyr=weyr,hatchdate=hatchdate
+
}}{{#get_db_data:
+
db=norcon
+
|from=dragons
+
|where=name='{{#external_value:dam}}'
+
|data=dam2=hname
+
}}{{#get_db_data:
+
db=norcon
+
|from=dragons
+
|where=name='{{#external_value:sire}}'
+
|data=sire2=hname
+
}}{|class="table table-striped" style="background-color: #FFFFFF !important; float:right; width:280px; margin:0 0 1em 1em; text-align:left;" cellpadding=5px
+
 
|-
 
|-
!colspan=2 style="text-align:center; padding-top: 5px; padding-bottom: 5px; font-size: larger; background-color:{{#ifexist: Template:{{#external_value:weyr}}|{{ {{#external_value:weyr}} }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}}}}}}}; border: {{#ifexist: Template:{{#external_value:weyr}}2|{{ {{#external_value:weyr}}2 }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}2}}}}}} 2px solid; color:#FFFFFF; text-shadow: 2px 2px #000000;"| '''{{#ifeq:{{#external_value:dragon}}| |{{{name}}}|{{#ifeq:{{#external_value:hname}}| | {{#external_value:color}}&nbsp;|{{#external_value:hname}}&nbsp;}}{{#external_value:dragon}}}}'''
+
!colspan=2 style="text-align:center; padding-top: 5px; padding-bottom: 5px; font-size: larger; background-color:{{#ifexist: Template:{{{weyr}}}|{{ {{{weyr}}} }} |<nowiki>#000000</nowiki>}}; border: {{#ifexist: Template:{{{weyr}}}2|{{ {{{weyr}}}2 }} |<nowiki>#000000</nowiki>}} 2px solid; color:#FFFFFF; text-shadow: 2px 2px #000000;"| '''{{{name}}}'''
 
|-valign="top"  
 
|-valign="top"  
|style="width:100px;" | '''Impressee''' {{!}}{{!}} {{#ifeq: {{#external_value:rider}} | | {{#ifeq: {{{impressee|}}} | | | [[Impressee::{{{impressee}}}]] }} | [[Impressee::{{#external_value:rider}}]] }}
+
|style="width:100px;" | '''Impressee''' {{!}}{{!}} [[Dragon-rider::{{{impressee}}}]]
 
|-valign="top"
 
|-valign="top"
{{#ifeq: {{{date}}} | | | {{!}}'''Hatching Date:''' {{!}}{{!}} {{#ifeq: {{#external_value:hatchdate}} | | {{Date | {{{date|0000.00.00}}} }} | {{Date | {{{date|{{#time:Y.m.d|@{{#external_value:hatchdate}} }} }}}}} }}}}
+
{{#ifeq: {{{date}}} | | | {{!}}'''Hatching Date:''' {{!}}{{!}} {{Date | {{{date|0000.00.00}}} }} }}
 
|-valign="top"
 
|-valign="top"
{{#ifeq: {{#external_value:hatchsecs}} | | | {{!}}'''Current Age:''' {{!}}{{!}} ~{{#expr:trunc {{#expr:{{#expr:{{#expr: {{#time: U | now }}-{{#external_value:hatchsecs}}}}/31536000}}*3}}}} turns}}
+
{{#ifeq: {{{egg}}} | | {{!}}'''Egg Name:''' {{!}}{{!}} {{{egg}}} }}
 
|-valign="top"
 
|-valign="top"
{{#ifeq: {{#external_value:ename}} | | {{#ifeq: {{{egg|}}} | | | {{!}}'''Egg Name:''' {{!}}{{!}} {{{egg}}} }} | {{!}}'''Egg Name:''' {{!}}{{!}} {{#external_value:ename}} Egg }}
+
{{#ifeq: {{{size|}}} | | | {{!}}'''Size:''' {{!}}{{!}} {{{size}}} feet }}  
 
|-valign="top"
 
|-valign="top"
{{#ifeq: {{#external_value:size}} | | {{#ifeq: {{{size|}}} | | | {{!}}'''Size:''' {{!}}{{!}} {{{size}}} feet }} | {{!}}'''Size:''' {{!}}{{!}} {{#external_value:size}} }}
+
{{#ifeq: {{{dam| }}} | | | {{!}}'''Dam:''' {{!}}{{!}} [[Dragon:{{{dam}}}]] {{#set:Dragon-dam={{{dam}}}}}}}
 
|-valign="top"
 
|-valign="top"
{{#ifeq: {{#external_value:dam}} | | {{#ifeq: {{{dam| }}} | | | {{!}}'''Dam:''' {{!}}{{!}} [[Dam::Dragon:{{{dam}}}|{{{dam}}}]] }} | {{!}}'''Dam:''' {{!}}{{!}} [[Dam::Dragon:{{#external_value:dam}}{{!}}{{#ifeq: {{#external_value:dam2}} | | | {{#external_value:dam2}}}} {{#external_value:dam}} ]]}}
+
{{#ifeq: {{{sire| }}} | | | {{!}}'''Sire:''' {{!}}{{!}} [[Dragon:{{{sire}}}]] {{#set:Dragon-sire={{{sire}}}}}}}
|-valign="top"
+
{{#ifeq: {{#external_value:sire}} | |{{#ifeq: {{{sire| }}} | | | {{!}}'''Sire:''' {{!}}{{!}} [[Sire::Dragon:{{{sire}}}|{{{sire}}}]] }} | {{!}}'''Sire:''' {{!}}{{!}} [[Sire::Dragon:{{#external_value:sire}}{{!}}{{#ifeq: {{#external_value:sire2}} | | | {{#external_value:sire2}}}} {{#external_value:sire}} ]]}}
+
 
|-valign="top"
 
|-valign="top"
 
{{!}}'''Lineage:''' {{!}}{{!}} [http://ncmush.net/index.php?title=Special:FamilyTree&Special:FamilyTree&page={{FULLPAGENAMEE}}&amp;type=ancestors&amp;gen=5&amp;page2= Here]
 
{{!}}'''Lineage:''' {{!}}{{!}} [http://ncmush.net/index.php?title=Special:FamilyTree&Special:FamilyTree&page={{FULLPAGENAMEE}}&amp;type=ancestors&amp;gen=5&amp;page2= Here]
 
|-valign="top"
 
|-valign="top"
{{#ifeq: {{{clutch| }}} | | | {{!}}'''Clutch:''' {{!}}{{!}} [[Clutch::{{#ifeq:{{{weyr|}}} | | {{#ifeq:{{#external_value:weyr}}| | | {{#external_value:weyr}}Clutch:{{{clutch}}}|Clutch {{{clutch}}}}} |Clutch:{{{clutch}}}}}]]}}  
+
{{#ifeq: {{{clutch| }}} | | | {{!}}'''Clutch:''' {{!}}{{!}} [[Dragon-clutch::{{{clutch}}}]]}}
 
|-valign="top"
 
|-valign="top"
 
{{#ifeq: {{{egg credit| }}} | | | {{!}}'''Egg Credit:''' {{!}}{{!}} {{{egg credit}}} }}
 
{{#ifeq: {{{egg credit| }}} | | | {{!}}'''Egg Credit:''' {{!}}{{!}} {{{egg credit}}} }}
Line 47: Line 25:
 
{{#ifeq: {{{puppeteer| }}} | | | {{!}}'''Puppeteer:''' {{!}}{{!}} {{{puppeteer}}} }}
 
{{#ifeq: {{{puppeteer| }}} | | | {{!}}'''Puppeteer:''' {{!}}{{!}} {{{puppeteer}}} }}
 
|-
 
|-
|colspan=2 style="text-align:center; padding: 5px; font-size: larger; background-color:{{#ifexist: Template:{{#external_value:weyr}}|{{ {{#external_value:weyr}} }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}}}}}}}; border: {{#ifexist: Template:{{#external_value:weyr}}2|{{ {{#external_value:weyr}}2 }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}2}}}}}} 2px solid; box-shadow: 0 1px 10px rgba(0,0,0,0.1); color:{{{fgcolor|#FFFFFF}}};" {{!}}
+
!colspan=2 style="text-align:center; padding-top: 5px; padding-bottom: 5px; font-size: larger; background-color:{{#ifexist: Template:{{{weyr}}}|{{ {{{weyr}}} }} |<nowiki>#000000</nowiki>}}; border: {{#ifexist: Template:{{{weyr}}}2|{{ {{{weyr}}}2 }} |<nowiki>#000000</nowiki>}} 2px solid; color:#FFFFFF; text-shadow: 2px 2px #000000{{!}}
 
{{!}}}
 
{{!}}}
{{#ifeq: {{#external_value:desc}} | | |{{#external_value:desc}}<br><br> }}
 
 
{{{body|}}}
 
{{{body|}}}
  
Line 56: Line 33:
 
{{#ifeq: {{{clutch|}}} | | | {{{!}}class="table table-striped" style="background-color:#FFFFFF; float:center;  text-align: left" cellpadding="3" cellspacing="0" width="100%" align="center"
 
{{#ifeq: {{{clutch|}}} | | | {{{!}}class="table table-striped" style="background-color:#FFFFFF; float:center;  text-align: left" cellpadding="3" cellspacing="0" width="100%" align="center"
 
{{!}}-
 
{{!}}-
!colspan=2 style="text-align:center; padding-top: 5px; padding-bottom: 5px; font-size: larger; background-color:{{#ifexist: Template:{{#external_value:weyr}}|{{ {{#external_value:weyr}} }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}}}}}}}; border: {{#ifexist: Template:{{#external_value:weyr}}2|{{ {{#external_value:weyr}}2 }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}2}}}}}} 2px solid; color:#FFFFFF; text-shadow: 2px 2px #000000;"{{!}} '''{{#ifeq:{{#external_value:weyr}}| | {{#ifeq:{{{weyr|}}} | | | {{{weyr}}} }} | {{#external_value:weyr}} }} Clutch {{{clutch}}} '''
+
!colspan=2 style="text-align:center; padding-top: 5px; padding-bottom: 5px; font-size: larger; background-color:{{#ifexist: Template:{{{weyr}}}|{{ {{{weyr}}} }} |<nowiki>#000000</nowiki>}}; border: {{#ifexist: Template:{{{weyr}}}2|{{ {{{weyr}}}2 }} |<nowiki>#000000</nowiki>}} 2px solid; color:#FFFFFF; text-shadow: 2px 2px #000000;"'''Clutch {{{clutch}}}'''
 
{{!}}-valign="top"
 
{{!}}-valign="top"
{{!}}{{#ask:[[Clutch::Clutch:{{{clutch}}}]] [[Insta::Insta{{!}}{{!}}PC]]
+
{{!}}{{#ask:[[Dragon-clutch::{{#ask:[[Dragon-name::{{BASEPAGENAME}}]] [[DragonData::+]] OR [[Dragon-rider2::{{BASEPAGENAME}}]] |?Dragon-clutch= |mainlabel=- |link=none}}]]
|?Dragon
+
|?Dragon-name
|?Impressee=
+
|?Dragon-rider2
 +
|?Dragon-color
 +
|?Dragon-hname
 
|format=ul
 
|format=ul
 
|link=none
 
|link=none
Line 70: Line 49:
 
}}
 
}}
 
{{!}}-
 
{{!}}-
{{!}}colspan=2 style="text-align:center; padding: 5px; font-size: larger; background-color:{{#ifexist: Template:{{#external_value:weyr}}|{{ {{#external_value:weyr}} }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}}}}}}}; border: {{#ifexist: Template:{{#external_value:weyr}}2|{{ {{#external_value:weyr}}2 }}|{{#ifeq:{{{weyr|}}}| |<nowiki>#000000</nowiki>|{{{{{weyr}}}2}}}}}} 2px solid; box-shadow: 0 1px 10px rgba(0,0,0,0.1); color:{{{fgcolor|#FFFFFF}}};" {{!}}
+
!colspan=2 style="text-align:center; padding-top: 5px; padding-bottom: 5px; font-size: larger; background-color:{{#ifexist: Template:{{{weyr}}}|{{ {{{weyr}}} }} |<nowiki>#000000</nowiki>}}; border: {{#ifexist: Template:{{{weyr}}}2|{{ {{{weyr}}}2 }} |<nowiki>#000000</nowiki>}} 2px solid; color:#FFFFFF; text-shadow: 2px 2px #000000;"{{!}}
 
{{!}}} }}
 
{{!}}} }}
{{#set:Color={{#ifeq:{{#external_value:color}}| |{{#ifeq:{{{color|}}}| | |{{{color}}}}}|{{#external_value:color}}}}}}  {{#ifeq: {{{insta| }}} | | {{#set:Insta=PC}}| }}  {{#ifeq: {{{insta|}}} | NPC | {{#set:Insta=NPC}} | }} {{#ifeq: {{{insta|}}} | Yes | {{#set:Insta=Insta}} | }}{{#ifeq:{{#external_value:home}} | | | {{#set:DragonHome={{#external_value:home}} }} }} {{#set:Clutched={{#ifeq:{{#external_value:weyr}}| |{{#ifeq:{{{weyr|}}}| | | {{{weyr}}} }}| {{#external_value:weyr}}}}}} {{#set:Dragon={{#ifeq:{{#external_value:dragon}}| |{{{name}}}|{{#ifeq:{{#external_value:hname}}| | |{{#external_value:hname}}&nbsp;}}{{#external_value:dragon}}}}}}
+
{{#set:Dragon-color={{{color}}}}} {{#ifeq: {{{insta| }}} | | {{#set:Insta=PC}}| }}  {{#ifeq: {{{insta|}}} | NPC | {{#set:Insta=NPC}} | }} {{#ifeq: {{{insta|}}} | Yes | {{#set:Insta=Insta}} | }} {{#ifeq: {{{hname|}}} | | | {{#set:Dragon-hname={{{hname}}}}} }} {{#pagetitle:{{{name}}}}}
{{#pagetitle:{{#ifeq:{{#external_value:dragon}}| |{{{name}}}|{{#ifeq:{{#external_value:hname}}| | |{{#external_value:hname}}&nbsp;}}{{#external_value:dragon}}}}}}
+

Revision as of 01:37, 30 January 2016

{{{name}}}
Impressee {{{impressee}}}
Hatching Date: Some time in history
Lineage: Here