Author Topic: Random Url  (Read 640 times)

Offline Sweet

  • Level 3
  • *
  • Posts: 9
  • Reputation: +0/-0
    • View Profile
Random Url
« on: July 11, 2010, 05:44:16 PM »
Ok so I am having a problem with my game, I need to keep people from fast traveling in my game, is there a way to add a random number to the end of my url's?? like www . freeland . com/index.php?id=535392175. is that possible??

Offline Mufasa

  • Game Owner
  • Level 18
  • *
  • Posts: 189
  • Reputation: +3/-0
  • Maniac Developer
    • View Profile
Re: Random Url
« Reply #1 on: July 11, 2010, 05:57:52 PM »
sure it's possible (I mean even aol.com/?moo=48575 loads), but what will it accomplish besides adding random numbers? If they do nothing, people will realize they're BS and just junk (or repeat) them.

So perhaps it would be better if you shared a bit more information about the situation and the desired outcome so we can chime in?

Offline Sweet

  • Level 3
  • *
  • Posts: 9
  • Reputation: +0/-0
    • View Profile
Re: Random Url
« Reply #2 on: July 11, 2010, 06:24:29 PM »
Alright so i am new at scripting php and using mysql, so sorry if i seem like a nub, but in my game, index.php is the main page, this shows you the shops and stuff in the town you are in. In ovendale, my starting city, you can leave the west gate, which leads you to travelbattle1, which is my form of a map.  A random number (1,100) rolls and there is a chance you can be attacked by a monster, ie Goblin. Once you have defeated the monster, it will take you to travel1.php, which from there you can continue traveling west, or east back into Ovendale. That being said, i don't want someone just typing in, travel2.php and skipping the first one... you understand?

Offline Mufasa

  • Game Owner
  • Level 18
  • *
  • Posts: 189
  • Reputation: +3/-0
  • Maniac Developer
    • View Profile
Re: Random Url
« Reply #3 on: July 11, 2010, 06:45:41 PM »
gotcha, location should be stored server-side.

For example, my "explorable" areas, I call "dungeons", the user table has a "dungeonid" field. There is a generic /dungeon or /explore link and the appropriate map is shown based on where the user is (the dungeonid, and also their dungeon_x and dungeon_y). If they are not in a dungeon at all, redirect them, else show the appropriate map.

Offline Nox

  • Level 35
  • **
  • Posts: 738
  • Reputation: +12/-2
    • View Profile
Re: Random Url
« Reply #4 on: July 12, 2010, 03:18:57 AM »
Store to DB everything you need to verify the action (move to location or something)

1) stop naming travel1, travel2... "1" doesn't mean anything, name it the way that you know what the file is about
2) make a universal file to handle locations, you don't want to make 120 files for places containing almost the same code
Meet us at an IRC irc.freenode.net #bbg as well
Enjoy http://spiritbeacon.noxart.cz/ !

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal