What's new

Skrypty & Kody npc od Addon?w (10.31)

Status
Not open for further replies.

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Witam,

Szukam szukam i si? nie mog? doszuka?.
Mianowicie poszukuj? NPC od Addon?w z rl tibii pod 10.31.
Wszystkie inne pod 8.6 nie dzia?aj?. U?ywam TFS 1.0
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

Od?wie?am !!!!!!!!!!!!!!!!!!!!!!!!!!
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

O co chodzi? Nikt nie potrafi pom?c??????????
OD?WIE?AM !!!!!!!!!!!!!!
 

Xevis

Senior User
Joined
May 28, 2008
Messages
836
Reaction score
54
Odp: npc od Addon?w (10.31)

Wszyscy potrafi? pom?c, ale nie dajesz sobie, ja nie bed? za Ciebie niczego szuka?, napisz w requescie co tam potrzebujesz, tu zajmujemy sie rozwiazywaniem problem?w, np nie dzia?aj?cy skrypt itd.
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

W takim razie prosze o pomoc w skrypcie addon.lua.
Poni?ej za??czam skrypt z silnika jaki posiadam.
Podczas kupowania oboj?tnie jakiego addonu, npc nie reaguje na komendy typu "first citizen addon".
Co mo?e by? przyczyn??

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|. Will you help me? If you do, I'll reward you with nice addons! Just say {addons} or {help} if you don't know what to do.")

function playerBuyAddonNPC(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if (parameters.confirm ~= true) and (parameters.decline ~= true) then
if(getPlayerPremiumDays(cid) == 1) and (parameters.premium == true) then
npcHandler:say('Sorry, but this addon is only for vip players!', cid)
npcHandler:resetNpc()
return true
end
if (getPlayerStorageValue(cid, parameters.storageID) ~= -1) then
npcHandler:say('You already have this addon!', cid)
npcHandler:resetNpc()
return true
end
local itemsTable = parameters.items
local items_list = ''
if table.maxn(itemsTable) > 0 then
for i = 1, table.maxn(itemsTable) do
local item = itemsTable
items_list = items_list .. item[2] .. ' ' .. getItemNameById(item[1])
if i ~= table.maxn(itemsTable) then
items_list = items_list .. ', '
end
end
end
local text = ''
if (parameters.cost > 0) and table.maxn(parameters.items) then
text = items_list .. ' and ' .. parameters.cost .. ' gp'
elseif (parameters.cost > 0) then
text = parameters.cost .. ' gp'
elseif table.maxn(parameters.items) then
text = items_list
end
npcHandler:say('Did you bring me ' .. text .. ' for ' .. keywords[1] .. '?', cid)
return true
elseif (parameters.confirm == true) then
local addonNode = node:getParent()
local addoninfo = addonNode:getParameters()
local items_number = 0
if table.maxn(addoninfo.items) > 0 then
for i = 1, table.maxn(addoninfo.items) do
local item = addoninfo.items
if (getPlayerItemCount(cid,item[1]) >= item[2]) then
items_number = items_number + 1
end
end
end
if(getPlayerMoney(cid) >= addoninfo.cost) and (items_number == table.maxn(addoninfo.items)) then
doPlayerRemoveMoney(cid, addoninfo.cost)
if table.maxn(addoninfo.items) > 0 then
for i = 1, table.maxn(addoninfo.items) do
local item = addoninfo.items
doPlayerRemoveItem(cid,item[1],item[2])
end
end
doPlayerAddOutfit(cid, addoninfo.outfit_male, addoninfo.addon)
doPlayerAddOutfit(cid, addoninfo.outfit_female, addoninfo.addon)
setPlayerStorageValue(cid,addoninfo.storageID,1)
npcHandler:say('Here you are.', cid)
else
npcHandler:say('You do not have needed items or cash!', cid)
end
npcHandler:resetNpc()
return true
elseif (parameters.decline == true) then
npcHandler:say('Not interested? Maybe other addon?', cid)
npcHandler:resetNpc()
return true
end
return false
end

local noNode = KeywordNode:new({'no'}, playerBuyAddonNPC, {decline = true})
local yesNode = KeywordNode:new({'yes'}, playerBuyAddonNPC, {confirm = true})

-- citizen (done)
local outfit_node = keywordHandler:addKeyword({'first citizen addon'}, playerBuyAddonNPC, {premium = false, 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 = false, 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 = false, 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 = 40003})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second hunter addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5875,1}}, outfit_female = 137, outfit_male = 129, addon = 2, storageID = 40004})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

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

-- mage (done)
local outfit_node = keywordHandler:addKeyword({'first mage addon'}, playerBuyAddonNPC, {premium = false, 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 = 10007})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second mage addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5903,1}}, outfit_female = 138, outfit_male = 130, addon = 2, storageID = 10008})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)


-- summoner (done)
local outfit_node = keywordHandler:addKeyword({'first summoner addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5958,1}}, 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 = false, cost = 0, items = {{5894,70}, {5911,20}, {5883,40}, {5922,35}, {5886,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 = false, 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 = false, 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 = false, cost = 0, items = {{5896,50}, {5897,50}}, outfit_female = 148, outfit_male = 144, addon = 1, storageID = 60013})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second druid addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6550,100}, {5940,1}, {5937,1}}, outfit_female = 148, outfit_male = 144, addon = 2, storageID = 60014})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- nobleman (done)
local outfit_node = keywordHandler:addKeyword({'first nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 1500000, items = {}, outfit_female = 140, outfit_male = 132, addon = 1, storageID = 90015})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second nobleman addon'}, playerBuyAddonNPC, {premium = false, cost = 1500000, items = {}, outfit_female = 140, outfit_male = 132, addon = 2, storageID = 90016})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- oriental (done)
local outfit_node = keywordHandler:addKeyword({'first oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5945,1}}, outfit_female = 150, outfit_male = 146, addon = 1, storageID = 10017})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second oriental addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5883,100}, {5895,100}, {5891,2}, {5912,100}}, outfit_female = 150, outfit_male = 146, addon = 2, storageID = 40018})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- warrior (done)
local outfit_node = keywordHandler:addKeyword({'first warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5925,100}, {5899,100}, {5884,1}, {10020,1}}, outfit_female = 142, outfit_male = 134, addon = 1, storageID = 40019})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second warrior addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5880,100}, {5887,1}}, outfit_female = 142, outfit_male = 134, addon = 2, storageID = 40020})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- wizard (done)
local outfit_node = keywordHandler:addKeyword({'first wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{2536,1}, {2492,1}, {2488,1}, {2123,1}}, outfit_female = 149, outfit_male = 145, addon = 1, storageID = 10021})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second wizard addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5922,50}}, outfit_female = 149, outfit_male = 145, addon = 2, storageID = 10022})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- assassin (done)
local outfit_node = keywordHandler:addKeyword({'first assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5912,50}, {5910,50}, {5911,50}, {5913,50}, {5914,50}, {5909,50}, {5886,10}}, outfit_female = 156, outfit_male = 152, addon = 1, storageID = 10023})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second assassin addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5804,1}, {5930,1}}, outfit_female = 156, outfit_male = 152, addon = 2, storageID = 10024})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- beggar (done)
local outfit_node = keywordHandler:addKeyword({'first beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5878,50}, {5921,30}, {5913,20}, {5894,10}}, outfit_female = 157, outfit_male = 153, addon = 1, storageID = 10025})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second beggar addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5883,100}, {2160,2}, {6107,1}}, outfit_female = 157, outfit_male = 153, addon = 2, storageID = 10026})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- pirate (done)
local outfit_node = keywordHandler:addKeyword({'first pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6098,100}, {6126,100}, {6097,100}}, outfit_female = 155, outfit_male = 151, addon = 1, storageID = 10027})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second pirate addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6101,1}, {6102,1}, {6100,1}, {6099,1}}, outfit_female = 155, outfit_male = 151, addon = 2, storageID = 10028})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- shaman (done)
local outfit_node = keywordHandler:addKeyword({'first shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5810,5}, {3955,5}, {5015,1}}, outfit_female = 158, outfit_male = 154, addon = 1, storageID = 10029})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second shaman addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{3966,5}, {3967,5}}, outfit_female = 158, outfit_male = 154, addon = 2, storageID = 10030})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- norseman (done)
local outfit_node = keywordHandler:addKeyword({'first norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{7290,5}}, outfit_female = 252, outfit_male = 251, addon = 1, storageID = 10031})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second norseman addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{7290,10}}, outfit_female = 252, outfit_male = 251, addon = 2, storageID = 10032})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- jester (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first jester addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5912,50}, {5913,50}, {5914,50}, {5909,50}}, outfit_female = 270, outfit_male = 273, addon = 1, storageID = 10033})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second jester addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5912,50}, {5910,50}, {5911,50}, {5912,50}}, outfit_female = 270, outfit_male = 273, addon = 2, storageID = 10034})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- demonhunter (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{5905,30}, {6550,40}, {5954,50}, {6500,50}, {2151,100}}, outfit_female = 288, outfit_male = 289, addon = 1, storageID = 10035})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second demonhunter addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6550,50}, {6500,200}, {2151,100}}, outfit_female = 288, outfit_male = 289, addon = 2, storageID = 10036})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- nightmare (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 1, storageID = 10037})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second nightmare addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6500,1500}}, outfit_female = 269, outfit_male = 268, addon = 2, storageID = 10038})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- brotherhood (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6500,1500}}, outfit_female = 279, outfit_male = 278, addon = 1, storageID = 10039})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second brotherhood addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{6500,1500}}, outfit_female = 279, outfit_male = 278, addon = 2, storageID = 10040})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- yalaharian (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10041})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10041})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- wayfarer (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{12656,1}}, outfit_female = 367, outfit_male = 366, addon = 1, storageID = 10047})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second wayfarer addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{12657,1}}, outfit_female = 367, outfit_male = 366, addon = 2, storageID = 10048})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- elementalist (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first elementalist addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13940,1}}, outfit_female = 432, outfit_male = 433, addon = 1, storageID = 10049})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second elementalist addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13756,1}}, outfit_female = 432, outfit_male = 433, addon = 2, storageID = 10050})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- afflicted (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first afflicted addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13926,1}}, outfit_female = 430, outfit_male = 431, addon = 1, storageID = 10051})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second afflicted addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13925,1}}, outfit_female = 430, outfit_male = 431, addon = 2, storageID = 10052})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- warmaster (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{11115,1}}, outfit_female = 336, outfit_male = 335, addon = 1, storageID = 10047})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second warmaster addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{11116,1}}, outfit_female = 336, outfit_male = 335, addon = 2, storageID = 10048})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- Insectoid (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first insectoid addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{15484,100}}, outfit_female = 466, outfit_male = 465, addon = 1, storageID = 10053})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second insectoid addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{15483,100}}, outfit_female = 466, outfit_male = 365, addon = 2, storageID = 10054})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)

-- Deepling (done)(custom)
local outfit_node = keywordHandler:addKeyword({'first deepling addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{13870,100}}, outfit_female = 464, outfit_male = 463, addon = 1, storageID = 10055})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)
local outfit_node = keywordHandler:addKeyword({'second deepling addon'}, playerBuyAddonNPC, {premium = false, cost = 0, items = {{15421,100}}, outfit_female = 464, outfit_male = 463, addon = 2, storageID = 10056})
outfit_node:addChildKeywordNode(yesNode)
outfit_node:addChildKeywordNode(noNode)



keywordHandler:addKeyword({'addons'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can give you citizen, hunter, knight, mage, nobleman, summoner, warrior, barbarian, druid, wizard, oriental, pirate, assassin, beggar, shaman, norseman, nighmare, jester, yalaharian, brotherhood, warmaster, wayfarer, afflicted, elementalist, deeplings and insectoids addons.'})
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To buy the first addon say \'first NAME addon\', for the second addon say \'second NAME addon\'.'})

npcHandler:addModule(FocusModule:new())
 

misztrz440

Banned
Joined
Dec 15, 2012
Messages
1,032
Reaction score
39
Odp: npc od Addon?w (10.31)

Patrzy?e? "buy first citizen addon" czy co? takiego?
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

pisa?em:
- buy first citizen addon
- buy addon
- buy first addon citizen
- buy first addon
- citizen addon
- first citizen addon
- first

Na ?adn? komend? NPC nie odpisuje ! :(:( Jedyne na co reaguje to "HI"

---------- Tre?? dodana o 13:01 ----------

Od?wie?am!
12:54 Addon Boy: To buy the first addon say 'first NAME addon', for the second addon say 'second NAME addon'.
12:54 Tester [1]: first citizen addon
W dalszym ci?gu brak reakcji ! :(
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

Od?wie?am !!!!!!!!!!!!!!!!!!!!!
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

Od?wie?am !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Verdoom

Banned
Joined
Aug 7, 2012
Messages
238
Reaction score
6
Age
31
Odp: npc od Addon?w (10.31)

Od?wie?am !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

---------- Tre?? dodana o 19:18 ----------

HELOOO?? OD?WIE?AM !!!!!!!!!!!!!!!!!!!!!!
 

Shadow Dan

User
Joined
Mar 25, 2010
Messages
16
Reaction score
1
Odp: npc od Addon?w (10.31)

Pro?ciutkie.
Wystarczy zamieni? jedn? funkcj?, kt?ra si? zmieni?a w nowszej wersji.

getItemNameById(item[1])
zamie? na:
getItemName(item[1])

Widz?, ?e dawno napisa?e?, ale innym na pewno si? przyda -.^

Taki bonus ode mnie, lista funkcji 10.31, kt?re na pewno dzia?aj? na t? wersj?.
[lua]
addDamageCondition(condition, rounds, time, value)
addEvent(callback, delay, ...)
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
broadcastMessage(message, type)
canPlayerLearnInstantSpell(cid, name)
canPlayerWearOutfit(cid, lookType, addons)
cleanMap()
createCombatArea( {area}, <optional> {extArea} )
createCombatObject()
createConditionObject(type)
Creature.getClosestFreePosition(self, position, extended)
debugPrint(text)
doAddCondition(cid, condition)
doAddContainerItem(uid, itemid, <optional> count/subtype)
doAddContainerItemEx(uid, virtualId)
doAddMapMark(cid, pos, type, description)
doAreaCombatCondition(cid, pos, area, condition, effect)
doAreaCombatDispel(cid, pos, area, type, effect)
doAreaCombatHealth(cid, type, pos, area, min, max, effect)
doAreaCombatMana(cid, pos, area, min, max, effect)
doChallengeCreature(cid, target)
doChangeSpeed(cid, delta)
doChangeTypeItem(uid, newtype)
doCombat(cid, combat, param)
doConvinceCreature(cid, target)
doCreateItem(itemid, type/count, pos)
doCreateItemEx(itemid, <optional> count/subtype)
doCreateNpc(name, pos)
doCreateTeleport(itemid, topos, createpos)
doCreatureAddHealth(cid, health)
doCreatureChangeOutfit(cid, outfit)
doCreatureSay(cid, text, type, ...)
doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
doCreatureSetLookDir(cid, direction)
doDecayItem(uid)
doForceSummonCreature(name, pos)
doMonsterChangeTarget(cid)
doMoveCreature(cid, direction)
doPlayerAddBlessing(cid, blessing)
doPlayerAddExp(cid, exp, useMult, ...)
doPlayerAddItem(cid, itemid, <optional: default: 1> count, <optional: default: 1> canDropOnMap, <optional: default: 1>subtype)
doPlayerAddItem(uid, itemid, <optional: default: 1> count/subtype)
doPlayerAddItemEx(cid, uid, ...)
doPlayerAddMana(cid, mana, ...)
doPlayerAddManaSpent(cid, mana)
doPlayerAddMoney(cid, money)
doPlayerAddMount(cid, mountId)
doPlayerAddOutfit(cid, lookType, addons)
doPlayerAddPremiumDays(cid, days)
doPlayerAddSkillTry(cid, skillid, n)
doPlayerAddSoul(cid, soul)
doPlayerFeed(cid, food)
doPlayerJoinParty(cid, leaderId)
doPlayerPopupFYI(cid, message)
doPlayerRemOutfit(cid, lookType, addons)
doPlayerRemoveItem(cid, itemid, count, <optional> subtype, <optional> ignoreEquipped)
doPlayerRemoveMoney(cid, money)
doPlayerRemoveMount(cid, mountId)
doPlayerRemovePremiumDays(cid, days)
doPlayerSendCancel(cid, text)
doPlayerSendTextMessage(cid, type, text, ...)
doPlayerSetBalance(cid, balance)
doPlayerSetGuildLevel(cid, level)
doPlayerSetGuildNick(cid, nick)
doPlayerSetOfflineTrainingSkill(cid, skill)
doPlayerSetSex(cid, sex)
doPlayerSetTown(cid, town)
doPlayerSetVocation(cid, vocation)
doRelocate(pos, posTo)
doRemoveCondition(cid, type[, subId])
doRemoveCreature(cid)
doRemoveItem(uid, ...)
doSendDistanceShoot(fromPos, toPos, distanceEffect, ...)
doSendMagicEffect(pos, magicEffect, ...)
doSendTutorial(cid, tutorialId)
doSetCreatureDropLoot(cid, doDrop)
doSetCreatureLight(cid, lightLevel, lightColor, time)
doSetCreatureOutfit(cid, outfit, time)
doSetItemActionId(uid, actionId)
doSetItemOutfit(cid, item, time)
doSetItemSpecialDescription(uid, desc)
doSetItemText(uid, text)
doSetMonsterOutfit(cid, name, time)
doSetMonsterTarget(cid, target)
doShowTextDialog(cid, itemId, text)
doSummonCreature(name, pos)
doTargetCombatCondition(cid, target, condition, effect)
doTargetCombatDispel(cid, target, type, effect)
doTargetCombatHealth(cid, target, type, min, max, effect)
doTargetCombatMana(cid, target, min, max, effect)
doTeleportThing(uid, dest, pushMovement)
doTileAddItemEx(pos, uid)
doTransformItem(uid, newItemId, ...)
Game.convertIpToString(ip)
Game.getStorageValue(key)
Game.setStorageValue(key, value)
getAccountNumberByPlayerName(name)
getBlessingsCost(level)
getConfigInfo(info)
getContainerCap(uid)
getContainerCapById(itemId)
getContainerItem(uid, slot)
getContainerSize(uid)
getCreatureBaseSpeed(cid)
getCreatureCondition(cid, condition[, subId])
getCreatureHealth(cid)
getCreatureMaster(cid)
getCreatureMaxHealth(cid)
getCreatureName(cid)
getCreatureOutfit(cid)
getCreaturePosition(cid)
getCreatureSpeed(cid)
getCreatureSummons(cid)
getCreatureTarget(cid)
getDepotId(uid)
getDistanceBetween(firstPosition, secondPosition)
getFluidSourceType(itemId)
getGlobalStorageValue(key)
getGuildId(guildName)
getHouseAccessList(id, listId)
getHouseByPlayerGUID(playerGUID)
getHouseEntry(houseId)
getHouseName(houseId)
getHouseOwner(houseId)
getHouseRent(id)
getHouseTilesSize(houseId)
getHouseTown(houseId)
getInstantSpellInfoByName(cid, name)
getInstantSpellWords(name)
getIPByPlayerName(name)
getItemDescriptions(itemId)
getItemIdByName(name)
getItemName(itemId)
getItemRWInfo(uid)
getItemWeight(itemId, ...)
getItemWeightByUID(uid, ...)
getMonsterFriendList(cid)
getMonsterTargetList(cid)
getOnlinePlayers()
getPartyMembers(cid)
getPlayerAccess(cid)
getPlayerAccountType(cid)
getPlayerBalance(cid)
getPlayerBlessing(cid, blessing)
getPlayerByName(name)
getPlayerDepotItems(cid, depotId)
getPlayerFlagValue(cid, flag)
getPlayerFood(cid)
getPlayerFreeCap(cid)
getPlayerGroupId(cid)
getPlayerGUID(cid)
getPlayerGUIDByName(name)
getPlayerGuildId(cid)
getPlayerGuildLevel(cid)
getPlayerGuildName(cid)
getPlayerGuildNick(cid)
getPlayerGuildRank(cid)
getPlayerInstantSpellCount(cid)
getPlayerInstantSpellInfo(cid, index)
getPlayerIp(cid)
getPlayerItemById(cid, deepSearch, itemId, ...)
getPlayerItemCount(cid, itemId, ...)
getPlayerLastLoginSaved(cid)
getPlayerLearnedInstantSpell(cid, name)
getPlayerLevel(cid)
getPlayerLight(cid)
getPlayerLookDir(cid)
getPlayerLossPercent(cid)
getPlayerMagLevel(cid)
getPlayerMana(cid)
getPlayerMasterPos(cid)
getPlayerMaxMana(cid)
getPlayerMoney(cid)
getPlayerMount(cid, mountId)
getPlayerName(cid)
getPlayerParty(cid)
getPlayerPosition(cid)
getPlayerPremiumDays(cid)
getPlayersByAccountNumber(accountNumber)
getPlayersByIPAddress(ip, mask)
getPlayerSex(cid)
getPlayerSkill(cid, skillId)
getPlayerSkullType(cid)
getPlayerSlotItem(cid, slot)
getPlayerSoul(cid)
getPlayerStorageValue(cid, key)
getPlayerTown(cid)
getPlayerVocation(cid)
getPromotedVocation(vocationId)
getPvpBlessingCost(level)
getSpectators(centerPos, rangex, rangey, multifloor, onlyPlayers)
getThing(uid)
getThingfromPos(pos)
getThingPos(uid)
getTibianTime()
getTileHouseInfo(pos)
getTileInfo(position)
getTileItemById(position, itemId, ...)
getTileItemByType(position, itemType)
getTilePzInfo(position)
getTileThingByPos(position)
getTileThingByTopOrder(position, topOrder)
getTopCreature(position)
getTownId(townName)
getTownName(townId)
getTownTemplePosition(townId)
getWaypointPosition(name)
getWorldCreatures(type)
getWorldLight()
getWorldTime()
getWorldUpTime()
hasProperty(uid, prop)
isContainer(uid)
isCorpse(uid)
isCreature(cid)
isDepot(uid)
isDruid(cid)
isInArray(array, value)
isInRange(pos, fromPos, toPos)
isInWar(cid, target)
isItem(uid)
isItemContainer(itemId)
isItemDoor(itemId)
isItemFluidContainer(itemId)
isItemMovable(itemId)
isItemRune(itemId)
isItemStackable(itemId)
isKnight(cid)
isMonster(cid)
isMovable(uid)
isNpc(cid)
isNumber(str)
isPaladin(cid)
isPlayer(cid)
isPlayerGhost(cid)
isPlayerPzLocked(cid)
isPremium(cid)
isSightClear(fromPos, toPos, floorCheck)
isSorcerer(cid)
isSummon(cid)
isValidUID(uid)
mayNotMove(cid, value)
numberToVariant(number)
Player.feed(self, food)
Player.isUsingOtClient(self)
Player.sendCancelMessage(self, message)
Player.sendExtendedOpcode(self, opcode, buffer)
playerLearnInstantSpell(cid, name)
Position.getNextPosition(self, direction, steps)
positionToVariant(pos)
pushThing(thing)
queryTileAddThing(thing, position, ...)
registerClass(className, baseClass, newFunction)
registerCreatureEvent(cid, name)
registerEnum(value)
registerEnumIn(tableName, value)
registerGlobalMethod(functionName, function)
registerGlobalVariable(name, value)
registerMetaMethod(className, functionName, function)
registerMethod(className, functionName, function)
registerTable(tableName)
registerVariable(tableName, name, value)
saveServer()
sendChannelMessage(channelId, type, message)
sendGuildChannelMessage(guildId, type, message)
setCombatArea(combat, area)
setCombatCallBack(combat, key, function_name)
setCombatCondition(combat, condition)
setCombatFormula(combat, type, mina, minb, maxa, maxb)
setCombatParam(combat, key, value)
setConditionFormula(combat, mina, minb, maxa, maxb)
setConditionParam(condition, key, value)
setGlobalStorageValue(key, value)
setHouseAccessList(id, listId, listText)
setHouseOwner(id, guid)
setPlayerGroupId(cid, groupId)
setPlayerStorageValue(cid, key, value)
stopEvent(eventid)
string.split(str, sep)
stringToVariant(string)
targetPositionToVariant(pos)
unregisterCreatureEvent(cid, name)
variantToNumber(var)
variantToPosition(var)
variantToString(var)
[/lua]
 
Last edited:
Status
Not open for further replies.
Top