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

[Problem] setActionId, set UniqueId, etc.

Zikerus

Nutria Developer
Joined
Mar 13, 2008
Messages
193
Reaction score
0
Location
Poole, UK
Hello mates, I tried to make quest with book which contains various text ;P So I made it like items in container but it doesn't work ;] also I tried to make quest for item with action id, still doesn't work, could you give me some samples to use setItemActionID( I don't remember if this is exacly name of function) and for text :p maybe some other attributes too.

Also I would ask if TFS contains function which can take item uid by name/item id (something like getItemById(cid, itemid))?:p
 
Hello good Zikerus, I bring you an example to use SetItemActionId and setItemSpecialDescription, with one of my quests...

Code:
function onUse(cid, item, frompos, item2, topos)
	local queststatus = getPlayerStorageValue(cid,16001)   
 
		if queststatus == -1 then
[COLOR="Red"]			local Shovel = doPlayerAddItem(cid,5710,1)
			doSetItemActionId(Shovel,8002)
			doSetItemSpecialDescription(Shovel,'Boula [/COLOR]is engraved with gold.')
			doPlayerSendTextMessage(cid,22,'You have found the shovel of Boula')
			setPlayerStorageValue(cid,16001,1)
			setPlayerStorageValue(cid,8002,2)
		else
			doPlayerSendTextMessage(cid,22,"It is empty.")
		end
	return 1 
end


Please if you have any doubt about the script let me know..
 
Thanks for such fast replies ;P I will try that Kramer :p I jut had something like that:

doSetItemActionId(doPlayerAddItem(cid,5710,1), 8002)

to optymalize code ;P but it seems to don't work well :D I will try your solution then

@Marcinek~
Not exacly what I mean :p but thanks anyway :D I just wanted to get item unique id to take from player item which have xxxx unique id (or just add to it description~ something like that) ;p I guess it's not possible for now :p

@down
You still don't understand me :p Let me explain it exacly. I want make quest which give you, for example, demon helmet with unique id (e.g. 8000), then I want that player take helmet, go with it to npc and then npc need to check if helmet have unique id (8000), if yes, he will reward the player :p if not... he wont reward him.

P.S.
One more thing I need, if there is an option which let me to get item desctiption (not set, but this function should get it from item and then compare with string <- I know how to compare :p just need to get this special desc. from item ^.,^ I know it's freaked :p but I am just looking for solutions of my problems ;D
 
Last edited:
Code:
                        local Shovel = doPlayerAddItem(cid,5710,1)
			doSetItemActionId(Shovel,8002)
			doSetItemSpecialDescription(Shovel,"Boula is engraved with gold. Item actionid: "..item.actionid..".")

Add to description like that?
 
Back
Top