• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Only 1 problem (geisor) (rly need help!)

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
This is my problem when i try to load vocations on geisor this come :
:wub::wub::wub::wub::wub::wub:
Can't load vocations from: C:/Mystic Spirit/

And

Warning: DOMDocument::load(C:/Mystic Spirit/) [domdocument.load]: failed to open stream: No such file or directory in C:\xampp\htdocs\pot\OTS_VocationsList.php on line 43

Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "file:///C:/Mystic%20Spirit/" in C:\xampp\htdocs\pot\OTS_VocationsList.php on line 43

so plzz help :) i give rep*



I Use All geisor , i use some file from old and some for the new so i use all ..
and TFS i use
http://otland.net/f18/8-42-forgotten-server-v0-2-1-mystic-spirit-31253/
all in geisor work 100% but not that problem its the only problem ! :(


OTS_VocationsList.php
Code:
<?php

/**#@+
 * @version 0.1.0
 * @since 0.1.0
 */

/**
 * @package POT
 * @version 0.1.3
 * @author Wrzasq <[email protected]>
 * @copyright 2007 - 2008 (C) by Wrzasq
 * @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public License, Version 3
 */

/**
 * Wrapper for vocations.xml file.
 * 
 * @package POT
 * @version 0.1.3
 * @example examples/vocations.php vocations.php
 * @tutorial POT/data_directory.pkg#vocations
 */
class OTS_VocationsList implements IteratorAggregate, Countable, ArrayAccess
{
/**
 * List of vocations.
 * 
 * @var array
 */
    private $vocations = array();

/**
 * Loads vocations list from given file.
 * 
 * @param string $file vocations.xml file location.
 * @throws DOMException On DOM operation error.
 */
    public function __construct($file)
    {
        // loads DOM document
        $vocations = new DOMDocument();
        $vocations->load($file);

        // loads vocations
        foreach( $vocations->getElementsByTagName('vocation') as $vocation)
        {
            $this->vocations[ (int) $vocation->getAttribute('id') ] = $vocation->getAttribute('name');
        }
    }

/**
 * Magic PHP5 method.
 * 
 * <p>
 * Allows object importing from {@link http://www.php.net/manual/en/function.var-export.php var_export()}.
 * </p>
 * 
 * @param array $properties List of object properties.
 * @throws DOMException On DOM operation error.
 */
    public function __set_state($properties)
    {
        $object = new self();

        // loads properties
        foreach($properties as $name => $value)
        {
            $object->$name = $value;
        }

        return $object;
    }

/**
 * Checks if given vocation ID exists on list.
 * 
 * @version 0.1.3
 * @since 0.1.3
 * @param int $id ID.
 * @return bool If vocation is set then true.
 */
    public function hasVocationId($id)
    {
        return isset($this->vocations[$id]);
    }

/**
 * Returns vocation's ID.
 * 
 * @version 0.1.3
 * @param string $name Vocation.
 * @return int ID.
 * @throws OutOfBoundsException If not found.
 */
    public function getVocationId($name)
    {
        $id = array_search($name, $this->vocations);

        // checks if vocation was found
        if($id === false)
        {
            throw new OutOfBoundsException();
        }

        return $id;
    }

/**
 * Checks if given vocation name exists on list.
 * 
 * @version 0.1.3
 * @since 0.1.3
 * @param string $name Vocation.
 * @return bool If vocation is set then true.
 */
    public function hasVocationName($name)
    {
        return array_search($name, $this->vocations) !== false;
    }

/**
 * Returns name of given vocation's ID.
 * 
 * @version 0.1.3
 * @param int $id Vocation ID.
 * @return string Name.
 * @throws OutOfBoundsException If not found.
 */
    public function getVocationName($id)
    {
        if( isset($this->vocations[$id]) )
        {
            return $this->vocations[$id];
        }

        throw new OutOfBoundsException();
    }

/**
 * Returns amount of vocations loaded.
 * 
 * @return int Count of vocations.
 */
    public function count()
    {
        return count($this->vocations);
    }

/**
 * Returns iterator handle for loops.
 * 
 * @return ArrayIterator Vocations list iterator.
 */
    public function getIterator()
    {
        return new ArrayIterator($this->vocations);
    }

/**
 * Checks if given element exists.
 * 
 * @version 0.1.3
 * @param string|int $offset Array key.
 * @return bool True if it's set.
 */
    public function offsetExists($offset)
    {
        // integer key
        if( is_int($offset) )
        {
            return isset($this->vocations[$offset]);
        }

        // vocation name
        return array_search($offset, $this->vocations) !== false;
    }

/**
 * Returns item from given position.
 * 
 * @version 0.1.3
 * @param string|int $offset Array key.
 * @return string|int If key is an integer (type-sensitive!) then returns vocation name. If it's a string then return associated ID.
 */
    public function offsetGet($offset)
    {
        // integer key
        if( is_int($offset) )
        {
            return $this->getVocationName($offset);
        }

        // vocations name
        return $this->getVocationId($offset);
    }

/**
 * This method is implemented for ArrayAccess interface. In fact you can't write/append to vocations list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
 * 
 * @param string|int $offset Array key.
 * @param mixed $value Field value.
 * @throws E_OTS_ReadOnly Always - this class is read-only.
 */
    public function offsetSet($offset, $value)
    {
        throw new E_OTS_ReadOnly();
    }

/**
 * This method is implemented for ArrayAccess interface. In fact you can't write/append to vocations list. Any call to this method will cause {@link E_OTS_ReadOnly E_OTS_ReadOnly} raise.
 * 
 * @param string|int $offset Array key.
 * @throws E_OTS_ReadOnly Always - this class is read-only.
 */
    public function offsetUnset($offset)
    {
        throw new E_OTS_ReadOnly();
    }
}

/**#@-*/

?>
 
Last edited:
This error is because the .php file can't find your vocations.xml (inside data/XML/).

This occurs when you install the AAC or whenever?
 
Yee all the other tools work and its right
C:\Mystic Spirit\
and there are
C:\Mystic Spirit\data\XML
and in there
vocations.xml ( i have tested whit .xml and whitout)
and here is the file
Code:
<?xml version="1.0" encoding="UTF-8" ?> 
- <vocations>
- <vocation id="0" name="None" description="none" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.5" /> 
  <skill id="1" multiplier="2.0" /> 
  <skill id="2" multiplier="2.0" /> 
  <skill id="3" multiplier="2.0" /> 
  <skill id="4" multiplier="2.0" /> 
  <skill id="5" multiplier="1.5" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="1" name="Sorcerer" description="a sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="5" gainhpamount="5" gainmanaticks="3" gainmanaamount="23" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="1">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.5" /> 
  <skill id="1" multiplier="2.0" /> 
  <skill id="2" multiplier="2.0" /> 
  <skill id="3" multiplier="2.0" /> 
  <skill id="4" multiplier="2.0" /> 
  <skill id="5" multiplier="1.5" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="2" name="Druid" description="a druid" gaincap="10" gainhp="5" gainmana="30" gainhpticks="5" gainhpamount="5" gainmanaticks="3" gainmanaamount="23" manamultiplier="1.1" attackspeed="1000" soulmax="100" gainsoulticks="120" fromvoc="2">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.5" /> 
  <skill id="1" multiplier="1.8" /> 
  <skill id="2" multiplier="1.8" /> 
  <skill id="3" multiplier="1.8" /> 
  <skill id="4" multiplier="1.8" /> 
  <skill id="5" multiplier="1.5" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="3" name="Paladin" description="a paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="7" gainmanaticks="4" gainmanaamount="15" manamultiplier="1.4" attackspeed="800" soulmax="100" gainsoulticks="120" fromvoc="3">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.2" /> 
  <skill id="1" multiplier="1.2" /> 
  <skill id="2" multiplier="1.2" /> 
  <skill id="3" multiplier="1.2" /> 
  <skill id="4" multiplier="1.1" /> 
  <skill id="5" multiplier="1.1" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="4" name="Knight" description="a knight" gaincap="25" gainhp="20" gainmana="5" gainhpticks="3" gainhpamount="15" gainmanaticks="5" gainmanaamount="15" manamultiplier="3.0" attackspeed="500" soulmax="100" gainsoulticks="120" fromvoc="4">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.1" /> 
  <skill id="1" multiplier="1.1" /> 
  <skill id="2" multiplier="1.1" /> 
  <skill id="3" multiplier="1.1" /> 
  <skill id="4" multiplier="1.4" /> 
  <skill id="5" multiplier="1.1" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="5" name="Master Sorcerer" description="a master sorcerer" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="51" manamultiplier="1.1" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="1">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.5" /> 
  <skill id="1" multiplier="2.0" /> 
  <skill id="2" multiplier="2.0" /> 
  <skill id="3" multiplier="2.0" /> 
  <skill id="4" multiplier="2.0" /> 
  <skill id="5" multiplier="1.5" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="6" name="Elder Druid" description="an elder druid" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="51" manamultiplier="1.1" attackspeed="900" soulmax="200" gainsoulticks="15" fromvoc="2">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.5" /> 
  <skill id="1" multiplier="1.8" /> 
  <skill id="2" multiplier="1.8" /> 
  <skill id="3" multiplier="1.8" /> 
  <skill id="4" multiplier="1.8" /> 
  <skill id="5" multiplier="1.5" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="7" name="Royal Paladin" description="a royal paladin" gaincap="20" gainhp="10" gainmana="15" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="20" manamultiplier="1.4" attackspeed="500" soulmax="200" gainsoulticks="15" fromvoc="3">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.2" /> 
  <skill id="1" multiplier="1.2" /> 
  <skill id="2" multiplier="1.2" /> 
  <skill id="3" multiplier="1.2" /> 
  <skill id="4" multiplier="1.1" /> 
  <skill id="5" multiplier="1.1" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
- <vocation id="8" name="Elite Knight" description="an elite knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="1" gainhpamount="10" gainmanaticks="2" gainmanaamount="20" manamultiplier="3.0" attackspeed="300" soulmax="200" gainsoulticks="15" fromvoc="4">
  <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0" /> 
  <skill id="0" multiplier="1.1" /> 
  <skill id="1" multiplier="1.1" /> 
  <skill id="2" multiplier="1.1" /> 
  <skill id="3" multiplier="1.1" /> 
  <skill id="4" multiplier="1.4" /> 
  <skill id="5" multiplier="1.1" /> 
  <skill id="6" multiplier="1.1" /> 
  </vocation>
  </vocations>
 
You have the vocations samples installed? I mean that if you have the characters Rook Sample, Druid Sample, etc. created?
If not, execute this queryes:

PHP:
INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Rook Sample", 1, 1, 1, 0, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)

PHP:
INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Sorcerer Sample", 1, 1, 1, 1, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)

PHP:
INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Druid Sample", 1, 1, 1, 2, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)

PHP:
INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Paladin Sample", 1, 1, 1, 3, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)

PHP:
INSERT INTO players (name, group_id, account_id, sex, vocation, experience, level, maglevel, health, healthmax, mana, manamax, manaspent, soul, direction, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, posx, posy, posz, cap, lastlogin, lastip, save, conditions, redskulltime, redskull, guildnick, rank_id, town_id, loss_experience, loss_mana, loss_skills, lastlogout, blessings, premend, online, comment, created, hide_char, nick_verify) VALUES ("Knight Sample", 1, 1, 1, 4, 0, 1, 0, 185, 185, 35, 35, 0, 100,"", 44, 44, 44, 44, 128, 0, 0, 0, 0, 420, "", "", 1,"","","","","","1","","","","","","","","",'.time().',1,1)
 
Have you selected the right direction??

Is this really the right place??
Isn't it in like: C:/Mystic Spirit/data/XML/vocations.xml


aaaaaaaaaaaAAAAAAAAAAAAAAAaaaaaaaaaa failll :/

When your select the "direction" its for (Server path)
It's for the whole server..
It loads the vocation from the server path.. You can't use data>vocations>vocation.xml as a direction..

AAAAAAAAAAAAAAAAAAAAAAaaaaaaaaa
 
@chipsen, made any changes to your vocation.xml?
And what Mystic Spirit version are you using?
If you didn't make any changes just download a new :p
 
Back
Top