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

Lua A bug with item edition

brunolopes

New Member
Joined
Nov 8, 2009
Messages
49
Reaction score
1
Hello,

I have a problem with a system that I have made:

Code:
function onKill(cid, target)
	if(getCreatureName(target) == "Rotworm") then
		if(getPlayerStorageValue(cid, 100002) == 1) then
			local item = doPlayerAddItem(cid, 11186)
			doItemSetAttribute(item, "name", "strange item")
			doItemSetAttribute(item, "aid", 6666)
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have found a strange item!\nBring it to Riccer")
			setPlayerStorageValue(cid, 100002, 2)
		end
	end
	return true
end

When the player kills the "Rotworm", he will get a 'carrion worm fang' with edited name 'strange item', but when the player drops the item on ground, the edited name returns to 'carrion worm fang' and loses the actionid '6666' too.

Someone can help me with this?

Distribution: TheForgottenServer 0.3.6pl1
 
Do you need the action id for anything else? Because I suggest you to create a item in items.otb with carrion worm fang clientid, I think it works.


edited: Oops, the topic is old, but this answer may serve for the other guy.
 
Back
Top Bottom