• 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!

Change the "Create Summon" System

alltus

Active Member
Joined
Aug 5, 2020
Messages
49
Reaction score
31
[TF2 1.2, Tibia 10.98]
Hey guys, I just would like to know if it's possible to change the system of the normal Summon Creature spell. I would like them to enter in PZ, use stairs etc. like the new ones (Grovebeast, Thundergiant etc.)
Thanks a lot!!
 
Solution
For teleporting them you can use this globalevent and change distFromMaster to how many steps, This is just an alternative but what Evil Puncker posted above looks like how it works on real Tibia.
Lua:
local distFromMaster = 10

function onThink(interval)
    for _, player in ipairs(Game.getPlayers()) do
        local playerPos = player:getPosition()
        if not Tile(playerPos):hasFlag(TILESTATE_PROTECTIONZONE) then
            local summons = player:getSummons()
            if #summons ~= 0 then
                for i = 1, #summons do
                    local summon = summons[i]
                    local summonPos = summon:getPosition()
                    if summonPos.z ~= playerPos.z or summonPos:getDistance(playerPos) >...
I don't know how the new summons work but they use stairs? or you mean they just get teleported to the summoner (master) area if he went X number of sqms off screen?
 
I think they use, I'm not exactly sure but here it is an example (yet, I think this would work too, Mr. Moustafa)
Here it's an example. Go to minute (08:00):

Post automatically merged:

yes it is possible, you can have a general idea of how its done by looking at these changes and changing them to isSummon
I'm gonna check it, thanks!!
 
For teleporting them you can use this globalevent and change distFromMaster to how many steps, This is just an alternative but what Evil Puncker posted above looks like how it works on real Tibia.
Lua:
local distFromMaster = 10

function onThink(interval)
    for _, player in ipairs(Game.getPlayers()) do
        local playerPos = player:getPosition()
        if not Tile(playerPos):hasFlag(TILESTATE_PROTECTIONZONE) then
            local summons = player:getSummons()
            if #summons ~= 0 then
                for i = 1, #summons do
                    local summon = summons[i]
                    local summonPos = summon:getPosition()
                    if summonPos.z ~= playerPos.z or summonPos:getDistance(playerPos) > distFromMaster then
                        summon:teleportTo(playerPos)
                        summon:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    end
                end
            end
        end
    end
    return true
end
and add it to your globalevents.xml
XML:
<globalevent name="SummonTeleport" interval="1000" script="yourscriptnamehere.lua"/>
 
Solution
For teleporting them you can use this globalevent and change distFromMaster to how many steps, This is just an alternative but what Evil Puncker posted above looks like how it works on real Tibia.
Lua:
local distFromMaster = 10

function onThink(interval)
    for _, player in ipairs(Game.getPlayers()) do
        local playerPos = player:getPosition()
        if not Tile(playerPos):hasFlag(TILESTATE_PROTECTIONZONE) then
            local summons = player:getSummons()
            if #summons ~= 0 then
                for i = 1, #summons do
                    local summon = summons[i]
                    local summonPos = summon:getPosition()
                    if summonPos.z ~= playerPos.z or summonPos:getDistance(playerPos) > distFromMaster then
                        summon:teleportTo(playerPos)
                        summon:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    end
                end
            end
        end
    end
    return true
end
and add it to your globalevents.xml
XML:
<globalevent name="SummonTeleport" interval="1000" script="yourscriptnamehere.lua"/>
It worked perfectly!! Thanks :D
 
Back
Top