Bot format

From CatchChallenger wiki
Jump to: navigation, search

Bot format

 skin is invisible
	<bot id="1">
		<step id="1" type="text">
			<text lang="en"><![CDATA[Hello world!]]></text>
	<bot id="2">
		<step id="1" type="text">
			<text lang="en"><![CDATA[Welcome in my shop!<br />
			<br />
				<a href="2">Buy</a><br />
				<a href="3">Sell</a><br />
				<span class="remote"><a href="">Buy with real money</a><br /></span>
				<span class="quest"><a href="4">Quest<br /></a></span>
		<step id="2" type="shop" shop="1" />
		<step id="3" type="sell" shop="1" />
		<step id="4" type="quests" />
		<step id="5" industry="9" type="industry" />
		<step id="6" type="zonecapture" zone="arcania" />

		<!-- Farm your success -->

	<bot id="3">
		<step id="1" type="text">
			<text lang="en"><![CDATA[You are into dangerous zone.<br />
			Here grow the root of the evil.<br />
			<br />
			Take care.]]></text>
	<bot id="4">
		<step id="1" type="text">
			<text lang="en"><![CDATA[I can learn you some attack<br />
			<br />
				<a href="4">Heal</a><br />
				<a href="2">Learn</a><br />
				<a href="3">Quest</a><br />
		<step id="2" type="learn" />
		<step id="3" type="quests" /><!-- show the default failure text if failed -->
		<step id="4" type="heal" />
		<step id="10" type="text">
			<text lang="en"><![CDATA[The bandit want I give you some plants.]]></text>
	<bot id="5">
		<step id="1" type="fight" fightid="1" />

Quest folder

client_logic.js + text.xml

Only to display the text on the client, client_logic.js:

	return '1';//do you want accept the quest
		return 50;//give all object to pass to step 2
		return 42;//need more object
	return '55';//to finish the quest


	<client_logic id="1">
		<text lang="en"><![CDATA[Ho you hate the empire! Like me.<br />
			Collect 10 tooth to help me.<br />
			<br />
			<a href="11">Yes I hate the empire</a>]]></text>
	<client_logic id="42">
		<text lang="en"><![CDATA[I wait you with the 10 teeth]]></text>
	<client_logic id="50">
		<text lang="en"><![CDATA[Do you have the 10 tooth for me?<br />
			<br />
			<a href="21">Yes I have it</a>]]></text>
	<client_logic id="52">
		<text lang="en"><![CDATA[Thanks, you have finish my quest.]]></text>
	<client_logic id="53">
		<text lang="en"><![CDATA[You don't have the requiered quantity.]]></text>

Quest logic

<quest id="2" repeatable="yes" bot="2">
	<name lang="en"><![CDATA[Farm your success]]></name>
		<quest id="1" />
	<step id="1">
		<text lang="en"><![CDATA[Abrind 5 craftball to the bandit]]></text>
		<item id="1" quantity="5" />
		<fight id="1" />
	<step id="2" bot="4"><!-- just talk with a bot -->
		<text lang="en"><![CDATA[Talk to the reaper]]></text>
		<item id="3" quantity="2" />
		<reputation type="empire" point="-1" />
		<allow type="clan" />