Ezzam
New Member
- Joined
- Jan 16, 2008
- Messages
- 213
- Reaction score
- 2
(New script in quote, previous was bugged, now I have tested it, and it works 100%)
First, when you create quest put UniqueID=ItemID & ActionID=Count+100
Ex. Golden armor would be like this:
AID=101(OBS: You must set AID, to only get 1 item write AID: 101)
UID=2466 (ID of g-arm)
(New script in quote, previous was bugged, now I have tested it, and it works 100%)
Save as "Quest.lua" in "...\data\actions\scripts\
Put in "...\data\actions\actions.xml"
(New script in quote, previous was bugged, now I have tested it, and it works 100%)
First, when you create quest put UniqueID=ItemID & ActionID=Count+100
Ex. Golden armor would be like this:
AID=101(OBS: You must set AID, to only get 1 item write AID: 101)
UID=2466 (ID of g-arm)
(New script in quote, previous was bugged, now I have tested it, and it works 100%)
Save as "Quest.lua" in "...\data\actions\scripts\
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
price = item.uid
count = item.actionid - 100
if price > 1000 and price < 10000 then
queststatus = getPlayerStorageValue(cid, price)
local itemWeight = getItemWeight(price, count)
local playerCap = getPlayerFreeCap(cid)
if queststatus == -1 then
if playerCap >= itemWeight then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found ' .. count .. ' ' .. getItemName(price) .. '.')
doPlayerAddItem(cid, price, count)
setPlayerStorageValue(cid, price, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have found ' .. count .. ' ' .. getItemName(item.uid) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
end
return TRUE
end
Put in "...\data\actions\actions.xml"
Code:
<action itemid="1740" script="Quest.lua"/>
<action fromid="1747" toid="1749" script="Quest.lua"/>
(New script in quote, previous was bugged, now I have tested it, and it works 100%)
Last edited: