Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Ai Pessoal. Boa tarde, vcs podem me ajudar?

Eu tenho um otserv ai eu queria botar nele um npc que vende itens vip ai eu fiz tudo certinho botei ele pra vender os itens só que ele aceita Hundred Dollar ai eu quero mudar o Hundred  Dollar para Vip dollar q é a moeda vip ai eu fiz isso:

Obs: O Vip Dollar ja existe no jogo!

 

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Loja vip" script="loot.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<look type="546" head="132" body="79" legs="97" feet="132" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="message_greet" value="Hello |PLAYERNAME|. I buy items there is my offer!.. and also sells some ." /> 
<parameter key="shop_buyable" value="Legendary Stone,2158,2159,1;Mystic,2154,2159,1;Ancient Stone,4851,2159,1;Reliquia Stone,6536,2159,4;Shiny Stone,2361,2159,2;Super Stone,5865,2159,1;Maluco Stone,2178,2159,1;master ball,2521,2159,1 "/>
</parameters>
</npc>
 
Porém, o Npc continua aceitando a bosta do Hundred dollar e n aceita o Vip dollar q é oq eu quero o iD do vip Dollar é 2159 ai eu botei (Stone,id da stone,id do vip dollar,e quantidade de vip dollars a retirar do player.)
 

Esses comandos eu peguei de outros npcs q vendiam esses itens ai eu criei esse e deletei os outros mais ta tudo igualzinho! A unica coisa q tenho q fazer é trocar o Hundred dollar pelo vip dollar... 

Aqui o Loot.lua: Obs: eu acho q o problema e no loot.lua

 

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
 
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
keywordHandler:addKeyword({'helmets'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy royal (40k), warrior (6k), crusader (9k), crown (5k), devil (4k), chain (35gp) and iron helmets (30gp), also mystic turbans (500gp).'})
keywordHandler:addKeyword({'boots'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden boots (100k), steel boots (40k) and boots of haste (40k).'})
keywordHandler:addKeyword({'armors'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden (30k), crown (20k), knight (5k), lady (7,5k), plate (400gp), brass (200gp) and chain armors (100gp), also mpa (100k), dsm (60k) and blue robes (15k).'})
keywordHandler:addKeyword({'legs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden (80k), crown (15k), knight (6k), plate (500gp) and brass legs (100gp).'})
keywordHandler:addKeyword({'shields'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy blessed (150k), great (100k), demon (40k), vampire (25k), medusa (8k), amazon (4k), crown (5k), tower (4k), dragon (3k), guardian (2k), beholder (1k), and dwarven shields (100gp), also mms (80k).'})
keywordHandler:addKeyword({'swords'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy giant (10k), bright (6k), fire (3k) serpent (1.5k), spike (800gp) and two handed swords (400gp), also ice rapiers (4k), magic longswords (150k), magic swords (90k), warlord swords (100k) broad swords (70gp), short swords (30gp), sabres (25gp) and swords (25gp).'})
keywordHandler:addKeyword({'axes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy fire (10k), guardian halberds (7,5k) knight (2k), double (200gp) and battle axes (100gp), also dragon lances (10k), stonecutters axes (90k), halberds (200gp) and hatchets (20gp).'})
keywordHandler:addKeyword({'clubs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy thunder hammers (90k), war (6k), dragon (2k) and battle hammers (60gp), also skull staffs (10k) and clerical maces (200gp).'})
 
npcHandler:addModule(FocusModule:new())

Editado por lucasgld (veja o histórico de edições)

  • Respostas 6
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Participe da conversa

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

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo