DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • September 23, 2018, 10:32:35 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Race Course  (Read 6358 times)
0 Members and 1 Guest are viewing this topic.
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« on: December 05, 2004, 12:24:06 PM »

This mod will let your players train a horse (pony, geldion, stallion) to prepare him for a race. You'll be able to bet on anyone horse, and even to make illegal bet  Grin
From the Race Control you'll be able to open Stables to train horses, and you'll decide when the race will start.

It will be generated a comment for 4 laps for the first 10th positions.

You can download it here

Full instruction included at the beginning of each php file.
A full load of thanks goes to Sixf00t4 for his great help translating the scripts.
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Romulus
Guest
« Reply #1 on: December 06, 2004, 12:00:10 PM »

I translated the Mod into German and installed it on my Server. There is no error Message or so, but users can't take part in the race nor can they use the stables although they've got a horse.
Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #2 on: December 06, 2004, 12:26:25 PM »

I translated the Mod into German and installed it on my Server. There is no error Message or so, but users can't take part in the race nor can they use the stables although they've got a horse.
You must go to Grotto, ippodromoreset.php to manage option and "Enable Stable". After that your player will be able to access stables.

I have uploaded a new, corrected version. There were few typos and the most part of case had ; instead of : Thanks to Robert for pointing them out.
Same link as above.
« Last Edit: December 06, 2004, 12:27:22 PM by Excalibur » Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Romulus
Guest
« Reply #3 on: December 06, 2004, 01:14:53 PM »

In the superuser-settings there is only a "disable stables" option. So I think, it's already enabled...
Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #4 on: December 06, 2004, 02:51:03 PM »

In the superuser-settings there is only a "disable stables" option. So I think, it's already enabled...
Have you tried to disable it and re-enable ?
Maybe it could solve the problem. I run this mod since 5-6 months without any problem.

Anyway I'll check again the part that give access to Stables to see if something went wrong with the translation ....
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Romulus
Guest
« Reply #5 on: December 06, 2004, 03:38:22 PM »

Yes, I treid this but it did not affect anything. Could it be, that there's a problem whith checking if the mount is a horse? because on my (german) server the mountcategory is set to "Pferde"
Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #6 on: December 07, 2004, 01:44:09 AM »

Yes, I treid this but it did not affect anything. Could it be, that there's a problem whith checking if the mount is a horse? because on my (german) server the mountcategory is set to "Pferde"
I don't think so, as I have mountcategory translated in italian (cavalli) onto my server and I have no problem at all.

I don't know what to think ... has anyone else problem running this script ?
« Last Edit: December 07, 2004, 01:45:01 AM by Excalibur » Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #7 on: December 07, 2004, 01:54:45 AM »

I suggest checking the sql inquires to make sure they match your db - and change if necessary the mountcategory from Horses to Pferde, if that is what is in your db.

Check all three files to make sure they match up to what you have in your db - if they dont match, you get bad results.

AND IF you downloaded the file when first posted - download it again as Excal corrected some errors in code - the one in the shared file NOW should be good to use.
« Last Edit: December 07, 2004, 01:58:24 AM by robert » Logged

Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #8 on: December 07, 2004, 02:39:42 AM »

I suggest checking the sql inquires to make sure they match your db - and change if necessary the mountcategory from Horses to Pferde, if that is what is in your db.

Check all three files to make sure they match up to what you have in your db - if they dont match, you get bad results.

AND IF you downloaded the file when first posted - download it again as Excal corrected some errors in code - the one in the shared file NOW should be good to use.
The script *should* be language indipendant, as I have my DB fields translated in italian and I have no problem at all. The only point is that the first 3 field *must* have horses in it (Pony, Geldion, Stallion) to show up correctly in the script.
But anyway it should work correctly, showing wrong mount's name.

As Robert said, download again the script, as there were some errors in them, same link as above.
« Last Edit: December 07, 2004, 02:40:41 AM by Excalibur » Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Romulus
Guest
« Reply #9 on: December 07, 2004, 04:27:02 AM »

I've downloaded the script yesterday... but i'll try it with the new one.
Logged
Romulus
Guest
« Reply #10 on: December 07, 2004, 05:12:04 AM »

I think I figured out what the problem is:
The mounts, that the player own already are not in the scuderie-table, just in the accounts-table. And in the scuderie.php there is no possiblility to buy a horse, only in the old stable.php, where the horse is not inserted in the scuderie-table.
The buy-option in the scuderie.php shows only the text that the player examins a horse which is offered, but no option to buy one, because auf the mountcategory-name "Horses", which is "Pferde" on my Server.


So if you want to verify only by the mountid, you have to do it in both .php files and I suggest to add a database-entry in the stables.php

I think the following changes would fix the problem with stables.php
Code:
Open stables.php
=========
Find: $session['user']['hashorse']=$mount['mountid'];
=========
After, add:
$caratteristiche = 8 + intval($mount[mountid]*2);
         $sql = "INSERT INTO scuderie
                                        (acctid
                                        ,mountid
                                        ,condizione
                                        ,sprint
                                        ,iscritto
                                ) VALUES (
                                        '$acctid'
                                       ,'$mount[mountid]'
                                       ,'$caratteristiche'
                                       ,'$caratteristiche'
                                       ,'0'
                                )";
                             db_query($sql) or die(db_error(LINK));
« Last Edit: December 07, 2004, 06:05:40 AM by Romulus » Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #11 on: December 07, 2004, 08:08:34 AM »

The mount a player own (or not) has nothing to share with the horse used to race. They are 2 different animal, you could have a stallion as mount and use a pony to race. The first is stored in user preference ($session['user']['hashorse']) the second one is stored in new DB scuderie. As I've said before the only drawback of the system used here, to avoid to duplicate horse category, is that in mounts DB the first 3 entry *MUST* be pony-geldion-stallion (as it is in a non-modified LoGD DB), because I use the description stored there, so I don't see the necessity to modify stables.php as you've proposed.

I haven't modify anything to use this mod, so could you please post here the result of this SQL command:

query SQL: SELECT mountid, mountname, mountcategory FROM `mounts` WHERE mountid < 4;

This is my output (cavalli = horses):
mountid  mountname  mountcategory  
1            Pony           Cavalli
2            Puledro        Cavalli
3            Stallone       Cavalli


Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #12 on: December 07, 2004, 08:30:03 AM »

Found the problem  Grin
In scuderie.php, line 170:
Code:
$sql = "SELECT mountname,mountid,mountcategory FROM mounts WHERE mountactive=1 AND mountcategory='Horses' ORDER BY mountcategory,mountcostgems,mountcostgold";
substitute 'Horses' with your Pferde category. Everything should work fine without any further modification.

Let me know if that fix works. As soon as I'll get home I'll update instructions to point out this problem with translated DB categories.
« Last Edit: December 07, 2004, 08:31:09 AM by Excalibur » Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #13 on: December 07, 2004, 09:54:39 AM »

[quote robert]
I suggest checking the sql inquires to make sure they match your db
- and change if necessary the mountcategory from Horses to Pferde, if that is what is in your db.

Check all three files to make sure they match up to what you have in your db - if they dont match, you get bad results.

Quote
[quote Excalibur] Found the problem  
In scuderie.php, line 170:
Quote

Gee, didnt I say that earlier?  Cool
« Last Edit: December 07, 2004, 09:59:07 AM by robert » Logged

Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #14 on: December 07, 2004, 10:56:01 AM »

Gee, didnt I say that earlier?  Cool
Yup, you did mate  Grin
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
51 Guests, 1 User
Aeolus
Home Forums News Downloads Login Register Advanced Search