Postado Maio 24, 2018 7 anos @peterson18 Fiz o teste em um servidor TFS 0.4 3777 com o seguinte script: <?xml version="1.0" encoding="UTF-8"?> <npc name="Test" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="132" head="38" body="58" legs="58" feet="58"/> <parameters> <parameter key="message_greet" value="Welcome |PLAYERNAME|! Hungry?" /> <parameter key="message_farewell" value="Vlw fiote!!" /> </parameters> </npc> E o NPC me retornou corretamente. como o amigo @FlavioHulk pediu, poste seu npchandler.lua, e se possível nos informe qual distro você esta utilizando.
Postado Maio 24, 2018 7 anos -- Constant indexes for defining default messages. MESSAGE_GREET = 1 -- When the player greets the npc. MESSAGE_FAREWELL = 2 -- When the player unGreets the npc. MESSAGE_BUY = 3 -- When the npc asks the player if he wants to buy something. MESSAGE_ONBUY = 4 -- When the player successfully buys something via talk. MESSAGE_BOUGHT = 5 -- When the player bought something through the shop window. MESSAGE_SELL = 6 -- When the npc asks the player if he wants to sell something. MESSAGE_ONSELL = 7 -- When the player successfully sells something via talk. MESSAGE_SOLD = 8 -- When the player sold something through the shop window. MESSAGE_MISSINGMONEY = 9 -- When the player does not have enough money. MESSAGE_NEEDMONEY = 10 -- Same as above, used for shop window. MESSAGE_MISSINGITEM = 11 -- When the player is trying to sell an item he does not have. MESSAGE_NEEDITEM = 12 -- Same as above, used for shop window. MESSAGE_NEEDSPACE = 13 -- When the player don't have any space to buy an item MESSAGE_NEEDMORESPACE = 14 -- When the player has some space to buy an item, but not enough space MESSAGE_IDLETIMEOUT = 15 -- When the player has been idle for longer then idleTime allows. MESSAGE_WALKAWAY = 16 -- When the player walks out of the talkRadius of the npc. MESSAGE_DECLINE = 17 -- When the player says no to something. MESSAGE_SENDTRADE = 18 -- When the npc sends the trade window to the player MESSAGE_NOSHOP = 19 -- When the npc's shop is requested but he doesn't have any MESSAGE_ONCLOSESHOP = 20 -- When the player closes the npc's shop window MESSAGE_ALREADYFOCUSED = 21 -- When the player already has the focus of this npc. MESSAGE_WALKAWAY_MALE = 22 -- When a male player walks out of the talkRadius of the npc. MESSAGE_WALKAWAY_FEMALE = 23 -- When a female player walks out of the talkRadius of the npc. Basta usar um dos ID acima, e incluir no final do script do NPC npcHandler:setMessage(MESSAGE_WALKAWAY, "Example") npcHandler:setMessage(MESSAGE_FAREWELL, "Example")
Postado Maio 24, 2018 7 anos Autor Sim, entendi. Esses negocio de Script é novo para mim. Não sabia que CAPSLOOCK fazia diferença '-' Grato aos dois pela atenção!
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.