#4937 - 11/06/04 12:37 PM
DK v1.1.6 released.
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
Thanks to everyone who's reported bugs. Sorry it's taken me so long. I had a nice lazy Saturday, finally, so I was able to fix these. Changelog is listed below. Download the new file from the dev site at your leisure. 
### 1.1.6 (11.6.2004) ###
### Thanks to Shadowbq, joshman, jimp, and Tsufo. 
- Fixed variable name reference in fight.php.
- Fixed URL cheat that allowed people to buy any item from any town.
- Fixed URL cheat that allowed people to travel anywhere without having the map.
- Fixed display bug in the error messages generated by cheat attempts.
- Fixed admin/editlevels that caused all level values to be reset to zero.
---Jamin
|
|
Top
|
|
|
#4938 - 11/06/04 12:41 PM
Re: DK v1.1.6 released.
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
And I just noticed that I released 1.1.6 on 11.6... weird... 
---Jamin
|
|
Top
|
|
|
#4939 - 11/06/04 03:13 PM
Re: DK v1.1.6 released.
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
I dont like to be a pain but, is there any possibility of you telling me how to patch these bugs up? My dragon knight site is heavily modded, and I don't want to disturb anything.
Cheers, if this is possible Jamin
|
|
Top
|
|
|
#4940 - 11/06/04 03:13 PM
Re: DK v1.1.6 released.
|
monkeysnap
Malt-o-Meal
Registered: 11/05/04
Posts: 3
|
Offline
|
|
Awesome, thanks for the hard work. This script rocks.
|
|
Top
|
|
|
#4941 - 11/06/04 03:18 PM
Re: DK v1.1.6 released.
|
monkeysnap
Malt-o-Meal
Registered: 11/05/04
Posts: 3
|
Offline
|
|
quote: Originally posted by Jimp:
I dont like to be a pain but, is there any possibility of you telling me how to patch these bugs up? My dragon knight site is heavily modded, and I don't want to disturb anything.
Cheers, if this is possible Jamin
Jimp, in the Upgrade.Txt file it says which files were changed. Hopefully that helps.
|
|
Top
|
|
|
#4942 - 11/06/04 03:34 PM
Re: DK v1.1.6 released.
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
I saw your previous post which asked the same thing as I.
You dont realise just how modded they are, its not very good even with the file names.
Maybe line numbers, or extracts of code will work.
Thanks if you can
|
|
Top
|
|
|
#4943 - 11/06/04 03:45 PM
Re: DK v1.1.6 released.
|
monkeysnap
Malt-o-Meal
Registered: 11/05/04
Posts: 3
|
Offline
|
|
quote: Originally posted by Jimp:
I saw your previous post which asked the same thing as I.
You dont realise just how modded they are, its not very good even with the file names.
Maybe line numbers, or extracts of code will work.
Thanks if you can
Gotcha. Yeah at first I wondered the same thing; where the changes actually were, but then I found them listed in the Upgrade.txt file so I edited my post. If you use something like TextPad (http://www.textpad.com) you can do a compare of the two files and see where the differences are.
|
|
Top
|
|
|
#4944 - 11/06/04 03:53 PM
Re: DK v1.1.6 released.
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Thanks. I'll look into that. But if he does find time, it would be highly appreciated 
EDIT: I found the 2 changes within towns, i think there is only 2:
- Prevent travelling if they dont have the map.
- Prevent buying all items, even if your not in the correct town.
|
|
Top
|
|
|
#4945 - 11/06/04 04:46 PM
Re: DK v1.1.6 released.
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
I'm at my friend's house now so I can't give you line numbers or find/replace code, but here's a little help... These are all general locations of the new code in the 1.1.6 files. Find the code in question and copy it over into your files.
Towns.php...
Up at the top of buy2() and buy3() there should be a few lines about $townitems=explode(...) and if(!in_array...). Look for those blocks of code and copy them over. Similar deal for travelto() except this time it's inside the if statement that checks whether it's supposed to use points or not, and the variable is $townslist I think. Also, every previous occurance (everyone not included in the three you just put in) of display("Cheat attempt detected..."); needs to say display("Cheat attempt detected...","Error"); so it doesn't fill up your error log with PHP warnings.
Fight.php...
Shadowbq already posted the exact change in this thread.
Admin.php...
Go to editlevel(), and basically change every single occurance of "1_exp" to "one_exp", and so on, for all instances of the variables, the array elements, and the form fields. 2 should be two, 3 should be three, etc. Variable names can't start with numbers (something I should have known and picked up on a long time ago) so you have to rename them all.
Hope this helps.
---Jamin
|
|
Top
|
|
|
#4946 - 11/07/04 05:23 AM
Re: DK v1.1.6 released.
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Is there a bug with a new bug fix?
The change in buy2() which is (i think):
$townrow = mysql_fetch_array($townquery);
$townitems = explode(",",$townrow["itemslist"]);
if (! in_array($id, $townitems)) { display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error"); }
If its just that, then it doesnt allow anyone to buy any items, even if they are in the correct town.
What was the change in lib? Thanks for your guidance.
|
|
Top
|
|
|
#4947 - 11/07/04 10:29 AM
Re: DK v1.1.6 released.
|
Jamin
Cookie Crisp
  
Registered: 02/25/05
Posts: 2649
Loc: Texas
|
Offline
|
|
You can still buy items in the correct town. I just tried it. It checks to make sure the item number is in the townitems array - or, to put it another way: if(item not in town array) { die("Cheat."); }
Change in lib was only the version number at the top of the file.
---Jamin
|
|
Top
|
|
|
#4948 - 11/07/04 10:50 AM
Re: DK v1.1.6 released.
|
Jimp
Cheerios
Registered: 07/22/04
Posts: 132
|
Offline
|
|
Thats odd.. I just added that code I shown you, and it doesnt allow anyone to buy items, even if they are in the correct town.
Maybe I am doing something wrong? But i simply copy the code I shown to the buy2 function, just like the updated file. Thats the final bug which i've not fixed.
EDIT: Ok I have found the problem, thanks.
|
|
Top
|
|
|
|
|