Jump to content
xisto Community

8ennett

Members
  • Content Count

    435
  • Joined

  • Last visited

Everything posted by 8ennett

  1. No, it's not going to take me 10 hours to write it lol 8 hours to sleep, an hour to wake up and drop my boy at school, half an hour to sit around, have a smoke and scratch my balls which I have just finished doing so it'll take me half an hour at the most. Also the favour I want from you for doing this is simple enough, I want you to learn the code. I'll comment all the php for you so you can understand what each bit is doing, that way you are forced to go through all the code anyway removing the comments before you hand it in.
  2. No problems lol but you're gonna owe me for this one. I'm going to bed now but after I've taken my little boy to school in the morning I'll get on it. Should be ready in about 10 hours.
  3. right lol so a little bit of cheating going on is there. Yeah no worries, I'll throw something together for you in the morning and post the code in this thread. Does it need to have any specific details or code structure, even in the database or can i just construct my own for you? I probably won't use the ACCESS column you see, maybe use an INT(2) column allowing for a more varied user structure.
  4. right well if want you dump your current database in to a query and post it here along with information on what exactly you want the login script to do (login, register, etc) then I can throw together a quick script for you, it would simply be a matter of adding your own html to it. However I would advise against doing this. If you are going to try and build a website using snippets and examples of code from all over the web you will end up with one hell of a mess. Your code will be formatted differently, there will be loads you don't understand, stuff running that shouldn't be running causing unnecessary server load, and not to mention all the security holes there is going to be. I recommend building your own or settling for something prebuilt which is similar to what you want. Any attempt at what was mentioned above will most likely end in disaster.
  5. Just because you don't agree with the rules doesn't make it ok to break them. Besides the plagiarism rule is there to protect xisto from having to pay out myCents to people who are simply copying and pasting content from other websites. It's fine to provide information such as you did from another website, but seeing as it is not your own words and comes from an alternate source then it's fully justified placing the text in to quote tags. Not to say you can't comment on the text or explain the origin and why you placed the text there and earn myCents from doing that however plagiarising content so that you actually gain myCents from it is unfair for the people at xisto. I'm not trying to argue with the semantics of plagiarised content on the internet, as you said the large majority of internet content is plagiarised. I'm just pointing it out because if you post too much plagiarised content on the forums and spend the money on hosting etc. only to have your posts modified by an admin and you end up in negative myCents. That would mean you have to earn a load more to break even and your hosting credits may have run out by that point.
  6. Sorry I don't quite understand what you mean. Are you wanting to remove the database connection and comparison all together and have a login script for only 3 different users? If so do you want the 3 users usernames and passwords hard coded in to the php file?
  7. Please remember if you are going to plagiarise content from other websites then wrap it in quote tags, it's against the rules here at Xisto. Also the previous comment about how it's a waste of time posting in these forums, I strongly dissagree. The entire point of these forums and the ones over at KS are to expand the amount of helpful knowledge there is stored on the web which is freely available for anyone to view which is also a reason why guests are allowed to reply to posts as well. People who merely "water down" the forums will usually have their posts removed so only helpful and relevant information is left over. For me especially it's not so much about the myCents (although it is a bonus) but helping to add to a database already full of useful and interesting information. Opaque has created something good here, not many other people would strive for the exchange and ready availability of knowledge the way he(/she?) has at cost to themself.
  8. Welcome to Xisto And I'm a very active user, since I joined I've earned myself nearly $100 and am in the middle of writing a large tutorial for creating your own mmorpg using php. Also there are quite a few other active members as well, it just goes through quiet patches sometimes. We look forward to your contributions!
  9. I've updated the archive to include an installer for the website. the index.php page will first test to see if install.php exists, if it does then it will redirect the page to there instead of the login page or what ever. Here is how the first part of the installer will probably look for you. Now as you can see it has tested all the relevant directories and files to make sure they have the proper permissions set. If any of the directories or files do not have the proper permissions then parts of the site may not work properly (including the installer) so be sure to chmod everything it tells you to. Now I know a lot of people out there are really shirty when it comes to setting directories to 777 and so on, but I'm confident that on the basic users side of this game all security holes have been sealed and manipulation of the open directories is impossible. Once you have gone through and changed all the permissions you will then see the information input page like below. So here you will need to enter all your database information. If you are unsure about which port your database server is on then best just leave this as the default 3306, this is usually the right one anyway. Now you have entered all your database information we will need to enter a few details about the Super admin account which our installer also creates for us. Now this is just a quick version of the installer and will be more advanced and do more checks in the next tutorial, for now be careful what details you enter here. Basically try and use only letters and numbers for your name and email (except the @ and .com of course) and make sure your name is less then 15 characters in length. If you don't enter a matching password or no password entirely for the Super admin account, it will create the account anyway using the password 'password'. So if you enter all the details correctly (not including admin password) and everything runs smoothly, you should hopefully see the page below. Now the MySQL Connection refers to if it can make a succesful connection to the sql server using the information you have supplied. If so then success, if not then failed. Database connection is the same thing except for the database (obviously). Next we attempt to create all the tables we need for the game in the database. This query string has already been hard coded in to the install.php file so table.sql is no longer going to be supplied in the archive. If there is a problem with creating any of the tables then it would say failed and a white box will appear underneath the failed line with information about the error. Next it checks the length of the admin passwords entered are greater than 0 and they both match, if not then like I said before it will create the account with the password set as 'password' (without the speech marks of course). Then it moves on to create the admin account, open the lib/config.php file for editing, then write the new database values we entered in to the config.php file. Like it says above as well, you will need to delete the install.php file before you can start using the site as well, and also to prevent other people from using it as it is only meant as a temporary file. Now assuming something goes wrong with the installation, you will see a page similar to this. So it gives you a list of where the errors have occured and tells you to either re-run the setup or fix the problems manually. It also displays the information form with most of the fields already filled out with the $_POST data from your last attempt. This is just in case you mistyped something and can quickly change it. You can run the install as many times as you like, the only error it may throw back after running it the first time is the create tables line as it also tries to insert the new inventory items I created for you, and with duplicate id's that part will fail but it won't affect the rest of the code. So there we have it, we also have a natty little installer for our new site which helps us to setup our example without tearing our hair out trying to figure what we did wrong.
  10. Before starting on this tutorial be sure to run through the first 4. Part 1: Advanced User Account System Part 2: Welcome Home Part 3: Administrative Part 4: Profiles ######################## Part 5: Messaging & Inventory ######################## Download Example5.rar Now this tutorial is going to cover quite a lot. I thought I'd best pick up the pace so you can get learning in larger chunks now you are starting to understand the code. In this tutorial we are going to introduce a few new things, such as cron jobs and javascript. Also you will notice I have changed the design of the example site. Here is a list of all the features added in this next tutorial. Messaging System Send, receive and reply to messages Turn inbox on/off Accept messages from friends only or all players Mark read messages as unread Delete messages Inventory System Player inventory manager, including equipping, selling and sending items Admin page for creating new/editing exisiting items and their attributes and uploading images Admin panel for creating new items in a players inventory Admin alerts and auto ban for same ip and password transfers Livesearch for players to send items to So first of all we are going to setup our cron jobs. A cron job is an action which runs every predefined amount of time. In this case we will be executing two php scripts, one every five minutes and the other once a day. Our five minute cron job will increase players health by 10% and energy by 5% if either of those is below the maximum. Our daily cron is our server maintenance. First of all it turns off the server, logging everyone out so it can run through quickly without causing drag on the server and offers an equal chance to all players for our dailies (which we haven't got any of yet). Next it decides randomly how much strength and defense to take off each player. As with real life, players will need to maintain their training (in the gym we haven't built yet) otherwise their stats will go down. This is another form of evening the playing field. It would be unfair if someone who was new to playing going against a player who hasn't been on in a long time but has started playing again. After this we delete all the item prices for yesterday and change the current days prices to 2 which means yesterday. Then we can loop through and create the new prices for the new day for each item. It creates the new price by creating a random figure between 90% and 110% of the items average price. So if you create an item with an average price of $100, then the new days price would be between $90 and $110. This helps to prevent the market from getting stagnant and encourages players to buy large quantities of goods and hold them until they can sell them again for a profit. Next up, the cron job we switch the server back on so people can log back in again and start playing the new day. We will need to put our crons in a place where they can't be accessed by anyone who visits your site, so putting them in your root directory in a file named crons so you can simply type in http://forums.xisto.com/no_longer_exists/ to refill your health wouldn't be advisable. Instead put them outside your public_html directory (also htdocs, www depending on your server). So create a new folder outside your public_html folder named crons and place the day.php and five.php documents in the archive in to this directory. Next edit line 3 in five.php and lines 3 and 43 in day.php to point towards your config file. So on an Xisto server you would change this to '../public_html/lib/config.php'. I'll show you how to get the cron running on cPanel X on Xisto. First of all you need to open the cron jobs section and create two new crons. Here is how each should be configured: Daily Cron Minute = 0 Hour = 0 Day = * Month = * Weekday = * Command: php /home/mysite/Crons/day.php Five Minute Cron Minute = */5 Hour = * Day = * Month = * Weekday = * Command: php /home/mysite/Crons/five.php Each of these crons should now run both daily and every five minutes. You can try them out by editing the database to reduce your health and energy and watch them increase every 5th minute. Next up we have our messaging system. For this we created a new folder in the modules directory called inbox and also inserted a new menu item for the inbox as well. We have also created a new feature for a menu item where if the user has unread email in his/her inbox then it will be displayed next to the link as shown below. This image shows the inbox displaying messages in ascending order from the date they were received, however I have changed this to descending so the newest is on the top of the list. So we have our list of messages in our inbox. We are able to open these messages by clicking the subject or delete these messages by clicking on the X next to them. We can also create a new message, there is another button for turning off/on our inbox and choose who we accept messages from. Click the "Accept Messages From Anyone" button will change your inbox settings and the button will change to "Accept Messages From Friends Only". Below is what is displayed if we click on a messages subject. So here we have a display of our message. The date and time, a clickable link with the senders name, the subject, the messages content (with full bbcode processing) and our message controls. Clicking the "Mark as Unread" button will take us back to the inbox and obviously mark our message as unread. "Delete" deletes it and etc. Now if we click on the reply button this will take us to the same page as the "Compose New" button in the inbox however the users id field has already been filled in. Also, there is a new button on the user profile page called "Send Message" which also fills in the user id field. So here we have our message creation system. We can write our bbcode as well as our message in to the message field. Now our subject field is fairly interesting, if we are replying to a message it will add "Re:" however if the message subject already contains "Re:" or any variation it will remove these first then add its own "Re:" to prevent message subjects from becoming something like "Re: Re: Re: Re: Just another example". Here we have our events list found on the menu. This is subject to the same tests as the inbox link where a box is displayed with the amount of new events eg. [5 new]. So when ever a user has had some interaction with your account we can send the user an event alert to let them know what it is. Now as you can see above we also have a clear events button. This will delete any and all events the user has had. Like the emails however, this will not actually delete them but instead set the status to deleted so admins are able to view everything before it is deleted from the server. We haven't written in to the cron to delete messages or events over a a certain amount of time, I thought I needed to break this process up a bit as this is quite an extensive part of the tutorial already. Another feature of the events list is listing our events in pages. If there are more than 10 events then a button will be displayed saying next page, this takes us back to this page but with the $_GET['page'] variable set. If this variable is more than 1 then a previous page button is displayed. Next we can move on to the inventory system. So here we have five different types of items. Weapon, Armour, Consumable, Drug and Other. Each item has its own options (although drugs and other are the same for now) which for now are hard coded in to the inventory.php file in the modules directory. Each item has several values in the database numbered 1-5. These will have different effects depending on the item type but this will be explained in the admin item editor later. So you can see we can equip our weapons and armour which will place them in the equipped armour and weapon slots at the top. We can also unequip them. Another thing we have to remember is if we have an item equipped but then we sell it, we will then have to unequip that item as well. Clicking each items image will open a pop-up window containing all the information about the item except current and previous prices. So the values listed in the database each have their own property for a consumable item as show above. It also displays the average price of the item, although the current price could be anywhere from 90% to 110% of this items average price. We may later want to create items that get us out of hospital faster, prison or some other thing but this will be covered in another tutorial. So if we choose to sell an item we will see this. So like we covered earlier, you can see todays price and yesterdays price with arrows letting us know the difference more easily. Ok moving on to sending an item to a person. So here we have our live search example. By entering a full or partial users name in the input field a list of results (up to 10 max) will be displayed underneath. Clicking one of these names will complete the input field allowing you to send the item. This will also to check to make sure the users inventory is not full. Another check that is performed during the transfer is wether or not the user sending the item has the same last ip as the user receiving the item. If so we then check to see if both user accounts use the same password. If not then it is not likely the user accounts are owned by the same user and so an alert is put in to the admin inbox (both users might just be on the same network) and then the admin can decide if they want to ban the accounts or not. If the passwords do match then the accounts are both automatically disabled for 6 months and the user will be logged out. An alert will also be sent to the admin inbox (which we are yet to build) if this happens. So that is the basics of our inventory system. Next we need a way to create and edit items. Now we have our new game editors button on the admin panel and two new editors. We can either edit and create new items or send created items to different users. So as stated earlier, when we are creating a new item and change the item type, it also changes the values 1-5 input fields using javascript. Also the new item will not be created unless a valid image has been selected to upload as well. Now I have included five items to get you started, also I have given you a template item image which is just the green background. You can find it in images/inventory/template.png. Now when we select an item to edit we see the below screen. http://forums.xisto.com/no_longer_exists/404.png Changing the items type will change the fields the same as creating a new item. You can also choose to delete the item or upload a new image. If you make changes to the item but do not select a new image then the old one will stay the same. Next we have the send item option. This merely sends whatever item you choose to a user and inputs an alert in to that users events. http://forums.xisto.com/no_longer_exists/404.png There is also another link on a users profile for admins sending items to users and automatically fills in the user id field using the $_GET variable. The admin control panel will appear on a users profile if you are an admin or a super admin (obviously). So I think that's about all covered in this next part. As usual leave any comments or questions. Also sorry about having to post some of the images links instead of images but the forum won't allow too many images.
  11. Did anyone read the article?that wasn't directed at the last reply
  12. Proxies don't really load the page on to their server then pass it on, that would require huge amounts of server space. Instead the proxies work like a mirror. The connection is sent to the proxy server which then bounces it to the website, then the websites response is then bounced off the proxy back to the computer. The website will receive the connection from the proxy, so it will read your ip as the proxies ip. The proxy then encrypts the website address so the isp can't read the address and decide if it is blocked or not. In countries like china though it's very hard to find a proxy site that hasn't been blocked. Unless you have a friend in another country who can setup a private proxy and not advertise it, you will spend most of your time searching for proxies that aren't yet blocked. And then once your isp has finally figured it out and blocked the private proxy, you get your friend to change the ip and bingo, a new unblocked proxy.
  13. I'm actually considering turning this in to an open-source project at the end of the tutorial. Try and gather a developing community to create a free text-based rpg system which is easy to use and feature rich and a large module database so users can create a completely customised game. That way people may turn to using this instead of being ripped off and buying something like mccodes. No doubt they overcharge for a rather limited engine. Open-source is always the best way.
  14. 8ennett

    Xp Dieng

    Well you have three quick options which should help increase your computers speed, however I would personally recommend a complete reinstallation of your operating system. That way you are guaranteed faster operating speeds although you will have to backup all your files and reinstall all your applications. Anyway the 3 quick things you can do are: Go to Start -> Control Panel -> Switch to classic view (if there) -> Add/Remove Programs Now you can start getting rid of all the rubbish you have collected over the years and don't need. Be careful not to remove important software (antivirus, system tools etc) but uninstall only the junk you don't use. Next you need to clear your registry. Very simple and there are loads of apps that will clean it up for you out there. Finally give you hard disk a defrag. Some people say this doesn't work, although it makes retrieving files from the hard disk that little bit faster. Those three are the quick tips, but like I said really if you want complete performance then a full reinstall of xp is advised.
  15. Yeah you're absolutely right about that, sorry. Don't chmod 777 but 664 instead. I am writing the tutorial on a private server so I forgot. 664 permits all to read, only user and group to write and none to execute.
  16. I forgot to add sorry, you will need to change permissions for a file and a directory.First of all you will need to change the permission of 'lib/config.php' to 777, and also change the directory 'images/users' to 777 as well otherwise you won't be able to upload files or save config changes.The current version of the online script is Part 5 which I haven't finished writing the tutorial for yet, but it will be out in a couple of days. I've also changed the design of the example site which will be included in the next tutorial download.You can either register with the example site or sign in to the guest account, although for obvious reasons I haven't given it admin privelages.S/N: GuestPass: password
  17. Thanks for the contribution, but the title was a little misleading. I thought you needed help with a networking problem.
  18. Welcome to Xisto, looking forward to your contributions!
  19. I take it you can't open your virus scanner as well then. Try booting your computer up in safe mode (keep pressing F8 when you first turn it on until you get a command prompt with options, then select safe mode with no networking). Once it has booted up try opening your virus scanner anyway, if it opens don't start the scan yet. Hold down CTRL+ALT+DEL and click start task manager. Once it is open, click the processes tab along the top and scroll down to explorer.exe. Click on explorer.exe so it is highlighted and then press the end process button (making sure your virus scanner is still open). Now your menu bar at the bottom should dissapear and all windows will close as well. Go back to your virus scanner and start your scan. If it is something that is embedded deep in your operating system then this method should get rid of it. If you still can't access your virus scanner even in safe mode I recommend that you either roll back your computer to a point before the problems started happening or reinstall your operating system. You could use Qrntz suggestion and boot from a live cd however that usually isn't recommended for amateur users as you could seriously end up damaging your computer. Reinstalling your operating system is quite simple nowadays, most newer computers (such as dells) come with a ghost partition on the main drive which can wipe and restore your operating system within a few minutes. Others use a standard backup partition. To access a dells ghost partition you need to press F11 just after the initial boot screen, however you can only press it the once otherwise it won't work and it's tricky to get it at the right time.
  20. Before starting on this tutorial be sure to run through the first 3. Part 1: Advanced User Account System Part 2: Welcome Home Part 3: Administrative ########### Part 4: Profiles ########### Download Example4.rar In this tutorial we are going to create several things. Contact List Blocked Users List Users Profile Profile Editor Avatar Uploader Inbox On/Off Switch Our contact list can be found on the updated menu under 'contacts'. This also contains the users blocked list as well at the bottom of the page. As you can see from the above image it simply contains the name of the person on either the contact list or blocked list and also the action link which will simply say remove. You can choose to remove people off either after putting them there. Users who are on your blocked list are unable to message you, and users who are on your contacts list will be eligible to message you when you turn the 'receive messages from contacts only' option on in your profile settings. Currently there is no messaging system or profile setting for user only messages but we will be creating that in the next tutorial. The other new item on our menu is the Contacts link. Clicking this menu link will take us to the module page modules/profile/profile.php. Now profile.php determines what users profile you are looking at through the $_GET variable USER. Eg. http://forums.xisto.com/no_longer_exists/ will display the profile for who ever has the user id 1. As you can see on the above image it shows certain information about the user such as name, gender, account type, health stats, cash on hand, level and current status (Online, Offline, In Prison, In Hospital, Banned). Also at the bottom of the profile page is the players signature. This is an area which will only be displayed if the user has input something in to their signature. Between the signature and the players information is the control panel. Now this is obviously different depending on wether you are looking at your own profile or another players. When viewing your own profile there are four different options in our profile control panel. The first is the choice to edit your profile. As you can see the user can change their name, email, password and signature. If you look through the code for modules/profile/edit.php you will see how we process the form data as all the lines are commented in full as usual. We also ensure that the user is actually changing certain data and only adjust the database data where necessary to save on server load. We have also added a new feature to the players signature. As well as being able to write any text they want in there, they can also insert BB Code. This is specialised code that allows users to format their text in different ways (alignment, bold, italic, underlined, size etc.) as well as being able to insert images and youtube videos. If you look through the new BBCode() function in our lib/functions.php file you can see how simple it is to add more bbcode tags of your own and the outputted html each tag results in. There is also another feature and new function in our functions file where we check to see the size of an image a user is inputting in to their signature, and if it is too wide then we rescale the image so it won't mess up the formatting of our page. Remember, all our modules can be no more than 600px wide otherwise our page starts to look distorted and mishapen. This adds another level of professionalism to your site while maintaining aesthetic integrity. The avatar on the users profile is also subject to the same rescaling except it measures both height and width and rescales to a maximum of 150px for either height or width. Next up on the profile control panel we have the inbox on/off switch. When the inbox is turned off then the player will not receive messages from anyone but admins. We will also be creating a 'only contacts can message' button as well but that's for the next tutorial. After the inbox on/off switch comes our avatar upload button. This loads up the page modules/profile/avatar.php. It's a very simple and effective script where the user can upload an image that is less than 100kb in size (we limit size to save server space) and can only have the extension GIF, JPG, JPEG or PNG. We have to limit the file extensions to prevent upload of malicious software and scripts. Finally on the profile control there is the delete account button however there is still too much work to be done and unknown future table names that need to be considered so we won't be programming this yet, however there is a piece of javascript written in to the link which asks for confirmation of wether the player wants to delete their account or not. This is to prevent people from accidentally clicking it and deleting their account by mistake. If we move on to the other player profile control panel. Start by registering a new account on your game and manually activating it through the sql database by changing the userlist-validated column to 'Yes'. Now take note of this players new id number and go back to your own account. You will notice we have added another new feature to the game and new function to the lib/functions.php file. This function is userName($id); which displays the name of the user id and also makes the name a link which when clicked takes you to the players profile. This is how we are going to display any users name in the game from now on to help make it more accessible. The link generated for the users name also has their account type in the title so when you mouse over the link you can see their account type. Anyway if you click your name in the top left corner it will take you to your profile and in the address bar should be http://forums.xisto.com/no_longer_exists/ or something similar. If you change the 'user' value to the user id of the new account you just created you can see that players profile now and the player profile control panel. So far we only have 'Add to contacts' and 'Block user' but in the next tutorial we will be working on more things to put in here. When either of these links are clicked it then either adds the user to the contacts list or blocked list and changes the link on the page to either 'Contact' or 'Blocked' which can be viewed in the 'Contacts' link in the menu. Another feature is, if you add someone to your contacts list while they are on the blocked list then they will become unblocked, and the same the other way around. If you click block user when they are in your contacts then they are remove from your contacts. A few other points interest are how we retrieve a users profile avatar, that is set in a custom function. Also there is the findexts() function which basically returns file extensions. We have also added level, signature, inbox, prison and hospital to our userlist table and created the contacts and blocked tables as well. Level: This is the users experience level which increases the more experience the player gathers. Does nothing for now but will do later. Signature: The bbcode displayed on a players profile Inbox: The inbox on/off toggle Prison: Timestamp of when player gets out of prison Hospital: Timestamp of when player gets out of hospital As usual leave any comments and questions below and I'll do my best to help. And please, can people stop asking me to make their sites for them. Just learn how to do it yourself through these tutorials.
  21. I thought that only released your local ip address (192.168.0.*/127.0.0.1) instead of the routers isp ip. If it connects to the router and resets the ip though that's handy enough. I know you can do it through telnet as well but that's an extra couple of lines of code.
  22. Just had a little look at your game, it looks great. I haven't registered as I don't have the time right now but your design is brilliant.
  23. Could you be more specific about what kind of software it is you are trying to open? This is far too vague to give you an accurate answer to. If you are trying to open a piece of software that uses IE as a gateway to the internet and it's colliding with a newer process in windows 7 then that could be causing the problem. Installing firefox and setting it as your default browser may amend this. If it is a problem with the current version of windows 7 you are using then maybe doing a system update will sort it out. If both of those fail then I suggest you download a copy of firefox and uninstall IE from your computer all together. Failing that we need more specific information.
  24. You might not need an antivirus for linux due to the passworded root tree, however there are more viruses out there created for linux than any other operating system, followed by windows and then mac os. The majority of "viruses" for windows aren't viruses in the slightest, they are ad-ware. There is a big difference, virii cause damage and ad-ware just pi**es you off. There are more viruses for linux simply because of the amount of different versions there are. People develop these rootkits for all kinds of different versions of linux, and although the exploit they use are usually repaired within hours of it being discovered (advantage of an open-source community) you are still not 100% protected.
  25. It's simple enough for me to change my ip. I simpy login to my router, click disconnect, then click reconnect. I opted for the dynamic ip instead of the static ip from my isp and they looked at my like I was a crazy person.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.