• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Chest who give you addons.

Szakal

Frank Jaeger
Joined
Apr 16, 2008
Messages
1,338
Reaction score
6
Location
Poland, Lubań.
I make a simple chest who give you a all addons.

The script addons.lua :

function onUse(cid, item, frompos, item2, topos)
prize = item.uid

if prize > 0 and prize < 5000 then
queststatus = getPlayerStorageValue(cid,4581)

if queststatus == -1 then
doCreatureSay(cid, "You have found a all addons.", TALKTYPE_ORANGE_1)
doPlayerAddOutfit(cid, 156, 3)
doPlayerAddOutfit(cid, 152, 3)
doPlayerAddOutfit(cid, 147, 3)
doPlayerAddOutfit(cid, 143, 3)
doPlayerAddOutfit(cid, 157, 3)
doPlayerAddOutfit(cid, 153, 3)
doPlayerAddOutfit(cid, 279, 3)
doPlayerAddOutfit(cid, 278, 3)
doPlayerAddOutfit(cid, 128, 3)
doPlayerAddOutfit(cid, 136, 3)
doPlayerAddOutfit(cid, 288, 3)
doPlayerAddOutfit(cid, 289, 3)
doPlayerAddOutfit(cid, 148, 3)
doPlayerAddOutfit(cid, 144, 3)
doPlayerAddOutfit(cid, 137, 3)
doPlayerAddOutfit(cid, 129, 3)
doPlayerAddOutfit(cid, 270, 3)
doPlayerAddOutfit(cid, 273, 3)
doPlayerAddOutfit(cid, 131, 3)
doPlayerAddOutfit(cid, 139, 3)
doPlayerAddOutfit(cid, 138, 3)
doPlayerAddOutfit(cid, 130, 3)
doPlayerAddOutfit(cid, 269, 3)
doPlayerAddOutfit(cid, 268, 3)
doPlayerAddOutfit(cid, 132, 3)
doPlayerAddOutfit(cid, 140, 3)
doPlayerAddOutfit(cid, 252, 3)
doPlayerAddOutfit(cid, 251, 3)
doPlayerAddOutfit(cid, 150, 3)
doPlayerAddOutfit(cid, 146, 3)
doPlayerAddOutfit(cid, 155, 3)
doPlayerAddOutfit(cid, 151, 3)
doPlayerAddOutfit(cid, 158, 3)
doPlayerAddOutfit(cid, 154, 3)
doPlayerAddOutfit(cid, 133, 3)
doPlayerAddOutfit(cid, 141, 3)
doPlayerAddOutfit(cid, 134, 3)
doPlayerAddOutfit(cid, 142, 3)
doPlayerAddOutfit(cid, 149, 3)
doPlayerAddOutfit(cid, 145, 3)
setPlayerStorageValue(cid,4581,1)
doPlayerAddOutfit(cid, 325, 3)
doPlayerAddOutfit(cid, 324, 3)

else
doPlayerSendTextMessage(cid,22,"It is empty.")
end

return 1
else
return 0
end
end

you can remove AddOutfit lines to get a one addon/outfit , it can help on inquistion quest etc.

Actions:
<action uniqueid="4581" script="addons.lua"/>

If i help you REP ++ :]

Yours Szakal.
 
Last edited:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if (getPlayerStorageValue(cid, xxxx) == -1) then
	for i = 1, #maleOutfits do
		doPlayerAddOutfit(cid, maleOutfits[i], 3)
	end
	for i = 1, #femaleOutfits do
		doPlayerAddOutfit(cid, femaleOutfits[i], 3)
	end
	setPlayerStorageValue(cid, xxxx, 1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a all addons.")
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The chest is empty.")
end

return TRUE
end

Shorter? xD
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if (getPlayerStorageValue(cid, xxxx) == -1) then
	for i = 1, #maleOutfits do
		doPlayerAddOutfit(cid, maleOutfits[i], 3)
	end
	for i = 1, #femaleOutfits do
		doPlayerAddOutfit(cid, femaleOutfits[i], 3)
	end
	setPlayerStorageValue(cid, xxxx, 1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a all addons.")
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The chest is empty.")
end

return TRUE
end

Shorter? xD

much shorter but you cannot cofig ur chest for that addons you whant :D
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local addons = {128, 129, 139}

if (getPlayerStorageValue(cid, xxxx) == -1) then
	for i = 1, #addons do
		doPlayerAddOutfit(cid, addons[i], 3)
	end
	setPlayerStorageValue(cid, xxxx, 1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a all addons.")
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The chest is empty.")
end

return TRUE
end

Okay? :D
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local addons = {128, 129, 139}

if (getPlayerStorageValue(cid, xxxx) == -1) then
	for i = 1, #addons do
		doPlayerAddOutfit(cid, addons[i], 3)
	end
	setPlayerStorageValue(cid, xxxx, 1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a all addons.")
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The chest is empty.")
end

return TRUE
end

Okay? :D

:wub:
 
is it possible if u get a full random addon if u click on a chest? with storage so u could only do it once.
 
Yes,

LUA:
addons = {555, 666, 777, 888}

doPlayerAddOutfit(cid, addons[math.random(1,4)])
 
Yes,

LUA:
addons = {555, 666, 777, 888}

doPlayerAddOutfit(cid, addons[math.random(1,4)])

well.. i guess thats good, but i dont know where/how i shall lay it in my tfs, so i wont ask questions :) just sounds noobish :D haha. but thx
 
Question, if you take away the "3"

doPlayerAddOutfit(cid, 156, 3)

will it just give u the outfit? cuz i wanna make quests to get the outfit FIRST, then the addons in another quest :p
 
Back
Top