Ir para conteúdo
  • Cadastre-se

[PEDIDO] Npc's Yaman e Alesar


Posts Recomendados

Alguém me passa as Script's desses dois Npc's. Tipo, no meu servidor 10.76 eles não estão configurados e gostaria que me passassem um configurado, tudo certo. GRATO DESDE JÁ!


UP

Link para o post
Compartilhar em outros sites

Essas são a parte do .lua caso queria a parte do .xml eu posto.

 

Script yaman.

 

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
 
local function getTable()
local list = {
{id = 2201, buy = 1000, sell = 100, name = 'Dragon Necklace'},
{id = 2213, buy = 2000, sell = 100, name = 'Dwarven Ring'},
{id = 2167, buy = 2000, sell = 100, name = 'Energy Ring'},
{id = 2168, buy = 900, sell = 50, name = 'Life Ring'},
{id = 2164, buy = 5000, sell = 250, name = 'Might Ring'},
{id = 2200, buy = 700, sell = 100, name = 'Protection Amulet'},
{id = 2216, buy = 2000, sell = 100, name = 'Ring of Healing'},
{id = 2170, buy = 100, sell = 50, name = 'Silver Amulet'},
{id = 2161, buy = 100, sell = 30, name = 'Strange Talisman'},
{id = 2169, buy = 2000, sell = 100, name = 'Time Ring'},
{id = 2327, buy = 0, sell = 100, name = 'Ankh'},
{id = 18412, buy = 0, sell = 6500, name = 'Glacial Rod'},
{id = 2183, buy = 0, sell = 3000, name = 'Hailstorm Rod'},
{id = 2186, buy = 0, sell = 200, name = 'Moonlight Rod'},
{id = 18411, buy = 0, sell = 6000, name = 'Muck Rod'},
{id = 2194, buy = 0, sell = 50, name = 'Mysterious Fetish'},
{id = 2185, buy = 0, sell = 1000, name = 'Necrotic Rod'},
{id = 8911, buy = 0, sell = 1500, name = 'Northwind Rod'},
{id = 2182, buy = 0, sell = 100, name = 'Snakebite Rod'},
{id = 8912, buy = 0, sell = 3600, name = 'Springsprout Rod'},
{id = 2181, buy = 0, sell = 2000, name = 'Terra Rod'},
{id = 8910, buy = 0, sell = 4400, name = 'Underworld Rod'}
}
 
return list
end
 
local function greetCallback(cid, message)
if not msgcontains(message, 'djanni\'hah') and Player(cid):getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03) < 3 then
return false
end
 
return true
end
 
local function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
 
if isInArray({"enchanted chicken wing", "boots of haste"}, msg) then
npcHandler:say('Do you want to trade Boots of haste for Enchanted Chicken Wing?', cid)
npcHandler.topic[cid] = 1
elseif isInArray({"warrior Sweat", "warrior helmet"}, msg) then
npcHandler:say('Do you want to trade 4 Warrior Helmet for Warrior Sweat?', cid)
npcHandler.topic[cid] = 2
elseif isInArray({"fighting Spirit", "royal helmet"}, msg) then
npcHandler:say('Do you want to trade 2 Royal Helmet for Fighting Spirit', cid)
npcHandler.topic[cid] = 3
elseif isInArray({"magic sulphur", "fire sword"}, msg) then
npcHandler:say('Do you want to trade 3 Fire Sword for Magic Sulphur', cid)
npcHandler.topic[cid] = 4
elseif isInArray({"job", "items"}, msg) then
npcHandler:say('I trade Enchanted Chicken Wing for Boots of Haste, Warrior Sweat for 4 Warrior Helmets, Fighting Spirit for 2 Royal Helmet Magic Sulphur for 3 Fire Swords', cid)
npcHandler.topic[cid] = 0
 
elseif msgcontains(msg,'yes') and npcHandler.topic[cid] <= 4 and npcHandler.topic[cid] >= 1 then
local trade = {
{ NeedItem = 2195, Ncount = 1, GiveItem = 5891, Gcount = 1}, -- Enchanted Chicken Wing
{ NeedItem = 2475, Ncount = 4, GiveItem = 5885, Gcount = 1}, -- Flask of Warrior's Sweat
{ NeedItem = 2498, Ncount = 2, GiveItem = 5884, Gcount = 1}, -- Spirit Container
{ NeedItem = 2392, Ncount = 3, GiveItem = 5904, Gcount = 1}  -- Magic Sulphur
}
 
local player = Player(cid)
if player:getItemCount(trade[npcHandler.topic[cid]].NeedItem) >= trade[npcHandler.topic[cid]].Ncount then
player:removeItem(trade[npcHandler.topic[cid]].NeedItem, trade[npcHandler.topic[cid]].Ncount)
player:addItem(trade[npcHandler.topic[cid]].GiveItem, trade[npcHandler.topic[cid]].Gcount)
return npcHandler:say('Here you are.', cid)
else
npcHandler:say('Sorry but you don\'t have the item.', cid)
end
elseif msgcontains(msg,'no') and (npcHandler.topic[cid] >= 1 and npcHandler.topic[cid] <= 5) then
npcHandler:say('Ok then.', cid)
npcHandler.topic[cid] = 0
end
return true
end
 
local function onTradeRequest(cid)
TradeRequest(cid, Npc(), getTable(), GreenDjinn, 4)
end
 
npcHandler:setMessage(MESSAGE_GREET, "Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Farewell, human.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Farewell, human.")
 
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_ONTRADEREQUEST, onTradeRequest)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
 
local focusModule = FocusModule:new()
focusModule:addGreetMessage('hi')
focusModule:addGreetMessage('hello')
focusModule:addGreetMessage('djanni\'hah')
npcHandler:addModule(focusModule)

 
 
Do alesar
 

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
 
local function getTable()
local list = {
{id = 2532, buy = 5000, sell = 900, name='Ancient Shield'},
{id = 2489, buy = 1500, sell = 400, name='Dark Armor'},
{id = 2490, buy = 1000, sell = 250, name='Dark Helmet'},
{id = 2396, buy = 5000, sell = 0, name='Ice Rapier'},
{id = 2409, buy = 6000, sell = 900, name='Serpent Sword'},
{id = 2529, buy = 0, sell = 800, name='Black Shield'},
{id = 7428, buy = 0, sell = 10000, name='Bonebreaker'},
{id = 2434, buy = 0, sell = 2000, name='Dragon Hammer'},
{id = 7419, buy = 0, sell = 15000, name='Dreaded Cleaver'},
{id = 7860, buy = 0, sell = 2000, name='Earth Knight Axe'},
{id = 7875, buy = 0, sell = 2000, name='Energy Knight Axe'},
{id = 7750, buy = 0, sell = 2000, name='Fiery Knight Axe'},
{id = 2393, buy = 0, sell = 17000, name='Giant Sword'},
{id = 7407, buy = 0, sell = 8000, name='Haunted Blade'},
{id = 7769, buy = 0, sell = 2000, name='Icy Knight Axe'},
{id = 2476, buy = 0, sell = 5000, name='Knight Armor'},
{id = 2430, buy = 0, sell = 2000, name='Knight Axe'},
{id = 2477, buy = 0, sell = 5000, name='Knight Legs'},
{id = 2663, buy = 0, sell = 150, name='Mystic Turban'},
{id = 7421, buy = 0, sell = 22000, name='Onyx Flail'},
{id = 7411, buy = 0, sell = 20000, name='Ornamented Axe'},
{id = 2411, buy = 0, sell = 50, name='Poison Dagger'},
{id = 2436, buy = 0, sell = 6000, name='Skull Staff'},
{id = 2479, buy = 0, sell = 500, name='Strange Helmet'},
{id = 7413, buy = 0, sell = 4000, name='Titan Axe'},
{id = 2528, buy = 0, sell = 8000, name='Tower Shield'},
{id = 2534, buy = 0, sell = 15000, name='Vampire Shield'},
{id = 2475, buy = 0, sell = 5000, name='Warrior Helmet'}
}
return list
end
 
local function greetCallback(cid, message)
local player = Player(cid)
if not msgcontains(message, 'DJANNI\'HAH') and player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission03) < 3 or player:getStorageValue(Storage.DjinnWar.Factions) <= 0 and not BlueOrGreen then
return false
end
return true
end
 
local function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
 
local player = Player(cid)
-- Mission 2 - The Tear of Daraman
if msgcontains(msg, "mission") then
if player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission01) == 5 and player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission02) < 1 then
npcHandler:say({
"So Baa'leal thinks you are up to do a mission for us? ...",
"I think he is getting old, entrusting human scum such as you are with an important mission like that. ...",
"Personally, I don't understand why you haven't been slaughtered right at the gates. ...",
"Anyway. Are you prepared to embark on a dangerous mission for us?"
}, cid)
npcHandler.topic[cid] = 1
elseif player:getStorageValue(Storage.DjinnWar.EfreetFaction.Mission02) == 2 then
npcHandler:say("Did you find the tear of Daraman?", cid)
npcHandler.topic[cid] = 2
end
-- Mission 2 - The Tear of Daraman
elseif msgcontains(msg, "yes") then
if npcHandler.topic[cid] == 1 then
npcHandler:say({
"All right then, human. Have you ever heard of the {'Tears of Daraman'}? ...",
"They are precious gemstones made of some unknown blue mineral and possess enormous magical power. ...",
"If you want to learn more about these gemstones don't forget to visit our library. ...",
"Anyway, one of them is enough to create thousands of our mighty djinn blades. ...",
"Unfortunately my last gemstone broke and therefore I'm not able to create new blades anymore. ...",
"To my knowledge there is only one place where you can find these gemstones - I know for a fact that the Marid have at least one of them. ...",
"Well... to cut a long story short, your mission is to sneak into Ashta'daramai and to steal it. ...",
"Needless to say, the Marid won't be too eager to part with it. Try not to get killed until you have delivered the stone to me."
}, cid)
player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission02, 1)
npcHandler.topic[cid] = 0
elseif npcHandler.topic[cid] == 2 then
if player:removeItem(2346, 1) then
npcHandler:say({
"So you have made it? You have really managed to steal a Tear of Daraman? ...",
"Amazing how you humans are just impossible to get rid of. Incidentally, you have this character trait in common with many insects and with other vermin. ...",
"Nevermind. I hate to say it, but it you have done us a favour, human. That gemstone will serve us well. ...",
"Baa'leal, wants you to talk to Malor concerning some new mission. ...",
"Looks like you have managed to extended your life expectancy - for just a bit longer."
}, cid)
player:setStorageValue(Storage.DjinnWar.EfreetFaction.Mission02, 3)
npcHandler.topic[cid] = 0
end
end
end
return true
end
 
local function onTradeRequest(cid)
TradeRequest(cid, Npc(), getTable(), GreenDjinn, 4)
end
 
npcHandler:setMessage(MESSAGE_GREET, "What do you want from me, |PLAYERNAME|?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Finally.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Finally.")
 
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_ONTRADEREQUEST, onTradeRequest)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
 
local focusModule = FocusModule:new()
focusModule:addGreetMessage('hi')
focusModule:addGreetMessage('hello')
focusModule:addGreetMessage('djanni\'hah')
npcHandler:addModule(focusModule)

Link para o post
Compartilhar em outros sites

Deu erro nas scripts

Tente esse:

 

 

Yaman:

 

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
 
function onCreatureAppear(cid)                          npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid)                       npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)                  npcHandler:onCreatureSay(cid, type, msg) end
function onThink()                                      npcHandler:onThink() end
 
local function getTable()
local list =
{
{id = 2201, buy = 1000, sell = 100, name = 'Dragon Necklace'},
{id = 2213, buy = 2000, sell = 100, name = 'Dwarven Ring'},
{id = 2167, buy = 2000, sell = 100, name = 'Energy Ring'},
{id = 2168, buy = 900, sell = 50, name = 'Life Ring'},
{id = 2164, buy = 5000, sell = 250, name = 'Might Ring'},
{id = 2200, buy = 700, sell = 100, name = 'Protection Amulet'},
{id = 2216, buy = 2000, sell = 100, name = 'Ring of Healing'},
{id = 2170, buy = 100, sell = 50, name = 'Silver Amulet'},
{id = 2161, buy = 100, sell = 30, name = 'Strange Talisman'},
{id = 2169, buy = 2000, sell = 100, name = 'Time Ring'},
{id = 2327, buy = 0, sell =  100, name = 'Ankh'},
{id = 18412, buy = 0, sell =  6500, name = 'Glacial Rod'},
{id = 2183, buy = 0, sell =  3000, name = 'Hailstorm Rod'},
{id = 2186, buy = 0, sell =  200, name = 'Moonlight Rod'},
{id = 18411, buy = 0, sell =  6000, name = 'Muck Rod'},
{id = 2194, buy = 0, sell =  50, name = 'Mysterious Fetish'},
{id = 2185, buy = 0, sell =  1000, name = 'Necrotic Rod'},
{id = 8911, buy = 0, sell =  1500, name = 'Northwind Rod'},
{id = 2182, buy = 0, sell =  100, name = 'Snakebite Rod'},
{id = 8912, buy = 0, sell =  3600, name = 'Springsprout Rod'},
{id = 2181, buy = 0, sell =  2000, name = 'Terra Rod'},
{id = 8910, buy = 0, sell =  4400, name = 'Underworld Rod'}
}
return list
end
 
function creatureSayCallback(cid, type, msg)
local player = Player(cid)
 
if(msg == "DJANNI'HAH" or (player:getStorageValue(GreenDjinn.MissionEnd) >= 3 and msg == "hi")) then
npcHandler:addFocus(cid)
npcHandler:say("Be greeted, human " .. player:getName() .. ". How can a humble djinn be of service?", player)
end
 
if(not npcHandler:isFocused(cid)) then
return false
end
 
if (msgcontains(msg, "bye") or msgcontains(msg, "farewell")) then
npcHandler:say("Finally.", player)
npcHandler.topic[cid] = 0
npcHandler:releaseFocus(cid)
elseif isInArray({"enchanted chicken wing", "boots of haste"}, msg:lower()) then
        npcHandler:say('Do you want to trade Boots of haste for Enchanted Chicken Wind?', cid)
        npcHandler.topic[cid] = 1 
elseif isInArray({"warrior Sweat", "warrior helmet"}, msg:lower()) then
        npcHandler:say('Do you want to trade 4 Warrior Helmet for Warrior Sweat?', cid)
        npcHandler.topic[cid] = 2 
elseif isInArray({"fighting Spirit", "royal helmet"}, msg:lower()) then
        npcHandler:say('Do you want to trade 2 Royal Helmet for Fighting Spirit', cid)       
        npcHandler.topic[cid] = 3
elseif isInArray({"magic sulphur", "fire sword"}, msg:lower()) then
        npcHandler:say('Do you want to trade 3 Fire Sword for Magic Sulphur', cid) 
        npcHandler.topic[cid] = 4
elseif isInArray({"job", "items"}, msg:lower()) then
        npcHandler:say('I trade Enchanted Chicken Wing for Boots of Haste, Warrior Sweat for 4 Warrior Helmets, Fighting Spirit for 2 Royal Helmet Magic Sulphur for 3 Fire Swords', cid)
npcHandler.topic[cid] = 0
 
elseif msgcontains(msg,'yes') and npcHandler.topic[cid] <= 4 and npcHandler.topic[cid] >= 1 then
 
local trade = {
{NeedItem = 2195, Ncount = 1, GiveItem = 5891, Gcount = 1}, -- Enchanted Chicken Wing
{NeedItem = 2475, Ncount = 4, GiveItem = 5885, Gcount = 1}, -- Flask of Warrior's Sweat
{NeedItem = 2498, Ncount = 2, GiveItem = 5884, Gcount = 1}, -- Spirit Container
{NeedItem = 2392, Ncount = 3, GiveItem = 5904, Gcount = 1}, -- Magic Sulphur
}
 
        if player:getItemCount(trade[npcHandler.topic[cid]].NeedItem) >= trade[npcHandler.topic[cid]].Ncount then
player:removeItem(trade[npcHandler.topic[cid]].NeedItem, trade[npcHandler.topic[cid]].Ncount)
player:addItem(trade[npcHandler.topic[cid]].GiveItem, trade[npcHandler.topic[cid]].Gcount)
return npcHandler:say(msg,'Here you are')
        else
            npcHandler:say('Sorry but you don\'t have the item', player)
        end
 
elseif msgcontains(msg,'no') and (npcHandler.topic[cid] >= 1 and npcHandler.topic[cid] <= 5) then
npcHandler:say(msg,'Ok then', player)
npcHandler.topic[cid] = 0
npcHandler:releaseFocus(cid)
end
 
return true
end
 
local function onTradeRequest(cid)
TradeRequest(cid, npcHandler, getTable(), GreenDjinn, 4)
end
 
npcHandler:setCallback(CALLBACK_ONTRADEREQUEST, onTradeRequest)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

 
Alesar:
 

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
 
function onCreatureAppear(cid)                          npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid)                       npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)                  npcHandler:onCreatureSay(cid, type, msg) end
function onThink()                                      npcHandler:onThink() end
 
local function getTable()
local list = {
{id = 2532, buy = 5000, sell = 900, name='Ancient Shield'},
{id = 2489, buy = 1500, sell = 400, name='Dark Armor'},
{id = 2490, buy = 1000, sell = 250, name='Dark Helmet'},
{id = 2396, buy = 5000, sell = 0, name='Ice Rapier'},
{id = 2409, buy = 6000, sell = 900, name='Serpent Sword'},
{id = 2529, buy = 0, sell = 800, name='Black Shield'},
{id = 7428, buy = 0, sell = 10000, name='Bonebreaker'},
{id = 2434, buy = 0, sell = 2000, name='Dragon Hammer'},
{id = 7419, buy = 0, sell = 15000, name='Dreaded Cleaver'},
{id = 7860, buy = 0, sell = 2000, name='Earth Knight Axe'},
{id = 7875, buy = 0, sell = 2000, name='Energy Knight Axe'},
{id = 7750, buy = 0, sell = 2000, name='Fiery Knight Axe'},
{id = 2393, buy = 0, sell = 17000, name='Giant Sword'},
{id = 7407, buy = 0, sell = 8000, name='Haunted Blade'},
{id = 7769, buy = 0, sell = 2000, name='Icy Knight Axe'},
{id = 2476, buy = 0, sell = 5000, name='Knight Armor'},
{id = 2430, buy = 0, sell = 2000, name='Knight Axe'},
{id = 2477, buy = 0, sell = 5000, name='Knight Legs'},
{id = 2663, buy = 0, sell = 150, name='Mystic Turban'},
{id = 7421, buy = 0, sell = 22000, name='Onyx Flail'},
{id = 7411, buy = 0, sell = 20000, name='Ornamented Axe'},
{id = 2411, buy = 0, sell = 50, name='Poison Dagger'},
{id = 2436, buy = 0, sell = 6000, name='Skull Staff'},
{id = 2479, buy = 0, sell = 500, name='Strange Helmet'},
{id = 7413, buy = 0, sell = 4000, name='Titan Axe'},
{id = 2528, buy = 0, sell = 8000, name='Tower Shield'},
{id = 2534, buy = 0, sell = 15000, name='Vampire Shield'},
{id = 2475, buy = 0, sell = 5000, name='Warrior Helmet'}
}
return list
end
 
function creatureSayCallback(cid, type, msg)
local player = Player(cid)
-- GREET
if(msg == "DJANNI'HAH" or (getPlayerStorageValue(cid,GreenDjinn.MissionEnd) >= 3 and msg == "hi")) then
if(player:getStorageValue(Factions) > 0) then
npcHandler:addFocus(cid)
if(player:getStorageValue(BlueDjinn.MissionStart) < 1 or not BlueOrGreen) then
npcHandler:say("What do you want from me, " .. getCreatureName(cid) .."?", player)
npcHandler:addFocus(cid)
end
end
end
-- GREET
if(not npcHandler:isFocused(cid)) then
return false
end
 
-- Mission 2 - The Tear of Daraman
if(msgcontains(msg, "mission")) then
if(player:getStorageValue(GreenDjinn.MissionStart+1) == 4 and player:getStorageValue(GreenDjinn.MissionStart+2) < 1) then
selfSay("So Baa'leal thinks you are up to do a mission for us? ...", cid)
selfSay("I think he is getting old, entrusting human scum such as you are with an important mission like that. ...", cid)
selfSay("Personally, I don't understand why you haven't been slaughtered right at the gates. ...", cid)
npcHandler:say("Anyway. Are you prepared to embark on a dangerous mission for us?", cid)
npcHandler.topic[cid] = 1
elseif(player:getStorageValue(GreenDjinn.MissionStart+2) == 2) then
npcHandler:say("Did you find the tear of Daraman?", player)
npcHandler.topic[cid] = 2
end
-- Mission 2 - The Tear of Daraman
elseif(msgcontains(msg, "yes")) then
if(npcHandler.topic[cid] == 1) then
selfSay("All right then, human. Have you ever heard of the {'Tears of Daraman'}? ...", cid)
selfSay("They are precious gemstones made of some unknown blue mineral and possess enormous magical power. ...", cid)
selfSay("If you want to learn more about these gemstones don't forget to visit our library. ...", cid)
selfSay("Anyway, one of them is enough to create thousands of our mighty djinn blades. ...", cid)
selfSay("Unfortunately my last gemstone broke and therefore I'm not able to create new blades anymore. ...", cid)
selfSay("To my knowledge there is only one place where you can find these gemstones - I know for a fact that the Marid have at least one of them. ...", cid)
selfSay("Well... to cut a long story short, your mission is to sneak into Ashta'daramai and to steal it. ...", cid)
npcHandler:say("Needless to say, the Marid won't be too eager to part with it. Try not to get killed until you have delivered the stone to me.", cid)
npcHandler.topic[cid] = 0
player:setStorageValue(GreenDjinn.MissionStart+2, 1)
elseif(npcHandler.topic[cid] == 2) then
if(getPlayerItemCount(cid, 2346) >= 1) then
doPlayerRemoveItem(cid, 2346, 1)
selfSay("So you have made it? You have really managed to steal a Tear of Daraman? ...", cid)
selfSay("Amazing how you humans are just impossible to get rid of. Incidentally, you have this character trait in common with many insects and with other vermin. ...", cid)
selfSay("Nevermind. I hate to say it, but it you have done us a favour, human. That gemstone will serve us well. ...", cid)
selfSay("Baa'leal, wants you to talk to Malor concerning some new mission. ...", cid)
npcHandler:say("Looks like you have managed to extended your life expectancy - for just a bit longer.", cid)
npcHandler.topic[cid] = 0
player:setStorageValue(GreenDjinn.MissionStart+2, 3)
else
npcHandler:say("You kidding me?", player)
end
end
end
if (msgcontains(msg, "bye") or msgcontains(msg, "farewell")) then
npcHandler:say("Finally.", player)
npcHandler.topic[cid] = 0
npcHandler:releaseFocus(cid)
end
return true
end
 
local function onTradeRequest(cid)
TradeRequest(cid, npcHandler, getTable(), GreenDjinn, 4)
end
 
npcHandler:setCallback(CALLBACK_ONTRADEREQUEST, onTradeRequest)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

Link para o post
Compartilhar em outros sites

Como assim?

O xml do NPC  :facepalm:

                              _
                          .-'` `}
                  _./)   /       }
                .'o   \ |       }
                '.___.'`.\    {`
                /`\_/  , `.    }                                      ME DA UMA NOZ!
                \=' .-'   _`\  {
                 `'`;/      `,  }
                    _\   @   ;  }
                   /__`;-...'--'

Cluck!

Link para o post
Compartilhar em outros sites

data/npc/nomedoseunpc.xml

                              _
                          .-'` `}
                  _./)   /       }
                .'o   \ |       }
                '.___.'`.\    {`
                /`\_/  , `.    }                                      ME DA UMA NOZ!
                \=' .-'   _`\  {
                 `'`;/      `,  }
                    _\   @   ;  }
                   /__`;-...'--'

Cluck!

Link para o post
Compartilhar em outros sites

Pera, tenho as 2 scripts aqui e pelo que vi elas estão normais, só que na hora que eu vou falar com oc NPC's eles não respondem. Ta ai as scripts:

 

É que eu quero que eles me respondam sem ter feito as missões. Já coloquei false lá no Lib mas não resolveu. Os npc's do blue ficaram

normais, mas esse não.

 

 

OBS: Esses dois npc's quando falo Hi para eles, eles nem dão bola e ficam de um lado pro outro.

 

 

Alesar:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Alesar" script="Alesar.lua" walkinterval="2000" speechbubble="4" floorchange="0">
  <health now="100" max="100" />
  <look type="80" head="0" body="0" legs="0" feet="0" addons="0" />
  <parameters>
    <parameter key="message_greet" value="What do you want from me, |PLAYERNAME|?" />
<parameter key="module_shop" value="1" /> <!-- added shop module to show the icon in npc (10:36 +) -->
<parameter key="shop_sellable" value="0,0,0;"/>
<parameter key="shop_buyable" value="0,0,0;"/>
  </parameters>
</npc>
 
 
 
 
 
-----------------
 
Yaman:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Yaman" script="Yaman.lua" walkinterval="2000" speechbubble="2" floorchange="0">
  <health now="100" max="100" />
  <look type="103" head="0" body="0" legs="0" feet="0" addons="0" />
  <parameters>
    <parameter key="message_greet" value="Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?" />
    <parameter key="message_farewell" value="Farewell, human." />
    <parameter key="message_buy" value="Do you want to purchase |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold?" />
    <parameter key="message_sell" value="Do you want to sell |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold?" />
    <parameter key="message_decline" value="Well, obviously not." />
    <parameter key="message_onbuy" value="It'll serve you well!" />
    <parameter key="message_onsell" value="Thank you, human." />
    <parameter key="message_walkaway" value="Farewell, human." />
    <parameter key="module_keywords" value="1" />
    <parameter key="keywords" value="job" />
    <parameter key="keyword_reply1" value="I'm an old djinn, I buy several items, and sell a few myself." />
 
<parameter key="module_shop" value="1" /> <!-- added shop module to show the icon in npc (10:36 +) -->
<parameter key="shop_sellable" value="0,0,0;"/>
<parameter key="shop_buyable" value="0,0,0;"/>
 
  </parameters>
</npc>
 
 
 
 
-----
 
Vocês poderia me dizer o que tem de errado?
Editado por arthur122222 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Troque pelo seu:

 

Yaman:

 

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Yaman" script="Yaman.lua" walkinterval="2000" speechbubble="2" floorchange="0">
  <health now="100" max="100" />
  <look type="103" head="0" body="0" legs="0" feet="0" addons="0" />
  <parameters>
    <parameter key="message_greet" value="Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?" />
    <parameter key="message_farewell" value="Farewell, human." />
    <parameter key="message_buy" value="Do you want to purchase |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold?" />
    <parameter key="message_sell" value="Do you want to sell |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold?" />
    <parameter key="message_decline" value="Well, obviously not." />
    <parameter key="message_onbuy" value="It'll serve you well!" />
    <parameter key="message_onsell" value="Thank you, human." />
    <parameter key="message_walkaway" value="Farewell, human." />
    <parameter key="module_keywords" value="1" />
    <parameter key="keywords" value="job" />
    <parameter key="keyword_reply1" value="I'm an old djinn, I buy several items, and sell a few myself." />


<parameter key="module_shop" value="1" /> <!-- added shop module to show the icon in npc (10:36 +) -->
<parameter key="shop_sellable" value="0,0,0;"/>
<parameter key="shop_buyable" value="0,0,0;"/>


  </parameters>
</npc>

Alesar:

 

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Alesar" script="Alesar.lua" walkinterval="2000" speechbubble="4" floorchange="0">
  <health now="100" max="100" />
  <look type="80" head="0" body="0" legs="0" feet="0" addons="0" />
  <parameters>
    <parameter key="message_greet" value="What do you want from me, |PLAYERNAME|?" />
<parameter key="module_shop" value="1" /> <!-- added shop module to show the icon in npc (10:36 +) -->
<parameter key="shop_sellable" value="0,0,0;"/>
<parameter key="shop_buyable" value="0,0,0;"/>
  </parameters>
</npc>

 

Link para o post
Compartilhar em outros sites

Creio que não seja algo na Script.. Só falta saber ONDE.. oskaKS TÁ FODA

 

 

Na real é que nenhum NPC da green djinn tá me respondendo..


UP

Editado por arthur122222 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 1 month later...

Eu estou tendo o mesmo problema e quando eu falo Hi depois de substituir os meus scripts pelo recomendado pelo Ceos aparece estes erros no console para mim:

 

Lua Script Error: [Npc interface]
data/npc/scripts/Yaman.lua:onCreatureSay
data/npc/scripts/Yaman.lua:40: attempt to index field 'DjinnWar' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/npc/scripts/Yaman.lua:40: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:338: in function 'greet'
        data/npc/lib/npcsystem/npchandler.lua:512: in function 'onGreet'
        data/npc/lib/npcsystem/modules.lua:277: in function 'callback'
        data/npc/lib/npcsystem/keywordhandler.lua:26: in function 'processMessage'
        data/npc/lib/npcsystem/keywordhandler.lua:135: in function 'processNodeMessage'
        data/npc/lib/npcsystem/keywordhandler.lua:110: in function 'processMessage'
        data/npc/lib/npcsystem/npchandler.lua:407: in function 'onCreatureSay'
        data/npc/scripts/Yaman.lua:7: in function <data/npc/scripts/Yaman.lua:7>
 
Uso TFS 1.0 Linux
 
Alguem sabe como me ajudar?
Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo