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

Lua Creaturescript/levitate problems

swevaman

New Member
Joined
Jun 18, 2013
Messages
38
Reaction score
0
Okay so the first problem is in this script I found on the forums, it works 100% fine EXCEPT when two people kill the monster... When that happens it will summon 2x (demon 2) instead of 1x like it should :(
Code:
local monster = "Demon"
local summon = "Demon 2"
function onKill(cid, target, lastHit)
    if isPlayer(target) then
        return true
    end
    if isPlayer(cid) and getCreatureName(target) == monster and not(getCreatureByName(summon)) then
        local t = getCreaturePosition(target)
        doCreatureSay(target, "I'm not finished with you yet!", 0x11)
        doSummonCreature(summon, t)
        doSendMagicEffect(t,1)
    end
    return true
end

Another issue is a little one, and I'm wondering if it's possible to block levitate on certain places? Like on a roof where you could normally levitate on, disable it?
 
@Levitate
You can place id 1548 there. It is invisible pathblocking tile.


Lua:
local monster = "Demon"
local summon = "Demon 2"
function onKill(cid, target, lastHit)
    if isPlayer(target) then
        return true
    end
    if isPlayer(cid) and getCreatureName(target) == monster and not(getCreatureByName(summon)) and os.time() >= getStorage(75755) then
        local t = getCreaturePosition(target)
        doCreatureSay(target, "I'm not finished with you yet!", 0x11)
        doSummonCreature(summon, t)
        doSendMagicEffect(t,1)
        doSetStorage(75755, os.time() + 5)
    end
    return true
end
 
Thank you so much!

Is there a way to edit the 1548 tile through the .otb, to make it walkable?

Walkable BUT still unable to levitate on?
 
Back
Top