BorkaOTS
New Member
- Joined
- Jul 7, 2015
- Messages
- 9
- Reaction score
- 0
Hello, i have following problems (using tfs 1.0):
I found wrong coded script in creaturescripts.xml :
I get it that I have to change name from Kamulec into something else but what should i write there?
METIN.lua scripts is following
- In console while loading ots
Code:
[Error - CreatureEvent: :configureEvent] Invalid type for creature event: Kamulec
[Warning - Base Events: :loadFromXml] Failed to configure event
I found wrong coded script in creaturescripts.xml :
Code:
<event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
I get it that I have to change name from Kamulec into something else but what should i write there?
- In console while executing comand /metin that should start event
Code:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/METIN.lua:onSay
data/talkactions/scripts/Metin.lua:23: attempt to call global 'doCreateMonster'
(a nil value)
stack traceback:
[C]: in funcktion 'doCreateMonster'
data/talkactions/scripts/METIN.lua:23: in function <data/talkactions/scripts/METIN.lua:18>
METIN.lua scripts is following
Code:
local stones = {
[1] = {name="Earth Stone"},
[2] = {name="Icy Stone"},
[3] = {name="Fire Stone"},
[4] = {name="Wind Stone"},
}
local pos = {
[1] = {pos={x = 959, y = 638, z = 7}},
[2] = {pos={x = 1012, y = 639, z = 7}},
[3] = {pos={x = 961, y = 688, z = 7}},
[4] = {pos={x = 1011, y = 686, z = 7}},
}
function onSay()
local monst = stones[math.random(1, #stones)]
local poss = pos[math.random(1, #pos)]
print(monst, poss)
if not(monst) then return TRUE end
doCreateMonster(monst.name,poss.pos)
doBroadcastMessage('[Event Stones]\n '.. monst.name ..' have been spawn. Find it in Event Chamber and defeat it!', 22)
return TRUE
end