Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 17.05.2005, 20:22   #1
andreagighi
Архивный участник
 
Join Date: Mar 2005
Posts: 74
Default PHP Maps with Coords

I've make an easy script to take the position of player and to know the exactly coords position of any player (very useful in C2 that got /loc not workin).
Now with this method i can use the map to make coord for new span in npcpos.

Easier to see that to say here the screen...
andreagighi is offline  
Old 17.05.2005, 20:23   #2
andreagighi
Архивный участник
 
Join Date: Mar 2005
Posts: 74
Default

here the script:
sorry for multiply post but my connection suck...
andreagighi is offline  
Old 17.05.2005, 21:51   #3
damienstone
Архивный участник
 
Join Date: Feb 2005
Posts: 238
Default

wow thats pretty cool. Itd be nice if we can get a bigger higher resolution map especially for a server like mines where 2000 people could be logged in at one time.
damienstone is offline  
Old 17.05.2005, 23:31   #4
Dubie
Архивный участник
 
Join Date: Mar 2005
Posts: 133
Default

Great job bro.
Worked great.

You must of used png for your own copy or test copy.
Still have that in there for the images but the ones you packaged were jpg
Will have to change them couple of lines not a big deal.

Yeah bigger map would also be cool like Dam said for higher number of players be hard to target one players on this one out of 2000+ hehe

You could try this one out I uploaded
Well shit I did not want to show the pic just link it.

Keep up the good work.

Peace,
Dubie
Dubie is offline  
Old 18.05.2005, 04:11   #5
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

Man wish we had really smart people I mean thats sweet work but saw one time you all think sweet i think java or somthing map shows all locations of the players in the world... was a wow server. it would be sorta sweet have that for admin use or even player use hehe.
Kane Hart is offline  
Old 18.05.2005, 06:11   #6
archy
Архивный участник
 
Join Date: Mar 2005
Posts: 280
Default

Havent looked at source, just wanted to say good morning europe! :-)

But, if you use the x,y,z from database you may know they aint all that correct (more like totally wrong and written to every 5 min)

But thats just my experience..
archy is offline  
Old 18.05.2005, 07:13   #7
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

oh wait LOL I was not looking this guy made somthing like this LOL I only looked at the 2nd image thought was just a nice map LOL cool!

Don't think can do in php like a biger map then guy added and be able zoom or have more then 1 map layout.. so people like small one can use or click on for bigger map and such.,
Kane Hart is offline  
Old 18.05.2005, 07:31   #8
andreagighi
Архивный участник
 
Join Date: Mar 2005
Posts: 74
Default

Yeah ops sorry mymistake... with png if u need i will post...

The map in the package is 1027x768 if u need more resolution pm me i can correct the script...
andreagighi is offline  
Old 18.05.2005, 07:38   #9
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

Quote:
Originally Posted by andreagighi
Yeah ops sorry mymistake... with png if u need i will post...

The map in the package is 1027x768 if u need more resolution pm me i can correct the script...
I'm going see if I can learn correct on my own sorta learning php man this so cool though

Edit gave up on trying im guessing:
$xsito=($valorex + 131072)/400-7; //Aden
$ysito=($valorey + 32768)/410-7; //Aden
but dont know how get exactly to match.. Im guessing you sat there fin tunning it to be perfect not sure..
Kane Hart is offline  
Old 18.05.2005, 08:25   #10
andreagighi
Архивный участник
 
Join Date: Mar 2005
Posts: 74
Default

Quote:
Originally Posted by Kane Hart
Quote:
Originally Posted by andreagighi
Yeah ops sorry mymistake... with png if u need i will post...

The map in the package is 1027x768 if u need more resolution pm me i can correct the script...
I'm going see if I can learn correct on my own sorta learning php man this so cool though

Edit gave up on trying im guessing:
$xsito=($valorex + 131072)/400-7; //Aden
$ysito=($valorey + 32768)/410-7; //Aden
but dont know how get exactly to match.. Im guessing you sat there fin tunning it to be perfect not sure..

$valorex=mssql_result($resultlistaplayer, $i, 1); //Take x from DB
$valorey=mssql_result($resultlistaplayer, $i, 2); //Take y from DB



if ($valorey>(-32768)) { //choose if in Aden or Elmore
$xsito=($valorex + 131072)/400-7; //131072=Offset DB; 400 = multiplier half image x; 7 = Icon Offset
$ysito=($valorey + 32768)/410-7;}
else {
$xsito=($valorex - 98336)/325-7+510;
$ysito=($valorey + 229352)/325-7+719+90; //719 = Offset for image.
}
andreagighi is offline  
Old 18.05.2005, 08:30   #11
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

ahh cool. I did bring down size of my icons to 5 don't know made diffrence in where people are if correct or not heres little shot of it. was just messing around hehe.
Kane Hart is offline  
Old 18.05.2005, 08:38   #12
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

Quote:
Originally Posted by andreagighi
Quote:
Originally Posted by Kane Hart
Quote:
Originally Posted by andreagighi
Yeah ops sorry mymistake... with png if u need i will post...

The map in the package is 1027x768 if u need more resolution pm me i can correct the script...
I'm going see if I can learn correct on my own sorta learning php man this so cool though

Edit gave up on trying im guessing:
$xsito=($valorex + 131072)/400-7; //Aden
$ysito=($valorey + 32768)/410-7; //Aden
but dont know how get exactly to match.. Im guessing you sat there fin tunning it to be perfect not sure..

$valorex=mssql_result($resultlistaplayer, $i, 1); //Take x from DB
$valorey=mssql_result($resultlistaplayer, $i, 2); //Take y from DB



if ($valorey>(-32768)) { //choose if in Aden or Elmore
$xsito=($valorex + 131072)/400-7; //131072=Offset DB; 400 = multiplier half image x; 7 = Icon Offset
$ysito=($valorey + 32768)/410-7;}
else {
$xsito=($valorex - 98336)/325-7+510;
$ysito=($valorey + 229352)/325-7+719+90; //719 = Offset for image.
}
ok i get so the new map should be

$xsito=($valorex + 131072)/513.5-7; //Aden
$ysito=($valorey + 32768)/384-7; //Aden

now the 7= the icon offset hows that work default layout each icon map is 12 pixs.. so not sure yet how work.. and what be for 5pix one.

LOL my calculations are way off :P

What would be cool save me bandwidth and such is a image or somthing is made every 5 min sorta same way but makes the calulations on server pc then web server grabs info every like 5-10 min from server reduce lag just be a nice map have on front site.. dont know if it's possible..
Kane Hart is offline  
Old 18.05.2005, 12:31   #13
Riane
Архивный участник
 
Join Date: Apr 2005
Posts: 196
Default

hm great stuff, will look into this later
@kane of course thats possible, maybe will try later
Riane is offline  
Old 18.05.2005, 13:57   #14
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

Quote:
Originally Posted by andreagighi
here the script:
sorry for multiply post but my connection suck...
Thumbs up !
Nice helper for GM's
BiGBoY is offline  
Old 18.05.2005, 20:51   #15
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

here is a hint how to narrow online players info a little bit more accurate:
replace
$querylistaplayer="SELECT char_name,xloc,yloc,race,zloc FROM [user_data] WHERE login > logout ORDER BY char_name ASC";
with
$querylistaplayer="SELECT char_name,xloc,yloc,race,zloc FROM [user_data] WHERE login>logout AND logout>0 AND login>0 ORDER BY char_name ASC";

and
$querynumeroplayer="SELECT count(*) FROM [user_data] WHERE login > logout";
with
$querynumeroplayer="SELECT count(*) FROM user_data WHERE login>logout AND logout>0 AND login>0";
BiGBoY is offline  
Old 18.05.2005, 21:40   #16
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

be cool if like at the ned script be like map?=kane

and it displays just kane or like map?=kane,all
and would make kane show up as image 6 or w/e image you want and then it stands him out..
Kane Hart is offline  
Old 20.05.2005, 23:26   #17
demon
Архивный участник
 
Join Date: May 2005
Posts: 367
Default

this is the map for C2 correct image size for this project

size is better 810x719 than 800 x 719 btw..
demon is offline  
Old 22.05.2005, 02:36   #18
rodier
Архивный участник
 
Join Date: May 2005
Posts: 979
Default

Heh I created version with C2 maps + better place descriptions + in title you see player name + location + clan .
next version (I post it here) will have player filter = you type player name and you see only that player on map )
rodier is offline  
Old 22.05.2005, 03:10   #19
Kane Hart
Архивный участник
 
Join Date: May 2005
Posts: 154
Default

Quote:
Originally Posted by rodier
Heh I created version with C2 maps + better place descriptions + in title you see player name + location + clan .
next version (I post it here) will have player filter = you type player name and you see only that player on map )
I can't wait
Kane Hart is offline  
Old 22.05.2005, 13:07   #20
EntroX
Архивный участник
 
Join Date: May 2005
Posts: 373
Default

Yes, this is an awsome job, quite usefull because at my work on the cybercafe i can keep an eye on people :P

I will keep an eye on the next releases, keep the good work and thank you for releasing this.

Yours.
EntroX
EntroX is offline  
Old 22.05.2005, 13:08   #21
EntroX
Архивный участник
 
Join Date: May 2005
Posts: 373
Default

Sorry, double post, i got some weird XML error and i wasnt sure if this got posted.

Yours.
EntroX
EntroX is offline  
Old 26.05.2005, 07:44   #22
ThaDon
Архивный участник
 
Join Date: Apr 2005
Posts: 104
Default

hmm i have a problem with it, when i copy it in the wwwroot and try http://127.0.0.1/mappeadmin.php ill become this (look attachment), and yes i have modified the php file to my ip, sql nick and pw anyone can help pls ?
ThaDon is offline  
Old 26.05.2005, 08:38   #23
demon
Архивный участник
 
Join Date: May 2005
Posts: 367
Default

does your IIS run php ?..
demon is offline  
Old 26.05.2005, 09:18   #24
ThaDon
Архивный участник
 
Join Date: Apr 2005
Posts: 104
Default

hmm where i can enable php for IIS, i think only Asp is enabled, but iam not sure?
ThaDon is offline  
Old 26.05.2005, 09:50   #25
ThaDon
Архивный участник
 
Join Date: Apr 2005
Posts: 104
Default

ok Php Version 4 and 5 in IIS is activated

ok i have modified some things in the IIS, and now i get this:
ThaDon is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:12.