well im not using a script all im doing is putting the id of the arrows on both the action and unique id of the chest and it works but it gives the player 100 arrowsFirst find out how the chest has been scripted.
Is it a script in actions.xml?
If it is find the script and change the amount given to 1 within the script.
You can check quickly by opening your map editor and finding the actionID or uniqueID used on the chest, then find that ID in actions.xml
If the quest was made within the map.. change the items inside the chest to 1 arrow.
well im not using a script all im doing is putting the id of the arrows on both the action and unique id of the chest and it works but it gives the player 100 arrowsi dont want it to do that i only want them to receive one
ok ill find one and put it here and you or someone please tell me if its okay thank you i think this is the answer i was looking forJust make a lua script. When he clicks on a chest with aid x it gives him x arrow and tells him x msg. U can find similar scripts on otland
As Danger II posted, the script is added in actions. Look for the id you use in Remere and look for the Lua script with that id in actions.xml, it's either added with the actionid or the chests itemids in actions.xml.well im not using a script all im doing is putting the id of the arrows on both the action and unique id of the chest and it works but it gives the player 100 arrowsi dont want it to do that i only want them to receive one
As Danger II posted, the script is added in actions. Look for the id you use in Remere and look for the Lua script in actions.xml, it's either added with the actionid or the chest ids in actions.xml.
Post the script. Also post your server version.
function onUse(cid, item, frompos, item2, topos)
local config = {
UID = 4321 ----------Any UID here
ITEM = {1294,1} ---- itemid and itemcount In this sample 5 crystal coins
}-- config end --
if item.uid == config.UID then
if getPlayerStorageValue(cid,config.UID) == -1 then
doPlayerAddItem(cid, config.ITEM)
setPlayerStorageValue(cid,config.UID,1)
else
doPlayerSendTextMessage(cid,25,"The chest is empty.")
end
end
return TRUE
end
oops ok this is the server im using [16/5/2015 11:51:19] The OTX Server Version: (2.51 - SE - 1549) - Codename: (Necron)I ment the script you were already using. There is no need to add different scripts for the quest chests.
To see which server versiobn you are using: https://otland.net/threads/how-to-see-which-server-you-are-using.230892/
-- simple quests based on uniqueId
-- to make quest create chest on map and set its uniqueId to id of quest item
function onUse(cid, item, frompos, item2, topos)
prize = item.uid
count = item.actionid
if prize > 0 and prize < 9000 then
queststatus = getPlayerStorageValue(cid,prize)
if queststatus == -1 then
if count > 1 then
doPlayerSendTextMessage(cid,22,'You have found '.. count ..' of ' .. getItemName(prize) .. '.')
doPlayerAddItem(cid,prize,count)
setPlayerStorageValue(cid,prize,1)
else
doPlayerSendTextMessage(cid,22,'You have found a ' .. getItemName(prize) .. '.')
doPlayerAddItem(cid,prize,1)
setPlayerStorageValue(cid,prize,1)
addPlayerRep(cid, 5, TEXTCOLOR_LIGHTBLUE)
end
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return 1
else
return 0
end
end
count = item.actionid
understood haha thank you i think this is going to do it thank youThis means the actionid will be the count, so all you have to do is just don't add an actionid.Code:count = item.actionid
Although I assume it's supposed to be item.actionid - 100, since the minimum of actionids is 100.