View Full Version : Detect message
yooka
06-19-2016, 09:34 AM
Who detect this message ?
Paid 50 gold from bank account. Your account balance is now 222538 gold.
---Not Work
function LookMessage(proxy, message)
print("Meee: "..message)
local paid, balance = string.match(message, "Paid (.+) gold from bank account. Your account balance is now (.+) gold.")
if(balance)then
Meee.Data.Balance = balance
end
end
LookMessageProxy.OnReceive("LookMessageProxy", LookMessage)
yooka
06-23-2016, 06:01 PM
Ok please Close
WORK
function GenericTextMessage(proxy, message)
local paid, balance = string.match(message, "Paid (.+) gold from bank account. Your account balance is now (.+) gold.")
if(balance)then
Meee.Data.Balance = balance
end
end
GenericTextMessageProxy.OnReceive("MessageProxy", GenericTextMessage)
shadowart
06-27-2016, 10:25 PM
Use a NpcMessageProxy instead, it has better performance.
NpcMessageProxy.OnReceive("Gets Bank Balance", function(proxy, npcName, message)
local balance = string.match(message, "Your account balance is (.+) gold.")
if balance then
Meee.Data.Balance = balance
end
end)
Fatality
06-28-2016, 03:26 AM
Use a NpcMessageProxy instead, it has better performance.
NpcMessageProxy.OnReceive("Gets Bank Balance", function(proxy, npcName, message)
local balance = string.match(message, "Your account balance is (.+) gold.")
if balance then
Meee.Data.Balance = balance
end
end)
This is for traveling via boat (I think) so it prints to server log.
shadowart
06-28-2016, 08:45 AM
This is for traveling via boat (I think) so it prints to server log.
Ah, in that case its the generic proxy. I haven't played since the patch so I'm not really up to date on that.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.