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

Say Item Description

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
287
Reaction score
2
I need an action script that says the item's description in orange. I'm gonna use it so players click use on the kill reward, and it shows the description.

This may help create it.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doCreatureSay(cid, "TOOOOOOT!", TALKTYPE_ORANGE_1)
	return TRUE
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCreatureSay(cid, getItemAttribute(item.uid, "description"), TALKTYPE_ORANGE_1)
end
or
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCreatureSay(cid, getItemDescriptions(uid).special, TALKTYPE_ORANGE_1)
end
 
Thank you. this is the one that works,
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCreatureSay(cid, getItemAttribute(item.uid, "description"), TALKTYPE_ORANGE_1)
end
Can you do make it say the item name too please. cuz right now it says this

He was killed at level 803 by Darkness. [Unjustified]

I would like it to say
You see Astroniis's death note.
He was killed at level 803 by Darkness. [Unjustified]
 
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCreatureSay(cid, getItemAttribute(item.uid, "description"), TALKTYPE_ORANGE_1)
end

Umm, I posted it in my previous message saying which one worked :P
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return [B]doCreatureSay(cid, [COLOR="Red"]getItemAttribute(item.uid, "description")[/COLOR], TALKTYPE_ORANGE_1)[/B]
end
Can you do make it say the item name too please. cuz right now it says this
He was killed at level 803 by Darkness. [Unjustified]
?

anyways, use:
Code:
getItemName(item.uid)
 
I fail. Debugs on use.

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCreatureSay(cid, getItemName(item.uid), getItemAttribute(item.uid, "description"), TALKTYPE_ORANGE_1)
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doCreatureSay(cid, getItemName(item.uid) .. " " .. getItemAttribute(item.uid, "description"), TALKTYPE_ORANGE_1)
end
Also don't use
PHP:
 or [code=lua] because they convert tabs to spaces.
 
Back
Top