DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 18, 2013, 03:20:58 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Best attacks ever  (Read 2251 times)
0 Members and 1 Guest are viewing this topic.
anpera
Guest
« on: March 20, 2004, 09:07:55 PM »

Description:
This adds "best attacks ever" into new hall of fame.
By: anpera
Idea: knuffelkuh

Version: 08.02.2004

For LoGD: 0.9.7+jt with re-importet hof.php from 0.9.8-prerelease

Instructions:
Code:
----- SQL:
ALTER TABLE accounts ADD punch INT(11) DEFAULT '1' NOT NULL;


----- Open:
battle.php

----- Find:
      }
   }else if($HTTP_GET_VARS[op]=="run" && !$surprised){

----- Before, add (before }):
if ($creaturedmg>$session[user][punch]){
   $session[user][punch]=$creaturedmg;
   output("`@`b`cTHIS WAS YOUR BEST HIT EVER!`b`c");
}


----- Open:
dragon.php

----- Find:
,"beta"=>1

----- After, add:
,"punch"=>1


----- Open:
hof.php (0.9.8 version for 0.9.7)

----- Find:
addnav("Toughness", "hof.php?op=tough&subop=$subop&page=$page");

----- After, add:
addnav("Punch","hof.php?op=punch&subop=$subop&page=$page");

----- Find:
} elseif ($_GET[op]=="resurrects"){

----- Before, add:
}elseif ($_GET[op]=="punch"){
   $sql = "SELECT name,punch AS data1,$racesel AS data2 FROM accounts WHERE locked=0 ORDER BY data1 $order, level $order, experience $order, acctid $order LIMIT $limit";
   $adverb = "hardest";
   if ($_GET[subop] == "least") $adverb = "weakest";
   $title = "The $adverb attacks of all times";
   $headers = array("Points","Race");
   display_table($title, $sql, false, false, $headers, false);


----- Save and close all files
Logged
keith
Guest
« Reply #1 on: March 20, 2004, 11:05:26 PM »

how do I get v0.9.8 hof.php
Logged
Interloper
Guest
« Reply #2 on: October 25, 2004, 05:48:02 AM »

how do I get v0.9.8 hof.php

Apologies for digging up a very, very old thread. But I just got here and found myself wondering the same thing.

Where can I get the 0.9.8 hof.php that's compatible with 0.9.7 ? Is it one from a specific version of the pre-release, or will any 0.9.8 hof.php do?

 Shocked Shocked Shocked
« Last Edit: October 25, 2004, 05:50:05 AM by Interloper » Logged
Kendaer
Guest
« Reply #3 on: October 25, 2004, 07:32:23 AM »

You may *NOT* use 0.9.8 code in a 0.9.7 game.  Not from *any* prerelease.

There was at some point an updated HoF which Anpera created, it *might* be in his user folder. His HoF is the one on which the one in 0.9.8 is based with his blessing.

However, all code which is released in 0.9.8 is released under the CC 2.0 license and that license is incompatible with the GPL due to the fact that the GPL allows taking and using in a web-game environment without the requisite clause to require release of modifications.  [For a lot of technical discussion about why the GPL doesn't work with LoGD and why it's actually bad in this case, do a search on this board for copyright.  I have done a lot of talking about this in the past]
Logged
Boofo
Member
Mod God
*****
Offline Offline

Posts: 774


View Profile
« Reply #4 on: October 25, 2004, 09:45:04 AM »

Will this work in 098 then? Wink
Logged

chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
Interloper
Guest
« Reply #5 on: October 25, 2004, 04:45:33 PM »

You may *NOT* use 0.9.8 code in a 0.9.7 game.  Not from *any* prerelease.

I understand, thanks for your help.  Smiley

Edit: The file was in Anpera's shared files. I should've looked more closely. Thanks again for your time.  Embarrassed
« Last Edit: October 25, 2004, 04:52:56 PM by Interloper » Logged
Boofo
Member
Mod God
*****
Offline Offline

Posts: 774


View Profile
« Reply #6 on: October 25, 2004, 06:10:59 PM »

Shouldn't there also be a $me= statement right below the $sql= statement in the hof.php code? I'm using 098.
Logged

chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
Kendaer
Guest
« Reply #7 on: October 25, 2004, 06:15:21 PM »

The first $sql statement in the file is JUST counting the total number of players who are eligible to be ranked.  There is no need for the $me statement which is included in the individual rankings to determine an approximation of where you stand.

So, the answer is no, please read the code more closely Smiley
Logged
Boofo
Member
Mod God
*****
Offline Offline

Posts: 774


View Profile
« Reply #8 on: October 25, 2004, 06:23:38 PM »

The first $sql statement in the file is JUST counting the total number of players who are eligible to be ranked.  There is no need for the $me statement which is included in the individual rankings to determine an approximation of where you stand.

So, the answer is no, please read the code more closely Smiley

I read it I just didn't quite understand it. Sorry. Wink
Logged

chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
Boofo
Member
Mod God
*****
Offline Offline

Posts: 774


View Profile
« Reply #9 on: October 25, 2004, 06:54:04 PM »

I am getting the following error now when I go into the HOF.

Quote
SELECT name,punch AS data1, AS data2 FROM accounts WHERE locked=0 ORDER BY data1 DESC, level DESC, experience DESC, acctid DESC LIMIT 0,50
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS data2 FROM accounts WHERE locked=0 ORDER BY data1 DESC, leve

Here is the sql statement I am using:

Code:
   $sql = "SELECT name,punch AS data1,$racesel AS data2 FROM " . db_prefix("accounts") . " WHERE locked=0 ORDER BY data1 $order, level $order, experience $order, acctid $order LIMIT $limit";

Any way to fix this? Wink
Logged

chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
Boofo
Member
Mod God
*****
Offline Offline

Posts: 774


View Profile
« Reply #10 on: October 25, 2004, 06:57:11 PM »

I think I fixed it, sorry. I changed the $racesel to race in that query and it seems to be working now. Was that the correct thing to do?
Logged

chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
Pages: [1]   Go Up
  Print  
 
Jump to:  


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

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
22 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search