[Znote AAC] Advanced Spells v2

Discussion in 'Website Applications' started by cbrm, Oct 12, 2012.

  1. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    This script loads spells.xml when requested by the user at admin panel, and creates a PHP file saving all spells in arrays.
    It has sort options exactly like Tibia's page. It works with both 0.2 and 0.3 distributions.

    Preview:
    [​IMG]

    [​IMG]

    [​IMG]


    Setup:
    engine/function/general.php

    Before
    PHP:
    1. ?>
    Add
    PHP:
    1.  
    2. function build_spells($xml, $display_groups) {
    3.     $t_count = 0;
    4.     $rune = array();
    5.     $string = '<?php'."\n".'#Generated spells file from admin panel'."\n".'#Edit at your own risk!';
    6.    $string .= "\n".'$show_spells_groups = '.($display_groups ? 'true' : 'false').';'."\n".'$spells = array(';
    7.     foreach($xml as $key => $value)
    8.     {      
    9.         if($value['lvl'])
    10.         {
    11.             if($key == 'rune')
    12.             {
    13.                 if($display_groups)
    14.                 {
    15.                     if($value['group'] == NULL)
    16.                     {
    17.                         echo '<span style="color:orange;font-weight:bold">WARNING: Group not found at spell "'.$value['name'].'", set to "Attack".</span><br>';
    18.                     }
    19.                     $rune[(string)$value['name']] = ($value['group'] == NULL) ? 'Attack' : $value['group'];
    20.                 }
    21.                 continue;
    22.             }
    23.  
    24.             $t_count++;
    25.             $string .= "\n\t".'array(';
    26.            
    27.             if($display_groups)
    28.             {
    29.                 $string .= "\n\t\t".'"group" => ';
    30.                 {
    31.                     if($value['function'] == 'conjureRune')
    32.                     {
    33.                         $string .= '\''.ucfirst($rune[(string)$value['name']]).'\'';
    34.                     }
    35.                     else
    36.                     {
    37.                         if($value['group'] == NULL)
    38.                         {
    39.                             echo '<span style="color:orange;font-weight:bold">WARNING: Group not found at spell "'.$value['name'].'", set to "Attack".</span><br>';
    40.                         }
    41.                         $string .= '\''.ucfirst(($value['group'] == NULL) ? 'Attack' : $value['group']).'\'';
    42.                     }
    43.                 }
    44.                 $string .= ',';
    45.             }
    46.  
    47.             $string .= "\n\t\t".'"type" => ';
    48.             if(config('TFSVersion') == 'TFS_02')
    49.             {
    50.                 $string .= (($value['function'] == 'conjureRune') ? '\'Rune\'' : '\'Instant\'');
    51.             }
    52.             if(config('TFSVersion') == 'TFS_03')
    53.             {
    54.                 $string .= (($value['value'] == 'conjureRune') ? '\'Rune\'' : '\'Instant\'');
    55.             }
    56.             $string .= ',';
    57.             $string .= "\n\t\t".'"name" => "'.$value['name'].'",';
    58.             $string .= "\n\t\t".'"words" => \''.$value['words'].'\',';
    59.             $string .= "\n\t\t".'"level" => '.$value['lvl'].',';
    60.             $string .= "\n\t\t".'"mana" => ';
    61.             $string .= (($value['mana'] == NULL) or ($value['mana'] == '')) ? '\'Var.\'' : $value['mana'];
    62.             $string .= ',';
    63.             $string .= "\n\t\t".'"premium" => ';
    64.             if($value['prem'])
    65.             {
    66.                 $string .= ($value['prem'] == 1) ? '\'yes\'' : '\'no\'';
    67.             }
    68.             else
    69.             {
    70.                 $string .= '\'no\'';
    71.             }
    72.             $string .= ',';
    73.             $vocs = array();
    74.             $string .= "\n\t\t".'"vocation" => array(';
    75.             foreach($value->vocation as $vocation)
    76.             {
    77.                 if(config('TFSVersion') == 'TFS_02')
    78.                 {
    79.                     $vocs[] = '\''.$vocation[0]['name'].'\'';
    80.                 }
    81.                 elseif(config('TFSVersion') == 'TFS_03')
    82.                 {
    83.                     if(strpos($vocation[0]['id'], ';') !== FALSE)
    84.                     {
    85.                         $array = explode(';', $vocation[0]['id']);
    86.                         foreach($array as $voc)
    87.                         {
    88.                             $vocs[] = '\''.vocation_id_to_name($voc).'\'';
    89.                         }
    90.                     }
    91.                     else
    92.                     {
    93.                         $vocs[] = '\''.vocation_id_to_name((int)$vocation[0]['id']).'\'';
    94.                     }
    95.                 }
    96.             }
    97.             if(count($vocs) < 1) foreach(config('vocations') as $id => $name) if($id > 0) $vocs[] = '\''.$name.'\'';
    98.             $string .= implode(', ',$vocs).')'."\n\t".'),';
    99.         }
    100.     }  
    101.     $string .= "\n".'); ?>';
    102.     echo('Loaded '. $t_count .' spells!<br>');
    103.     echo 'File "spell.php" '.(file_exists('spell.php') ? 'updated' : 'created').'!<br>';
    104.     $file = fopen('spell.php', 'w');
    105.     fwrite($file, $string);
    106.     fclose($file);
    107. }

    admin.php

    Before
    PHP:
    1.  
    2. </ul>
    3.  
    4. <?php include 'layout/overall/footer.php'; ?>
    5.  
    Add
    PHP:
    1.  
    2.     <li>
    3.         <b>Update spells from file:</b><br>
    4.         <?php
    5.             if (!isset($_POST['action']))
    6.             {          
    7.                 $_POST['action'] = 'undefine';
    8.             }
    9.            
    10.             if ($_POST['action'] == 'upload')
    11.             {
    12.                 $xml = $_FILES['file'];
    13.                 $_POST['action'] = 'undefine';
    14.                 if($xml['tmp_name'])
    15.                 {
    16.                     if($xml['name'] == 'spells.xml')
    17.                     {
    18.                         $groups = (isset($_POST['show_groups']) && $_POST['show_groups'] == 'yes') ? true : false;
    19.                         echo 'Successfully fetched spells.xml!<br>';
    20.                         echo 'Using temporal file: '. $_FILES['file']['tmp_name'] .'<br>';
    21.                         build_spells(simplexml_load_file($xml['tmp_name']), $groups);
    22.                     }
    23.                     else
    24.                     {
    25.                         echo '<span style="color:red;font-weight:bold">ERROR: File "spells.xml" not found.</span>';
    26.                     }
    27.                 }
    28.                 else
    29.                 {
    30.                     echo '<span style="color:red;font-weight:bold">ERROR: Upload failed.</span>';
    31.                 }
    32.             }
    33.         ?>
    34.         <form enctype='multipart/form-data' method='POST'>
    35.             <input type='checkbox' name='show_groups' value='yes'> Show spells groups (Only for TFS 0.2.9+)<br>
    36.             <input type='hidden' name='action' value='upload' />
    37.             <input type='file' name='file' />
    38.             <input type='submit' value='Submit' />
    39.         </form>
    40.     </li>
    41.  
    Create spells.php
    PHP:
    1.  
    2.  <?php
    3. require_once 'engine/init.php'; include 'layout/overall/header.php'; echo '<h1>Spells</h1>';
    4. if(file_exists('spell.php')) { require_once 'spell.php'; ?>
    5. <table>
    6.     <tr class="yellow">
    7.         <td><b>Name</b></td>
    8.         <?php if($show_spells_groups) echo '<td><b>Group</b></td>'; ?>
    9.         <td><b>Type</b></td>
    10.         <td><b>Exp Lvl</b></td>
    11.         <td><b>Mana</b></td>
    12.         <td><b>Premium</b></td>
    13.         </span>
    14.     </tr>
    15.  
    16. <?php
    17.     @$sort = $_REQUEST['sort'];
    18.     if(!isset($sort)) $sort = 'name';
    19.    
    20.     @$vocation = $_REQUEST['vocation'];
    21.     if(!isset($vocation)) $vocation = 'vall';
    22.    
    23.     if($show_spells_groups)
    24.     {
    25.         @$group = $_REQUEST['_group'];
    26.         if(!isset($group)) $group = 'gall';
    27.     }
    28.    
    29.     @$type = $_REQUEST['_type'];
    30.     if(!isset($type)) $type = 'tall';
    31.    
    32.     @$premium = $_REQUEST['_premium'];
    33.     if(!isset($premium)) $premium = 'pall';
    34.    
    35.     $order = array();
    36.     foreach($spells as $key => $row)
    37.     {
    38.         $order[$key] = $row[$sort];
    39.     }
    40.     array_multisort($order, SORT_ASC, $spells);
    41.    
    42.     foreach($spells as $spell) {
    43.         if($vocation != 'vall')
    44.         {
    45.             if(!in_array($vocation, $spell['vocation'])) continue;
    46.         }
    47.         if($show_spells_groups && $group != 'gall')
    48.         {
    49.             if($spell['group'] != $group) continue;
    50.         }
    51.         if($type != 'tall')
    52.         {
    53.             if($spell['type'] != $type) continue;
    54.         }
    55.         if($premium != 'pall')
    56.         {
    57.             if($spell['premium'] != $premium) continue;
    58.         }
    59.     ?>
    60.     <tr>
    61.         <td><?php echo '<b>'.$spell['name'].'</b> ('.$spell['words'].')'; ?></td>
    62.         <?php if($show_spells_groups) echo '<td>'.$spell['group'].'</td>'; ?>
    63.         <td><?php echo $spell['type']; ?></td>
    64.         <td><?php echo $spell['level']; ?></td>
    65.         <td><?php echo $spell['mana']; ?></td>
    66.         <td><?php echo $spell['premium']; ?></td>
    67.     </tr>
    68. <?php } echo '</table>'; ?>
    69.  
    70. <form action='spells.php' method='post'>
    71.     <table>
    72.         <tr class="yellow">
    73.             <td colspan=4><b>Spell Search</b></td></tr>
    74.             <tr class="yellow">
    75.                 <?php if($show_spells_groups) {
    76.                 echo'<td width=25%><b>vocation</b></td>
    77.                    <td width=25%><b>group</b></td>
    78.                    <td width=25%><b>type</b></td>
    79.                    <td width=25%><b>premium</b></td>';}
    80.                 else {
    81.                 echo'<td width=40%><b>vocation</b></td>
    82.                    <td width=30%><b>type</b></td>
    83.                    <td width=30%><b>premium</b></td>';}?>
    84.             </tr>
    85.             <tr>
    86.                 <td valign='top'>
    87.                     <input type='radio' name='vocation' value='vall' checked> all<br>
    88.                     <?php
    89.                     foreach(config('vocations') as $id => $vocation)
    90.                     {
    91.                         if($id > 0)
    92.                         {
    93.                             echo "<input type='radio' name='vocation' value='".$vocation."'> ".$vocation."<br>";
    94.                         }
    95.                     }
    96.                     ?>
    97.                 </td>
    98.                 <?php
    99.                 if($show_spells_groups) echo"
    100.                    <td valign='top'>
    101.                        <input type='radio' name='_group' value='gall' checked> all<br>
    102.                        <input type='radio' name='_group' value='Attack'> attack<br>
    103.                        <input type='radio' name='_group' value='Healing'> healing<br>
    104.                        <input type='radio' name='_group' value='Support'> support</td>"; ?>
    105.                 <td valign='top'>
    106.                     <input type='radio' name='_type' value='tall' checked> all<br>
    107.                     <input type='radio' name='_type' value='Instant'> instant<br>
    108.                     <input type='radio' name='_type' value='Rune'> rune
    109.                 </td>
    110.                 <td valign='top'>
    111.                     <input type='radio' name='_premium' value='pall' checked> all<br>
    112.                     <input type='radio' name='_premium' value='no'> no<br>
    113.                     <input type='radio' name='_premium' value='yes'> yes
    114.                 </td>
    115.             </tr>
    116.             <tr>
    117.                 <td>sort by:
    118.                     <select name='sort'>
    119.                         <option value='name' selected>name
    120.                         <option value='words'>words
    121.                         <?php if($show_spells_groups) echo "<option value='group' >group"; ?>
    122.                         <option value='type' >type
    123.                         <option value='level' >exp lvl
    124.                         <option value='mana' >mana
    125.                         <option value='premium' >premium
    126.                     </select>
    127.                 </td>
    128.                 <td colspan='3'>
    129.                     <input type='submit' name='submit'>
    130.                 </td>
    131.             </tr>
    132.     </table>
    133. </form>
    134. <?php } else { echo 'This page has not been configured yet.'; };
    135. include 'layout/overall/footer.php'; ?>
    136.  

    Add page link to your layout

    default layout: /layout/menu.php
    Add page list:
    PHP:
    1. <li><a href="spells.php">Spells</a></li>
    I cannot ensure if it will work with all TFS distros, but I'll try to do it if you request it here.
    Remember you can edit your generated spell.php file, mostly needed if you use custom spells.
    If you see any bug don't forget to report it here, and if you know how to improve the code I'd be grateful with it.
     
    Limos, Peonso, Swiff and 4 others like this.
  2. Dalt0n

    Dalt0n Hiho:)

    Joined:
    Dec 14, 2011
    Messages:
    536
    Likes Received:
    29
    Best Answers:
    0
    Excellent cbrm,
    Awesome, thanks :D!
     
  3. Impacto Certero

    Impacto Certero New Member

    Joined:
    Jul 7, 2011
    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    hey pal I have this problem, can you help me ? :(
     
  4. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Ask in the correct thread
     
  5. killing

    killing Member

    Joined:
    Feb 23, 2012
    Messages:
    817
    Likes Received:
    7
    Best Answers:
    0
    WOW cool ty
     
  6. Diath

    Diath DIATH

    Joined:
    Jun 4, 2010
    Messages:
    1,970
    Likes Received:
    110
    Best Answers:
    0
    a) You first include then require config.php in two places.
    b) Optional error message in case fopen() fails would be nice.
     
  7. Impacto Certero

    Impacto Certero New Member

    Joined:
    Jul 7, 2011
    Messages:
    11
    Likes Received:
    1
    Best Answers:
    0
    how should i configure spells site? im sorry, i am just learning :rolleyes:

    - - - Updated - - -


    i am talking about this
     
  8. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    admin panel -> Update spells from file -> search your spells.xml -> submit

    - - - Updated - - -

    Yep :p I now use smth Znote left to load values from config.php
    Dunno about fopen, if file doesn't exist it creates it anyways. I added some message about if spell.php is created or updated.

    v1 - Added promoted vocations to search query .-Removed unnecessary stuff from main function
    [​IMG]
     
    Last edited: Oct 13, 2012
  9. Amped RPG

    Amped RPG New Member

    Joined:
    Aug 24, 2012
    Messages:
    163
    Likes Received:
    3
    Best Answers:
    0
    [​IMG]

    o_O what happened?

    Spells.xml
    Code (Lua):
    1.  
    2. <?xml version="1.0" encoding="UTF-8"?>
    3. <spells>
    4.     <!-- Attack Runes -->
    5.     <rune name="Poison Field" id="2285" allowfaruse="1" charges="3" lvl="14" maglv="0" exhaustion="2000" blocktype="solid" event="script" value="attack/poison field.lua"/>
    6.     <rune name="Poison Bomb" id="2286" allowfaruse="1" charges="2" lvl="25" maglv="4" exhaustion="2000" blocktype="solid" event="script" value="attack/poison bomb.lua"/>
    7.     <rune name="Poison Wall" id="2289" allowfaruse="1" charges="4" lvl="29" maglv="5" exhaustion="2000" blocktype="solid" event="script" value="attack/poison wall.lua"/>
    8.     <rune name="Fire Field" id="2301" allowfaruse="1" charges="3" lvl="15" maglv="1" exhaustion="2000" blocktype="solid" event="script" value="attack/fire field.lua"/>
    9.     <rune name="Firebomb" id="2305" allowfaruse="1" charges="2" lvl="27" maglv="5" exhaustion="2000" blocktype="solid" event="script" value="attack/fire bomb.lua"/>
    10.     <rune name="Fire Wall" id="2303" allowfaruse="1" charges="4" lvl="33" maglv="6" exhaustion="2000" blocktype="solid" event="script" value="attack/fire wall.lua"/>
    11.     <rune name="Soulfire" id="2308" allowfaruse="1" charges="3" lvl="27" maglv="7" exhaustion="2000" needtarget="1" blocktype="solid" event="function" value="soulfire"/>
    12.     <rune name="Fireball" id="2302" allowfaruse="1" charges="5" lvl="27" maglv="4" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/fireball.lua"/>
    13.     <rune name="Great Fireball" id="2304" allowfaruse="1" charges="4" lvl="30" maglv="4" exhaustion="2000" blocktype="solid" event="script" value="attack/great fireball.lua"/>
    14.     <rune name="Energy Field" id="2277" allowfaruse="1" charges="3" lvl="18" maglv="3" exhaustion="2000" blocktype="solid" event="script" value="attack/energy field.lua"/>
    15.     <rune name="Energybomb" id="2262" allowfaruse="1" charges="2" lvl="37" maglv="10" exhaustion="2000" blocktype="solid" event="script" value="attack/energy bomb.lua"/>
    16.     <rune name="Energy Wall" id="2279" allowfaruse="1" charges="4" lvl="41" maglv="9" exhaustion="2000" blocktype="solid" event="script" value="attack/energy wall.lua"/>
    17.     <rune name="Light Magic Missile" id="2287" allowfaruse="1" charges="10" lvl="15" exhaustion="2000" maglv="0" needtarget="1" blocktype="solid" event="script" value="attack/light magic missile.lua"/>
    18.     <rune name="Heavy Magic Missile" id="2311" allowfaruse="1" charges="10" lvl="25" exhaustion="2000" maglv="3" needtarget="1" blocktype="solid" event="script" value="attack/heavy magic missile.lua"/>
    19.     <rune name="Explosion" id="2313" allowfaruse="1" charges="6" lvl="31" maglv="6" exhaustion="2000" blocktype="solid" event="script" value="attack/explosion.lua"/>
    20.     <rune name="Sudden Death" id="2268" allowfaruse="1" charges="3" lvl="45" maglv="15" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/sudden death.lua"/>
    21.     <rune name="Icicle" id="2271" allowfaruse="1" charges="5" lvl="28" maglv="4" exhaustion="2000" needtarget="1" event="script" value="attack/icicle.lua"/>
    22.     <rune name="Avalanche" id="2274" allowfaruse="1" charges="4" lvl="30" maglv="4" exhaustion="2000" event="script" value="attack/avalanche.lua"/>
    23.     <rune name="Stone Shower" id="2288" allowfaruse="1" charges="4" lvl="28" maglv="4" exhaustion="2000" event="script" value="attack/stone shower.lua"/>
    24.     <rune name="Thunderstorm" id="2315" allowfaruse="1" charges="4" lvl="28" maglv="4" exhaustion="2000" event="script" value="attack/thunderstorm.lua"/>
    25.     <rune name="Stalagmite" id="2292" allowfaruse="1" charges="10" lvl="24" maglv="3" exhaustion="2000" needtarget="1" event="script" value="attack/stalagmite.lua"/>
    26.     <rune name="Holy Missile" id="2295" allowfaruse="1" charges="5" lvl="27" maglv="4" exhaustion="2000" needtarget="1" blocktype="solid" event="script" value="attack/holy missile.lua">
    27.         <vocation id="3"/>
    28.         <vocation id="7" showInDescription="0"/>
    29.     </rune>
    30.  
    31.     <!-- Healing Runes -->
    32.     <rune name="Antidote Rune" id="2266" allowfaruse="1" charges="1" lvl="15" maglv="0" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/antidote rune.lua"/>
    33.     <rune name="Intense Healing Rune" id="2265" allowfaruse="1" charges="1" lvl="15" maglv="1" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/intense healing rune.lua"/>
    34.     <rune name="Ultimate Healing Rune" id="2273" allowfaruse="1" charges="1" lvl="24" maglv="4" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/ultimate healing rune.lua"/>
    35.  
    36.     <!-- Summon Runes -->
    37.     <rune name="Animate Dead" id="2316" allowfaruse="1" charges="1" lvl="27" maglv="4" exhaustion="2000" blocktype="solid" event="script" value="summon/animate dead rune.lua"/>
    38.  
    39.     <!-- Support Runes -->
    40.     <rune name="Chameleon" id="2291" allowfaruse="1" charges="1" lvl="27" maglv="4" exhaustion="1000" aggressive="0" selftarget="1" blocktype="solid" event="function" value="chameleon"/>
    41.     <rune name="Desintegrate" id="2310" allowfaruse="0" charges="3" lvl="21" maglv="4" exhaustion="2000" range="1" event="script" value="support/desintegrate rune.lua"/>
    42.     <rune name="Destroy Field" id="2261" allowfaruse="1" charges="3" lvl="17" maglv="3" exhaustion="1000" aggressive="0" range="5" event="script" value="support/destroy field rune.lua"/>
    43.     <rune name="Magic Wall" id="2293" allowfaruse="1" charges="3" lvl="32" maglv="9" exhaustion="2000" blocktype="all" event="script" value="support/magic wall rune.lua"/>
    44.     <rune name="Wild Growth" id="2269" allowfaruse="1" charges="2" lvl="27" maglv="8" exhaustion="2000" blocktype="all" event="script" value="support/wild growth rune.lua">
    45.         <vocation id="2"/>
    46.         <vocation id="6" showInDescription="0"/>
    47.     </rune>
    48.     <rune name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
    49.         <vocation id="2"/>
    50.         <vocation id="6" showInDescription="0"/>
    51.     </rune>
    52.  
    53.     <!-- Attack Spells -->
    54.     <instant name="Death Strike" words="exori mort" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/death strike.lua">
    55.         <vocation id="1;5"/>
    56.         <vocation id="2;6"/>
    57.     </instant>
    58.     <instant name="Flame Strike" words="exori flam" lvl="12" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/flame strike.lua">
    59.         <vocation id="1;5"/>
    60.         <vocation id="2;6"/>
    61.     </instant>
    62.     <instant name="Energy Strike" words="exori vis" lvl="12" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/energy strike.lua">
    63.         <vocation id="1;5"/>
    64.         <vocation id="2;6"/>
    65.     </instant>
    66.     <instant name="Whirlwind Throw" words="exori hur" lvl="15" mana="40" prem="1" range="5" needtarget="1" blockwalls="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/whirlwind throw.lua">
    67.         <vocation id="4;8"/>
    68.     </instant>
    69.     <instant name="Fire Wave" words="exevo flam hur" lvl="18" mana="25" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/fire wave.lua">
    70.         <vocation id="1;5"/>
    71.     </instant>
    72.     <instant name="Ethereal Spear" words="exori con" lvl="23" mana="25" prem="1" range="5" needtarget="1" exhaustion="2000" blockwalls="1" needlearn="0" event="script" value="attack/ethereal spear.lua">
    73.         <vocation id="3;7"/>
    74.     </instant>
    75.     <instant name="Energy Beam" words="exevo vis lux" lvl="23" mana="40" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/energy beam.lua">
    76.         <vocation id="1;5"/>
    77.     </instant>
    78.     <instant name="Great Energy Beam" words="exevo gran vis lux" lvl="29" mana="110" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/great energy beam.lua">
    79.         <vocation id="1;5"/>
    80.     </instant>
    81.     <instant name="Groundshaker" words="exori mas" lvl="33" mana="160" prem="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/groundshaker.lua">
    82.         <vocation id="4;8"/>
    83.     </instant>
    84.     <instant name="Berserk" words="exori" lvl="35" mana="115" prem="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/berserk.lua">
    85.         <vocation id="4;8"/>
    86.     </instant>
    87.     <instant name="Energy Wave" words="exevo vis hur" lvl="38" mana="170" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/energy wave.lua">
    88.         <vocation id="1;5"/>
    89.     </instant>
    90.     <instant name="Rage of the Skies" words="exevo gran mas vis" lvl="55" mana="650" selftarget="1" prem="1" exhaustion="2000" needlearn="0" event="script" value="attack/rage of the skies.lua">
    91.         <vocation id="1;5"/>
    92.     </instant>
    93.     <instant name="Fierce Berserk" words="exori gran" lvl="70" mana="340" prem="1" needweapon="1" exhaustion="2000" needlearn="0" event="script" value="attack/fierce berserk.lua">
    94.         <vocation id="4;8"/>
    95.     </instant>
    96.         <instant name="Hells Core" words="exevo gran mas flam" lvl="60" mana="1200" prem="1" exhaustion="2000" selftarget="1" needlearn="0" event="script" value="attack/hells core.lua">
    97.         <vocation id="1;5"/>
    98.     </instant>
    99.     <instant name="Divine Missile" words="exori san" lvl="40" mana="20" prem="1" range="4" casterTargetOrDirection="1" needlearn="0" blockwalls="1" exhaustion="2000" event="script" value="attack/divine missile.lua">
    100.         <vocation id="3;7"/>
    101.     </instant>
    102.     <instant name="Divine Caldera" words="exevo mas san" lvl="50" mana="160" prem="1" selftarget="1" exhaustion="2000" needlearn="0" event="script" value="attack/divine caldera.lua">
    103.         <vocation id="3;7"/>
    104.     </instant>
    105.     <instant name="Eternal Winter" words="exevo gran mas frigo" lvl="60" mana="1200" prem="1" selftarget="1" exhaustion="2000" needlearn="0" event="script" value="attack/eternal winter.lua">
    106.         <vocation id="2;6"/>
    107.     </instant>
    108.     <instant name="Ice Strike" words="exori frigo" lvl="15" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/ice strike.lua">
    109.         <vocation id="1;5"/>
    110.         <vocation id="2;6"/>
    111.     </instant>
    112.     <instant name="Ice Wave" words="exevo frigo hur" lvl="18" mana="25" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/ice wave.lua">
    113.         <vocation id="2;6"/>
    114.     </instant>
    115.     <instant name="Terra Strike" words="exori tera" lvl="13" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/terra strike.lua">
    116.         <vocation id="1;5"/>
    117.         <vocation id="2;6"/>
    118.     </instant>
    119.     <instant name="Terra Wave" words="exevo tera hur" lvl="38" mana="210" direction="1" exhaustion="2000" needlearn="0" event="script" value="attack/terra wave.lua">
    120.         <vocation id="2;6"/>
    121.     </instant>
    122.     <instant name="Wrath of Nature" words="exevo gran mas tera" lvl="55" mana="770" prem="1" selftarget="1" exhaustion="2000" needlearn="0" event="script" value="attack/wrath of nature.lua">
    123.         <vocation id="2;6"/>
    124.     </instant>
    125.  
    126.     <!-- Healing Spells -->
    127.     <instant name="Light Healing" words="exura" lvl="9" mana="20" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="healing/light healing.lua"/>
    128.     <instant name="Antidote" words="exana pox" lvl="10" mana="30" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="healing/antidote.lua"/>
    129.     <instant name="Intense Healing" words="exura gran" lvl="11" mana="70" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="healing/intense healing.lua">
    130.         <vocation id="1;5"/>
    131.         <vocation id="2;6"/>
    132.         <vocation id="3;7"/>
    133.     </instant>
    134.     <instant name="Heal Friend" words="exura sio" lvl="18" mana="140" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="2000" needlearn="0" event="script" value="healing/heal friend.lua">
    135.         <vocation id="2;6"/>
    136.     </instant>
    137.     <instant name="Ultimate Healing" words="exura vita" lvl="20" mana="160" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="healing/ultimate healing.lua">
    138.         <vocation id="1;5"/>
    139.         <vocation id="2;6"/>
    140.         <vocation id="3;7"/>
    141.     </instant>
    142.     <instant name="Mass Healing" words="exura gran mas res" lvl="36" mana="150" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="healing/mass healing.lua">
    143.         <vocation id="2;6"/>
    144.     </instant>
    145.     <instant name="Divine Healing" words="exura san" lvl="35" mana="210" prem="1" selftarget="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="healing/divine healing.lua">
    146.         <vocation id="3;7"/>
    147.     </instant>
    148.     <instant name="Wound Cleansing" words="exana mort" lvl="30" mana="65" prem="1" selftarget="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="healing/wound cleasing.lua">
    149.         <vocation id="4;8"/>
    150.     </instant>
    151.  
    152.     <!-- Support Spells -->
    153.     <instant name="Light" words="utevo lux" lvl="8" mana="20" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/light.lua"/>
    154.     <instant name="Find Person" words="exiva" lvl="8" mana="20" aggressive="0" params="1" exhaustion="1000" needlearn="0" event="function" value="searchPlayer"/>
    155.     <instant name="Magic Rope" words="exani tera" lvl="9" mana="20" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/magic rope.lua"/>
    156.     <instant name="Levitate" words="exani hur" lvl="12" mana="50" prem="1" aggressive="0" exhaustion="1000" params="1" needlearn="0" event="function" value="Levitate"/>
    157.     <instant name="Great Light" words="utevo gran lux" lvl="13" mana="60" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/great light.lua"/>
    158.     <instant name="Magic Shield" words="utamo vita" lvl="14" mana="50" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/magic shield.lua">
    159.         <vocation id="1;5"/>
    160.         <vocation id="2;6"/>
    161.         <vocation id="3;7"/>
    162.     </instant>
    163.     <instant name="Haste" words="utani hur" lvl="14" mana="60" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/haste.lua"/>
    164.     <instant name="Charge" words="utani tempo hur" lvl="25" mana="100" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/charge.lua">
    165.         <vocation id="4;8"/>
    166.     </instant>
    167.     <instant name="Swift Foot" words="utamo tempo san" lvl="55" mana="400" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/swift foot.lua">
    168.         <vocation id="3;7"/>
    169.     </instant>
    170.     <instant name="Challenge" words="exeta res" lvl="20" mana="30" prem="1" aggressive="0" exhaustion="1000" needlearn="0" event="script" value="support/challenge.lua">
    171.         <vocation id="8"/>
    172.     </instant>
    173.     <instant name="Strong Haste" words="utani gran hur" lvl="20" mana="100" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/strong haste.lua">
    174.         <vocation id="1;5"/>
    175.         <vocation id="2;6"/>
    176.     </instant>
    177.     <instant name="Creature Illusion" words="utevo res ina" lvl="23" mana="100" aggressive="0" params="1" exhaustion="1000" needlearn="0" event="function" value="Illusion">
    178.         <vocation id="1;5"/>
    179.         <vocation id="2;6"/>
    180.     </instant>
    181.     <instant name="Ultimate Light" words="utevo vis lux" lvl="26" mana="140" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/ultimate light.lua">
    182.         <vocation id="1;5"/>
    183.         <vocation id="2;6"/>
    184.     </instant>
    185.     <instant name="Cancel Invisibility" words="exana ina" lvl="26" mana="200" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/cancel invisibility.lua">
    186.         <vocation id="1;5"/>
    187.     </instant>
    188.     <instant name="Invisibility" words="utana vid" lvl="35" mana="440" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/invisible.lua">
    189.         <vocation id="1;5"/>
    190.         <vocation id="2;6"/>
    191.         <vocation id="3;7"/>
    192.     </instant>
    193.     <instant name="Sharpshooter" words="utito tempo san" lvl="60" mana="450" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/sharpshooter.lua">
    194.         <vocation id="3;7"/>
    195.     </instant>
    196.     <instant name="Protector" words="utamo tempo" lvl="55" mana="200" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/protector.lua">
    197.         <vocation id="4;8"/>
    198.     </instant>
    199.     <instant name="Blood Rage" words="utito tempo" lvl="60" mana="290" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/blood rage.lua">
    200.         <vocation id="4;8"/>
    201.     </instant>
    202.  
    203.     <!-- Party Spells -->
    204.     <instant name="Train Party" words="utito mas sio" lvl="32" mana="60" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="party/train.lua">
    205.         <vocation id="8"/>
    206.     </instant>
    207.     <instant name="Protect Party" words="utamo mas sio" lvl="32" mana="90" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="party/protect.lua">
    208.         <vocation id="7"/>
    209.     </instant>
    210.     <instant name="Heal Party" words="utura mas sio" lvl="32" mana="120" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="party/heal.lua">
    211.         <vocation id="6"/>
    212.     </instant>
    213.     <instant name="Enchant Party" words="utori mas sio" lvl="32" mana="120" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="party/enchant.lua">
    214.         <vocation id="5"/>
    215.     </instant>
    216.  
    217.     <!-- Summon Spells -->
    218.     <instant name="Summon Creature" words="utevo res" lvl="25" params="1" exhaustion="2000" needlearn="0" event="function" value="summonMonster">
    219.         <vocation id="1;5"/>
    220.         <vocation id="2;6"/>
    221.     </instant>
    222.     <instant name="Undead Legion" words="exana mas mort" lvl="30" mana="500" prem="1" exhaustion="2000" needlearn="0" event="script" value="summon/undead legion.lua">
    223.         <vocation id="2;6"/>
    224.     </instant>
    225.  
    226.     <!-- Conjure Spells -->
    227.     <conjure name="Conjure Arrow" words="exevo con" lvl="13" mana="100" soul="1" conjureId="2544" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    228.         <vocation id="3;7"/>
    229.     </conjure>
    230.     <conjure name="Poisoned Arrow" words="exevo con pox" lvl="16" mana="130" soul="2" conjureId="2545" conjureCount="7" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    231.         <vocation id="3;7"/>
    232.     </conjure>
    233.     <conjure name="Conjure Bolt" words="exevo con mort" lvl="17" mana="140" soul="2" prem="1" conjureId="2543" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    234.         <vocation id="3;7"/>
    235.     </conjure>
    236.     <conjure name="Conjure Sniper Arrow" words="exevo con hur" lvl="24" mana="160" soul="3" prem="1" conjureId="7364" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    237.         <vocation id="3;7"/>
    238.     </conjure>
    239.     <conjure name="Explosive Arrow" words="exevo con flam" lvl="25" mana="290" soul="3" conjureId="2546" conjureCount="8" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    240.         <vocation id="3;7"/>
    241.     </conjure>
    242.     <conjure name="Conjure Piercing Bolt" words="exevo con grav" lvl="33" mana="180" soul="3" prem="1" conjureId="7363" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    243.         <vocation id="3;7"/>
    244.     </conjure>
    245.     <conjure name="Enchant Staff" words="exeta vis" lvl="41" mana="80" prem="1" conjureId="2433" reagentId="2401" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    246.         <vocation id="5"/>
    247.     </conjure>
    248.     <conjure name="Enchant Spear" words="exeta con" lvl="45" mana="350" soul="3" prem="1" conjureId="7367" reagentId="2389" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    249.         <vocation id="3;7"/>
    250.     </conjure>
    251.     <conjure name="Power Bolt" words="exevo con vis" lvl="59" mana="800" soul="4" prem="1" conjureId="2547" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
    252.         <vocation id="7"/>
    253.     </conjure>
    254.     <conjure name="Poison Field" words="adevo grav pox" lvl="14" mana="200" soul="1" reagentId="2260" conjureId="2285" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    255.         <vocation id="1;5"/>
    256.         <vocation id="2;6"/>
    257.         <vocation id="3;7"/>
    258.     </conjure>
    259.     <conjure name="Light Magic Missile" words="adori min vis" lvl="15" mana="120" soul="1" reagentId="2260" conjureId="2287" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    260.         <vocation id="1;5"/>
    261.         <vocation id="2;6"/>
    262.         <vocation id="3;7"/>
    263.     </conjure>
    264.     <conjure name="Fire Field" words="adevo grav flam" lvl="15" mana="240" soul="1" reagentId="2260" conjureId="2301" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    265.         <vocation id="1;5"/>
    266.         <vocation id="2;6"/>
    267.         <vocation id="3;7"/>
    268.     </conjure>
    269.     <conjure name="Fireball" words="adori flam" lvl="27" mana="460" soul="3" prem="1" reagentId="2260" conjureId="2302" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    270.         <vocation id="1;5"/>
    271.     </conjure>
    272.     <conjure name="Energy Field" words="adevo grav vis" lvl="18" mana="320" soul="2" reagentId="2260" conjureId="2277" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    273.         <vocation id="1;5"/>
    274.         <vocation id="2;6"/>
    275.     </conjure>
    276.     <conjure name="Stalagmite" words="adori tera" lvl="24" mana="400" soul="2" prem="2" reagentId="2260" conjureId="2292" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    277.         <vocation id="1;5"/>
    278.         <vocation id="2;6"/>
    279.     </conjure>
    280.     <conjure name="Great Fireball" words="adori mas flam" lvl="30" mana="530" soul="3" reagentId="2260" conjureId="2304" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    281.         <vocation id="1;5"/>
    282.     </conjure>
    283.     <conjure name="Heavy Magic Missile" words="adori vis" lvl="25" mana="350" soul="2" reagentId="2260" conjureId="2311" conjureCount="10" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    284.         <vocation id="1;5"/>
    285.         <vocation id="2;6"/>
    286.     </conjure>
    287.     <conjure name="Poison Bomb" words="adevo mas pox" lvl="25" mana="520" soul="2" prem="1" reagentId="2260" conjureId="2286" conjureCount="2" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    288.         <vocation id="2;6"/>
    289.     </conjure>
    290.     <conjure name="Firebomb" words="adevo mas flam" lvl="27" mana="600" soul="4" reagentId="2260" conjureId="2305" conjureCount="2" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    291.         <vocation id="1;5"/>
    292.         <vocation id="2;6"/>
    293.     </conjure>
    294.     <conjure name="Soulfire" words="adevo res flam" lvl="27" mana="600" soul="3" prem="1" reagentId="2260" conjureId="2308" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    295.         <vocation id="1;5"/>
    296.         <vocation id="2;6"/>
    297.     </conjure>
    298.     <conjure name="Poison Wall" words="adevo mas grav pox" lvl="29" mana="640" soul="3" reagentId="2260" conjureId="2289" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    299.         <vocation id="1;5"/>
    300.         <vocation id="2;6"/>
    301.     </conjure>
    302.     <conjure name="Explosion" words="adevo mas hur" lvl="31" mana="570" soul="4" reagentId="2260" conjureId="2313" conjureCount="6" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    303.         <vocation id="1;5"/>
    304.         <vocation id="2;6"/>
    305.     </conjure>
    306.     <conjure name="Fire Wall" words="adevo mas grav flam" lvl="33" mana="780" soul="4" reagentId="2260" conjureId="2303" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    307.         <vocation id="1;5"/>
    308.         <vocation id="2;6"/>
    309.     </conjure>
    310.     <conjure name="Energybomb" words="adevo mas vis" lvl="37" mana="880" soul="5" prem="1" reagentId="2260" conjureId="2262" conjureCount="2" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    311.         <vocation id="1;5"/>
    312.     </conjure>
    313.     <conjure name="Energy Wall" words="adevo mas grav vis" lvl="41" mana="1000" soul="5" reagentId="2260" conjureId="2279" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    314.         <vocation id="1;5"/>
    315.         <vocation id="2;6"/>
    316.     </conjure>
    317.     <conjure name="Sudden Death" words="adori gran mort" lvl="45" mana="985" soul="5" reagentId="2260" conjureId="2268" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    318.         <vocation id="1;5"/>
    319.     </conjure>
    320.     <conjure name="Antidote Rune" words="adana pox" lvl="15" mana="200" soul="1" reagentId="2260" conjureId="2266" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    321.         <vocation id="2;6"/>
    322.     </conjure>
    323.     <conjure name="Intense Healing Rune" words="adura gran" lvl="15" mana="240" soul="2" reagentId="2260" conjureId="2265" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    324.         <vocation id="2;6"/>
    325.     </conjure>
    326.     <conjure name="Ultimate Healing Rune" words="adura vita" lvl="24" mana="400" soul="3" reagentId="2260" conjureId="2273" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    327.         <vocation id="2;6"/>
    328.     </conjure>
    329.     <conjure name="Convince Creature" words="adeta sio" lvl="16" mana="200" soul="3" reagentId="2260" conjureId="2290" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    330.         <vocation id="2;6"/>
    331.     </conjure>
    332.     <conjure name="Animate Dead" words="adana mort" lvl="27" mana="600" soul="5" prem="1" reagentId="2260" conjureId="2316" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    333.         <vocation id="1;5"/>
    334.         <vocation id="2;6"/>
    335.     </conjure>
    336.     <conjure name="Chameleon" words="adevo ina" lvl="27" mana="600" soul="2" reagentId="2260" conjureId="2291" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    337.         <vocation id="2;6"/>
    338.     </conjure>
    339.     <conjure name="Destroy Field" words="adito grav" lvl="17" mana="120" soul="2" reagentId="2260" conjureId="2261" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    340.         <vocation id="1;5"/>
    341.         <vocation id="2;6"/>
    342.         <vocation id="3;7"/>
    343.     </conjure>
    344.     <conjure name="Desintegrate" words="adito tera" lvl="21" mana="200" soul="3" prem="1" reagentId="2260" conjureId="2310" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    345.         <vocation id="1;5"/>
    346.         <vocation id="2;6"/>
    347.         <vocation id="3;7"/>
    348.     </conjure>
    349.     <conjure name="Magic Wall" words="adevo grav tera" lvl="32" mana="750" soul="5" prem="1" reagentId="2260" conjureId="2293" conjureCount="3" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    350.         <vocation id="1;5"/>
    351.     </conjure>
    352.     <conjure name="Wild Growth" words="adevo grav vita" lvl="27" mana="600" soul="5" prem="1" reagentId="2260" conjureId="2269" conjureCount="2" needlearn="0" event="function" value="conjureRune">
    353.         <vocation id="2;6"/>
    354.     </conjure>
    355.     <conjure name="Paralyze" words="adana ani" lvl="54" mana="1400" soul="3" prem="1" reagentId="2260" conjureId="2278" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    356.         <vocation id="2;6"/>
    357.     </conjure>
    358.     <conjure name="Icicle" words="adori frigo" lvl="28" mana="460" soul="3" prem="1" reagentId="2260" conjureId="2271" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    359.         <vocation id="2;6"/>
    360.     </conjure>
    361.     <conjure name="Avalanche" words="adori mas frigo" lvl="30" mana="530" soul="3" reagentId="2260" conjureId="2274" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    362.         <vocation id="2;6"/>
    363.     </conjure>
    364.     <conjure name="Stone Shower" words="adori mas tera" lvl="28" mana="430" soul="3" prem="1" reagentId="2260" conjureId="2288" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    365.         <vocation id="2;6"/>
    366.     </conjure>
    367.     <conjure name="Thunderstorm" words="adori mas vis" lvl="28" mana="430" soul="3" prem="1" reagentId="2260" conjureId="2315" conjureCount="4" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    368.         <vocation id="1;5"/>
    369.     </conjure>
    370.     <conjure name="Holy Missile" words="adori san" lvl="27" mana="350" soul="3" prem="1" reagentId="2260" conjureId="2295" conjureCount="5" exhaustion="1000" needlearn="0" event="function" value="conjureRune">
    371.         <vocation id="3;7"/>
    372.     </conjure>
    373.    
    374.     <instant name="Mana Waste" words="manawaste" lvl="1" mana="0" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="manawaste.lua"/>
    375. </spells>
    376.  
    377.  
     
  10. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Yes, I had put 2 php tags inappropriately in spells.php which now is fixed in v2.
    Any spell that doesn't specify vocation requirement in spells.xml then will show that all vocations can use it(except voc id 0)
    Also I hadn't noticed the semicolon-divided vocations in the XML.

    Then now this script supports all these vocations formats:
    tfs 0.2
    Code (XML):
    1.  
    2.         <vocation name="Sorcerer"/>
    3.         <vocation name="Druid"/>
    4.         <vocation name="Master Sorcerer"/>
    5.         <vocation name="Elder Druid"/>
    6.  
    tfs 0.3
    Code (XML):
    1.  
    2.         <vocation id="1"/>
    3.         <vocation id="2"/>
    4.         <vocation id="5"/>
    5.         <vocation id="6"/>
    6.  
    Code (XML):
    1.  
    2.         <vocation id="1;5"/>
    3.         <vocation id="2;6"/>
    4.  
    I don't remember if there are other ways to divide vocations in spells.xml, anyways post it here to submit a new update for the script
     
  11. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Bump :)
     
  12. Znote

    Znote <?php echo $title; ?> Staff Member Global Moderator Premium User

    Joined:
    Feb 14, 2008
    Messages:
    6,361
    Likes Received:
    1,058
    Best Answers:
    148
    Looks sweet. :)
     
  13. Diath

    Diath DIATH

    Joined:
    Jun 4, 2010
    Messages:
    1,970
    Likes Received:
    110
    Best Answers:
    0
    I'm not sure but now that I think of it, couldn't it have been done using serialize instead of this dump work-around? :p
    PHP: serialize - Manual
     
  14. Esparda

    Esparda Member

    Joined:
    Jun 9, 2008
    Messages:
    188
    Likes Received:
    9
    Best Answers:
    0
    whe you search any spell show the same spells dont matter the kind of search
     
  15. kito2

    kito2 https://mtibia.online

    Joined:
    Mar 9, 2009
    Messages:
    3,582
    Likes Received:
    174
    Best Answers:
    1
    Not working.
     
  16. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Which server distro. ?

    gonna try json_encode since is faster and smaller than serialize, still it'd be stored in one file, I'm trying to avoid contact with db
     
    Last edited: Mar 9, 2013
  17. kito2

    kito2 https://mtibia.online

    Joined:
    Mar 9, 2009
    Messages:
    3,582
    Likes Received:
    174
    Best Answers:
    1
    Linux tfs 0.4
     
  18. kito2

    kito2 https://mtibia.online

    Joined:
    Mar 9, 2009
    Messages:
    3,582
    Likes Received:
    174
    Best Answers:
    1
    It says:
    Code (Text):
    1. Update spells from file:Successfully fetched spells.xml!
    2. Using temporal file: /tmp/phpxeIGWz
    3. Loaded 93 spells!
    4. File "spell.php" created!
    5.  Show spells groups (Only for TFS 0.2.9+)
    But it doesn't create the file spell.php :S
     
  19. 53701688

    53701688 Oldschooler

    Joined:
    Dec 14, 2008
    Messages:
    964
    Likes Received:
    209
    Best Answers:
    0
    by me it says loaded 0 spells... im using tfs 0.4
     
  20. Clorens

    Clorens Member

    Joined:
    Oct 5, 2011
    Messages:
    90
    Likes Received:
    0
    Best Answers:
    0
    I'm using tfs 0.4.0 and I just did everything you told me to, but for some reason not a single spell is loaded..
     

Share This Page

Loading...