• 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 ActionID on quest item

menfes

Sociopat
Joined
Feb 7, 2009
Messages
380
Reaction score
4
Location
Space
I wonder if it is possible to set an actionID on rewards from quests, for example you get leather boots with action id 1234 from a quest, is that possible?
 
I could not figure out how to do with that command :/

If someone helps me it would be very nice :)

Here is my quest.lua and i want the reward to have actionId 1234
Code:
function onUse(cid, item, frompos, item2, topos)
local itemID = 1693
local storage = 111444


 	queststatus = getPlayerStorageValue(cid,storage)
 	if queststatus == -1 then
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found "  ..getItemDescriptionsById(itemID).article .." "..getItemDescriptionsById(itemID).name.. ".")
	doPlayerAddItem(cid,itemID,1)
 	setPlayerStorageValue(cid,storage,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
	
	return 1
	end
 
Not Tested
Code:
local config = {

item = 1693, -- torqoise round pillow, 
storage = 111444, -- storage value
actionId = 1234
}

function onUse(cid, item, frompos, item2, topos)
-- check to see if they did the quest already, if they didn't continue --
if ((item.uid == 1234) and (getPlayerStorageValue(cid, config.storage) == 0)) then 
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found "..getItemArticleById(config.item).." "..
getItemNameById(config.item)..".")
doSetItemActionId(doPlayerAddItem(cid, config.item, 1), config.actionId)
setPlayerStorageValue(cid, config.storage, 1)	
 else
 -- if they did it already tell them too bad its empty :P --
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
end
end

Code:
<action uniqueid="1234" script="yourquest.lua"/>
 
Last edited:
Back
Top