• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Monsters looking ahead

El Man

«لَا إِلَٰهَ إِلَّا ٱللَّٰهُ»
Joined
Mar 23, 2013
Messages
161
Reaction score
33
When startup server all monster looking ahead like .
1661871628264.png

How i fix it.?

TFS 0.4
 
in globalevents.xml
Code:
<globalevent name="dirMonster" type="startup" event="script" value="scripts/globalevents/directionMonster.lua"/>

script directionMonster.lua:
Code:
function onStartup()
    local config = {
        [1] = {pos = {x = 227, y = 754, z = 8}, dir = 1},
        [2] = {pos = {x = 231, y = 757, z = 8}, dir = 2},
        [3] = {pos = {x = 223, y = 757, z = 8}, dir = 3},
        [4] = {pos = {x = 223, y = 760, z = 8}, dir = 4}
    }

    for i = 1, #config do
        local crt = getTopCreature(config[i].pos).uid
        if crt > 0 and isMonster(crt) then
            doCreatureSetLookDirection(crt, config[i].dir)
        end
    end

    return true
end

pos is position of monster and dir is monster looking.
 
in globalevents.xml
Code:
<globalevent name="dirMonster" type="startup" event="script" value="scripts/globalevents/directionMonster.lua"/>

script directionMonster.lua:
Code:
function onStartup()
    local config = {
        [1] = {pos = {x = 227, y = 754, z = 8}, dir = 1},
        [2] = {pos = {x = 231, y = 757, z = 8}, dir = 2},
        [3] = {pos = {x = 223, y = 757, z = 8}, dir = 3},
        [4] = {pos = {x = 223, y = 760, z = 8}, dir = 4}
    }

    for i = 1, #config do
        local crt = getTopCreature(config[i].pos).uid
        if crt > 0 and isMonster(crt) then
            doCreatureSetLookDirection(crt, config[i].dir)
        end
    end

    return true
end

pos is position of monster and dir is monster looking.
But i need control it from rme

theres way for it?


1661876957756.png
Thanks for intersting !
 
Back
Top