This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.lua
6857 lines (6423 loc) · 360 KB
/
index.lua
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--==[[ libs ]]==--
local stringutils = {}
stringutils.format = function(s, tab)
return (s:gsub('($%b{})',
function(w) return tab[w:sub(3, -2)] or w end))
end
stringutils.split = function(s, delimiter)
result = {}
for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
table.insert(result, match)
end
return result
end
table.tostring = function(tbl, depth)
local res = "{"
local prev = 0
for k, v in next, tbl do
if type(v) == "table" then
if depth == nil or depth > 0 then
res =
res ..
((type(k) == "number" and prev and prev + 1 == k) and "" or k .. ": ") ..
table.tostring(v, depth and depth - 1 or nil) .. ", "
else
res = res .. k .. ": {...}, "
end
else
res = res .. ((type(k) == "number" and prev and prev + 1 == k) and "" or k .. ": ") .. tostring(v) .. ", "
end
prev = type(k) == "number" and k or nil
end
return res:sub(1, res:len() - 2) .. "}"
end
table.map = function(tbl, fn)
local res = {}
for k, v in next, tbl do
res[k] = fn(v)
end
return res
end
table.find = function(tbl, val)
for k, v in next, tbl do
if v == val then return k end
end
end
table.copy = function(obj, seen)
if type(obj) ~= 'table' then return obj end
if seen and seen[obj] then return seen[obj] end
local s = seen or {}
local res = setmetatable({}, getmetatable(obj))
s[obj] = res
for k, v in pairs(obj) do res[table.copy(k, s)] = table.copy(v, s) end
return res
end
math.pythag = function(x1, y1, x2, y2)
return ((x1 - x2) ^ 2 + (y1 - y2) ^ 2) ^ (1/2)
end
local _xpcall = xpcall
xpcall = function(f, msgh, arg1, arg2, arg3, arg4, arg5)
local fWrapper = function()
return f(arg1, arg2, arg3, arg4, arg5)
end
local success = _xpcall(fWrapper, msgh)
if success then msgh(nil, true) end
end
local prettyify
do
local typeLookup = {
["string"] = function(obj) return ("<VP>\"%s\"</VP>"):format(obj) end,
["number"] = function(obj) return ("<J>%s</J>"):format(obj) end,
["boolean"] = function(obj) return ("<J>%s</J>"):format(obj) end,
["function"] = function(obj) return ("<b><V>%s</V></b>"):format(obj) end,
["nil"] = function() return ("<G>nil</G>") end
}
local string_repeat = function(str, times)
local res = ""
while times > 0 do
res = res .. str
times = times - 1
end
return res
end
prettify = function(obj, depth, opt)
opt = opt or {}
opt.maxDepth = opt.maxDepth or 30
opt.truncateAt = opt.truncateAt or 30
local prettifyFn = typeLookup[type(obj)]
if (prettifyFn) then return { res = (prettifyFn(tostring(obj))), count = 1 } end -- not the type of object ({}, [])
if depth >= opt.maxDepth then
return {
res = ("<b><V>%s</V></b>"):format(tostring(obj)),
count = 1
}
end
local kvPairs = {}
local totalObjects = 0
local length = 0
local shouldTruncate = false
local previousKey = 0
for key, value in next, obj do
if not shouldTruncate then
local tn = tonumber(key)
key = tn and (((previousKey and tn - previousKey == 1) and "" or "[" .. key .. "]:")) or (key .. ":")
-- we only need to check if the previous key is a number, so a nil key doesn't matter
previousKey = tn
local prettified = prettify(value, depth + 1, opt)
kvPairs[#kvPairs + 1] = key .. " " .. prettified.res
totalObjects = totalObjects + prettified.count
if length >= opt.truncateAt then shouldTruncate = true end
end
length = length + 1
end
if shouldTruncate then kvPairs[#kvPairs] = (" <G><i>... %s more values</i></G>"):format(length - opt.truncateAt) end
if totalObjects < 6 then
return { res = "<N>{ " .. table.concat(kvPairs, ", ") .. " }</N>", count = totalObjects }
else
return { res = "<N>{ " .. table.concat(kvPairs, ",\n " .. string_repeat(" ", depth)) .. " }</N>", count = totalObjects }
end
end
end
local prettyprint = function(obj, opt) print(prettify(obj, 0, opt or {}).res) end
local p = prettyprint
-- Credits: lua users wiki
local base64Encode, base64Decode
do
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
-- encoding
base64Encode = function(data)
return ((data:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c=0
for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end
return b:sub(c+1,c+1)
end)..({ '', '==', '=' })[#data%3+1])
end
-- decoding
base64Decode = function(data)
data = string.gsub(data, '[^'..b..'=]', '')
return (data:gsub('.', function(x)
if (x == '=') then return '' end
local r,f='',(b:find(x)-1)
for i=6,1,-1 do r=r..(f%2^i-f%2^(i-1)>0 and '1' or '0') end
return r;
end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
if (#x ~= 8) then return '' end
local c=0
for i=1,8 do c=c+(x:sub(i,i)=='1' and 2^(8-i) or 0) end
return string.char(c)
end))
end
end
local healthMt = {
__sub = function(self, amount)
local player = Player.players[self.playerName]
if player.isShielded then
local shield = player.inventory[player.inventorySelection][1]
amount = amount - shield.defense
if amount > 0 then
shield.durability = shield.durability - shield.defense
self.health = self.health - amount
else
shield.durability = shield.durability - 1
end
if shield.durability <= 0 then
player.inventory[player.inventorySelection] = {}
player:changeInventorySlot(player.inventorySelection)
player:displayInventory()
end
else
self.health = self.health - amount
end
return self
end,
__div = function (self, amount)
return self.health / amount
end,
__lt = function(self, amount)
amount = amount.health
return self.health < amount
end,
__le = function(self, amount)
amount = amount.health
return self.health <= amount
end,
__gt = function(self, amount)
amount = amount.health
return self.health > amount
end,
__ge = function(self, amount)
amount = amount.health
return self.health >= amount.health
end
}
local health = function(health, player)
return setmetatable({ health = health, playerName = player}, healthMt)
end
-- Thanks to Turkitutu
-- https://pastebin.com/raw/Nw3y1A42
bit = {}
bit.lshift = function(x, by) -- Left-shift of x by n bits
return x * 2 ^ by
end
bit.rshift = function(x, by) -- Logical right-shift of x by n bits
return math.floor(x / 2 ^ by)
end
bit.band = function(a, b) -- bitwise and of x1, x2
local p, c = 1, 0
while a > 0 and b > 0 do
local ra, rb = a % 2, b % 2
if ra + rb > 1 then
c = c + p
end
a, b, p = (a - ra) / 2, (b - rb) / 2, p * 2
end
return c
end
bit.bxor = function(a,b) -- Bitwise xor of x1, x2
local r = 0
for i = 0, 31 do
local x = a / 2 + b / 2
if x ~= math.floor(x) then
r = r + 2^i
end
a = math.floor(a / 2)
b = math.floor(b / 2)
end
return r
end
bit.bor = function(a,b) -- Bitwise or of x1, x2
local p, c= 1, 0
while a+b > 0 do
local ra, rb = a % 2, b % 2
if ra + rb > 0 then
c = c + p
end
a, b, p = (a - ra) / 2, (b - rb) / 2, p * 2
end
return c
end
bit.bnot = function(n) -- Bitwise not of x
local p, c = 1, 0
while n > 0 do
local r = n % 2
if r < 0 then
c = c + p
end
n, p = (n - r) / 2, p * 2
end
return c
end
local BitList = {}
BitList.__index = BitList
setmetatable(BitList, {
__call = function(cls, ...)
return cls.new(...)
end
})
do
function BitList.new(features)
local self = setmetatable({}, BitList)
self.featureArray = features
self.featureKeys = {}
for k, v in next, features do
self.featureKeys[v] = k
end
self.features = #self.featureArray
return self
end
function BitList:encode(featTbl)
local res = 0
for k, v in next, featTbl do
if v and self.featureKeys[k] then
res = bit.bor(res, bit.lshift(1, self.featureKeys[k] - 1))
end
end
return res
end
function BitList:decode(featInt)
local features, index = {}, 1
while (featInt > 0) do
feat = bit.band(featInt, 1) == 1
corrFeat = self.featureArray[index]
features[corrFeat] = feat
featInt = bit.rshift(featInt, 1)
index = index + 1
end
return features
end
function BitList:get(index)
return self.featureArray[index]
end
function BitList:find(feature)
return self.featureKeys[feature]
end
end
local Panel = {}
local Image = {}
do
local string_split = function(s, delimiter)
result = {}
for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
table.insert(result, match)
end
return result
end
local table_tostring
table_tostring = function(tbl, depth)
local res = "{"
local prev = 0
for k, v in next, tbl do
if type(v) == "table" then
if depth == nil or depth > 0 then
res =
res ..
((type(k) == "number" and prev and prev + 1 == k) and "" or k .. ": ") ..
table_tostring(v, depth and depth - 1 or nil) .. ", "
else
res = res .. k .. ": {...}, "
end
else
res = res .. ((type(k) == "number" and prev and prev + 1 == k) and "" or k .. ": ") .. tostring(v) .. ", "
end
prev = type(k) == "number" and k or nil
end
return res:sub(1, res:len() - 2) .. "}"
end
local table_copy = function(tbl)
local res = {}
for k, v in next, tbl do res[k] = v end
return res
end
-- [[ class Image ]] --
Image.__index = Image
Image.__tostring = function(self) return table_tostring(self) end
Image.images = {}
setmetatable(Image, {
__call = function(cls, ...)
return cls.new(...)
end
})
function Image.new(imageId, target, x, y, scaleX, scaleY, angle, alpha, anchorX, anchorY)
local self = setmetatable({
id = #Image.images + 1,
imageId = imageId,
target = target,
x = x,
y = y,
scaleX = scaleX,
scaleY = scaleY,
angle = angle,
alpha = alpha,
anchorX = anchorX,
anchorY = anchorY,
instances = {},
}, Image)
Image.images[self.id] = self
return self
end
function Image:show(target)
if target == nil then error("Target cannot be nil") end
if self.instances[target] then return self end
self.instances[target] = tfm.exec.addImage(self.imageId, self.target, self.x, self.y, target, self.scaleX, self.scaleY, self.angle, self.alpha, self.anchorX, self.anchorY)
return self
end
function Image:hide(target)
if target == nil then error("Target cannot be nil") end
if not self.instances[target] then return end
tfm.exec.removeImage(self.instances[target])
self.instances[target] = nil
return self
end
-- [[ class Panel ]] --
Panel.__index = Panel
Panel.__tostring = function(self) return table_tostring(self) end
Panel.panels = {}
setmetatable(Panel, {
__call = function (cls, ...)
return cls.new(...)
end,
})
function Panel.new(id, text, x, y, w, h, background, border, opacity, fixed, hidden)
local self = setmetatable({
id = id,
text = text,
x = x,
y = y,
w = w,
h = h,
background = background,
border = border,
opacity = opacity,
fixed = fixed,
hidden = hidden,
isCloseButton = false,
closeTarget = nil,
parent = nil,
onhide = nil,
onclick = nil,
children = {},
temporary = {},
temporaryListeners = {}
}, Panel)
Panel.panels[id] = self
return self
end
function Panel.handleActions(id, name, event)
local panelId = id - 10000
local panel = Panel.panels[panelId]
if not panel then return end
if panel.isCloseButton then
if not panel.closeTarget then return end
panel.closeTarget:hide(name)
if panel.onhide then panel.onhide(panelId, name, event) end
else
if panel.onclick then panel.onclick(panelId, name, event) end
if panel.temporaryListeners[name] then panel.temporaryListeners[name](panelId, name, event) end
end
end
function Panel:show(target)
ui.addTextArea(10000 + self.id, self.text, target, self.x, self.y, self.w, self.h, self.background, self.border, self.opacity, self.opacity)
self.visible = true
for name in next, (target and { [target] = true } or tfm.get.room.playerList) do
for id, child in next, self.children do
child:show(name)
end
end
return self
end
function Panel:update(text, target)
ui.updateTextArea(10000 + self.id, text, target)
return self
end
function Panel:hide(target)
ui.removeTextArea(10000 + self.id, target)
for name in next, (target and { [target] = true } or tfm.get.room.playerList) do
for id, child in next, self.children do
child:hide(name)
end
if self.temporary[name] then
for id, child in next, self.temporary[name] do
child:hide(name)
end
self.temporary[name] = {}
end
--self.temporaryListeners[name] = nil
end
if self.onclose then self.onclose(target) end
return self
end
function Panel:addPanel(panel)
self.children[panel.id] = panel
panel.parent = self.id
return self
end
function Panel:addImage(image)
self.children["i_" .. image.id] = image
return self
end
function Panel:addPanelTemp(panel, target)
if not self.temporary[target] then self.temporary[target] = {} end
panel:show(target)
self.temporary[target][panel.id] = panel
return self
end
function Panel:addImageTemp(image, target)
if not self.temporary[target] then self.temporary[target] = {} end
image:show(target)
self.temporary[target]["i_" .. image.id] = image
return self
end
function Panel:setActionListener(fn)
self.onclick = fn
return self
end
function Panel:setActionListenerTemp(fn, target)
self.temporaryListeners[target] = fn
return self
end
function Panel:setCloseButton(id, callback)
local button = Panel.panels[id]
if not button then return self end
self.closeTarget = button
self.onclose = callback
button.isCloseButton = true
button.closeTarget = self
return self
end
end
-- [[Timers4TFM]] --
local a={}a.__index=a;a._timers={}setmetatable(a,{__call=function(b,...)return b.new(...)end})function a.process()local c=os.time()local d={}for e,f in next,a._timers do if f.isAlive and f.mature<=c then f:call()if f.loop then f:reset()else f:kill()d[#d+1]=e end end end;for e,f in next,d do a._timers[f]=nil end end;function a.new(g,h,i,j,...)local self=setmetatable({},a)self.id=g;self.callback=h;self.timeout=i;self.isAlive=true;self.mature=os.time()+i;self.loop=j;self.args={...}a._timers[g]=self;return self end;function a:setCallback(k)self.callback=k end;function a:addTime(c)self.mature=self.mature+c end;function a:setLoop(j)self.loop=j end;function a:setArgs(...)self.args={...}end;function a:call()self.callback(table.unpack(self.args))end;function a:kill()self.isAlive=false end;function a:reset()self.mature=os.time()+self.timeout end;Timer=a
--[[DataHandler v22]]
local a={}a.VERSION='1.5'a.__index=a;function a.new(b,c,d)local self=setmetatable({},a)assert(b,'Invalid module ID (nil)')assert(b~='','Invalid module ID (empty text)')assert(c,'Invalid skeleton (nil)')for e,f in next,c do f.type=f.type or type(f.default)end;self.players={}self.moduleID=b;self.moduleSkeleton=c;self.moduleIndexes={}self.otherOptions=d;self.otherData={}self.originalStuff={}for e,f in pairs(c)do self.moduleIndexes[f.index]=e end;if self.otherOptions then self.otherModuleIndexes={}for e,f in pairs(self.otherOptions)do self.otherModuleIndexes[e]={}for g,h in pairs(f)do h.type=h.type or type(h.default)self.otherModuleIndexes[e][h.index]=g end end end;return self end;function a.newPlayer(self,i,j)assert(i,'Invalid player name (nil)')assert(i~='','Invalid player name (empty text)')self.players[i]={}self.otherData[i]={}j=j or''local function k(l)local m={}for n in string.gsub(l,'%b{}',function(o)return o:gsub(',','\0')end):gmatch('[^,]+')do n=n:gsub('%z',',')if string.match(n,'^{.-}$')then table.insert(m,k(string.match(n,'^{(.-)}$')))else table.insert(m,tonumber(n)or n)end end;return m end;local function p(c,q)for e,f in pairs(c)do if f.index==q then return e end end;return 0 end;local function r(c)local s=0;for e,f in pairs(c)do if f.index>s then s=f.index end end;return s end;local function t(b,c,u,v)local w=1;local x=r(c)b="__"..b;if v then self.players[i][b]={}end;local function y(n,z,A,B)local C;if z=="number"then C=tonumber(n)or B elseif z=="string"then C=string.match(n and n:gsub('\\"','"')or'',"^\"(.-)\"$")or B elseif z=="table"then C=string.match(n or'',"^{(.-)}$")C=C and k(C)or B elseif z=="boolean"then if n then C=n=='1'else C=B end end;if v then self.players[i][b][A]=C else self.players[i][A]=C end end;if#u>0 then for n in string.gsub(u,'%b{}',function(o)return o:gsub(',','\0')end):gmatch('[^,]+')do n=n:gsub('%z',','):gsub('\9',',')local A=p(c,w)local z=c[A].type;local B=c[A].default;y(n,z,A,B)w=w+1 end end;if w<=x then for D=w,x do local A=p(c,D)local z=c[A].type;local B=c[A].default;y(nil,z,A,B)end end end;local E,F=self:getModuleData(j)self.originalStuff[i]=F;if not E[self.moduleID]then E[self.moduleID]='{}'end;t(self.moduleID,self.moduleSkeleton,E[self.moduleID]:sub(2,-2),false)if self.otherOptions then for b,c in pairs(self.otherOptions)do if not E[b]then local G={}for e,f in pairs(c)do local z=f.type or type(f.default)if z=='string'then G[f.index]='"'..tostring(f.default:gsub('"','\\"'))..'"'elseif z=='table'then G[f.index]='{}'elseif z=='number'then G[f.index]=f.default elseif z=='boolean'then G[f.index]=f.default and'1'or'0'end end;E[b]='{'..table.concat(G,',')..'}'end end end;for b,u in pairs(E)do if b~=self.moduleID then if self.otherOptions and self.otherOptions[b]then t(b,self.otherOptions[b],u:sub(2,-2),true)else self.otherData[i][b]=u end end end end;function a.dumpPlayer(self,i)local m={}local function H(I)local m={}for e,f in pairs(I)do local J=type(f)if J=='table'then m[#m+1]='{'m[#m+1]=H(f)if m[#m]:sub(-1)==','then m[#m]=m[#m]:sub(1,-2)end;m[#m+1]='}'m[#m+1]=','else if J=='string'then m[#m+1]='"'m[#m+1]=f:gsub('"','\\"')m[#m+1]='"'elseif J=='boolean'then m[#m+1]=f and'1'or'0'else m[#m+1]=f end;m[#m+1]=','end end;if m[#m]==','then m[#m]=''end;return table.concat(m)end;local function K(i,b)local m={b,'=','{'}local L=self.players[i]local M=self.moduleIndexes;local N=self.moduleSkeleton;if self.moduleID~=b then M=self.otherModuleIndexes[b]N=self.otherOptions[b]b='__'..b;L=self.players[i][b]end;if not L then return''end;for D=1,#M do local A=M[D]local z=N[A].type;if z=='string'then m[#m+1]='"'m[#m+1]=L[A]:gsub('"','\\"')m[#m+1]='"'elseif z=='number'then m[#m+1]=L[A]elseif z=='boolean'then m[#m+1]=L[A]and'1'or'0'elseif z=='table'then m[#m+1]='{'m[#m+1]=H(L[A])m[#m+1]='}'end;m[#m+1]=','end;if m[#m]==','then m[#m]='}'else m[#m+1]='}'end;return table.concat(m)end;m[#m+1]=K(i,self.moduleID)if self.otherOptions then for e,f in pairs(self.otherOptions)do local u=K(i,e)if u~=''then m[#m+1]=','m[#m+1]=u end end end;for e,f in pairs(self.otherData[i])do m[#m+1]=','m[#m+1]=e;m[#m+1]='='m[#m+1]=f end;return table.concat(m)..self.originalStuff[i]end;function a.get(self,i,A,O)if not O then return self.players[i][A]else assert(self.players[i]['__'..O],'Module data not available ('..O..')')return self.players[i]['__'..O][A]end end;function a.set(self,i,A,C,O)if O then self.players[i]['__'..O][A]=C else self.players[i][A]=C end;return self end;function a.save(self,i)system.savePlayerData(i,self:dumpPlayer(i))end;function a.removeModuleData(self,i,O)assert(O,"Invalid module name (nil)")assert(O~='',"Invalid module name (empty text)")assert(O~=self.moduleID,"Invalid module name (current module data structure)")if self.otherData[i][O]then self.otherData[i][O]=nil;return true else if self.otherOptions and self.otherOptions[O]then self.players[i]['__'..O]=nil;return true end end;return false end;function a.getModuleData(self,l)local m={}for b,u in string.gmatch(l,'([0-9A-Za-z_]+)=(%b{})')do local P=self:getTextBetweenQuotes(u:sub(2,-2))for D=1,#P do P[D]=P[D]:gsub("[%(%)%.%%%+%-%*%?%[%]%^%$]","%%%0")u=u:gsub(P[D],P[D]:gsub(',','\9'))end;m[b]=u end;for e,f in pairs(m)do l=l:gsub(e..'='..f:gsub('\9',','):gsub("[%(%)%.%%%+%-%*%?%[%]%^%$]","%%%0")..',?','')end;return m,l end;function a.convertFromOld(self,Q,R)assert(Q,'Old data is nil')assert(R,'Old skeleton is nil')local function S(l,T)local m={}for U in string.gmatch(l,'[^'..T..']+')do m[#m+1]=U end;return m end;local E=S(Q,'?')local m={}for D=1,#E do local O=E[D]:match('([0-9a-zA-Z]+)=')local u=S(E[D]:gsub(O..'=',''):gsub(',,',',\8,'),',')local G={}for V=1,#u do if R[O][V]then if R[O][V]=='table'then G[#G+1]='{'if u[V]~='\8'then local I=S(u[V],'#')for W=1,#I do G[#G+1]=I[W]G[#G+1]=','end;if G[#G]==','then table.remove(G)end end;G[#G+1]='},'elseif R[O][V]=='string'then G[#G+1]='"'if u[V]~='\8'then G[#G+1]=u[V]end;G[#G+1]='"'G[#G+1]=','else if u[V]~='\8'then G[#G+1]=u[V]else G[#G+1]=0 end;G[#G+1]=','end end end;if G[#G]==','then table.remove(G)end;m[#m+1]=O;m[#m+1]='='m[#m+1]='{'m[#m+1]=table.concat(G)m[#m+1]='}'m[#m+1]=','end;if m[#m]==','then table.remove(m)end;return table.concat(m)end;function a.convertFromDataManager(self,Q,R)assert(Q,'Old data is nil')assert(R,'Old skeleton is nil')local function S(l,T)local m={}for U in string.gmatch(l,'[^'..T..']+')do m[#m+1]=U end;return m end;local E=S(Q,'§')local m={}for D=1,#E do local O=E[D]:match('%[(.-)%]')local u=S(E[D]:gsub('%['..O..'%]%((.-)%)','%1'),'#')local G={}for V=1,#u do if R[V]=='table'then local I=S(u[V],'&')G[#G+1]='{'for W=1,#I do if tonumber(I[W])then G[#G+1]=I[W]G[#G+1]=','else G[#G+1]='"'G[#G+1]=I[W]G[#G+1]='"'G[#G+1]=','end end;if G[#G]==','then table.remove(G)end;G[#G+1]='}'G[#G+1]=','else if R[V]=='string'then G[#G+1]='"'G[#G+1]=u[V]G[#G+1]='"'else G[#G+1]=u[V]end;G[#G+1]=','end end;if G[#G]==','then table.remove(G)end;m[#m+1]=O;m[#m+1]='='m[#m+1]='{'m[#m+1]=table.concat(G)m[#m+1]='}'end;return table.concat(m)end;function a.getTextBetweenQuotes(self,l)local m={}local X=1;local Y=0;local Z=false;for D=1,#l do local _=l:sub(D,D)if _=='"'then if l:sub(D-1,D-1)~='\\'then if Y==0 then X=D;Y=Y+1 else Y=Y-1;if Y==0 then m[#m+1]=l:sub(X,D)end end end end end;return m end;DataHandler=a
--[[ Makinit's XML library ]]--
local a="Makinit's XML library"local b="[%a_:][%w%.%-_:]*"function parseXml(c,d)if not d then c=string.gsub(c,"<!%[CDATA%[(.-)%]%]>",xmlEscape)c=string.gsub(c,"<%?.-%?>","")c=string.gsub(c,"<!%-%-.-%-%->","")c=string.gsub(c,"<!.->","")end;local e={}local f={}local g=e;for h,i,j,k,l in string.gmatch(c,"<(/?)("..b..")(.-)(/?)>%s*([^<]*)%s*")do if h=="/"then local m=f[g]if m and i==g.name then g=m end else local n={name=i,attribute={}}table.insert(g,n)f[n]=g;if k~="/"then g=n end;for i,o in string.gmatch(j,"("..b..")%s*=%s*\"(.-)\"")do n.attribute[i]=d and o or xmlUnescape(o)end end;if l~=""then local n={text=d and l or xmlUnescape(l)}table.insert(g,n)f[n]=g end end;return e[1]end;function generateXml(g,d)if g.name then local c="<"..g.name;for i,o in pairs(g.attribute)do c=c.." "..i.."=\""..(d and tostring(o)or xmlEscape(tostring(o))).."\""end;if#g==0 then c=c.." />"else c=c..">"for p,n in ipairs(g)do c=c..generateXml(n,d)end;c=c.."</"..g.name..">"end;return c elseif g.text then return d and tostring(g.text)or xmlEscape(tostring(g.text))end end;function path(q,...)q={q}for p,i in ipairs(arg)do local r={}for p,s in ipairs(q)do for p,n in ipairs(s)do if n.name==i then table.insert(r,n)end end end;q=r end;return q end;local t={}function xmlEscape(u)local v=t[u]if not v then local w=string.gsub;v=w(u,"&","&")v=w(v,"\"",""")v=w(v,"'","'")v=w(v,"<","<")v=w(v,">",">")t[u]=v end;return v end;local x={}function xmlUnescape(u)local v=x[u]if not v then local w=string.gsub;v=w(u,""","\"")v=w(v,"'","'")v=w(v,"<","<")v=w(v,">",">")v=w(v,"&#(%d%d?%d?%d?);",dec2char)v=w(v,"&#x(%x%x?%x?%x?);",hex2char)v=w(v,"&","&")x[u]=v end;return v end;function dec2char(y)y=tonumber(y)return string.char(y>255 and 0 or y)end;function hex2char(y)y=tonumber(y,16)return string.char(y>255 and 0 or y)end
local quests = {
--[[
struture:
name:
stage: tasksAmount
..
]]
wc = {
id = 1,
title_locales = {
ar = "شخص جديد في البلدة",
en = "New person in the town",
pl = "Nowa osoba w mieście",
ro = "Un nou vizitator în oraș",
tr = "Şehirdeki yeni kişi",
es = "Alguien nuevo en el poblado",
cn = "城市中的新脸孔",
zh = "城市中的新臉孔",
ru = "Новый человек в городе",
br = "Nova pessoa na cidade",
pt = "Nova pessoa na cidade",
hu = "Új egér a városban",
},
{
description_locales = {
ar = "سافر من وقت لآخر إلى بلدة في العصور الوسطى",
en = "Travel back from time to a town in the medieval era",
pl = "Cofnij się w czasie do średniowiecznego miasta",
ro = "Călătorește înapoi în timp într-un orășel din evul mediu",
tr = "Ortaçağ döneminde bulunan bir şehire zamanda geri git",
es = "Viaja atrás en el tiempo hacia un poblado en la época medieval",
cn = "时光倒流回到中世纪的城市",
zh = "時光倒流回到中世紀的城市",
ru = "Путешествуй во времени в средневековье",
br = "Viaje de volta no tempo para uma pequena cidade medieval",
pt = "Viaje de volta no tempo para uma pequena cidade medieval",
hu = "Utazz vissza az időben egy középkori városba",
},
tasks = 1
}
},
nosferatu = {
id = 2,
title_locales = {
ar = "الخادم المخلص",
en = "The loyal servant",
pl = "Lojalny sługa",
ro = "Servitorul regal",
tr = "Sadık hizmetçi",
es = "El sirviente leal",
cn = "忠心的仆人",
zh = "忠心的僕人",
ru = "Верный слуга",
br = "O servo leal",
pt = "O servo leal",
hu = "A hűséges szolga",
},
{
description_locales = {
ar = "قابل نوسفيراتو في المنجم",
en = "Meet Nosferatu at the mine",
pl = "potkaj się z Nosferatu w kopalni",
ro = "Întâlnește-l pe Nosferatu lângă mină",
tr = "Madende Nosferatu ile buluş",
es = "Ve con Nosferatu a la mina",
cn = "在洞穴中跟 Nosferatu 见面",
zh = "在洞穴中跟 Nosferatu 見面",
ru = "Встреться с Носферату у шахты",
br = "Conheça Nosferatu na mina",
pt = "Conheça Nosferatu na mina",
hu = "Találkozz Nosferatu-val a bányában",
},
tasks = 1
},
{
description_locales = {
ar = "اجمع 15 قطعة خشب",
en = "Gather 15 wood",
pl = "Zbierz 15 drewien",
ro = "Adună 15 lemne",
tr = "15 odun topla",
es = "Recolecta 15 de madera",
cn = "收集 15 个木头",
zh = "收集 15 個木頭",
ru = "Раздобудь 15 древесины",
br = "Recolha 15 madeiras",
pt = "Recolha 15 madeiras",
hu = "Gyűjts 15 fát",
},
tasks = 1
},
{
description_locales = {
ar = "اجمع 15 خام حديد",
en = "Gather 15 iron ore",
pl = "Zbierz 15 rud żelaza",
ro = "Adună 15 minereuri de fier",
tr = "15 demir cevheri topla",
es = "Recolecta 15 lingotes de hierro",
cn = "收集 15 个铁矿石",
zh = "收集 15 個鐵礦石",
ru = "Раздобудь 15 железа",
br = "Recolha 15 minério de ferro",
pt = "Recolha 15 minério de ferro",
hu = "Gyűjts 15 vasércet",
},
tasks = 1
}
},
strength_test = {
id = 3,
title_locales = {
ar = "إختبار القوة",
en = "Strength test",
pl = "Test siły",
ro = "Testul forței",
tr = "Sağlamlık testi",
es = "Test de fuerza",
cn = "力量测试",
zh = "力量測試",
ru = "Испытание силы",
br = "Teste de resistência",
pt = "Teste de resistência",
hu = "Az erőmérő próba",
},
{
description_locales = {
ar = "اجمع الوصفات وتحدث إلى الملازم إدريك",
en = "Gather recipes and talk to Lieutenant Edric",
pl = "Zbierz przepisy i porozmawiaj z porucznikiem Edriciem",
ro = "Adună rețete pentru a vorbi cu Locotenentul Edric",
tr = "Tarifleri elde et ve Lieutenant Edric ile konuş",
es = "Recolecta recetas y habla con el Teniente Edric",
cn = "收集物品制作方法然后跟 Lieutenant Edric 说话",
zh = "收集物品製作方法然後跟 Lieutenant Edric 說話",
ru = "Найди рецепты и поговори с Лейтенантом Эдриком",
br = "Junte as receitas e fale com o Tenente Edric",
pt = "Junte as receitas e fale com o Tenente Edric",
hu = "Gyűjts recepteket, és beszélj Edric Hadnaggyal",
},
tasks = 1
},
{
description_locales = {
ar = "اهزم 25 وحشًا",
en = "Defeat 25 monsters",
pl = "Pokonaj 25 potworów",
ro = "Înfrânge 25 monștri",
tr = "25 canavar yen",
es = "Derrota 25 monstruos",
cn = "打败 25 个怪物",
zh = "打敗 25 個怪物",
ru = "Одолей 25 монстров",
br = "Destrua 25 monstros",
pt = "Destrua 25 monstros",
hu = "Ölj meg 25 szörnyet",
},
tasks = 25
},
{
description_locales = {
ar = "قابل الملازم إدريك مرة أخرى",
en = "Meet Lieutenant Edric back",
pl = "Spotkaj się z powrotem z porucznikiem Edriciem",
ro = "Întâlnește Locotenentul Edric din nou",
tr = "Tekrar Lieutenant Edric ile buluş",
es = "Ve con el Teniente Edric de vuelta",
cn = "回去跟 Lieutenant Edric 见面",
zh = "回去跟 Lieutenant Edric 見面",
ru = "Встреться с Лейтенантом Эдриком снова",
br = "Conheça o Tenente Edric.",
pt = "Conheça o Tenente Edric.",
hu = "Találkozz Edric Hadnaggyal",
},
tasks = 1
}
},
spiritOrbs = {
id = 4,
title_locales = {
ar = "الطريق الروحي",
en = "The spiritual way",
pl = "Droga duchowa",
ro = "Calea spirituală",
tr = "Ruhani yol",
es = "El camino espiritual",
cn = "灵性旅途",
zh = "靈性旅途",
ru = "Духовный путь",
br = "O caminho espiritual",
pt = "O caminho espiritual",
hu = "A szellemi út",
},
{
description_locales = {
ar = "اذهب إلى الغابة القاتمة",
en = "Go to the gloomy forest",
pl = "Udaj się do ponurego lasu",
ro = "Intră în pădurea mohorâtă",
tr = "Kasvetli ormana git",
es = "Ve al bosque sombrío",
cn = "前往阴沉森林",
zh = "前往陰沉森林",
ru = "Иди в мрачный лес",
br = "Dirigira-se à floresta sombria",
pt = "Dirigira-se à floresta sombria",
hu = "Menj a sötét erdőbe",
},
tasks = 1
},
{
description_locales = {
ar = "ابحث عن الصوت الغامض",
en = "Find the mysterious voice",
pl = "Znajdź tajemniczy głos",
ro = "Găsește vocea misterioasă",
tr = "Gizemli sesi bul",
es = "Encuentra la voz misteriosa",
cn = "找出谜之声音",
zh = "找出謎之聲音",
ru = "Найди загадочный голос",
br = "Encontre a voz misteriosa",
pt = "Encontre a voz misteriosa",
hu = "Találd meg a rejtélyes hangot",
},
tasks = 1
},
{
description_locales = {
ar = "اجمع كل الأجرام السماوية الخمسة",
en = "Gather all 5 spirit orbs",
pl = "Zbierz wszystkie 5 duchowych kul",
ro = "Adună toate 5 globuri",
tr = "Tüm 5 ruh küresini topla",
es = "Recolecta las 5 orbes espirituales",
cn = "收集全部 5 个灵体球",
zh = "收集全部 5 個靈體球",
ru = "Найди все 5 сфер душ",
br = "Junte as 5 orbes espirituosas",
pt = "Junte as 5 orbes espirituosas",
hu = "Gyűjts össze mind az 5 lélekgömböt",
},
tasks = 5
}
},
fiery_dragon = {
id = 5,
title_locales = {
ar = "مقاومة النار",
en = "Resisting the fire",
pl = "Odporność na ogień",
ro = "Rezistând focului",
tr = "Ateşe direnmek",
es = "Resistiendo al fuego",
cn = "抵抗火炎",
zh = "抵抗火炎",
ru = "Устаивая огню",
br = "Resista ao fogo",
pt = "Resista ao fogo",
hu = "A tűz ellenállása",
},
{
description_locales = {
ar = "تدمير التنين الناري وجمع الجرم السماوي الروحي",
en = "Destroy the fiery dragon and collect its spirit orb",
pl = "Zniszcz ognistego smoka i zbierz jego duchową kulę",
ro = "Distruge Dragonul de foc și pune mâna pe globul său de spirit",
tr = "Alevli ejderhayı yok et ve ruh küresini elde et",
es = "Destruye al dragón de fuego y recolecta su orbe espiritual",
cn = "打败喷火龙然后收集它的灵体球",
zh = "打敗噴火龍然後收集它的靈體球",
ru = "Уничтожь дракона и добудь его сферу души",
br = "Destrua o dragão de fogo e recolha a sua orbe espiritual",
pt = "Destrua o dragão de fogo e recolha a sua orbe espiritual",
hu = "Küzdj meg a tüzes sárkánnyal, és gyűjtsd be a lélekgömbjét",
},
tasks = 1
}
},
final_boss = {
id = 6,
title_locales = {
ar = "بطل العصور الوسطى",
en = "Medieval hero",
pl = "Średniowieczny bohater",
ro = "Erou medieval",
tr = "Ortaçağın kahramanı",
es = "Héroe medieval",
cn = "中世纪英雄",
zh = "中世紀英雄",
ru = "Герой средневековья",
br = "Herói medieval",
pt = "Herói medieval",
hu = "Középkori hős",
},
{
description_locales = {
ar = "اهلك الروح الشريرة",
en = "Destroy the evil spirit",
pl = "Zniszcz złego ducha",
ro = "Distruge spiritul răului",
tr = "Kötü ruhu yok et",
es = "Destruye el espíritu malvado",
cn = "毁灭邪恶力量",
zh = "毀滅邪惡力量",
ru = "Уничтожь злой дух",
br = "Destrua o espírito maligno",
pt = "Destrua o espírito maligno",
hu = "Győzdd le a gonosz szellemet",
},
tasks = 1
}
},
_all = { "wc", "nosferatu", "strength_test", "spiritOrbs", "fiery_dragon", "final_boss" }
}
--==[[ init ]]==--
local IS_TEST = true
tfm.exec.disableAfkDeath()
tfm.exec.disableAutoShaman()
tfm.exec.disablePhysicalConsumables()
tfm.exec.disableWatchCommand()
system.luaEventLaunchInterval(40)
system.setLuaEventBanner(28)
math.randomseed(os.time())
-- NOTE: Sometimes the script is loaded twice in the same round (detect it when eventNewGame is called twice). You must use system.exit() is this case, because it doesn't load the player data correctly, and the textareas (are duplicated) doesn't trigger eventTextAreaCallback.
local eventLoaded, mapLoaded, eventEnding = false, false, false
local mapPlaying = ""
-- final boss battle
local bossBattleTriggered, divineChargeTimeOver, divinePowerCasted = false, false, false
local divinePowerCharge = 0
local FINAL_BOSS_ATK_MAX_CHARGE = 2000
local maps = {
mine = [[<C><P L="1622" H="1720" APS="17f322853ac.png,,820,1329,800,317,0,800" Ca="" MEDATA="67,1;;;;0,6-0;0:::1-"/><Z><S><S T="1" X="1628" Y="1208" L="10" H="2016" P="0,0,0,0.2,2880,0,0,0" m=""/><S T="1" X="-7" Y="1296" L="10" H="2016" P="0,0,0,0.2,2880,0,0,0" m=""/><S T="0" X="5" Y="805" L="11" H="10" P="0,0,0.3,0.2,2880,0,0,0" c="4" nosync="" i="0,0,17f32282dfc.png"/><S T="0" X="30" Y="1002" L="61" H="10" P="0,0,0.3,0.2,2890,0,0,0" m=""/><S T="0" X="85" Y="1021" L="59" H="10" P="0,0,0.3,0.2,2910,0,0,0" m=""/><S T="0" X="149" Y="1119" L="139" H="10" P="0,0,6,0.2,2950,0,0,0" m=""/><S T="0" X="119" Y="1046" L="26" H="10" P="0,0,0.3,0.2,2930,0,0,0" m=""/><S T="0" X="209" Y="1199" L="102" H="10" P="0,0,0.3,0.2,2918,0,0,0" m=""/><S T="0" X="264" Y="1253" L="57" H="10" P="0,0,0.3,0.2,2950,0,0,0" m=""/><S T="0" X="298" Y="1309" L="79" H="10" P="0,0,0.3,0.2,2930,0,0,0" m=""/><S T="12" X="801" Y="315" L="723" H="542" P="0,0,0.3,0.2,0,0,0,0" o="322226" c="2"/><S T="0" X="321" Y="1362" L="49" H="10" P="0,0,0.3,0.2,2970,0,0,0" m=""/><S T="0" X="524" Y="1335" L="230" H="10" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="0" X="1237" Y="1257" L="80" H="10" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="0" X="1305" Y="1256" L="80" H="10" P="0,0,0.3,0.2,2890,0,0,0" m=""/><S T="0" X="1382" Y="1277" L="80" H="10" P="0,0,0.3,0.2,2900,0,0,0" m=""/><S T="0" X="1457" Y="1280" L="80" H="10" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="0" X="1541" Y="1269" L="80" H="10" P="0,0,0.3,0.2,2880,0,0,0" m=""/><S T="0" X="1588" Y="1258" L="80" H="10" P="0,0,0.3,0.2,2870,0,0,0" m=""/><S T="0" X="723" Y="1508" L="82" H="10" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="0" X="644" Y="1512" L="58" H="10" P="0,0,0.3,0.2,2870,0,0,0" m=""/><S T="0" X="792" Y="1468" L="82" H="10" P="0,0,0.3,0.2,2840,0,0,0" m=""/><S T="0" X="614" Y="1563" L="82" H="10" P="0,0,0.3,0.2,2840,0,0,0" m=""/><S T="0" X="827" Y="1417" L="82" H="10" P="0,0,0.3,0.2,2820,0,0,0" m=""/><S T="0" X="883" Y="1364" L="82" H="10" P="0,0,0.3,0.2,2850,0,0,0" m=""/><S T="0" X="909" Y="1344" L="63" H="10" P="0,0,0.3,0.2,2850,0,0,0" m=""/><S T="0" X="972" Y="1334" L="63" H="10" P="0,0,0.3,0.2,2890,0,0,0" m=""/><S T="0" X="1024" Y="1344" L="63" H="10" P="0,0,0.3,0.2,2880,0,0,0" m=""/><S T="0" X="1072" Y="1334" L="65" H="10" P="0,0,0.3,0.2,2857,0,0,0" m=""/><S T="0" X="1108" Y="1318" L="65" H="10" P="0,0,0.3,0.2,2837,0,0,0" m=""/><S T="0" X="1162" Y="1294" L="65" H="10" P="0,0,0.3,0.2,2877,0,0,0" m=""/><S T="0" X="1174" Y="1286" L="65" H="10" P="0,0,0.3,0.2,2847,0,0,0" m=""/><S T="0" X="915" Y="1354" L="82" H="28" P="0,0,0.3,0.2,2880,0,0,0" m=""/><S T="0" X="235" Y="1458" L="230" H="10" P="0,0,0.3,0.2,2840,0,0,0" m=""/><S T="0" X="667" Y="1274" L="88" H="10" P="0,0,0.3,0.2,2850,0,0,0" m=""/><S T="0" X="778" Y="1225" L="163" H="10" P="0,0,1.2,0.2,2860,0,0,0" m=""/><S T="0" X="957" Y="1198" L="212" H="10" P="0,0,0.3,0.2,2880,0,0,0" m=""/><S T="0" X="1082" Y="1190" L="54" H="10" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="0" X="1130" Y="1180" L="69" H="10" P="0,0,0.3,0.2,2840,0,0,0" m=""/><S T="0" X="1193" Y="1146" L="85" H="12" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="0" X="1237" Y="1133" L="67" H="10" P="0,0,0.3,0.2,2800,0,0,0" m=""/><S T="0" X="1314" Y="1063" L="161" H="10" P="0,0,0.3,0.2,2850,0,0,0" m=""/><S T="0" X="1430" Y="1014" L="94" H="10" P="0,0,0.3,0.2,2870,0,0,0" m=""/><S T="0" X="1532" Y="1007" L="113" H="10" P="0,0,0.3,0.2,2880,0,0,0" m=""/><S T="0" X="1602" Y="1010" L="34" H="10" P="0,0,0.3,0.2,2890,0,0,0" m=""/><S T="4" X="356" Y="1476" L="10" H="235" P="0,0,20,0.2,2910,0,0,0" m=""/><S T="0" X="900" Y="1644" L="1800" H="22" P="0,0,0.3,0.2,2880,0,0,0" m=""/><S T="0" X="894" Y="1662" L="136" H="10" P="0,0,0.3,0.2,2840,0,0,0" m=""/><S T="0" X="1003" Y="1611" L="121" H="10" P="0,0,0.3,0.2,2870,0,0,0" m=""/><S T="0" X="1121" Y="1595" L="118" H="10" P="0,0,0.3,0.2,2875,0,0,0" m=""/><S T="0" X="1528" Y="1650" L="118" H="10" P="0,0,0.3,0.2,2915,0,0,0" m=""/><S T="0" X="1332" Y="1604" L="314" H="10" P="0,0,0.3,0.2,2885,0,0,0" m=""/><S T="0" X="267" Y="1625" L="200" H="10" P="0,0,0.3,0.2,2900,0,0,0" m=""/><S T="0" X="86" Y="1625" L="200" H="10" P="0,0,0.3,0.2,2860,0,0,0" m=""/><S T="8" X="1263" Y="1444" L="718" H="449" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="2"/><S T="8" X="154" Y="1049" L="302" H="499" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="3"/><S T="8" X="730" Y="1195" L="264" H="151" P="0,0,0.3,0.2,0,0,0,0" c="2" m="" lua="4"/><S T="8" X="804" Y="313" L="670" H="520" P="0,0,0.3,0.2,5400,0,0,0" c="2" m="" lua="7"/><S T="5" X="470" Y="123" L="154" H="42" P="0,0,0.3,0.2,90,0,0,0"/><S T="5" X="1140" Y="123" L="154" H="42" P="0,0,0.3,0.2,-90,0,0,0"/><S T="5" X="491" Y="90" L="91" H="31" P="0,0,0.3,0.2,110,0,0,0"/><S T="5" X="471" Y="337" L="91" H="31" P="0,0,0.3,0.2,110,0,0,0"/><S T="5" X="490" Y="333" L="91" H="31" P="0,0,0.3,0.2,130,0,0,0"/><S T="5" X="1124" Y="346" L="91" H="31" P="0,0,0.3,0.2,90,0,0,0"/><S T="5" X="1119" Y="90" L="91" H="31" P="0,0,0.3,0.2,-110,0,0,0"/><S T="5" X="512" Y="82" L="78" H="42" P="0,0,0.3,0.2,150,0,0,0"/><S T="5" X="1098" Y="82" L="78" H="42" P="0,0,0.3,0.2,-150,0,0,0"/><S T="8" X="1239" Y="1062" L="765" H="299" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="5"/><S T="8" X="75" Y="1599" L="157" H="107" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="6"/><S T="8" X="563" Y="1594" L="157" H="107" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="8"/><S T="5" X="922" Y="214" L="110" H="23" P="0,0,0.3,0.2,140,0,0,0"/><S T="5" X="569" Y="257" L="58" H="23" P="0,0,0.3,0.2,90,0,0,0"/><S T="5" X="858" Y="256" L="58" H="23" P="0,0,0.3,0.2,160,0,0,0"/><S T="5" X="1045" Y="227" L="49" H="23" P="0,0,0.3,0.2,180,0,0,0"/><S T="5" X="999" Y="206" L="74" H="23" P="0,0,0.3,0.2,220,0,0,0"/><S T="5" X="902" Y="408" L="58" H="23" P="0,0,0.3,0.2,90,0,0,0"/><S T="5" X="563" Y="294" L="196" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="728" Y="338" L="101" H="23" P="0,0,0.3,0.2,-50,0,0,0"/><S T="5" X="653" Y="372" L="101" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="874" Y="370" L="80" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="1098" Y="336" L="101" H="23" P="0,0,0.3,0.2,-50,0,0,0"/><S T="5" X="1110" Y="348" L="47" H="23" P="0,0,0.3,0.2,-50,0,0,0"/><S T="5" X="1101" Y="450" L="156" H="23" P="0,0,0.3,0.2,280,0,0,0"/><S T="5" X="823" Y="196" L="101" H="23" P="0,0,0.3,0.2,-20,0,0,0"/><S T="5" X="644" Y="194" L="45" H="23" P="0,0,0.3,0.2,150,0,0,0"/><S T="5" X="733" Y="143" L="33" H="23" P="0,0,0.3,0.2,150,0,0,0"/><S T="5" X="835" Y="103" L="195" H="23" P="0,0,0.3,0.2,160,0,0,0"/><S T="5" X="637" Y="120" L="157" H="23" P="0,0,0.3,0.2,240,0,0,0"/><S T="5" X="918" Y="179" L="101" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="1064" Y="370" L="161" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="978" Y="127" L="129" H="23" P="0,0,0.3,0.2,-90,0,0,0"/><S T="5" X="938" Y="511" L="129" H="23" P="0,0,0.3,0.2,-90,0,0,0"/><S T="5" X="799" Y="339" L="111" H="23" P="0,0,0.3,0.2,-140,0,0,0"/><S T="5" X="746" Y="270" L="81" H="23" P="0,0,0.3,0.2,70,0,0,0"/><S T="5" X="611" Y="463" L="101" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="763" Y="499" L="101" H="23" P="0,0,0.3,0.2,-90,0,0,0"/><S T="5" X="941" Y="448" L="101" H="23" P="0,0,0.3,0.2,-180,0,0,0"/><S T="5" X="816" Y="526" L="101" H="23" P="0,0,0.3,0.2,20,0,0,0"/><S T="5" X="497" Y="351" L="138" H="23" P="0,0,0.3,0.2,130,0,0,0"/><S T="5" X="508" Y="431" L="138" H="23" P="0,0,0.3,0.2,210,0,0,0"/><S T="5" X="469" Y="494" L="156" H="23" P="0,0,0.3,0.2,270,0,0,0"/><S T="5" X="544" Y="548" L="156" H="23" P="0,0,0.3,0.2,350,0,0,0"/><S T="5" X="592" Y="557" L="156" H="23" P="0,0,0.3,0.2,360,0,0,0"/><S T="5" X="883" Y="546" L="528" H="44" P="0,0,0.3,0.2,360,0,0,0"/><S T="5" X="1047" Y="294" L="196" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="451" Y="313" L="30" H="550" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="478" Y="240" L="94" H="26" P="0,0,0.3,0.2,90,0,0,0"/><S T="5" X="1123" Y="457" L="163" H="26" P="0,0,0.3,0.2,90,0,0,0"/><S T="5" X="1112" Y="492" L="163" H="26" P="0,0,0.3,0.2,110,0,0,0"/><S T="5" X="1132" Y="240" L="94" H="26" P="0,0,0.3,0.2,-90,0,0,0"/><S T="5" X="1124" Y="175" L="130" H="23" P="0,0,0.3,0.2,-110,0,0,0"/><S T="5" X="808" Y="575" L="700" H="26" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="804" Y="76" L="526" H="23" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="492" Y="158" L="94" H="23" P="0,0,0.3,0.2,110,0,0,0"/><S T="5" X="540" Y="88" L="94" H="23" P="0,0,0.3,0.2,140,0,0,0"/><S T="5" X="1150" Y="313" L="32" H="550" P="0,0,0.3,0.2,0,0,0,0"/><S T="5" X="1070" Y="88" L="94" H="23" P="0,0,0.3,0.2,-140,0,0,0"/><S T="5" X="815" Y="52" L="700" H="28" P="0,0,0.3,0.2,0,0,0,0"/><S T="12" X="812" Y="1751" L="1640" H="207" P="0,0,0.3,0.2,0,0,0,0" o="533d2e"/><S T="1" X="612" Y="1543" L="14" H="58" P="0,0,0,0.2,16,0,0,0" m=""/><S T="12" X="813" Y="737" L="1643" H="125" P="0,0,0.3,0.2,0,0,0,0" o="BAD9E8"/></S><D><DS X="903" Y="1168"/></D><O><O X="19" Y="1008" C="22" nosync="" P="0" type="tree"/><O X="93" Y="1033" C="22" nosync="" P="0" type="tree"/><O X="189" Y="1186" C="22" nosync="" P="0" type="tree"/><O X="1340" Y="1580" C="22" nosync="" P="0" type="npc" name="nosferatu"/><O X="954" Y="1180" C="22" nosync="" P="0" type="npc" name="laura"/><O X="708" Y="505" C="22" nosync="" P="0" type="npc" name="garry"/><O X="856" Y="506" C="22" nosync="" P="0" type="npc" name="thompson"/><O X="763" Y="1206" C="22" nosync="" P="0" type="craft_table"/><O X="499" Y="1601" C="22" nosync="" P="0" type="recipe" name="basic_axe"/><O X="1596" Y="1241" C="22" nosync="" P="0" type="recipe" name="copper_shovel"/><O X="1569" Y="1247" C="22" nosync="" P="0" type="recipe" name="copper_axe"/><O X="950" Y="114" C="22" nosync="" P="0" type="recipe" name="iron_shovel"/><O X="1434" Y="1594" C="22" nosync="" P="0" type="recipe" name="log_stakes"/><O X="956" Y="154" C="22" nosync="" P="0" type="spirit_orb" name="1"/><O X="1057" Y="332" C="22" nosync="" P="0" type="recipe" name="basic_shovel"/><O X="15" Y="960" C="22" nosync="" P="0" type="recipe" name="iron_axe"/><O X="1449" Y="996" C="22" nosync="" P="0" type="rock"/><O X="1554" Y="981" C="22" nosync="" P="0" type="rock"/><O X="1296" Y="1067" C="22" nosync="" P="0" type="rock"/><O X="1535" Y="1599" C="11" nosync="" P="0" type="teleport" route="mine" id="1"/><O X="510" Y="519" C="11" nosync="" P="0" type="teleport" route="mine" id="2"/><O X="1027" Y="1188" C="22" nosync="" P="0" type="tree"/><O X="56" Y="1605" C="22" nosync="" P="0" type="tree"/><O X="584" Y="431" C="22" nosync="" P="0" type="rock"/><O X="521" Y="264" C="22" nosync="" P="0" type="rock"/><O X="629" Y="169" C="22" nosync="" P="0" type="copper_ore"/><O X="782" Y="100" C="22" nosync="" P="0" type="gold_ore"/><O X="888" Y="208" C="22" nosync="" P="0" type="copper_ore"/><O X="1031" Y="189" C="22" nosync="" P="0" type="iron_ore"/><O X="856" Y="342" C="22" nosync="" P="0" type="rock"/><O X="1053" Y="507" C="22" nosync="" P="0" type="rock"/><O X="1004" Y="504" C="22" nosync="" P="0" type="rock"/><O X="933" Y="417" C="22" nosync="" P="0" type="iron_ore"/></O><L/></Z></C>]],
castle = [[<C><P L="2000" H="6000" d="x_deadmeat/x_pictos/d_2297.png,1465,471;x_deadmeat/x_pictos/d_2297.png,1167,742;x_deadmeat/x_pictos/d_2297.png,346,441;x_deadmeat/x_pictos/d_2297.png,-22,760;x_deadmeat/x_pictos/d_2297.png,360,1055;x_deadmeat/x_pictos/d_2297.png,786,803;x_deadmeat/x_pictos/d_2297.png,1371,1025;x_deadmeat/x_pictos/d_2297.png,462,1247;x_deadmeat/x_pictos/d_2297.png,1171,1659;x_deadmeat/x_pictos/d_2297.png,1349,1606;x_deadmeat/x_pictos/d_2297.png,259,1767;x_deadmeat/x_pictos/d_2297.png,-11,1270;tfmadv/meli/fougere4.png,1924,1248;tfmadv/picto/marais/roseau3.png,687,453;tfmadv/picto/marais/herbe5.png,1462,909;tfmadv/picto/marais/herbe5.png,1094,1721;tfmadv/picto/marais/herbe5.png,530,868;tfmadv/picto/marais/herbe5.png,63,690;tfmadv/picto/foret/pomme-pin.png,887,750;tfmadv/picto/foret/herbe2.png,1060,1064;tfmadv/picto/foret/herbe2.png,567,765;tfmadv/picto/souris/tasbois_horizontal.png,197,744;tfmadv/picto/souris/tasbois_horizontal.png,406,1783;tfmadv/picto/souris/tasbois_horizontal.png,1451,1049;tfmadv/picto/marais/herbe2.png,1168,758;tfmadv/picto/marais/herbe2.png,597,1379;tfmadv/picto/marais/herbe2.png,378,1061;tfmadv/picto/marais/trefles2.png,1432,510;tfmadv/picto/marais/trefles.png,-97,864;tfmadv/picto/marais/test/plante3_moyenne.png,824,1107;tfmadv/picto/marais/test/plantecarnivore1_feuilles1.png,950,1667;tfmadv/picto/marais/test/plantecarnivore1_feuilles1.png,444,1326;tfmadv/picto/foret/treflemoyen.png,173,1554;tfmadv/picto/foret/treflemoyen.png,698,1157;tfmadv/picto/village/petitminerai.png,416,458;tfmadv/picto/village/petitminerai.png,1466,758;tfmadv/picto/village/petitminerai.png,1076,898;tfmadv/picto/village/petitminerai.png,221,1059;tfmadv/picto/village/petitminerai.png,771,1379;tfmadv/picto/village/petitminerai.png,531,1459;tfmadv/picto/village/petitminerai.png,241,1779" D="180c7386662.png,383,4486;180c7386662.png,403,4496" Ca="" MEDATA=";;;0,4:1,4:2,4:3,4:4,4:5,4:6,4:7,4:8,4:9,4:10,4:11,4:12,4:13,4:14,4:15,4:16,4:17,4:18,4:19,4:20,4:21,4:22,4:23,4:24,4:25,4:26,4:27,4:28,4:29,4:30,4:31,4:32,4:33,4;0,4:1,4:2,4:3,4:4,4:5,4:6,4:7,4:8,4:9,4:10,4:11,4:12,4:13,4:14,4:15,4:16,4:17,4:18,4:19,4:20,4:21,4:22,4:23,4:24,4:25,4:26,4:27,4:28,4:29,4:30,4:31,4:32,4:33,4:34,4:35,4:36,4:37,4:38,4:39,4:40,4:41,4:42,4-0;0::0,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:1-"/><Z><S><S T="0" X="7" Y="2745" L="10" H="10" P="0,0,0.3,0.2,0,0,0,0" i="0,0,17f9dab706f.jpg"/><S T="0" X="89" Y="3226" L="197" H="10" P="0,0,0.3,0.2,30,0,0,0" m=""/><S T="0" X="54" Y="3174" L="197" H="10" P="0,0,0.3,0.2,50,0,0,0" m=""/><S T="0" X="274" Y="3193" L="69" H="10" P="0,0,0.3,0.2,40,0,0,0" m=""/><S T="0" X="214" Y="3178" L="84" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="156" Y="3144" L="84" H="10" P="0,0,0.3,0.2,60,0,0,0" m=""/><S T="0" X="269" Y="3258" L="197" H="10" P="0,0,0.3,0.2,-10,0,0,0" m=""/><S T="0" X="530" Y="3241" L="330" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="654" Y="3241" L="197" H="10" P="0,0,0.3,0.2,-10,0,0,0" m=""/><S T="0" X="849" Y="3224" L="197" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="1027" Y="3224" L="158" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="1194" Y="3240" L="197" H="10" P="0,0,0.3,0.2,10,0,0,0" m=""/><S T="0" X="1700" Y="3217" L="197" H="10" P="0,0,0.3,0.2,20,0,0,0" m=""/><S T="0" X="1514" Y="3184" L="197" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="1713" Y="3237" L="197" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="12" X="446" Y="4969" L="896" H="295" P="0,0,0.3,0.2,0,0,0,0" o="c53c45" m=""/><S T="0" X="1687" Y="3021" L="51" H="10" P="0,0,0.3,0.2,230,0,0,0" m=""/><S T="0" X="1641" Y="2987" L="51" H="10" P="0,0,0.3,0.2,200,0,0,0" m=""/><S T="0" X="1600" Y="2983" L="51" H="10" P="0,0,0.3,0.2,170,0,0,0" m=""/><S T="0" X="1566" Y="2996" L="51" H="10" P="0,0,0.3,0.2,160,0,0,0" m=""/><S T="0" X="1854" Y="3263" L="103" H="10" P="0,0,0.3,0.2,30,0,0,0" m=""/><S T="0" X="1994" Y="3512" L="103" H="10" P="0,0,5,0.2,-80,0,0,0" m=""/><S T="0" X="1959" Y="3606" L="103" H="10" P="0,0,5,0.2,-60,0,0,0" m=""/><S T="0" X="1903" Y="3687" L="103" H="10" P="0,0,1,0.2,-50,0,0,0" m=""/><S T="0" X="1820" Y="3743" L="103" H="10" P="0,0,0.3,0.2,-20,0,0,0" m=""/><S T="0" X="1726" Y="3767" L="103" H="10" P="0,0,0.3,0.2,-10,0,0,0" m=""/><S T="0" X="1587" Y="3726" L="118" H="10" P="0,0,0.3,0.2,10,0,0,0" m=""/><S T="0" X="1421" Y="3716" L="220" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="1146" Y="3745" L="349" H="10" P="0,0,0.3,0.2,-10,0,0,0" m=""/><S T="0" X="838" Y="3826" L="310" H="10" P="0,0,0.3,0.2,-20,0,0,0" m=""/><S T="1" X="-13" Y="2265" L="10" H="3651" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="133" Y="3092" L="10" H="62" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="2009" Y="3168" L="10" H="2154" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="1168" Y="3019" L="10" H="482" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="1092" Y="3184" L="10" H="76" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="1121" Y="3135" L="10" H="76" P="0,0,0,0.2,50,0,0,0" m=""/><S T="0" X="1910" Y="3309" L="53" H="10" P="0,0,0.3,0.2,60,0,0,0" m=""/><S T="4" X="2003" Y="3381" L="10" H="190" P="0,0,20,0.2,0,0,0,0" m=""/><S T="1" X="1535" Y="2948" L="10" H="453" P="0,0,0,0.2,0,0,0,0" m=""/><S T="0" X="151" Y="4046" L="442" H="10" P="0,0,0.3,0.2,-10,0,0,0" m=""/><S T="0" X="291" Y="3848" L="675" H="10" P="0,0,0.3,0.2,3,0,0,0" m=""/><S T="0" X="586" Y="3977" L="442" H="10" P="0,0,0.3,0.2,-8,0,0,0" m=""/><S T="0" X="1024" Y="3955" L="442" H="10" P="0,0,0.3,0.2,2,0,0,0" m=""/><S T="0" X="1064" Y="3955" L="442" H="10" P="0,0,0.3,0.2,2,0,0,0" m=""/><S T="0" X="1472" Y="4040" L="411" H="10" P="0,0,0.3,0.2,22,0,0,0" m=""/><S T="0" X="1654" Y="4046" L="474" H="10" P="0,0,0.3,0.2,22,0,0,0" m=""/><S T="0" X="1678" Y="4119" L="43" H="10" P="0,0,0.3,0.2,2,0,0,0" m=""/><S T="0" X="1509" Y="3949" L="209" H="10" P="0,0,0.3,0.2,-4,0,0,0" m=""/><S T="0" X="1799" Y="3942" L="411" H="10" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="1851" Y="4090" L="310" H="61" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="0" X="1618" Y="3834" L="175" H="10" P="0,0,5,0.2,-44,0,0,0" m=""/><S T="4" X="1706" Y="3098" L="10" H="114" P="0,0,20,0.2,0,0,0,0" m=""/><S T="1" X="1700" Y="3089" L="10" H="121" P="0,0,0,0.2,0,0,0,0" m=""/><S T="8" X="1008" Y="3014" L="2013" H="535" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="1"/><S T="8" X="1402" Y="2332" L="900" H="405" P="0,0,0.3,0.2,0,0,0,0" c="4" lua="2" i="0,0,180938afb04.png"/><S T="8" X="427" Y="4768" L="1098" H="410" P="0,0,0.3,0.2,0,0,0,0" c="4" lua="5" i="116,-248,180e68a59d6.png"/><S T="12" X="1355" Y="5515" L="58" H="273" P="0,0,0,0.2,0,0,0,0" o="324650" m="" lua="4" ignore="true"/><S T="1" X="852" Y="4643" L="83" H="450" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="4" Y="4429" L="1990" H="57" P="0,0,0,0.2,0,0,0,0" m=""/><S T="12" X="995" Y="5316" L="1990" H="135" P="0,0,0,0.2,0,0,0,0" o="ABABAB"/><S T="1" X="-31" Y="4636" L="63" H="461" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="-33" Y="5562" L="63" H="440" P="0,0,0,0.2,0,0,0,0" m=""/><S T="1" X="2031" Y="5586" L="80" H="500" P="0,0,0,0.2,0,0,0,0" m=""/><S T="0" X="1403" Y="2518" L="905" H="67" P="0,0,0.3,0.2,0,0,0,0" m=""/><S T="8" X="995" Y="5579" L="1987" H="391" P="0,0,0.3,0.2,0,0,0,0" c="4" lua="3" i="0,0,1817ac76a6a.png"/><S T="8" X="996" Y="3878" L="2009" H="470" P="0,0,0.3,0.2,180,0,0,0" c="4" m="" lua="6"/><S T="8" X="983" Y="1329" L="1985" H="381" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="7"/><S T="8" X="983" Y="632" L="1985" H="381" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="9"/><S T="8" X="985" Y="961" L="2005" H="318" P="0,0,0.3,0.2,0,0,0,0" c="4" m="" lua="8"/><S T="12" X="1657" Y="5708" L="777" H="147" P="0,0,0.3,0.2,0,0,0,0" o="324650" m=""/><S T="12" X="399" Y="5709" L="872" H="147" P="0,0,0.3,0.2,0,0,0,0" o="324650" m=""/><S T="10" X="400" Y="1860" L="800" H="80" P="0,0,0.3,0,0,0,0,0" c="3"/><S T="10" X="1359" Y="1860" L="1120" H="80" P="0,0,0.3,0,0,0,0,0" c="3"/><S T="10" X="600" Y="1780" L="80" H="80" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="400" Y="1490" L="80" H="10" P="1,-1,0.3,0,0,1,0,0" m=""/><S T="10" X="760" Y="1700" L="80" H="80" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="440" Y="1700" L="80" H="80" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="320" Y="1600" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="600" Y="1640" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="360" Y="1720" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="600" Y="1520" L="400" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="420" Y="1440" L="120" H="120" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="200" Y="1520" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="300" Y="1440" L="120" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1120" Y="1000" L="120" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1721" Y="1766" L="120" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1080" Y="960" L="120" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1770" Y="1724" L="120" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1320" Y="920" L="120" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1520" Y="1040" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="780" Y="920" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="780" Y="660" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="700" Y="740" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1500" Y="660" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="1220" Y="780" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="900" Y="760" L="80" H="80" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="40" Y="720" L="80" H="160" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="700" Y="1040" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="580" Y="1000" L="80" H="40" P="0,0,0.3,0,0,0,0,0"/><S T="10" X="80" Y="1440" L="80" H="40" P="0,-1,0.3,0,0,0,0,0"/><S T="10" X="20" Y="1420" L="40" H="80" P="0,-1,0.3,0,0,0,0,0" c="3"/><S T="10" X="51" Y="1300" L="40" H="80" P="0,-1,0.3,0,0,0,0,0" c="3"/><S T="10" X="400" Y="1200" L="80" H="120" P="0,-1,0.3,0,0,0,0,0" c="3"/><S T="10" X="1926" Y="1678" L="80" H="463" P="0,-1,0.3,0,0,0,0,0" c="3"/><S T="10" X="120" Y="1700" L="240" H="240" P="0,0,0.3,0,360,0,0,0"/><S T="10" X="1220" Y="1280" L="40" H="280" P="0,0,0.3,0,-360,0,0,0"/><S T="10" X="1979" Y="1172" L="40" H="1460" P="0,0,0.3,0,-360,0,0,0"/><S T="10" X="921" Y="1460" L="640" H="80" P="0,0,0.3,0,-360,0,0,0"/><S T="10" X="947" Y="1120" L="1896" H="40" P="0,0,0.3,0,-360,0,0,0"/><S T="10" X="931" Y="820" L="1863" H="40" P="0,0,0.3,0,-360,0,0,0"/><S T="10" X="1000" Y="460" L="2000" H="40" P="0,0,0.3,0,-360,0,0,0"/><S T="10" X="240" Y="1280" L="400" H="40" P="0,0,0.3,0,-360,0,0,0"/><S T="12" X="760" Y="1820" L="20" H="40" P="1,20,0.3,0.2,0,1,2000,0" o="6D4E94" c="3"/><S T="12" X="30" Y="1580" L="20" H="40" P="1,20,0.3,0.2,0,1,2000,0" o="000000" c="2" m=""/><S T="12" X="810" Y="1660" L="20" H="40" P="1,20,0.3,0.2,0,1,2000,0" o="000000" c="2" m=""/><S T="12" X="360" Y="1390" L="38" H="20" P="1,20,0.3,0.2,0,1,2000,0" o="000000" c="2" m=""/><S T="12" X="30" Y="1420" L="20" H="40" P="1,20,0.3,0.2,0,1,2000,0" o="000000" c="2" m=""/><S T="12" X="80" Y="1520" L="80" H="120" P="1,20,0,0,0,1,0,0" o="6D4E94"/><S T="12" X="760" Y="1600" L="80" H="120" P="1,20,0,0,0,1,0,0" o="68A2C4"/><S T="12" X="80" Y="1360" L="80" H="120" P="1,20,0,0,0,1,0,0" o="007D42"/><S T="12" X="400" Y="1340" L="80" H="80" P="1,20,0,0,0,1,0,0" o="C6C96D"/><S T="12" X="80" Y="1580" L="20" H="40" P="1,20,0.3,0.2,0,1,2000,0" o="68A2C4" c="3"/><S T="12" X="760" Y="1660" L="20" H="40" P="1,20,0.3,0.2,0,1,2000,0" o="007D42" c="3"/><S T="12" X="40" Y="1410" L="40" H="20" P="1,20,0.3,0.2,0,1,2000,0" o="C6C96D" c="3"/><S T="1" X="1660" Y="1020" L="40" H="160" P="0,0,0,0.2,0,0,0,0"/><S T="1" X="300" Y="1020" L="40" H="160" P="0,0,0,0.2,0,0,0,0"/><S T="1" X="1160" Y="720" L="40" H="160" P="0,0,0,0.2,0,0,0,0"/><S T="1" X="840" Y="720" L="40" H="160" P="0,0,0,0.2,0,0,0,0"/><S T="1" X="400" Y="640" L="40" H="320" P="0,0,0,0.2,0,0,0,0"/><S T="1" X="840" Y="520" L="40" H="80" P="0,0,0,0.2,180,0,0,0"/><S T="1" X="1160" Y="520" L="40" H="80" P="0,0,0,0.2,180,0,0,0"/><S T="1" X="1280" Y="1040" L="40" H="120" P="0,0,0,0.2,0,0,0,0"/><S T="1" X="840" Y="1000" L="40" H="200" P="0,0,0,0.2,0,0,0,0"/><S T="10" X="1360" Y="720" L="280" H="20" P="1,0,0.3,0,0,0,0,0" c="3"/><S T="10" X="1000" Y="630" L="240" H="20" P="1,0,0.3,0,0,0,0,0" c="3"/><S T="10" X="240" Y="630" L="240" H="20" P="1,0,0.3,0,0,0,0,0" c="3"/><S T="10" X="1616" Y="740" L="160" H="120" P="0,0,0.3,0,0,0,0,0"/><S T="12" X="1091" Y="2567" L="1851" H="75" P="0,0,0.3,0.2,0,0,0,0" o="533d2e"/><S T="12" X="487" Y="4649" L="13" H="404" P="0,0,0.3,0.2,0,0,0,0" o="324650" c="2" m=""/><S T="12" X="559" Y="2298" L="463" H="787" P="0,0,0,0.2,90,0,0,0" o="b17a6d"/><S T="12" X="1946" Y="2300" L="463" H="187" P="0,0,0,0.2,90,0,0,0" o="b17a6d"/><S T="12" X="1101" Y="2036" L="1880" H="187" P="0,0,0,0.2,180,0,0,0" o="b17a6d"/><S T="0" X="1075" Y="5831" L="647" H="36" P="0,0,0.3,0.2,0,0,0,0" c="2" m=""/><S T="12" X="1292" Y="2411" L="66" H="17" P="0,0,0.3,0.2,-30,0,0,0" o="915E52"/><S T="12" X="1601" Y="2349" L="191" H="17" P="0,0,0.3,0.2,-30,0,0,0" o="915E52"/><S T="12" X="1420" Y="2396" L="207" H="17" P="0,0,0.3,0.2,0,0,0,0" o="915E52"/><S T="12" X="1441" Y="2300" L="251" H="17" P="0,0,0.3,0.2,0,0,0,0" o="915E52"/><S T="12" X="1712" Y="2302" L="68" H="17" P="0,0,0.3,0.2,0,0,0,0" o="915E52"/><S T="12" X="1738" Y="2337" L="90" H="17" P="0,0,0.3,0.2,90,0,0,0" o="915E52"/><S T="12" X="1755" Y="2436" L="134" H="17" P="0,0,0.3,0.2,0,0,0,0" o="915E52"/><S T="12" X="1255" Y="2263" L="149" H="17" P="0,0,0.3,0.2,30,0,0,0" o="915E52"/><S T="12" X="1072" Y="2226" L="242" H="17" P="0,0,0.3,0.2,0,0,0,0" o="915E52"/><S T="1" X="1742" Y="4935" L="400" H="250" P="1,9999,0,0.2,0,1,0,0" lua="300"/><S T="0" X="1460" Y="4996" L="150" H="170" P="1,9999,30,0.2,0,1,0,0" lua="200" contactlistener="true"/><S T="1" X="1497" Y="4880" L="30" H="30" P="1,9999,2,0.2,0,1,0,0" lua="12000" contactListener="true"/><S T="1" X="1427" Y="4884" L="30" H="30" P="1,9999,2,0.2,0,1,0,0" lua="12001" contactListener="true"/><S T="12" X="1966" Y="4832" L="30" H="553" P="0,0,0.3,0.2,0,0,0,0" o="324650" m=""/><S T="12" X="1623" Y="5104" L="757" H="50" P="0,0,0.3,0.2,0,0,0,0" o="324650" m=""/><S T="12" X="1262" Y="4822" L="137" H="587" P="0,0,0.3,0.2,0,0,0,0" o="324650" m=""/><S T="12" X="1630" Y="4529" L="827" H="100" P="0,0,0.3,0.2,0,0,0,0" o="324650" m=""/><S T="0" X="12" Y="4838" L="36" H="29" P="0,0,0.3,0.2,0,0,0,0" c="4" i="0,0,181b8d28825.png"/></S><D><P X="1160" Y="1400" T="11" P="0,0"/><P X="120" Y="1090" T="11" P="0,0"/><P X="40" Y="650" T="11" P="0,0"/><P X="637" Y="1541" T="109" P="1,0"/><P X="306" Y="1458" T="109" P="1,0"/><P X="1125" Y="1020" T="109" P="1,0"/><DS X="855" Y="3195"/></D><O><O X="322" Y="3221" C="22" nosync="" P="0" type="npc" name="edric"/><O X="593" Y="3222" C="22" nosync="" P="0" type="npc" name="laura"/><O X="769" Y="3189" C="22" nosync="" P="0" type="npc" name="marc"/><O X="286" Y="1190" C="22" nosync="" P="0" type="npc" name="saruman"/><O X="48" Y="610" C="22" nosync="" P="0" type="spirit_orb" name="2"/><O X="1890" Y="5596" C="22" nosync="" P="0" type="spirit_orb" name="5"/><O X="75" Y="1058" C="22" nosync="" P="0" type="spirit_orb" name="3"/><O X="1104" Y="1330" C="22" nosync="" P="0" type="spirit_orb" name="4"/><O X="1768" Y="3214" C="22" nosync="" P="0" type="npc" name="cole"/><O X="206" Y="5604" C="22" nosync="" P="0" type="npc" name="niels"/><O X="137" Y="4792" C="22" nosync="" P="0" type="npc" name="monk"/><O X="1075" Y="2197" C="11" nosync="" P="0" type="teleport" route="arena" id="2"/><O X="273" Y="3156" C="11" nosync="" P="0" type="teleport" route="arena" id="1"/><O X="1326" Y="888" C="14" nosync="" P="0" type="monster_spawn"/><O X="1150" Y="3728" C="14" nosync="" P="0" type="monster_spawn"/><O X="494" Y="3963" C="14" nosync="" P="0" type="monster_spawn"/><O X="944" Y="3914" C="14" nosync="" P="0" type="monster_spawn"/><O X="358" Y="5613" C="14" nosync="" P="0" type="monster_spawn"/><O X="1069" Y="1083" C="14" nosync="" P="0" type="monster_spawn"/><O X="620" Y="1064" C="14" nosync="" P="0" type="monster_spawn"/><O X="1379" Y="2282" C="14" nosync="" P="0" type="monster_spawn"/><O X="1380" Y="2370" C="14" nosync="" P="0" type="monster_spawn"/><O X="718" Y="4681" C="14" nosync="" P="0" type="final_boss"/><O X="486" Y="4710" C="14" nosync="" P="0" type="monster_spawn_passive"/><O X="1952" Y="3906" C="11" nosync="" P="0" type="teleport" route="bridge" id="1"/><O X="126" Y="5609" C="11" nosync="" P="0" type="teleport" route="final_boss" id="1"/><O X="1063" Y="3197" C="11" nosync="" P="0" type="teleport" route="castle" id="1"/><O X="1669" Y="3172" C="11" nosync="" P="0" type="teleport" route="castle" id="2"/><O X="23" Y="4793" C="11" nosync="" P="0" type="teleport" route="final_boss" id="2"/><O X="57" Y="4024" C="11" nosync="" P="0" type="teleport" route="shrines" id="1"/><O X="1911" Y="1420" C="11" nosync="" P="0" type="teleport" route="shrines" id="2"/><O X="358" Y="784" C="11" nosync="" P="0" type="teleport" route="enigma" id="2"/><O X="35" Y="5609" C="11" nosync="" P="0" type="teleport" route="bridge" id="2"/><O X="86" Y="3806" C="22" nosync="" P="0" type="recipe" name="bridge"/><O X="164" Y="3118" C="22" nosync="" P="0" type="recipe" name="iron_sword"/><O X="524" Y="1476" C="22" nosync="" P="0" type="recipe" name="copper_sword"/><O X="1684" Y="4085" C="22" nosync="" P="0" type="recipe" name="copper_shield"/><O X="156" Y="1245" C="22" nosync="" P="0" type="recipe" name="gold_shovel"/><O X="257" Y="1080" C="22" nosync="" P="0" type="recipe" name="gold_axe"/><O X="1769" Y="5596" C="22" nosync="" P="0" type="recipe" name="gold_sword"/><O X="1809" Y="5596" C="22" nosync="" P="0" type="recipe" name="gold_shield"/><O X="183" Y="3118" C="22" nosync="" P="0" type="recipe" name="iron_shield"/><O X="1619" Y="2960" C="22" nosync="" P="0" type="recipe" name="gold_axe"/><O X="721" Y="5607" C="22" nosync="" P="0" type="bridge"/><O X="1494" Y="3699" C="22" nosync="" P="0" type="tree"/><O X="1408" Y="3691" C="22" nosync="" P="0" type="tree"/><O X="1307" Y="3659" C="22" nosync="" P="0" type="tree"/><O X="1232" Y="3698" C="22" nosync="" P="0" type="tree"/><O X="1079" Y="3689" C="22" nosync="" P="0" type="tree"/><O X="985" Y="3730" C="22" nosync="" P="0" type="tree"/><O X="786" Y="3181" C="22" nosync="" P="0" type="craft_table"/><O X="1816" Y="5565" C="14" nosync="" P="0" type="fiery_dragon"/><O X="1740" Y="1090" C="7" P="0"/><O X="1360" Y="1090" C="7" P="0"/><O X="920" Y="1090" C="7" P="0"/><O X="380" Y="1090" C="7" P="0"/><O X="1740" Y="1090" C="11" P="0"/><O X="1360" Y="1090" C="11" P="0"/><O X="920" Y="1090" C="11" P="0"/><O X="380" Y="1090" C="11" P="0"/><O X="1846" Y="710" C="423" P="-60,0"/><O X="1696" Y="590" C="423" P="-60,0"/><O X="1894" Y="628" C="11" P="0"/><O X="1744" Y="508" C="11" P="0"/><O X="431" Y="770" C="11" nosync="" P="0" type="teleport" route="enigma" id="1"/><O X="431" Y="770" C="11" nosync="" P="0" type="teleport" route="enigma" id="1"/><O X="431" Y="770" C="11" nosync="" P="0" type="teleport" route="enigma" id="1"/></O><L><JP M1="112" M2="71" AXIS="0,1"/><JP M1="117" M2="71" AXIS="1,0" LIM1="0" LIM2="Infinity" MV="1,6.666666666666667"/><JP M1="113" M2="71" AXIS="0,1"/><JD M1="113" M2="112"/><JP M1="121" M2="71" AXIS="0,1"/><JP M1="114" M2="71" AXIS="0,1"/><JP M1="118" M2="71" AXIS="1,0" LIM1="-Infinity" LIM2="0" MV="1,-6.666666666666667"/><JD M1="121" M2="114"/><JP M1="122" M2="71" AXIS="0,1"/><JP M1="116" M2="71" AXIS="0,1"/><JD M1="116" M2="122"/><JP M1="119" M2="71" AXIS="1,0" LIM1="0" LIM2="Infinity" MV="1,6.666666666666667"/><JP M1="123" M2="71" AXIS="1,0"/><JP M1="120" M2="71" AXIS="0,1" LIM1="-Infinity" LIM2="0" MV="1,6.666666666666667"/><JD M1="123" M2="115"/><JP M1="115" M2="71" AXIS="1,0"/><JD c="C55924,4,1,0" P1="640,1720" P2="650,1725"/><JD c="C55924,4,1,0" P1="500,1370" P2="510,1375"/><JD c="C55924,4,1,0" P1="640,1730" P2="650,1725"/><JD c="C55924,4,1,0" P1="500,1380" P2="510,1375"/><JR M1="134" M2="109" P1="1000,630" MV="Infinity,1.4"/><JR M1="133" M2="109" P1="1360,720" MV="Infinity,1.4"/><JR M1="135" M2="109" P1="240,630" MV="Infinity,1.4"/><JD c="272416,200,1,0" P1="100,0" P2="100,1600"/><JD c="272416,200,1,0" P1="280,0" P2="280,1800"/><JD c="272416,200,1,0" P1="460,0" P2="460,1800"/><JD c="272416,200,1,0" P1="640,0" P2="640,1800"/><JD c="272416,200,1,0" P1="820,0" P2="820,1800"/><JD c="272416,200,1,0" P1="1000,0" P2="1000,1800"/><JD c="272416,200,1,0" P1="1180,0" P2="1180,1800"/><JD c="272416,200,1,0" P1="1360,0" P2="1360,1800"/><JD c="272416,200,1,0" P1="1540,0" P2="1540,1800"/><JD c="272416,200,1,0" P1="1720,0" P2="1720,1800"/><JD c="272416,200,1,0" P1="1900,0" P2="1900,1800"/></L></Z></C>]]
}
local keys = {
LEFT = 0,
JUMP = 1,
RIGHT = 2,
DUCK = 3,
SPACE = 32,
KEY_0 = 48,
KEY_1 = 49,
KEY_2 = 50,
KEY_3 = 51,
KEY_4 = 52,
KEY_5 = 53,
KEY_6 = 54,
KEY_7 = 55,
KEY_8 = 56,
KEY_9 = 57,
KEY_P = 80,
KEY_X = 88,
KEY_U = 85
}
local assets = {
ui = {
reply = "171d2f983ba.png",
btnNext = "17eaa38a3f8.png",
inventory = "17ff9b6b11f.png",
dialogue_proceed = "180c6623296.png",
dialogue_replies = "180c6a27f57.png",
divine_panel = "180e6a4cc73.png",
marker = "180e698ed6b.png",
attack = "180f665dad5.png",
defense = "180f6724a3b.png",
durability = "180f66d1355.png",
chopping = "180f697bff3.png",
mining = "180f675527f.png",