PDA

View Full Version : PHP Legends code


stormgod
04-25-2002, 08:44 AM
php script to begin a Legend system

code is in zip

stormgod
04-25-2002, 08:45 AM
Hmm here is the zip


use new zip see below

Malevolent
04-25-2002, 11:23 AM
- Cleaned up the ui some
- Refactored some code

Malevolent
04-25-2002, 11:26 AM
Oops. :-)

--MV

Shortlived
04-25-2002, 07:57 PM
umm what is this?

stormgod
04-25-2002, 11:20 PM
watch here (if I'm up)

http://stormgod.dyndns.org

Trumpcard
04-25-2002, 11:33 PM
Very cool !

I had gotten about 60% of the way through my php database editor, very similar to this, cept it was geared at changing the database, not just displaying, but got sucked into other projects so I never did finish.. Glad to see someone's deciding to pick up and work on some web database integration tools, great work! (Those blobs are a pain to work with!)

I havent seen the legend code on EqLive, but I think the next cool thing would be to generate pop up windows with item stats when you right click on their items. Now that you are the master of the blob, shouldn't be too hard! LOL.. Really cool would be using php's built in image functions to produce a gif with a 'fill-in-the-blanks' format so you could display something that looked like when you examined an item on live (with the little scroll background)

If you dont mind Storm, I wouldnt mind playing with and adding on to your code some later.. It would give me the chance to start playing with some of the new 4.2.0 functions, and play with image functions a bit...

stormgod
04-25-2002, 11:37 PM
hee just do Trumpcard , The better it is .. you know . I want peeps to play with else I wouldnt have put it here ;o)

Shortlived
04-26-2002, 11:05 AM
Can't connect to Mysql databse :( I get the idea of it though, and I think it would rock to have a stats site for your server! Also a web bassed...or at least php based database front end would rock!

Trumpcard
04-27-2002, 10:09 AM
Ok, here's my quick addition..

Items are now hyperlinks to an item.php page that will yank the basic item data and display it for you..

Yes, its ugly, but it works.. I'll beautify it later if I get the desire, Im not much on the flash side of stuff though..

Storm, I based it on your format , (which I like btw), just pulled all the different stats out into seperate fields to make additons/changes easier, and to make the sql update field a bit easier to manage..


Noticed a bug in yours though, no biggie, EAR1 is getting deciphered as WRIST item, think you have the item field for WRIST2 in display.php being set as EAR1 in the sql query.

Actually, it looks like the id is coming back correctly, its just showing the wrong name on the display page.. I'll see if I can fix it..

Update: Found the error, where you were creating the wrist2name, you must have copy and pasted and forgot to change 1 field, it was setting ear1name=substr($data2['wrist2name']

Putting a new att. in with this minor fix...

Arcalyn
04-27-2002, 11:13 AM
Link to DL php?

And/Or what is php?

Please & Tanks

Trumpcard
04-27-2002, 11:46 AM
PHP stands for PHP Hypertext Preprocessor

PHP use to stand for Personal Home Page, it was a library a guy wrote to be able to build his homepage with better embedded functionality and it expanded from there..

If you dont know what it is, I wouldnt recommend you try to figure it out unless you are a programming/web enthusiast.

You can get it from

http://www.php.net

You need a webserver (Apache) to go along with it to use this stuff we're posting..

stormgod
04-27-2002, 11:55 AM
hehe nice trumpcards I will reuse your additions and release a new one with some changes ( possibility for visitors to leave some comments and a server info page ) will post it in a matter of minutes

stormgod
04-27-2002, 12:11 PM
here it is , please read the readme because a new table is used , you can use a new database to use it , its for the comments , this script part is using the db2.php to configure connect to the database .

CREATE TABLE `comments` (`id` SMALLINT (3) DEFAULT '0' NOT NULL, `title` VARCHAR (128) DEFAULT '0', `text` TEXT, PRIMARY KEY(`id`), UNIQUE(`id`), INDEX(`id`))

this is the query to create the table
dont forget to change the database name from legends to eq in db2.php if you want to use the comment in the same db

stormgod
04-27-2002, 12:22 PM
corrected a little bug in your correction , you where poiting to the right item for ear1 and wrist2 but names were inverted its corrected too (its in the zip )

stormgod
04-27-2002, 12:58 PM
another thing for malevolent ( I may do it myself but .. )
for the global faction you should get the total number of faction existing else just by getting more bad faction your global faction may go up ( number is divided by more factions)

Lurker_005
04-27-2002, 01:35 PM
I know your still working on getting everything functioning corectly. BUT... have you considered making the stats page look like the real items stats window? Frame with blank background and then throw the item text and icon on top.

stormgod
04-27-2002, 01:37 PM
actually.......

hm.....


thats exactly what I'm doing at the moment but formating the window is goin to take a little time so except it for tomorow or monday (popup window with the info in, not displaying stats = 0)

Trumpcard
04-27-2002, 11:36 PM
I was thinking the same thing for doing item stats.. Going to try and fool around with php's image manipulating functions to see if I can do it.. No promises as Ive never fooled around with them before, but I'll give it a shot..

Need to get a jpg/gif/pcx of a blank item scroll box first, after that, putting text on top of it shouldn't be too tough..

Another change I was thinking about making is make a lookup table for spell id's/names so this program could display the spell effect names. If you drop the spdat along with it, you could parse through it that way, but would be easier just to make a table for it.

Trumpcard
04-28-2002, 01:26 AM
Ok, heres another quick update..

This one will allow you to use a layout.php file to determine a consistant color scheme for your backgrounds, and a common header..

To use, edit the layout.php file to define your background color, and table colors..

This is optional to use.. If you dont want all your pages looking the same, then just comment out the PrintHeader function call in each .php page that calls it. I like this because it gives your pages a more consistant feel.

I also included a new .php called globalfunctions.php. Require 'ing it on each page gives you the ability to define your function once, and call it from any page.

I left the header empty for the time being.. Just an empty table right now with a couple of borders..

I also included a dump of the sql requried to make the new comments table. To make the new table, just do a

mysql
create database legends; #or whatever you want to call it
use legends;
source legend.sql

stormgod
04-28-2002, 05:27 AM
here is the server.php ( php page displaying info about the server ) its now able to connect to your world Telnet and tell you how many players are on your world using the who command

stormgod
04-28-2002, 05:28 AM
(forgot the zip...)

stormgod
04-28-2002, 05:57 AM
little bug .. the number of player is not the first line as I thought before having a player connected

so if you have no player on the server it will display 0 players , else it will display the first returned player info
would be great if in next release the who number of player could be on the first line , else if someone can fix the code to keep searching line by line till it displays the number of player

Trumpcard
04-28-2002, 10:27 AM
Ok, my newest update, not quite finished but will give you an idea of what im shooting for..

When you click on an item off the character profile page, it will take you to a new page that will display most of its stats, and an image box designed to look like when you do a right click in game.. (ala eqmaps)

When Im finished, I hope to have it so when you click on an item link, you will get a popup window with just that view in it..

I've also included Storm's latest server.php change..

stormgod
04-28-2002, 01:27 PM
here is the web based broadcast to server
first page is a basic form to enter account name password and text to broadcast , second is where the connection to the world using accountname and password is done and the broadcasting is done is succesful

stormgod
04-29-2002, 01:54 AM
Ok Last version including Trumpcard layout modification and item display

The number of player online is now working

Added the broadcast command , lock unlock world command and worldservershutdown.

for those ones you need an account 200+ on the server with a password ( you can use FQadmin to add a password to an account).

Enjoy ;)

Trumpcard
04-30-2002, 01:03 PM
Latest changes..

Fixed most off the item code.. well, alot of it.. put in so item page is a small javascript popup, with the pertinent data..

Most is displaying correctly.. Still have to fix a bug in weight calculation, and make a name lookup for spells. Right now it will show the Effect with the numeric spell value, when I make a lookup table I'll convert this to the spell name.

Also, still need to add in Race/Class lookups.. I'll fix that up a bit later..

This version includes Storms last posted changes.


Update: Ok, Races and Classes display are working (Thanks to Lyn and Ruz for the info on the weirds**t mod 2 remainder determination technique.) Last piece of any value is the Slot fields. Try to get to that tonight and have a finished copy.

Oh, by the way, I say Lyenu's character display php last night, makes me want to quit bothering... LOL... Its fantastic! I want to snake that one..lol..

morpheus014
05-12-2002, 04:43 AM
I downloaded and setup the legends php stuff, and uploaded it to the webpage Im gonna use for my legends server. When i try to view the webpage, it has lines of php code with Mysql_error in several places... Im not too familiar with Php code, so if someone could help me out with this it would be great


Webpage is at http://eqemulegends.tripod.com/index.php if you want to see the errors...

DeletedUser
05-12-2002, 06:34 AM
They don't support PHP

morpheus014
05-16-2002, 02:33 PM
So if i want this to work right i have to be hosted on a server with a .com address?

stormgod
05-16-2002, 03:47 PM
some servers support it for free , but many functions will be disabled like the one checking if a server is up , and you will have to link it to the computer with the emu db , so best thing is to get a dns name redirector ( dyndns.org for exemple ) and to install apache and php , this installation is not supported so I will not help anyone , their are forum to explain all the thing on both apache and php websites ( apache.org and php.net)

_OZZY_
05-25-2002, 03:24 PM
Any chance this is going to be made 0.3.2 compatible? I've messed with it for a few days now, but can't figure out the character profile blob. So my Characters are showing up without Races, Classes, and their Level is 0. When you click on the character name, all stats are 0. Thanks for this code. It really great :)

stormgod
05-25-2002, 04:09 PM
working on anything else at the moment but yes I will make it compatible with 0.3.2 (should not take really long to do but I'm lazy ;) )

_OZZY_
05-25-2002, 04:19 PM
LOL ;) It would be greatly appreciated. I'm trying to understand what's wrong, but can't. Thanks again for your work.

stormgod
05-27-2002, 07:59 AM
http://www.stormgod-online.com/


link is on the first page , I cant make direct links , my provider stop them , dont know why...

anyway for the file its updated (should be the right one in the zip , tell me if its not )

items names are messed up ( IE wrong place like writs1 and 2 are in leg and feets positions ) but other things should be working

files may not be the latest ones , but index2.php and display.php are the latest inside the PHPlegend2.zip so download it and just change those two files , I will update the all zip tonight or tomorow


edit : items are now displaying right

_OZZY_
05-27-2002, 03:32 PM
/me bows to the great god of storm :)

Trumpcard
05-28-2002, 12:15 AM
One of these days I need to get in there and finish my item look up code. I stopped at doing spell effects.. trying to figure out an easy way to do them, look up table would be the easiest, unless I feel like trying to parse the spdat.eff, but then we would have to keep a copy of it with the php code, and I really dont like that idea. Probably be easier to write a prog to parse out the spdat, create the sql structure for a database table (just spell id -> spell name) , then drop it with the legend code as a sql update with the other ones.

stormgod
05-28-2002, 12:34 AM
actually I begin to think to link my quest helper to the php code for some usefull features , because with the monitor I can pull out some stats using a timer , or make a new vb6 and not vb net programm monitoring to get stats like players online and some things like that

unix_phreak
09-19-2002, 03:02 PM
Wanna see what I do when I click the Stormgod link?


Index of /




There is is... Tonight just isn't my night.

Celesteal_eq
10-07-2002, 09:38 AM
Are you still updating this ? its great tool if you looks thru the item_info.txt included with eqadmin2.8 it has a full structure listing for items. Ive started myself was wondering if someon else had done it before i go wriite it all.

Celesteal

unix_phreak
12-04-2002, 06:18 AM
Anyone know if Storm's still on this?

Krathis
06-06-2003, 06:58 AM
Does anyone have a copy of this legends zip file? would like to get a copy of it.

Lurker_005
06-08-2003, 05:30 AM
Here is the last version I saw of it. I think others may have worked on it since then, but I havn't seen the download for it.

.... Well for some reason it keeps failing to upload the file :(

IADestavator
06-08-2003, 05:36 AM
Here is where ?? A link or something like this would be nice..... no link i got so far is working...

Lurker_005
06-08-2003, 05:51 AM
Ok, here is a link I'm serving from my local machine, it will not always be up, nad since my connection is sucking really bad right now it will be slow :p

http://lurker.gotdns.com:4580/EQEmuFiles/eq_treasures_release.zip

DeletedUser
06-09-2003, 04:17 AM
Lurker: You want some space to host your files like that? I can arrange it if so. Just private message me here or on IRC (When Im around, heh), and i'll get you setup.

DeletedUser
06-09-2003, 12:13 PM
http://www.boggletech.com/eqemu/eq_treasures_release.zip

Just adding a mirror to it.

Could possibly make an eqemu users download page for registered users on the forum, but then again that'd probably raise the bandwidth a bit more. :roll: