Easy, ;D voce pode adaptar o Sweaty Cyclops do global por exemplo:
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
-- XVX FORGER START --
function amulet(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,8265) >= 1 then
if doPlayerRemoveItem(cid,8265,1) and (doPlayerRemoveMoney(cid, 0) == TRUE) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,8266,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function obsidian(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,2425) >= 1 then
if doPlayerRemoveItem(cid,2516,1) and doPlayerRemoveItem(cid,2425,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5908,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function crude(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2393) >= 1 then
if doPlayerRemoveItem(cid,2393,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5892,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function draconian(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2516) >= 1 then
if doPlayerRemoveItem(cid,2516,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5889,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function piece(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2487) >= 1 then
if doPlayerRemoveItem(cid,2487,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5887,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
function hell(cid, message, keywords, parameters, node)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerItemCount(cid,2462) >= 1 then
if doPlayerRemoveItem(cid,2462,1) then
npcHandler:say('Here is your item!', cid)
doPlayerAddItem(cid,5888,1)
end
else
npcHandler:say('You don\'t have these items!', cid)
end
end
-- XVX FORGER END --
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I can forge Amulet, Obsidian Knife, Huge Chunk of Crude Iron and Piece of Draconian Steel!"})
local node1 = keywordHandler:addKeyword({'amulet'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Hum Humm! Welcume lil. Me can do unbroken but Big Ben want gold 5000 and Big Ben need a lil time to make it unbroken. Yes or no??'})
node1:addChildKeyword({'yes'}, amulet, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
local node2 = keywordHandler:addKeyword({'obsidian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield and an Obsidian Lance for a Obsidian Knife?'})
node2:addChildKeyword({'yes'}, obsidian, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
local node3 = keywordHandler:addKeyword({'crude'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Giant Sword for a Huge Chunk of Crude Iron?'})
node3:addChildKeyword({'yes'}, crude, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
local node4 = keywordHandler:addKeyword({'draconian'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Dragon Shield for a Piece of Draconian Steel?'})
node4:addChildKeyword({'yes'}, draconian, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
local node5 = keywordHandler:addKeyword({'royal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Crown Armor for a Piece of Royal Steel?'})
node5:addChildKeyword({'yes'}, piece, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
local node6 = keywordHandler:addKeyword({'hell'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to trade a Devil Helmet for a Piece of Hell Steel?'})
node6:addChildKeyword({'yes'}, hell, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you got the neccessary items.', reset = true})
npcHandler:addModule(FocusModule:new())
Em vermelho e o item que vc precisa ter no caso sua vip coin primeiro ele verifica se o playewr tem o item, depois remove
Em verde e o item que o npc dara no caso o item vip.E so voce adaptar os modulos das funçoes tipo a 1° que esta em azul depois configurar as palavras chaves que esta em amarelo
Estou meio sem tempo agora para mais detalhes , mas qulquer duvida poste ae que te auxilio mais tarde ;D









info
Grupo: Campones
Registrado: 20/01/10
Posts: 3
Reputação: 0
Char no Tibia: Nenhum no momento
Olá!
Implantei sistema Vip no meu servidor, deu tudu certo.
Agora estou com uma idéia de criar um NPC, que venda esses itens vips.
Criar o NPC, eu já consegui, ficou certo. Mais ai é que vem o motivo da criação desse forum.
Estou com objetivo de vender itens vip com Doação (Cash RL).
Intao irei vender 'Vip Coins' para os players comprarem no npc o item vip que quiserem.
Pois intão..
O Npc que criei vende os itens vips normais, porém, não sei se possível vocês me ajudarem..
QUERIA SABER COMO FAÇO PARA O NPC ACEITAR APENAS COIN VIP, E NÃO GP'S.
Já tentei pelo Tibihuck (ShopCreator) Porem o soft dele já vem implantado com gps.
Obs: (As Vip Coins, eu também já criei e estou com os id's em mãos.)
Grato ! Arthur..
=]]
Editado Janeiro 21 por Crocodileserver