--- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- ---
local talk_state = 0
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
function creatureSayCallback(cid, type, msg)
if msgcontains(msg, 'spike sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2383,1) >= 1 then --- spike sword
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2383,1) == 1 then --- spike sword
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7763) --- Spike sword with ice enchant
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'barbarian axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2429,1) >= 1 then --- barbarian axe
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2429,1) == 1 then --- barbarian axe
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7768) --- barbarian axe with ice enchant
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'relic sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7383,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7383,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7764) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'blacksteel sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7406,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7406,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7766) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'dragon slayer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7402,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7402,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7767) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'mystic blade') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7384,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7384,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7765) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'knight axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2430,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2430,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7769) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'heroic axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7389,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7389,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7770) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'headchopper') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7380,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7380,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7771) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'war axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2454,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2454,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7772) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'clerical mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2423,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2423,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7773) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'crystal mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2445,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2445,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7774) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'cranial basher') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7415,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7415,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7775) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'orcish maul') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7392,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7392,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7776) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'war hammer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2391,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2391,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7777) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'arrow') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2544,100) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2544,100) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,2544,100) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
end
end
end
end
end
end
end
end
--- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- ---
local talk_state = 0
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
function creatureSayCallback(cid, type, msg)
if msgcontains(msg, 'spike sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2383,1) >= 1 then --- spike sword
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2383,1) == 1 then --- spike sword
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7763) --- Spike sword with ice enchant
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'barbarian axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2429,1) >= 1 then --- barbarian axe
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2429,1) == 1 then --- barbarian axe
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7768) --- barbarian axe with ice enchant
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'relic sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7383,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7383,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7764) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'blacksteel sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7406,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7406,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7766) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'dragon slayer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7402,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7402,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7767) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'mystic blade') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7384,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7384,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7765) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'knight axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2430,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2430,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7769) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'heroic axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7389,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7389,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7770) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'headchopper') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7380,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7380,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7771) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'war axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2454,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2454,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7772) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'clerical mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2423,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2423,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7773) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'crystal mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2445,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2445,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7774) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'cranial basher') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7415,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7415,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7775) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'orcish maul') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7392,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,7392,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7776) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'war hammer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2391,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2391,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7777) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'arrow') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,2544,100) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == 1 then --- 5 ice shards
if doPlayerRemoveItem(cid,2544,100) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,2544,100) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
For the beginning lua i'm advicing them to juse Notepad++ u can see the lines and how many ends u need to put
--- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- ---
local talk_state = 0
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
function creatureSayCallback(cid, type, msg)
player_gold = getPlayerItemCount(cid,2148)
player_plat = getPlayerItemCount(cid,2152)*100
player_crys = getPlayerItemCount(cid,2160)*10000
player_money = player_gold + player_plat + player_crys
if msgcontains(msg, 'spike sword') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2383) >= 1 then --- spike sword
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2383,1) == TRUE then --- spike sword
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7763) --- Spike sword with ice enchant
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'barbarian axe') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2429) >= 1 then --- barbarian axe
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,2429,1) == TRUE then --- barbarian axe
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7768) --- barbarian axe with ice enchant
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'relic sword') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7383) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7383,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7764) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'blacksteel sword') then
if getPlayerItemMoney(cid,600) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,7290,5) >= 1 then --- 5 ice shards
if getPlayerItemCount(cid,7406,1) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7406,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7766) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'dragon slayer') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7402) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7402,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7767) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'mystic blade') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7384) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7384,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7765) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'knight axe') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2430) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2430,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7769) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'heroic axe') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7389) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7389,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7770) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'headchopper') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7380) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7380,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7771) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'war axe') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2454) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2454,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7772) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'clerical mace') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2423) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2423,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7773) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'crystal mace') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2445) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2445,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7774) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'cranial basher') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7415) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7415,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7775) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'orcish maul') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,7392) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,7392,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7776) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'war hammer') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2391) >= 1 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2391,1) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7777) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'arrow') then
if player_money >= 600 then --- 60 platinum coins
if getPlayerItemCount(cid,7290) >= 5 then --- 5 ice shards
if getPlayerItemCount(cid,2544) >= 100 then --- weapon
if doPlayerRemoveMoney(cid,600) == TRUE then --- 60 platinum coins
if doPlayerRemoveItem(cid,7290,5) == TRUE then --- 5 ice shards
if doPlayerRemoveItem(cid,2544,100) == TRUE then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,2544,100) --- ice enchanted weapon
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
end
if msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
--- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- ---
local talk_state = 0
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
function creatureSayCallback(cid, type, msg)
if msgcontains(msg, 'spike sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2383,1) >= 1 then --- spike sword
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2383,1) == 1 then --- spike sword
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7744) --- Spike sword with fire enchant
end
else
if msgcontains(msg, 'barbarian axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2429,1) >= 1 then --- barbarian axe
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2429,1) == 1 then --- barbarian axe
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7749) --- barbarian axe with fire enchant
end
else
if msgcontains(msg, 'relic sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7383,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7383,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7745) --- fire enchanted weapon
end
else
if msgcontains(msg, 'blacksteel sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7406,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7406,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7747) --- fire enchanted weapon
end
else
if msgcontains(msg, 'dragon slayer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7402,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7402,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7748) --- fire enchanted weapon
end
else
if msgcontains(msg, 'mystic blade') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7384,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7384,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7746) --- fire enchanted weapon
end
else
if msgcontains(msg, 'knight axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2430,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2430,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7750) --- fire enchanted weapon
end
else
if msgcontains(msg, 'heroic axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7389,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7389,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7751) --- fire enchanted weapon
end
else
if msgcontains(msg, 'headchopper') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7380,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7380,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7752) --- fire enchanted weapon
end
else
if msgcontains(msg, 'war axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2454,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2454,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7753) --- fire enchanted weapon
end
else
if msgcontains(msg, 'clerical mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2423,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2423,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7754) --- fire enchanted weapon
end
else
if msgcontains(msg, 'crystal mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2445,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2445,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7755) --- fire enchanted weapon
end
else
if msgcontains(msg, 'cranial basher') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7415,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7415,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7756) --- fire enchanted weapon
end
else
if msgcontains(msg, 'orcish maul') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,7392,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,7392,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7757) --- fire enchanted weapon
end
else
if msgcontains(msg, 'war hammer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2391,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2391,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7758) --- fire enchanted weapon
end
else
if msgcontains(msg, 'arrow') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2795,5) >= 1 then --- 5 fire mushrooms
if getPlayerItemCount(cid,2544,100) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2795,5) == 1 then --- 5 fire mushrooms
if doPlayerRemoveItem(cid,2544,100) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7840,100) --- fire enchanted weapon
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
elseif msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
--- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- ---
local talk_state = 0
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
function creatureSayCallback(cid, type, msg)
if msgcontains(msg, 'spike sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2383,1) >= 1 then --- spike sword
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2383,1) == 1 then --- spike sword
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7854) --- Spike sword with fire enchant
end
else
if msgcontains(msg, 'barbarian axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2429,1) >= 1 then --- barbarian axe
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2429,1) == 1 then --- barbarian axe
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7859) --- barbarian axe with fire enchant
end
else
if msgcontains(msg, 'relic sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7383,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7383,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7855) --- fire enchanted weapon
end
else
if msgcontains(msg, 'blacksteel sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7406,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7406,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7857) --- fire enchanted weapon
end
else
if msgcontains(msg, 'dragon slayer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7402,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7402,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7858) --- fire enchanted weapon
end
else
if msgcontains(msg, 'mystic blade') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7384,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7384,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7856) --- fire enchanted weapon
end
else
if msgcontains(msg, 'knight axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2430,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2430,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7860) --- fire enchanted weapon
end
else
if msgcontains(msg, 'heroic axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7389,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7389,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7861) --- fire enchanted weapon
end
else
if msgcontains(msg, 'headchopper') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7380,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7380,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7862) --- fire enchanted weapon
end
else
if msgcontains(msg, 'war axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2454,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2454,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7863) --- fire enchanted weapon
end
else
if msgcontains(msg, 'clerical mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2423,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2423,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7864) --- fire enchanted weapon
end
else
if msgcontains(msg, 'crystal mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2445,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2445,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7865) --- fire enchanted weapon
end
else
if msgcontains(msg, 'cranial basher') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7415,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7415,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7866) --- fire enchanted weapon
end
else
if msgcontains(msg, 'orcish maul') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,7392,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,7392,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7867) --- fire enchanted weapon
end
else
if msgcontains(msg, 'war hammer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2391,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2391,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7868) --- fire enchanted weapon
end
else
if msgcontains(msg, 'arrow') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,4850,1) >= 1 then --- 1 hydra egg
if getPlayerItemCount(cid,2544,100) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,4850,1) == 1 then --- 1 hydra egg
if doPlayerRemoveItem(cid,2544,100) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7850,100) --- fire enchanted weapon
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
elseif msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
--- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- ---
local talk_state = 0
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
function creatureSayCallback(cid, type, msg)
if msgcontains(msg, 'spike sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2383,1) >= 1 then --- spike sword
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2383,1) == 1 then --- spike sword
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7869) --- Spike sword with fire enchant
end
else
if msgcontains(msg, 'barbarian axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2429,1) >= 1 then --- barbarian axe
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2429,1) == 1 then --- barbarian axe
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7874) --- barbarian axe with fire enchant
end
else
if msgcontains(msg, 'relic sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7383,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7383,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7870) --- fire enchanted weapon
end
else
if msgcontains(msg, 'blacksteel sword') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7406,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7406,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7872) --- fire enchanted weapon
end
else
if msgcontains(msg, 'dragon slayer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7402,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7402,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7873) --- fire enchanted weapon
end
else
if msgcontains(msg, 'mystic blade') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7384,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7384,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7871) --- fire enchanted weapon
end
else
if msgcontains(msg, 'knight axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2430,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2430,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7875) --- fire enchanted weapon
end
else
if msgcontains(msg, 'heroic axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7389,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7389,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7876) --- fire enchanted weapon
end
else
if msgcontains(msg, 'headchopper') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7380,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7380,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7877) --- fire enchanted weapon
end
else
if msgcontains(msg, 'war axe') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2454,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2454,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7878) --- fire enchanted weapon
end
else
if msgcontains(msg, 'clerical mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2423,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2423,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7879) --- fire enchanted weapon
end
else
if msgcontains(msg, 'crystal mace') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2445,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2445,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7880) --- fire enchanted weapon
end
else
if msgcontains(msg, 'cranial basher') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7415,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7415,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7881) --- fire enchanted weapon
end
else
if msgcontains(msg, 'orcish maul') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,7392,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,7392,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7882) --- fire enchanted weapon
end
else
if msgcontains(msg, 'war hammer') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2391,1) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2391,1) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7883) --- fire enchanted weapon
end
else
if msgcontains(msg, 'arrow') then
if getPlayerItemCount(cid,2152,60) >= 1 then --- 60 platinum coins
if getPlayerItemCount(cid,2124,1) >= 1 then --- 1 chrystal ring
if getPlayerItemCount(cid,2544,100) >= 1 then --- weapon
if doPlayerRemoveItem(cid,2152,60) == 1 then --- 60 platinum coins
if doPlayerRemoveItem(cid,2124,1) == 1 then --- 1 chrystal ring
if doPlayerRemoveItem(cid,2544,100) == 1 then --- weapon
selfSay('Enchantmenth completed, heres your weapon.')
doPlayerAddItem(cid,7838,100) --- fire enchanted weapon
end
else
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
elseif msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
--/*- ------------------------------- ---
--- Inspired by stix360's npc trade ---
--- item for item example. Not sure ---
--- if he made it, but I found it - ---
--- through his posts. ------------ ---
--- ------------------------------- ---
--- The shit job was done by me --- ---
--- ----- The hoster of Znote ----- ---
--- ------------------------------- -*/--
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
function doHandleItems(cid, msg, str, reward, items)
if msgcontains(msg, str) then
for _, itemTable in pairs(items) do
if (getPlayerItemCount(cid, itemTable.itemid, itemTable.count) < 1) then
return false
end
end
end
for _, itemTable in pairs(arg) do
doPlayerRemoveItem(cid, itemTable.itemid, itemTable.count)
end
selfSay("Enchantment completed, here's your weapon.")
doPlayerAddItem(cid, reward) --- Spike sword with fire enchant
end
function creatureSayCallback(cid, type, msg)
if not doHandleItems(cid, msg, "spike sword", 7744, {
{itemid=2152, count=60}, -- 60 platinum coins
{itemid=2795, count=5}, -- 5 fire mushrooms
{itemid=2383, count=1} -- spike sword
}) and
doHandleItems(cid, msg, "barbarian axe", 7749, {
{itemid=2152, count=60}, -- 60 platinum coins
{itemid=2795, count=5}, -- 5 fire mushrooms
{itemid=2429, count=1} -- barbarian axe
}) and
doHandleItems(cid, msg, "relic sword", 7745, {
{itemid=2152, count=60}, -- 60 platinum coins
{itemid=2795, count=5}, -- 5 fire mushrooms
{itemid=7383, count=1} -- relic sword
}) then
selfSay('I need a weapon, and its ingredients, I also want 6k as paymenth for this job.')
talk_state = 0
end
if msgcontains(msg, 'no') then
selfSay('Maybe another time then.')
talk_state = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())