Szukam czegoś podobnego do tego:
W praktyce wygląda mniej więcej to tak:
[code=lua]function onUse(cid)
-- tralala[/code]
[code=xml]<?xml version="1.0"?>
<quests>
<!--
<quest name="OpenTibia Example" startstorageid="1000" startstoragevalue="1">
<mission name="Mission I" storageid="1000" startvalue="1" endvalue="1">
<missionstate id="1" description="This is description of Mission I." />
</mission>
</quest>
-->
<quest name="OpenTibia Example" startstorageid="1000" startstoragevalue="1">
<mission name="Mission I" storageid="1000" startvalue="1" endvalue="1">
<missionstate id="1" description="This is description of Mission I." />
</mission>
</quest>
</quests>[/code]
[code=cpp]#include "otpch.h"
#include "mount.h"
#include "tools.h"
#include "player.h"
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <iostream>
bool Mounts::reload()
{
mounts.clear();
bool result = loadFromXml(m_datadir);
if(result){
for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin();
it != Player::listPlayer.list.end();
++it)
{
it->second->setSex(it->second->getSex());
it->second->setCurrentOutfit(it->second->getCurrentOutfit());
}
}
return result;
}[/code]
ale był bym bardziej pocieszony z takiej wersji
[code=lua] = [lua], [/code] = [/lua]
[code=xml] = [xml], [/code] = [/xml]
[code=cpp] = [cpp], [/code] = [/cpp]
z góry dzięki za pomoc.