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
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.
Ten mod bez ograniczenia nie opłaca się nawet wrzucać do gry...
A jak wpisać sobie daną liczbę mitrilu??
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?
Przerobiłem to tak ale nie działaKod:<?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 platinum FROM players"); if (!isset ($_GET['action'])) { $smarty -> assign ("Iloscgold", $iloscgold -> fields['platinum']); $smarty -> display ('energia.tpl'); } else { $gold = ($_POST['gold'] / 5); if ($gold > $player -> platinum || $_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 platinum=platinum-".$_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"); ?>![]()
zmienne trzeba było zostawić byż miał łatwiej, a tylko zmienić że ma złoto zabierało, mithril jest chyba platinum![]()
Jak coż robisz rób porządnie bo tam gold sie z platinum mieszał.....<?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");
?>
Zamieniłem platinum na gold i energie dodaje :jupi: ale złota nie ubywa :beczy:
Kod:<?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 platinum FROM players"); if (!isset ($_GET['action'])) { $smarty -> assign ("Iloscgold", $iloscgold -> fields['gold']); $smarty -> display ('energia.tpl'); } else { $gold = ($_POST['gold'] / 5); if ($gold > $player -> platinum || $_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"); ?>
Zmień wszędzie platinum na gold
naKod:if ($gold > $player -> platinum || $_POST['gold'] <= 0 || !ereg("^[1-9][0-9]*$", $_POST['gold'])) {
Kod:if ($gold > $player -> gold || $_POST['gold'] <= 0 || !ereg("^[1-9][0-9]*$", $_POST['gold'])) {
Zmieniałem na to
I nadal mi nie pobiera złota za transakcje a jeszcze na dole sie wyżwietla:Kod:$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 -> platinum || $_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"); ?>
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
Aktualnie 1 użytkownik(ów) przegląda ten wątek. (0 zarejestrowany(ch) oraz 1 gości)
Zakładki