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

Solved Block Item Move

rstdias

New Member
Joined
Dec 22, 2013
Messages
25
Reaction score
3
Hello,

I have a dice with ActionID 12666, when player use this dice give a item to player and teleport to temple, but any player can pickup this item and generate infinite items.

Is there any method to do this?
 
Last edited:
By posting the script and telling us what server you are using we might be able to help you.

Sorry, I forgot to post the version.

TFS 1.0

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local randomValue = math.random(5792, 5797)
    local realRandomValue = (randomValue - 5791)

    Player(cid):addItem(9020, realRandomValue, true)
    Item(item.uid):transform(randomValue)

    Position(fromPosition):sendMagicEffect(CONST_ME_CRAPS)

    Player(cid):sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "You were rewarded with " .. (realRandomValue) .. " event tokens.")
    Creature(cid):say(Player(cid):getName() .. " rolled a " .. (realRandomValue), TALKTYPE_ORANGE_1)

    Creature(cid):teleportTo(WARCONFIG_TEMPLEPOS, false)
    Position(WARCONFIG_TEMPLEPOS):sendMagicEffect(CONST_ME_TELEPORT)

    return true
end
 
Back
Top