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

i wanna know if its possible to make an "if" condition based on a item name.

Ashtar

ShadowRealm.online
Joined
May 1, 2009
Messages
312
Reaction score
102
i wanna know if its possible to make an "if" condition based on a item name.

Hello guys, i wanna know if its possible to make an "if" based on a item name like for example...


somthing like this...

if item name == "special magic sword" then

(here goes any kind of normal script)


i hope you guys can help me on this one.


thanks for your time btw.
i will rep++ any kind of help in here for sure.

~kind regards...~
~Ashtar~

- - - Updated - - -

bump
 
Here it is...
this is an action example:
LUA:
function onUse(cid, item, fromPos, item2, toPos)
	if getItemName(item.itemid) == "sword" then
		doCreatureSay(cid, "What you are holding there, is a " .. getItemName(item.itemid), 34)
	end
	return TRUE
end
 
Back
Top