Hello guys,
I create a addon when a player write in guild chat "Hello" or "Hi" or "Ciao"..... automatically the addon write in guild chat "Hello" or "Hi bro" .... and it works perfectly.
The problem is that the addon respond automatically to all the players who have greeting the player.
This is the problem:
Sohana:Hello, I'm back <--- First greet
Kolbec: Hello <--- It's me
charyn: Hi bro
kolbec: Hello <--- It's me
Raviel: Hi sohana
Kolbec Hello <--- It's me
.......
I thought I put a timer (watch of wow) that after the addon greets the first player, for 10-15 seconds should not greet anyone more, but I do not know how to insert a watch of wow. Can you help me
The code should have this structure:
*vartime=watch world of warcraft when I logged in
if(eventguildhello)
if(*watch of wow > (vartime + 15))
writeguildchat.hello
end
end
Can you help me to implement the code with *?? Best regards
local previous = 0<br />
if eventguildhello then<br />
local t = GetTime()<br />
if t-previous > 15 then<br />
previous = t<br />
writeguildchat.hello<br />
end<br />
end
I create a addon when a player write in guild chat "Hello" or "Hi" or "Ciao"..... automatically the addon write in guild chat "Hello" or "Hi bro" .... and it works perfectly.
The problem is that the addon respond automatically to all the players who have greeting the player.
This is the problem:
Sohana:Hello, I'm back <--- First greet
Kolbec: Hello <--- It's me
charyn: Hi bro
kolbec: Hello <--- It's me
Raviel: Hi sohana
Kolbec Hello <--- It's me
.......
I thought I put a timer (watch of wow) that after the addon greets the first player, for 10-15 seconds should not greet anyone more, but I do not know how to insert a watch of wow. Can you help me
The code should have this structure:
*vartime=watch world of warcraft when I logged in
if(eventguildhello)
if(*watch of wow > (vartime + 15))
writeguildchat.hello
end
end
Can you help me to implement the code with *?? Best regards
You're looking for GetTime()