View Single Post
  #8  
Unread 11-16-2015, 12:34 PM
Elliss11 Elliss11 is offline
The Indomitable
 
Join Date: Nov 2015
Posts: 11
The second text is working with a small change . but you had me already pointed


THANKS !!!!




localPlayer=Turbine.Gameplay.LocalPlayer:GetInstan ce();
count=0; -- initialize variable
-- define the AddCallback function
function AddCallback(object, event, callback)
if (object[event] == nil) then
object[event] = callback;
else
if (type(object[event]) == "table") then
table.insert(object[event], callback);
else
object[event] = {object[event], callback};
end
end
return callback;
end

CombatChanged = function(sender, args)
if not localPlayer:IsInCombat() then
--BodyStatus:SetText("6")
killcount=6;
do_update()
end
end
AddCallback(localPlayer, "InCombatChanged", CombatChanged)

ChatMonitor = Turbine.Chat;
ChatReceived = function(f, args)
local msg = args.Message;

if(args.ChatType == Turbine.ChatType.PlayerCombat) then
if string.find (args.Message,"Verbesserter Gnadenschuss",1,true)~=nil then
killcount=6;
do_update()
else
if killcount<=0 then
do_update()
else
if string.find (args.Message,"Verbesserter Schneller Bogen",1,true)~=nil then
killcount=killcount-0.333
do_update()
end
end
end
end
end

AddCallback(Turbine.Chat, "Received", ChatReceived)

Last edited by Elliss11 : 11-16-2015 at 12:37 PM.
Reply With Quote