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

Use item to get addon

newlegend

Fear Me
Joined
Oct 18, 2009
Messages
146
Reaction score
0
Location
Australia
Hey there :D i am just here to ask if anyone could make a script like.. you right click on a object a special item id and it gives you a certain addon please let me know if thats possible :D
 
Yeh, but, do you want it as a quest? or just a normal item that gives you all addons

well i dont want it as a quest haha. See like for example theres alot of trees.... and there is a special one out of them that you right click and use and it will give you a certain addon in the script.
 
Then you can use that one, since its the same (Its like a quest, if you try to use the tree again it will say "You already have this outfit"
Just let me explain to you the numbers and stuff:
LUA:
[12001] = {12010,Hunter,2},

12001 = UID of tree
12010 = Storage(use an empty one if this is used)
Hunter = Name of outfit
2 = Outfit ID
 
Haha, no worries man
The long code goes in
data/actions/scripts/outfits.lua

Then just copy XML and as I explained above (above above)^_^
Put the UniqueIDs for the trees at RME :D
 
make new actionscript for each of the outfits you want and just change the configs name :) should work.
Code:
--Daniel Couillard: Blood BlvD Ot.
function onUse(cid, item, frompos, item2, topos)
--Config--
local outfit = Hunter
-/Config--
	if getPlayerStorageValue(cid,20202) == -1 then
		doPlayerAddOutfit(cid,outfit,2)
		setPlayerStorageValue(cid,20202,1)
	else
		doPlayerSendCancel(cid,"You have already obtained this ' .. outfit .. ' addon")
	end
return true
end
 
make new actionscript for each of the outfits you want and just change the configs name :) should work.
Code:
--Daniel Couillard: Blood BlvD Ot.
function onUse(cid, item, frompos, item2, topos)
--Config--
local outfit = Hunter
-/Config--
	if getPlayerStorageValue(cid,20202) == -1 then
		doPlayerAddOutfit(cid,outfit,2)
		setPlayerStorageValue(cid,20202,1)
	else
		doPlayerSendCancel(cid,"You have already obtained this ' .. outfit .. ' addon")
	end
return true
end

Too much files no good :(
 
Back
Top