• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Help me to change a detail in my dice script

jackl90

Member
Joined
Jul 25, 2017
Messages
249
Reaction score
12
i just want remove the "Name of my character" in msg when i use the dice :)
Thanks

Script
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local dicePosition = item:getPosition()
    local value = math.random(6)
    local isInGhostMode = player:isInGhostMode()

    dicePosition:sendMagicEffect(26, isInGhostMode and player)

    local spectators = Game.getSpectators(dicePosition, false, true, 3, 3)
    for i = 1, #spectators do
        player:say(player:getName() .. " Rolled " .. value .. " !", TALKTYPE_MONSTER_SAY, isInGhostMode, spectators[i], dicePosition)
    end

    item:transform(5091 + value)
    return true
end
 
Solution
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local dicePosition = item:getPosition()
    local value = math.random(6)
    local isInGhostMode = player:isInGhostMode()

    dicePosition:sendMagicEffect(26, isInGhostMode and player)

    local spectators = Game.getSpectators(dicePosition, false, true, 3, 3)
    for i = 1, #spectators do
        player:say("Rolled " .. value .. " !", TALKTYPE_MONSTER_SAY, isInGhostMode, spectators[i], dicePosition)
    end

    item:transform(5091 + value)
    return true
end
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local dicePosition = item:getPosition()
    local value = math.random(6)
    local isInGhostMode = player:isInGhostMode()

    dicePosition:sendMagicEffect(26, isInGhostMode and player)

    local spectators = Game.getSpectators(dicePosition, false, true, 3, 3)
    for i = 1, #spectators do
        player:say("Rolled " .. value .. " !", TALKTYPE_MONSTER_SAY, isInGhostMode, spectators[i], dicePosition)
    end

    item:transform(5091 + value)
    return true
end
 
Solution

Similar threads

Back
Top