-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bot_format.mw
120 lines (116 loc) · 3.24 KB
/
Bot_format.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
= Bot format =
<pre><!--
default:
skin is invisible
-->
<bots>
<bot id="1">
<step id="1" type="text">
<text lang="en"><![CDATA[Hello world!]]></text>
</step>
</bot>
<bot id="2">
<step id="1" type="text">
<text lang="en"><![CDATA[Welcome in my shop!<br />
<br />
<center>
<a href="2">Buy</a><br />
<a href="3">Sell</a><br />
<span class="remote"><a href="http://catchchallenger.first-world.info/shop/">Buy with real money</a><br /></span>
<span class="quest"><a href="4">Quest<br /></a></span>
</center>]]></text>
</step>
<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>
<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>
</step>
</bot>
<bot id="4">
<step id="1" type="text">
<text lang="en"><![CDATA[I can learn you some attack<br />
<br />
<center>
<a href="4">Heal</a><br />
<a href="2">Learn</a><br />
<a href="3">Quest</a><br />
</center>]]></text>
</step>
<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>
</step>
</bot>
<bot id="5">
<step id="1" type="fight" fightid="1" />
</bot>
</bots>
</pre>
= Quest folder =
== client_logic.js + text.xml ==
Only to display the text on the client, client_logic.js:
<pre>if(currentQuestStep()==0)
return '1';//do you want accept the quest
if(currentQuestStep()==1)
{
if(haveQuestStepRequirements())
return 50;//give all object to pass to step 2
else
return 42;//need more object
}
if(currentQuestStep()==2)
return '55';//to finish the quest</pre>
text.xml:
<pre><text>
<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>
<client_logic id="42">
<text lang="en"><![CDATA[I wait you with the 10 teeth]]></text>
</client_logic>
<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>
<client_logic id="52">
<text lang="en"><![CDATA[Thanks, you have finish my quest.]]></text>
</client_logic>
<client_logic id="53">
<text lang="en"><![CDATA[You don't have the requiered quantity.]]></text>
</client_logic>
</text></pre>
== Quest logic ==
<pre><quest id="2" repeatable="yes" bot="2">
<name lang="en"><![CDATA[Farm your success]]></name>
<requirements>
<quest id="1" />
</requirements>
<step id="1">
<text lang="en"><![CDATA[Abrind 5 craftball to the bandit]]></text>
<item id="1" quantity="5" />
<fight id="1" />
</step>
<step id="2" bot="4"><!-- just talk with a bot -->
<text lang="en"><![CDATA[Talk to the reaper]]></text>
</step>
<rewards>
<item id="3" quantity="2" />
<reputation type="empire" point="-1" />
<allow type="clan" />
</rewards>
</quest></pre>