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

Magic effect not found (/z talkaction)

Auriaotbr

New Member
Joined
Feb 15, 2017
Messages
61
Reaction score
1
Good morning I need help for my magic effect command it is not working. TFS 1.2


XML:
<talkaction words="/z" script="magiceffect.lua" />

Script
Lua:
function onSay(cid, words, param, channel)
    param = tonumber(param)
    if(not param or param < 0 or param > CONST_ME_LAST) then
        doPlayerSendCancel(cid, "Numeric param may not be lower than 0 and higher than " .. CONST_ME_LAST .. ".")
        return true
    end

    doSendMagicEffect(getCreaturePosition(cid), param)
    return true
end
 
Solution
use the OFFICIAL script
XML:
<talkaction words="/z" separator=" " script="magiceffect.lua" />
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end
    if tonumber(param) == nil then
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Param required.")
        return false
    else
        player:getPosition():sendMagicEffect(tonumber(param))
    end
    return false
end
use the OFFICIAL script
XML:
<talkaction words="/z" separator=" " script="magiceffect.lua" />
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end
    if tonumber(param) == nil then
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Param required.")
        return false
    else
        player:getPosition():sendMagicEffect(tonumber(param))
    end
    return false
end
 
Last edited:
Solution
use the OFFICIAL script
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end
    if tonumber(param) == nil then
        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Param required.")
        return false
    else
        player:getPosition():sendMagicEffect(tonumber(param))
    end
    return false
end


Not found /z 55 ...
 
5xX28U8.png

works exactly the way i told you to set it up
 
Back
Top