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

addon chest

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello otlanders, i want a script when you open a chest, you will get a addon like: citizen addons, and when you go to other chest and open you will get a addon like: hunter addons
Thx, i want all the scripts for all addons (8.54)
 
Addon chest
doPlayerAddOutfit(cid,looktype,addon)
Looktype is id outfit and addon is number of addons

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == xxxx then
	queststatus = getPlayerStorageValue(cid,12454)
 	if queststatus == -1 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,looktype,addon)
                doPlayerAddOutfit(cid,looktype,addon)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you got addon!")
 		setPlayerStorageValue(cid,12454,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
end


Code:
    <action uniqueid="xxx" event="script" value="xxx.lua"/>
 
Addon chest
doPlayerAddOutfit(cid,looktype,addon)
Looktype is id outfit and addon is number of addons

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == xxxx then
	queststatus = getPlayerStorageValue(cid,12454)
 	if queststatus == -1 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,looktype,addon)
                doPlayerAddOutfit(cid,looktype,addon)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you got addon!")
 		setPlayerStorageValue(cid,12454,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
end


Code:
    <action uniqueid="xxx" event="script" value="xxx.lua"/>

ok thx, btw can you give me all addons? and edit them? :(
 
Ok. Citizen chest


Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == 15000 then
	queststatus = getPlayerStorageValue(cid,12454)
 	if queststatus == -1 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,136,3)
                doPlayerAddOutfit(cid,128,3)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you got addon!")
 		setPlayerStorageValue(cid,12454,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
end


Hunter chest

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == 15001 then
	queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,137,3)
                doPlayerAddOutfit(cid,129,3)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you got addon!")
 		setPlayerStorageValue(cid,12455,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
end

If helped REP++
 
Ok. Citizen chest


Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == 15000 then
	queststatus = getPlayerStorageValue(cid,12454)
 	if queststatus == -1 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,136,3)
                doPlayerAddOutfit(cid,128,3)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you got addon!")
 		setPlayerStorageValue(cid,12454,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
end


Hunter chest

Code:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
        if item.uid == 15001 then
	queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
            local pPos = getPlayerPosition(cid)
            doSendMagicEffect(pPos, 28)
                doPlayerAddOutfit(cid,137,3)
                doPlayerAddOutfit(cid,129,3)
                    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you got addon!")
 		setPlayerStorageValue(cid,12455,1)
 	else
 	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.")
	end
	else
	return 0
	end
end

If helped REP++

^^, i mean all addons not just hunter, citizen, like all as real tibia when it was 8.54. :)
 
Rep++
LUA:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={335} }
    local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={336} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
	local queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
	local pPos = getPlayerPosition(cid)
	setPlayerStorageValue(cid,12455,1)
	doSendMagicEffect(pPos, 28)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
			if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
 	else
 		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
	end
	return 1
end
 
Rep++
LUA:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
	local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={335} }
    local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={336} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
	local queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
	local pPos = getPlayerPosition(cid)
	setPlayerStorageValue(cid,12455,1)
	doSendMagicEffect(pPos, 28)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
			if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
 	else
 		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
	end
	return 1
end

this is for 1 chest? i want like when i open a chest i get like citizen outift and other quest i get like knight outfit and other i get blablab....
 
Edit those lines
LUA:
local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={335} }
    local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={336} }

Example, only knight addon
LUA:
local femaleOutfits = { ["knight"]={139} }
    local maleOutfits = { ["knight"]={131} }
 
Edit those lines
LUA:
local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norsewoman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={335} }
    local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norsewoman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={336} }

Example, only knight addon
LUA:
local femaleOutfits = { ["knight"]={139} }
    local maleOutfits = { ["knight"]={131} }

Okay, but can u give me how to do ? like xml, action, and what should i put on the chest for like knight addon, soumoner addons, citizen addons. etc
 
Okay, but can u give me how to do ? like xml, action, and what should i put on the chest for like knight addon, soumoner addons, citizen addons. etc

I already told you how to edit it, Give chest action id 1732
then in actions.xml add
Code:
    <action actionid="1732" event="script" value="knightchest.lua"/>
knightchest.lua
LUA:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
local femaleOutfits = { ["knight"]={139} }
    local maleOutfits = { ["knight"]={131} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
	local queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
	local pPos = getPlayerPosition(cid)
	setPlayerStorageValue(cid,12455,1)
	doSendMagicEffect(pPos, 28)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
			if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
 	else
 		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
	end
	return 1
end

and an other example for addon nightmare:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local femaleOutfits = { ["nightmare"]={269} }
    local maleOutfits = { ["nightmare"]={268} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
	local queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
	local pPos = getPlayerPosition(cid)
	setPlayerStorageValue(cid,12455,1)
	doSendMagicEffect(pPos, 28)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
			if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
 	else
 		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
	end
	return 1
end
 
I already told you how to edit it, Give chest action id 1732
then in actions.xml add
Code:
    <action actionid="1732" event="script" value="knightchest.lua"/>
knightchest.lua
LUA:
 function onUse(cid, item, fromPosition, itemEx, toPosition)
local femaleOutfits = { ["knight"]={139} }
    local maleOutfits = { ["knight"]={131} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
	local queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
	local pPos = getPlayerPosition(cid)
	setPlayerStorageValue(cid,12455,1)
	doSendMagicEffect(pPos, 28)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
			if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
 	else
 		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
	end
	return 1
end

and an other example for addon nightmare:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local femaleOutfits = { ["nightmare"]={269} }
    local maleOutfits = { ["nightmare"]={268} }
    local msg = {"Full Addon Set sucesfully added!", "Not Possible"}
	local queststatus = getPlayerStorageValue(cid,12455)
 	if queststatus == -1 then
	local pPos = getPlayerPosition(cid)
	setPlayerStorageValue(cid,12455,1)
	doSendMagicEffect(pPos, 28)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
			if(getPlayerSex(cid) == 0)then
              doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
            else
              doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
            end
 	else
 		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
	end
	return 1
end

thx
 
Back
Top