• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.
Resource icon

Simple block OnUse/OnMoveItem/OnTradeRequest

Klank

Althea ¤ A New World Developer
Joined
Feb 21, 2008
Messages
1,107
Reaction score
687
Location
Norway
Klank submitted a new resource:

Simple block OnUse and OnMoveItem - Block items to be eaten/moved/traded

Hello,

A useful code for those who want to add items in map, but only for showoff.


How does it work? Simply add a action id of your preference on an item in RME. In this case, it is a brown mushroom. This will make sure it is not eatable, moveable or tradeable.
View attachment 85783


LUA:
local ActionId = 999

-- THIS IS USED TO DISABLE THE POSSIBILITY TO EAT FOOD OR MAKE ITEM NORMALLY USEABLE NOT.
local returnFalse = Action()
function returnFalse.onUse(player...

Read more about this resource...
 
Don't have a server to test on, but did you check if the 'use with' attribute breaks the script?
Specifically with weapons, to 'use with' from a distance, on a breakable object, like a box.

It was a cause of frustration for me when attempting to stop people from moving stuff placed via rme.
The server walks the character to the item, the server picks up the item, then walks to the new destination and attempts to break the object.

Requires those few specific pieces and everything being far enough away to force the walking.

It might've been fixed already, but just figured I'd throw it out there for someone to verify.

Untitled.webp
 
Don't have a server to test on, but did you check if the 'use with' attribute breaks the script?
Specifically with weapons, to 'use with' from a distance, on a breakable object, like a box.

It was a cause of frustration for me when attempting to stop people from moving stuff placed via rme.
The server walks the character to the item, the server picks up the item, then walks to the new destination and attempts to break the object.

Requires those few specific pieces and everything being far enough away to force the walking.

It might've been fixed already, but just figured I'd throw it out there for someone to verify.

View attachment 86249

Good point,i will try to test that out later today. However, i would imagine the action you would try to do would return false. But i will make sure later.
 
@Xikini , The player will move to the item, but the code does not break. It works as expected :)

This is a mana potion set with action id 999.
mpTest.gif
 
Back
Top