• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Vocation quest on start

KylerXX

Active Member
Joined
Jun 24, 2010
Messages
439
Reaction score
30
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local vocs =  {
[1] = {8871, 2647, 2641, 2190, 2525, 2457, 2003, 2160}, -- items sorc
[2] = {8871, 2647, 2641, 2182, 2525, 2457, 2003, 2160}, -- items druid
[3] = {2473, 2647, 2641, 7408, 2525, 2457, 2003, 2160}, -- items paladin
[4] = {8872, 2647, 2641, 2399, 2525, 2457, 2003, 2160} -- items knight
}
local voc = vocs[getPlayerVocation(cid)]
if item.itemid == 1740 and item.actionid == 4444 then
	if voc then
		if getPlayerStorageValue(cid, 155) == 0 then
		doPlayerSetStorageValue(cid, 155, 1)
		doPlayerAddItem(cid, voc[1], 1)
		doPlayerAddItem(cid, voc[2], 1)
		doPlayerAddItem(cid, voc[3], 1)
		doPlayerAddItem(cid, voc[4], 1)
		doPlayerAddItem(cid, voc[5], 1)
		doPlayerAddItem(cid, voc[6], 1)
		doPlayerAddItem(cid, voc[7], 10)
		elseif getPlayerStorageValue(cid, 155) == 1 then
		doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "It is empty.")
		end
	end
end
return true
end

actions.xml =
Code:
<action actionid="4444" event="script" value="name.lua"/>
You need to put only one actionid to one chest.

:thumbup:
 
Back
Top