Post new topic Reply to topic  [ 141 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 15  Next
Gryphonheart Target (GHT) 
Author Message
Site Admin
Joined:Mon Jun 16, 2008 7:25 pmPosts: 1535 Realm Region: Europe Realm Name: Argent Dawn
Post Re: Gryphonheart Target (GHT)
They have implemented a function to give the player facing now (I used that in GHO myself). It is called GetPlayerFacing().

Regaring Farlins questions / conclusions. I had in mind to let it do three things to find out who is in the zone.
1: Check who is in the generel chat of the zone, if the player is in it.
2: Note down players who are active in say, emotes or yells. (this needs to be flushed each X min).
3: Preform /who on the given zone. (This should not be done too often. Each few minute at max).

When it got the list of all players in the zone, it shall then just send one message to the player, asking if the player got GHT or not. In that way we dont waste much bandwith on communication with players without GHT. Those without GHT should still be ping'ed with the addons aswell.

Regardingthe tracking part, then there is one thing we should be carefull about. It is not the purpose of GHT to be able to track down other players. It is the purpose to be able to get addon information about the players who are nearby and to see in what directly a visible speach/yell are comming from. I woud like to avoid a scenario where players disables GHT in fear of being tracked down. I like the thing about having a list of those who are nearby at the given time however.


Fri Jan 29, 2010 5:04 am
Profile
Joined:Sun Oct 05, 2008 5:32 amPosts: 707 Realm Name: Earthen Ring
Post Re: Gryphonheart Target (GHT)
This is like the first few pages of this thread, heres some of the sutff i had found

it was from

http://wow.curse.com/downloads/wow-addo ... m-gps.aspx
i made some psudeo functions with a part of the code
out of proper order -_-

function GetDistance(tarX,tarY, posX,posY)
local v1 = (tarX-posX) * (tarX-posX);
local v2 = (destY-posY) * (destY-posY);
local v3 = 30 * (sqrt((v1 + v2)));
v3 = tonumber(v3,10);
DistanceToTarget = format("%d", v3);
end

posx,posy = whereamI();

function whereamI()
local posX, posY = GetPlayerMapPosition("player");
return posx, posy;
end
---Sendmessage asking for above after sotring our own. then cal GetDistance()

http://www.wowwiki.com/API_GetPlayerMapPosition
for info on that.
also
http://www.wowwiki.com/API_CheckInteractDistance
may be useful


also there is an addon called envrioment emotes that uses something simmiler to what wanted with *low*

http://www.wowinterface.com/downloads/i ... 7-1.3.html
a lib for whoing http://wow.curse.com/downloads/wow-addo ... holib.aspx

get player facing

local radians = GetPlayerFacing()

with it going around

0
-90 90
180


facing < 0 => westward
facing > 0 and facing != 180 => eastward
abs(facing) < 90 => northward
abs(facing) > 90 => southward

can also convert it to
0-360 as

local radians = (-math.pi/180) * (GetPlayerFacing() % 360)

Some most likely non working drycode of getting a yell direction


--after registering the CHAT_MSG_SAY event---


function whereamI()
local posX, posY = GetPlayerMapPosition("player");
return posx, posy;
end

function GetDistance(tarX,tarY, posX,posY)
local v1 = (tarX-posX) * (tarX-posX);
local v2 = (destY-posY) * (destY-posY);
local v3 = 30 * (sqrt((v1 + v2)));
v3 = tonumber(v3,10);
DistanceToTarget = format("%d", v3);---a varible.
end

function MyMod_Say(event, arg1, arg2, arg3)
PrevMsg = arg1;
PrevPlyr = arg2;
PrevLang = arg3;

if string.find(string.lower(prevmsg),"*low*") then --make it lowercase incase they type *Low*

posX,posY = whereamI();--store this for ourselves

SendAddonMessage("Distance",WHISPER,prevPlyr)
--wait for return on thier whereami check
--the returnvalue will have to be sent as tarX,tarY and saved

GetDistance(posX,posY,tarX,tarY)

if distanceTotarget > (some number) then
--we can't hear them, filter it
--add a meesage to the display as an emote that we hear the player mumbler or somesuch...add the language if its said in something other then dfualt
end


end


---CHAT_MSG_YELL on event

function Facing()


local radians = (-math.pi/180) * (GetPlayerFacing() % 360)

--converts the value to 0-360
--0 = north
--90 is east
--180 is south
--270 is west
--to get NE,NW etc we will have to do an if check between values IE > 0 and < 90

--after if/else checks return value as text heading
end


function MyMod_yell(event, arg1, arg2, arg3)
PrevMsg = arg1;
PrevPlyr = arg2;
PrevLang = arg3;

if string.find(string.lower(prevmsg),"*low*") then --make it lowercase incase they type *Low*

posX,posY = whereamI();--store this for ourselves

SendAddonMessage("Distance",WHISPER,prevPlyr)
--wait for return on thier whereami check
--the returnvalue will have to be sent as tarX,tarY and saved

GetDistance(posX,posY,tarX,tarY)

if distanceTotarget > (some number) then
--confirm they did not just yell right next to us...ow my ears
--ask the player for thier facing after getting ours
direction = Facing();

sendaddonmessage(<ask for facing>)

---after we have the info we need to do some complicated checking to compare our direction to thiers, I cannot quite wrap my head around how to identify if they are behind us or not.

--add a message to screen after the yell to the effect of 'it sounds like <name> is yelling from <direction>

end


end


Suggestion: Once we 'see' a player register them to a DB Store if they register as having the addon. that way we can do addon whispers to that player to get location info faster. Possibly have the DB purge itself or the player if not seen for a few days.

_________________
www.netherbane.org
Fethas Ravenmoon Earthen Ring US


Fri Jan 29, 2010 5:19 am
Profile
Joined:Fri Jan 15, 2010 7:30 pmPosts: 63
Post Re: Gryphonheart Target (GHT)
Pilus, I got yas now. Let me do some tweaking as I don't think it will take much to do. :)


Fri Jan 29, 2010 6:04 am
Profile
Joined:Fri Jan 15, 2010 7:30 pmPosts: 63
Post Re: Gryphonheart Target (GHT)
Still plugging away on GHT...had to go out of town for a week due to work last week, so did not get to focus much on it. Hope to be back at it this week! :)


Sun Feb 07, 2010 2:50 am
Profile
Site Admin
Joined:Mon Jun 16, 2008 7:25 pmPosts: 1535 Realm Region: Europe Realm Name: Argent Dawn
Post Re: Gryphonheart Target (GHT)
That sounds great :)

I will be fixing GHR and after that I will focus on GHP for a while, along with next GHI version


Sun Feb 07, 2010 12:49 pm
Profile
Joined:Mon Nov 03, 2008 5:37 pmPosts: 388 Realm Region: Europe Realm Name: Kult der Verdammten
Post Re: Gryphonheart Target (GHT)
Pilus wrote:
I will be fixing GHR


To motivated you doing that ... I will post you a new picture of Laruna every day, and evrey day she will drop a piece
of clothing.

Take it as a promise or a menace, depending on your point of view. :twisted:


Mon Feb 08, 2010 6:30 pm
Profile WWW
Site Admin
Joined:Mon Jun 16, 2008 7:25 pmPosts: 1535 Realm Region: Europe Realm Name: Argent Dawn
Post Re: Gryphonheart Target (GHT)
I will change my post to:
Quote:
Laruna will be fixing GHR (or most of it)


:P

Quote:
To motivated you doing that ... I will post you a new picture of Laruna every day, and evrey day she will drop a piece
of clothing.

Need more cowbell! (http://www.elfonlyinn.net/d/20040707.html)


Mon Feb 08, 2010 6:41 pm
Profile
Joined:Sun Oct 05, 2008 5:32 amPosts: 707 Realm Name: Earthen Ring
Post Re: Gryphonheart Target (GHT)
remind me to pester the lot of you on some stuff with Tongues later....

_________________
www.netherbane.org
Fethas Ravenmoon Earthen Ring US


Mon Feb 08, 2010 8:30 pm
Profile
Joined:Fri Jan 15, 2010 7:30 pmPosts: 63
Post Re: Gryphonheart Target (GHT)
Pilus,

Using version 0.27 of GHI, I am getting the below LUA error. It appears that GHI is hijacking the SendCommMessage from AceComm. Not sure why or how my script ends up calling GHI's functions, but here are some code lines that may help.

Initialization for AceAddOn:

Code:
GHTT = LibStub("AceAddon-3.0"):NewAddon("GHTT", "AceConsole-3.0", "AceComm-3.0", "AceEvent-3.0", "AceTimer-3.0");


Code:
Line 358:

GHTT:SendCommMessage(v, serializedMessage, C_GHT_DISTRIBUTION_METHOD, target, C_GHT_PRIORITY);


GHTT is a self-contained tracker I built for GHT that does the job of looking people up, asking if they have GHI, GHR, etc and keeping tabs on that information. However, with the update to 0.27, for some odd reason calling my internal SendCommMessage ends up calling GHI. Any thoughts or ideas as to why? I know I am hooking AceComm correctly because if I disable GHI, it works just fine and I have several other addons that use AceComm.

Code:
Date: 2010-02-10 08:55:39
ID: 1
Error occured in: Global
Count: 40
Message: Unknown addon chat type
Debug:
   (tail call): ?
   [C]: ?
   [C]: ?
   [C]: SendAddonMessage()
   ...face\AddOns\GHI\Libs\AceComm-3.0\ChatThrottleLib.lua:461: SendAddonMessage()
   ...nterface\AddOns\GHI\Libs\AceComm-3.0\AceComm-3.0.lua:108: Orig_SendCommMessage()
   GHI\ghi_communication.lua:20: SendCommMessage()
   GHT\GHTT.lua:358: SendAddOnPings()
   GHT\GHTT.lua:1235:
      GHT\GHTT.lua:1209
   (tail call): ?
   [C]: ?
   [string "safecall Dispatcher[2]"]:9:
      [string "safecall Dispatcher[2]"]:5
   (tail call): ?
   ...rface\AddOns\GHT\Libs\AceTimer-3.0\AceTimer-3.0.lua:164:
      ...rface\AddOns\GHT\Libs\AceTimer-3.0\AceTimer-3.0.lua:138


Wed Feb 10, 2010 6:09 pm
Profile
Site Admin
Joined:Mon Jun 16, 2008 7:25 pmPosts: 1535 Realm Region: Europe Realm Name: Argent Dawn
Post Re: Gryphonheart Target (GHT)
Hmm, that error happends with many addons when GHI is on. I will look trough GHI to find out what causes it. It is now without doubt a problem inside GHI.

See this thread for more info: viewtopic.php?f=11&t=782


Wed Feb 10, 2010 6:15 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 141 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 15  Next
Powered by phpBB © phpBB Group.
Designed by Laruna