Strona 1 z 2 12 OstatniOstatni
Pokaż wyniki od 1 do 10 z 15

Wątek: Mithrilowe ??ródło

  1. #1
    Optymista :) Awatar htmlxp
    Dołączył
    Sep 2007
    Posty
    2,095

    Domyślnie Mithrilowe żródło

    Screeny modyfikacji :

    Opis modyfikacji :
    Modyfikacja pozwalająca na wymiane mithrilu za energie.
    Autor modyfikacji :
    Korson
    Download modyfikacji :
    http://htmlxp.internetgnome.com/1pli...owe_zrodlo.rar
    NIE POMAGAM NA GG, jeśeli zostaniesz zablokowany/a to nie miej do mnie pretensji. Zawsze lubię pogadać gdy mam na to czas. GG podaje jedynie do zgłaszania wszelkich problemów z forum jak i jego treści.

  2. #2
    Zarejestrowany
    Dołączył
    Sep 2007
    Posty
    317

    Domyślnie Mithrilowe żródło

    Ten mod bez ograniczenia nie opłaca się nawet wrzucać do gry...

  3. #3
    Zarejestrowany
    Dołączył
    Nov 2007
    Posty
    97

    Domyślnie Mithrilowe żródło

    a moim zdaniem jest fajny ;p

  4. #4
    Zarejestrowany
    Dołączył
    Feb 2008
    Posty
    28

    Domyślnie Mithrilowe żródło

    A jak wpisać sobie daną liczbę mitrilu??

  5. #5
    Zarejestrowany
    Dołączył
    Sep 2007
    Posty
    49

    Domyślnie Mithrilowe żródło

    Chciałem to trochę przerobić żeby zamiast mithrilu było złoto. Wiec jak to zrobić. Wystarczy tylko dobrze edytować mithenerg.php a reszta to prożcizna? Co nie?
    Kod:
    <?php
    /***************************************************************************
     *                              mitheneg.php
     *                            -------------------
     *   copyright            &#58; Korson
     *   email                &#58; den4045@o2.pl
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *       This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   &#40;at your option&#41; any later version.
     *
     *   This program is distributed in the hope that it will be useful,
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *   GNU General Public License for more details.
     *
     *   You should have received a copy of the GNU General Public License
     *   along with this program; if not, write to the Free Software
     *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     *
     ***************************************************************************/ 
    
    $title = "Odnawianie energi"; 
    require_once&#40;"includes/head.php"&#41;; 
    
    if &#40;$player -> location != 'Altara'&#41; &#123; 
    	error &#40;"Zapomnij o tym"&#41;; 
    &#125; 
    
    $iloscgold = $db -> Execute&#40;"SELECT platinum FROM players"&#41;; 
    if &#40;!isset &#40;$_GET&#91;'action'&#93;&#41;&#41; &#123; 
        $smarty -> assign &#40;"Iloscgold", $iloscgold -> fields&#91;'platinum'&#93;&#41;; 
        $smarty -> display &#40;'energia.tpl'&#41;; 
    &#125; else &#123; 
        $gold = &#40;$_POST&#91;'gold'&#93; / 5&#41;; 
        if &#40;$gold > $player -> platinum || $_POST&#91;'gold'&#93; <= 0 || !ereg&#40;"^&#91;1-9&#93;&#91;0-9&#93;*$", $_POST&#91;'gold'&#93;&#41;&#41; &#123; 
    	error &#40;"Nie masz tyle złota! &#40;<a href=energia.php>wróć</a>&#41;"&#41;; 
        &#125; else &#123; 
    	$db -> Execute&#40;"UPDATE players SET energy=energy+".$gold." WHERE id=".$player -> id&#41;; 
    	$db -> Execute&#40;"UPDATE players SET platinum=platinum-".$_POST&#91;'gold'&#93;." WHERE id=".$player -> id&#41;; 
    	error &#40;"Wymieniłeż <b>".$_POST&#91;'gold'&#93;."</b> sztuk złota na <b>".$gold."</b> energi."&#41;; 
        &#125; 
    &#125; 
    $iloscgold -> Close&#40;&#41;; 
    
    require_once&#40;"includes/foot.php"&#41;; 
    ?>
    Przerobiłem to tak ale nie działa

  6. #6
    Zarejestrowany
    Dołączył
    Dec 2007
    Posty
    54

    Domyślnie Mithrilowe żródło

    zmienne trzeba było zostawić byż miał łatwiej, a tylko zmienić że ma złoto zabierało, mithril jest chyba platinum

  7. #7
    Pesymista :( Awatar Harrocan
    Dołączył
    Sep 2007
    Posty
    1,663

    Domyślnie Mithrilowe żródło

    <?php
    /************************************************** *************************
    * mitheneg.php
    * -------------------
    * copyright : Korson
    * email : den4045@o2.pl
    *
    ************************************************** *************************/

    /************************************************** *************************
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    *
    ************************************************** *************************/

    $title = "Odnawianie energi";
    require_once("includes/head.php");

    if ($player -> location != 'Altara') {
    error ("Zapomnij o tym");
    }

    $iloscgold = $db -> Execute("SELECT gold FROM players");
    if (!isset ($_GET['action'])) {
    $smarty -> assign ("Iloscgold", $iloscgold -> fields['gold']);
    $smarty -> display ('energia.tpl');
    } else {
    $gold = ($_POST['gold'] / 5);
    if ($gold > $player -> gold || $_POST['gold'] <= 0 || !ereg("^[1-9][0-9]*$", $_POST['gold'])) {
    error ("Nie masz tyle złota! (<a href=energia.php>wróć</a>)");
    } else {
    $db -> Execute("UPDATE players SET energy=energy+".$gold." WHERE id=".$player -> id);
    $db -> Execute("UPDATE players SET gold=gold-".$_POST['gold']." WHERE id=".$player -> id);
    error ("Wymieniłeż <b>".$_POST['gold']."</b> sztuk złota na <b>".$gold."</b> energi.");
    }
    }
    $iloscgold -> Close();

    require_once("includes/foot.php");
    ?>
    Jak coż robisz rób porządnie bo tam gold sie z platinum mieszał.....

  8. #8
    Zarejestrowany
    Dołączył
    Sep 2007
    Posty
    49

    Domyślnie Mithrilowe żródło

    Zamieniłem platinum na gold i energie dodaje :jupi: ale złota nie ubywa :beczy:
    Kod:
    <?php
    /***************************************************************************
     *                              mitheneg.php
     *                            -------------------
     *   copyright            &#58; Korson
     *   email                &#58; den4045@o2.pl
     *
     ***************************************************************************/
    
    /***************************************************************************
     *
     *       This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   &#40;at your option&#41; any later version.
     *
     *   This program is distributed in the hope that it will be useful,
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *   GNU General Public License for more details.
     *
     *   You should have received a copy of the GNU General Public License
     *   along with this program; if not, write to the Free Software
     *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     *
     ***************************************************************************/ 
    
    $title = "Odnawianie energi"; 
    require_once&#40;"includes/head.php"&#41;; 
    
    if &#40;$player -> location != 'Altara'&#41; &#123; 
    	error &#40;"Zapomnij o tym"&#41;; 
    &#125; 
    
    $iloscgold = $db -> Execute&#40;"SELECT platinum FROM players"&#41;; 
    if &#40;!isset &#40;$_GET&#91;'action'&#93;&#41;&#41; &#123; 
        $smarty -> assign &#40;"Iloscgold", $iloscgold -> fields&#91;'gold'&#93;&#41;; 
        $smarty -> display &#40;'energia.tpl'&#41;; 
    &#125; else &#123; 
        $gold = &#40;$_POST&#91;'gold'&#93; / 5&#41;; 
        if &#40;$gold > $player -> platinum || $_POST&#91;'gold'&#93; <= 0 || !ereg&#40;"^&#91;1-9&#93;&#91;0-9&#93;*$", $_POST&#91;'gold'&#93;&#41;&#41; &#123; 
    	error &#40;"Nie masz tyle złota! &#40;<a href=energia.php>wróć</a>&#41;"&#41;; 
        &#125; else &#123; 
    	$db -> Execute&#40;"UPDATE players SET energy=energy+".$gold." WHERE id=".$player -> id&#41;; 
    	$db -> Execute&#40;"UPDATE players SET gold=gold-".$_POST&#91;'gold'&#93;." WHERE id=".$player -> id&#41;; 
    	error &#40;"Wymieniłeż <b>".$_POST&#91;'gold'&#93;."</b> sztuk złota na <b>".$gold."</b> energi."&#41;; 
        &#125; 
    &#125; 
    $iloscgold -> Close&#40;&#41;; 
    
    require_once&#40;"includes/foot.php"&#41;; 
    ?>

  9. #9
    Zarejestrowany
    Dołączył
    Dec 2007
    Posty
    54

    Domyślnie Mithrilowe żródło

    Zmień wszędzie platinum na gold

    Kod:
        if &#40;$gold > $player -> platinum || $_POST&#91;'gold'&#93; <= 0 || !ereg&#40;"^&#91;1-9&#93;&#91;0-9&#93;*$", $_POST&#91;'gold'&#93;&#41;&#41; &#123;
    na

    Kod:
        if &#40;$gold > $player -> gold || $_POST&#91;'gold'&#93; <= 0 || !ereg&#40;"^&#91;1-9&#93;&#91;0-9&#93;*$", $_POST&#91;'gold'&#93;&#41;&#41; &#123;

  10. #10
    Zarejestrowany
    Dołączył
    Sep 2007
    Posty
    49

    Domyślnie Mithrilowe żródło

    Zmieniałem na to
    Kod:
    $title = "Odnawianie energi"; 
    require_once&#40;"includes/head.php"&#41;; 
    
    if &#40;$player -> location != 'Altara'&#41; &#123; 
        error &#40;"Zapomnij o tym"&#41;; 
    &#125; 
    
    $iloscgold = $db -> Execute&#40;"SELECT gold FROM players"&#41;; 
    if &#40;!isset &#40;$_GET&#91;'action'&#93;&#41;&#41; &#123; 
        $smarty -> assign &#40;"Iloscgold", $iloscgold -> fields&#91;'gold'&#93;&#41;; 
        $smarty -> display &#40;'energia.tpl'&#41;; 
    &#125; else &#123; 
        $gold = &#40;$_POST&#91;'gold'&#93; / 5&#41;; 
        if &#40;$gold > $player -> platinum || $_POST&#91;'gold'&#93; <= 0 || !ereg&#40;"^&#91;1-9&#93;&#91;0-9&#93;*$", $_POST&#91;'gold'&#93;&#41;&#41; &#123; 
        error &#40;"Nie masz tyle złota! &#40;<a href=energia.php>wróć</a>&#41;"&#41;; 
        &#125; else &#123; 
        $db -> Execute&#40;"UPDATE players SET energy=energy+".$gold." WHERE id=".$player -> id&#41;; 
        $db -> Execute&#40;"UPDATE players SET gold=gold-".$_POST&#91;'gold'&#93;." WHERE id=".$player -> id&#41;; 
        error &#40;"Wymieniłeż <b>".$_POST&#91;'gold'&#93;."</b> sztuk złota na <b>".$gold."</b> energi."&#41;; 
        &#125; 
    &#125; 
    $iloscgold -> Close&#40;&#41;; 
    
    require_once&#40;"includes/foot.php"&#41;; 
    ?>
    I nadal mi nie pobiera złota za transakcje a jeszcze na dole sie wyżwietla:
    Fatal error: Call to a member function on a non-object in /var/www/sites/yoyo.pl/w/l/wlatca-pierscienia/energia.php on line 49

Strona 1 z 2 12 OstatniOstatni

Informacje o wątku

Użytkownicy przeglądający ten wątek

Aktualnie 1 użytkownik(ów) przegląda ten wątek. (0 zarejestrowany(ch) oraz 1 gości)

Zakładki

Uprawnienia umieszczania postów

  • Nie możesz zakładać nowych tematów
  • Nie możesz pisać wiadomości
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów
  •