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

Lua tfs 0.3.6! 8.6 Statue addons!

Hi guys!
I went to actions/scripts and I made a lua file with the name " Statues"
I copied this text
-- citizen (done)
local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,100}}, outfit_female = 136, outfit_male = 128, addon = 1, storageID = 10001})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second citizen addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5890,100}, {5902,50}, {2480,1}}, outfit_female = 136, outfit_male = 128, addon = 2, storageID = 10002})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- hunter (done)
local outfit_node = keywordHandler:addKeyword({'first hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5947,1}, {5876,100}, {5948,100}, {5891,5}, {5887,1}, {5889,1}, {5888,1}}, outfit_female = 137, outfit_male = 129, addon = 1, storageID = 10003})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 10004})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- knight (done)
local outfit_node = keywordHandler:addKeyword({'first knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5892,1}}, outfit_female = 139, outfit_male = 131, addon = 1, storageID = 10005})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second knight addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5893,100}, {5924,1}, {5885,1}, {5887,1}}, outfit_female = 139, outfit_male = 131, addon = 2, storageID = 10006})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- mage (done)
local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{2182,1}, {2186,1}, {2185,1}, {8911,1}, {2181,1}, {2183,1}, {2190,1}, {2191,1}, {2188,1}, {8921,1}, {2189,1}, {2187,1}, {2392,30}, {5809,1}, {2193,20}}, outfit_female = 138, outfit_male = 130, addon = 1, storageID = 10005})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5903,1}}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10006})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)


-- summoner (done)
local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5878,100}}, outfit_female = 141, outfit_male = 133, addon = 1, storageID = 10009})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second summoner addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5894,70}, {5911,20}, {5883,40}, {5922,35}, {5879,10}, {5881,60}, {5882,40}, {2392,3}, {5905,30}}, outfit_female = 141, outfit_male = 133, addon = 2, storageID = 10010})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)


-- barbarian (done)
local outfit_node = keywordHandler:addKeyword({'first barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5884,1}, {5885,1}, {5910,50}, {5911,50}, {5886,10}}, outfit_female = 147, outfit_male = 143, addon = 1, storageID = 10011})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second barbarian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5880,100}, {5892,1}, {5893,50}, {5876,50}}, outfit_female = 147, outfit_male = 143, addon = 2, storageID = 10012})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- druid (done)
local outfit_node = keywordHandler:addKeyword({'first druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5896,50}, {5897,50}}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 10013})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{5906,100}, {5939,1}, {5940,1}}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 10014})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
I couldn't get the whole but you guys know which scripts I'm talking about.

Then I went to actions/actions.xml and wrote this line
Code:
    <action itemid="1444" script="Statue.lua"/>

Is there anything that I've missed so help me out. I've never done this before. And I would really like to do that you do not have to bring items with you. You just need to bring gold ingots. But yea first we fix it up and then we can fix the other
 
Oh my bad. i thought you were looking for like you click on a statue and it gives you an addon the code you have is an npc. Thats my bad misleading you
 
Add actionID on statue.(Not tested)
Items = XXXX (IDitem), X (Count).
PHP:
local config ={

   [4001]={
     name ="First Citizen Addon",-- name
     addon_type =1,-- addon
     outfit ={136,128},-- female / male
     cost =0,-- cost
     items ={{5878,100}},-- items
   },
   [4002]={
     name ="Second Citizen Addon",
     addon_type =2,
     outfit ={136,128},
     cost =0,
     items ={{5890,100},{5902,50},{2480,1}},
   },
   [4003]={
     name ="First Hunter Addon",
     addon_type =1,
     outfit ={137,129},
     cost =0,
     items ={{5947,1},{5876,100},{5948,100},{5889,1},{5887,1},{5888,1},{5891,5}},
   },
   [4004]={
     name ="Second Hunter Addon",
     addon_type =2,
     outfit ={137,129},
     cost =0,
     items ={{5875,1}},
   },
   [4005]={
     name ="First Mage Addon",
     addon_type =1,
     outfit ={138,130},
     cost =0,
     items ={{5958,1}},
   },
   [4006]={
     name ="Second Mage Addon",
     addon_type =2,
     outfit ={138,130},
     cost =0,
     items ={{5903,1}},
   },
   [4007]={
     name ="First Knight Addon",
     addon_type =1,
     outfit ={139,131},
     cost =0,
     items ={{5880,100}},
   },
   [4008]={
     name ="Second Knight Addon",
     addon_type =2,
     outfit ={139,131},
     cost =0,
     items ={{5893,100},{5924,1},{5885,1},{5887,1}},
   },
   [4009]={
     name ="First Nobleman Addon",
     addon_type =1,
     outfit ={140,132},
     cost =150000,
     items ={},
   },
   [4010]={
     name ="Second Nobleman Addon",
     addon_type =2,
     outfit ={140,132},
     cost =150000,
     items ={},
   },

   [4011]={
     name ="First Summoner Addon",
     addon_type =1,
     outfit ={141,133},
     cost =0,
     items ={{5958,1}},
   },
   [4012]={
     name ="Second Summoner Addon",
     addon_type =2,
     outfit ={141,133},
     cost =0,
     items ={{5894,70},{5911,20},{5883,40},{5905,30},{5904,15},{5882,40},{5881,60},{5886,10},{5922,35}},
   },
   [4013]={
     name ="First Warrior Addon",
     addon_type =1,
     outfit ={142,134},
     cost =0,
     items ={{5899,100},{5925,100},{5884,1},{5919,1}},
   },
   [4014]={
     name ="Second Warrior Addon",
     addon_type =2,
     outfit ={142,134},
     cost =0,
     items ={{5887,1},{5880,100}},
   },
   [4015]={
     name ="First Barbarian Addon",
     addon_type =1,
     outfit ={147,143},
     cost =0,
     items ={{5885,1},{5884,1},{5911,50},{5910,50},{5886,10}},
   },
   [4016]={
     name ="Second Barbarian Addon",
     addon_type =2,
     outfit ={147,143},
     cost =0,
     items ={{5892,1},{5880,100},{5893,50},{5876,50}},
   },
   [4017]={
     name ="First Druid Addon",
     addon_type =1,
     outfit ={148,144},
     cost =0,
     items ={{5897,50},{5896,50}},
   },
   [4018]={
     name ="Second Druid Addon",
     addon_type =2,
     outfit ={148,144},
     cost =0,
     items ={{5940,1},{5938,1},{5937,1},{5942,1},{5906,100}},
   },
   [4019]={
     name ="First Wizard Addon",
     addon_type =1,
     outfit ={149,145},
     cost =0,
     items ={{2488,1},{2123,1},{2492,1},{2536,1}},
   },
   [4020]={
     name ="Second Wizard Addon",
     addon_type =2,
     outfit ={149,145},
     cost =0,
     items ={{5922,50},},
   },
   [4021]={
     name ="First Oriental Addon",
     addon_type =1,
     outfit ={150,146},
     cost =0,
     items ={{5945,1}},
   },
   [4022]={
     name ="Second Oriental Addon",
     addon_type =2,
     outfit ={150,146},
     cost =0,
     items ={{5883,100},{5895,100},{5891,2},{5912,100}},
   },
   [4023]={
     name ="First Pirate Addon",
     addon_type =1,
     outfit ={155,151},
     cost =0,
     items ={{6126,100},{6097,100},{6098,100}},
   },
   [4024]={
     name ="Second Pirate Addon",
     addon_type =2,
     outfit ={155,151},
     cost =0,
     items ={{2385,1},{6098,1},{6095,1},{6096,1}},
   },
   [4025]={
     name ="First Assassin Addon",
     addon_type =1,
     outfit ={156,152},
     cost =0,
     items ={{5898,30},{5882,10},{5881,30},{5895,20},{5905,20},{5906,10},{5885,1}},
   },
   [4026]={
     name ="Second Assassin Addon",
     addon_type =2,
     outfit ={156,152},
     cost =0,
     items ={{5909,50},{5910,50},{5911,50},{5912,50},{5913,50},{5914,50},{5886,10}},
   },
   [4027]={
     name ="First Beggar Addon",
     addon_type =1,
     outfit ={157,153},
     cost =20000,
     items ={{5883,100}},
   },
   [4028]={
     name ="Second Beggar Addon",
     addon_type =2,
     outfit ={157,153},
     cost =0,
     items ={{6107,1}},
   },
   [4029]={
     name ="First Shaman Addon",
     addon_type =1,
     outfit ={158,154},
     cost =0,
     items ={{3955,5},{5015,1}},
   },
   [4030]={
     name ="Second Shaman Addon",
     addon_type =2,
     outfit ={158,154},
     cost =0,
     items ={{3966,5},{3967,5}},
   },
   [4031]={
     name ="First Norseman Addon",
     addon_type =1,
     outfit ={252,251},
     cost =0,
     items ={{7290,5}},
   },
   [4032]={
     name ="Second Norseman Addon",
     addon_type =2,
     outfit ={252,251},
     cost =0,
     items ={{7290,10}},
   },
   [4033]={
     name ="First Nightmare Addon",
     addon_type =1,
     outfit ={269,268},
     cost =0,
     items ={{6500,500}},
   },
   [4034]={
     name ="Second Nightmare Addon",
     addon_type =2,
     outfit ={269,268},
     cost =0,
     items ={{6500,1500}},
   },
   [4035]={
     name ="First Jester Addon",
     addon_type =1,
     outfit ={270,273},
     cost =0,
     items ={{5879,1},{5878,4}},
   },
   [4036]={
     name ="Second Jester Addon",
     addon_type =2,
     outfit ={270,273},
     cost =0,
     items ={{5909,5}},
   },
   [4037]={
     name ="First Brotherhood Addon",
     addon_type =1,
     outfit ={279,278},
     cost =0,
     items ={{6500,500}},
   },
   [4038]={
     name ="Second Brotherhood Addon",
     addon_type =2,
     outfit ={279,278},
     cost =0,
     items ={{6500,1500}},
   },
   [4039]={
     name ="First Demonhunter Addon",
     addon_type =1,
     outfit ={288,289},
     cost =150000,
     items ={},
   },
   [4040]={
     name ="Second Demonhunter Addon",
     addon_type =2,
     outfit ={288,289},
     cost =150000,
     items ={},
   },
   [4041]={
     name ="First Yalaharian Addon",
     addon_type =1,
     outfit ={324,325},
     cost =150000,
     items ={},
   },
   [4042]={
     name ="Second Yalaharian Addon",
     addon_type =2,
     outfit ={324,325},
     cost =150000,
     items ={},
   },

}-------- config end-------
local storage =14000
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local addon, removeItems, removeMoney = config[item.actionid],0,0
        if getPlayerStorageValue(cid, storage + item.actionid)~=1then
                if getPlayerMoney(cid)>= addon.cost then
                        removeMoney =1
                end
                if#addon.items > 0 then
                        for i =1,#addon.items do
                                if getPlayerItemCount(cid, addon.items[i][1])>= addon.items[i][2]then
                                        removeItems = removeItems+1
                                end
                        end
                end
                if removeMoney ==1and removeItems ==#addon.items then
                        for i =1,#addon.items do
                                doPlayerRemoveItem(cid, addon.items[i][1], addon.items[i][2])
                        end
                        doPlayerRemoveMoney(cid, addon.cost)
                        doPlayerAddOutfit(cid, addon.outfit[1], addon.addon_type)
                        doPlayerAddOutfit(cid, addon.outfit[2], addon.addon_type)
                        setPlayerStorageValue(cid, storage + item.actionid,1)
                        doPlayerSendTextMessage(cid,21,"Now you can use the "..addon.name..".")
                else
                        if addon.cost ~=0then
                                msg ="You need "..addon.cost.." gold coins and "
                        else
                                msg ="You need "
                        end
                        if#addon.items > 0 then
                                for i =1,#addon.items do
                                        msg = msg..""..addon.items[i][2].."x "..getItemNameById(addon.items[i][1]).." "
                                end
                        end
                        doPlayerSendTextMessage(cid,21, msg.."for the "..addon.name..".")
                end
        else
                doPlayerSendTextMessage(cid,21,"You already have the "..addon.name..".")
        end
        return TRUE
end

XML:
Code:
<actionactionid="4001-4042"event="script"value="addons.lua"/>
 
Last edited:
that shit is all kinds of bugged lol.. if you want to click on a statue and it add a specific addon(s) this is what you need.
File to go in actions:
http://www.mediafire.com/download/r7n1jiz4xt34f6r/AddonsxQuest.rar

and post this in your actions xml file:
Code:
<!-- Addons-->
    <action actionid="4581" script="AddonsxQuest/Citizen.lua"/>
    <action actionid="4582" script="AddonsxQuest/Hunter.lua"/>
    <action actionid="4583" script="AddonsxQuest/Mage.lua"/>
    <action actionid="4584" script="AddonsxQuest/Knight.lua"/>
    <action actionid="4585" script="AddonsxQuest/Nobleman.lua"/>
    <action actionid="4586" script="AddonsxQuest/Summoner.lua"/>
    <action actionid="4587" script="AddonsxQuest/Warrior.lua"/>
    <action actionid="4588" script="AddonsxQuest/Barbarian.lua"/>
    <action actionid="4589" script="AddonsxQuest/Druid.lua"/>
    <action actionid="4590" script="AddonsxQuest/Wizard.lua"/>
    <action actionid="4591" script="AddonsxQuest/Oriental.lua"/>
    <action actionid="4592" script="AddonsxQuest/Pirate.lua"/>
    <action actionid="4593" script="AddonsxQuest/Assassin.lua"/>
    <action actionid="4594" script="AddonsxQuest/Beggar.lua"/>
    <action actionid="4595" script="AddonsxQuest/Shaman.lua"/>
    <action actionid="4596" script="AddonsxQuest/Norseman.lua"/>
    <action actionid="4597" script="AddonsxQuest/Nightmare.lua"/>
    <action actionid="4598" script="AddonsxQuest/Jester.lua"/>
    <action actionid="4599" script="AddonsxQuest/Brotherhood.lua"/>
    <action actionid="4499" script="AddonsxQuest/Demonhunter.lua"/>
    <action actionid="4500" script="AddonsxQuest/Yalaharian.lua"/>
    <action actionid="4501" script="AddonsxQuest/Warmaster.lua"/>

you can obviously rename it all to w.e. folder you want but. Hope it helps
 
Hmm.. I pasted that action id to my Action.xml! I want the statue 1444 to give you addons. Different statues will give you different addons. Anyways I pasted that and my Server can't reload actions
 
Back
Top