Jump to content
MakeWebGames

zefiux

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by zefiux

  1. Collaborate? Can we just give answers?
  2. You can't convert it, but you can copy-paste some codes, and edit them to work :p
  3. Any example?
  4. Official forums are still up so its cool xD
  5. Where isn't any paid mods... But you can pay some1 to make one for you :p
  6. If you want any modules like bot editing/mission editing, just add their folders from admin modules to moderator modules
  7. Open this: lib/class.modulefactory.php And add this: public static function moderatorFactory(&$db, &$tpl, &$player, $module='Index') { if (file_exists (MODERATOR_DIR . '/' . $module . '/index.php')) { include_once (MODERATOR_DIR . '/' . $module . '/index.php'); $classname = 'Moderator_' . $module; return new $classname($db, $tpl, $player); } else { include_once (MODERATOR_DIR . '/Index/index.php'); return new Moderator_Index($db, $tpl, $player); } }   After this:   include_once (ADMIN_DIR . '/Index/index.php'); return new Admin_Index($db, $tpl, $player); } }   Now make new folder(in same folder as Hooks, smart, modules) called moderator(or just make copy of admin folder). create index.php   <?php define('IN_EZRPG', true); require_once '../init.php'; //Require moderator rank if ($player->rank < 5) { header('Location: ../index.php'); exit; } $default_mod = 'Index'; $module_name = ( (isset($_GET['mod']) && ctype_alnum($_GET['mod'])) ? $_GET['mod'] : $default_mod ); //moderator header hook $module_name = $hooks->run_hooks('moderator_header', $module_name); //Begin module $module = ModuleFactory::moderatorFactory($db, $tpl, $player, $module_name); $module->start(); //Admin footer hook $hooks->run_hooks('moderator_footer', $module_name); ?>   And then create directory index, and index.php inside it   <?php defined('IN_EZRPG') or exit; /* Class: Moderator_Index Home page for the admin panel. */ class Moderator_Index extends Base_Module { /* Function: start Displays moderator/index.tpl */ public function start() { $this->tpl->display('moderator/index.tpl'); } } ?>   Basic moderator panel without any modules. If want add any just copy paste them from admin folder. now go to smarty/templates folder and make exact copy of admin folder. change whole index.tpl to this   {include file="moderator/header.tpl" TITLE="Moderator"} <h1>Moderator</h1>> <h2>Moderator Modules</h2> <ul> <li><a href="index.php?mod=Members">Member Management</a></li> </ul> <p> If you install extra moderator modules, edit <em>smarty/templates/moderator/index.tpl</em> to add links above. </p> {include file="moderator/footer.tpl"}   Whola, you have your own moderator panel. Like this we can make diffrent ranks like Noob-Moderator, Moderator, Super Moderator, Admin, Super Admin, Owner, each having it owns Panel, with diffrent features. Enjoy ;) Note: this is just simple copy+paste with some editing needed. Just saving your time from long searching.
  8. Did you install game properly? And if you did, maybe you changed mySQL username/password after that?(I've no idea giving 1st idea what "shoot" in my head)
  9. Seems like ezrpg forum and site is suspended :( Hope it can get back up, as it had many usefull info
  10. Cool find.
  11. Finally something cool, what could help me learn basics. P.S. You should add this link: http://www.memorise.org/memory-gym or someting like that xD
  12. zefiux

    Inventory

    http://ezrpg.mybbmods.net/showthread.php?tid=41
  13. I tryed this code, but of course it doesn't work.... Now if any1 has hints(Hints would be more awesome than you fixing code, so I could learn something ,_,) :(   <?php defined('IN_EZRPG') or exit; $hooks->add_hook('player', 'level_up', 2); function hook_level_up($db, &$tpl, $player, $args = 0) { //No player data if ($args === 0 || LOGGED_IN == false) return $args; //Check if player has leveled up {if $player->village == 'Enerugi Village'} { //No player data if ($args === 0 || LOGGED_IN == false) return $args; //Check if player has leveled up if ($args->exp >= $args->max_exp) { //Update the current player variable ($args) $args->exp = $args->exp - $args->max_exp; $args->level += 1; $args->stat_points += 5; $args->max_exp += 100; $args->max_energy += 10; $args->energy += 10; $args->hp += 20; $args->max_hp += 20; //Update the database $db->execute('UPDATE `<ezrpg>players` SET `exp`=?, `level`=level+1, `stat_points`=stat_points+5, `max_exp`=max_exp+100, `energy`=energy+10, `max_energy`=max_energy+10, `hp`=hp+20, `max_hp`=max_hp+20 WHERE `id`=?', array(intval($args->exp), intval($args->id))); //Add event log $msg = 'You have leveled up! You gained +5 stat points, +10 max energy and +20 max hp!'; addLog(intval($args->id), $msg, $db); } return $args; } {else} {if $player->village == 'Kenko Village'} { //No player data if ($args === 0 || LOGGED_IN == false) return $args; //Check if player has leveled up if ($args->exp >= $args->max_exp) { //Update the current player variable ($args) $args->exp = $args->exp - $args->max_exp; $args->level += 1; $args->stat_points += 5; $args->max_exp += 100; $args->max_energy += 5; $args->energy += 5; $args->hp += 40; $args->max_hp += 40; //Update the database $db->execute('UPDATE `<ezrpg>players` SET `exp`=?, `level`=level+1, `stat_points`=stat_points+5, `max_exp`=max_exp+100, `energy`=energy+5, `max_energy`=max_energy+5, `hp`=hp+40, `max_hp`=max_hp+40 WHERE `id`=?', array(intval($args->exp), intval($args->id))); //Add event log $msg = 'You have leveled up! You gained +5 stat points, +5 max energy and +40 max hp!'; addLog(intval($args->id), $msg, $db); } return $args; } {else} {if $player->village == 'Jinsokuna Village'} { //No player data if ($args === 0 || LOGGED_IN == false) return $args; //Check if player has leveled up if ($args->exp >= $args->max_exp) { //Update the current player variable ($args) $args->exp = $args->exp - $args->max_exp; $args->level += 1; $args->stat_points += 10; $args->max_exp += 100; $args->max_energy += 5; $args->energy += 5; $args->hp += 20; $args->max_hp += 20; //Update the database $db->execute('UPDATE `<ezrpg>players` SET `exp`=?, `level`=level+1, `stat_points`=stat_points+10, `max_exp`=max_exp+100, `energy`=energy+5, `max_energy`=max_energy+5, `hp`=hp+20, `max_hp`=max_hp+20 WHERE `id`=?', array(intval($args->exp), intval($args->id))); //Add event log $msg = 'You have leveled up! You gained +10 stat points, +5 max energy and +20 max hp!'; addLog(intval($args->id), $msg, $db); } return $args; } {else} { //No player data if ($args === 0 || LOGGED_IN == false) return $args; //Check if player has leveled up if ($args->exp >= $args->max_exp) { //Update the current player variable ($args) $args->exp = $args->exp - $args->max_exp; $args->level += 1; $args->stat_points += 5; $args->max_exp += 100; $args->max_energy += 5; $args->energy += 5; $args->hp += 20; $args->max_hp += 20; //Update the database $db->execute('UPDATE `<ezrpg>players` SET `exp`=?, `level`=level+1, `stat_points`=stat_points+5, `max_exp`=max_exp+100, `energy`=energy+5, `max_energy`=max_energy+5, `hp`=hp+20, `max_hp`=max_hp+20 WHERE `id`=?', array(intval($args->exp), intval($args->id))); //Add event log $msg = 'You have leveled up! You gained +5 stat points, +5 max energy and +20 max hp!'; addLog(intval($args->id), $msg, $db); } return $args; } {/if} {/if} {/if} } ?>   I've 1% feeling that it is inposibble... and 99% that I did mistake, due to my Noobish skills ,_,
  14. Any1 knows? Or atleast know site for good tuts? ,_,
  15. I'm using ezRPG engine... And well every player has it owns race.. "Fire Clan" or "Ice Clan" Problem is I don't know how to make "Fire Clan" able to see only "Ice Clan" ... here is code of attack screen   {include file="header.tpl" TITLE="Attacking"} <p> Click on an opponent to attack them! </p> <table width="90%"> <tr> <th style="text-align: left;">Name</th> <th style="text-align: left;">Level</th> </tr> {foreach from=$weaker item=weaker} <tr> <td><a href="index.php?mod=Attack&act=go&id={$weaker->id}">{$weaker->username}</a></td> <td>{$weaker->level}</td> </tr> {/foreach} </table> {include file="footer.tpl"}   I think I've to do something with {foreach from=$weaker item=weaker} <tr> <td><a href="index.php?mod=Attack&act=go&id={$weaker->id}">{$weaker->username}</a></td> <td>{$weaker->level}</td> </tr> {/foreach}   I've tryed using {if} function, but failed, might be just me noob :/   {if $player->race == 'Fire Clan'} *Ice Clan list* {else} {if $player->race == 'Ice Clan'} *Fire Clan List* {else} {/if} {/if}
  16. They come with all versions :p
  17. How Can I make diffrent bonus for diffrent race/clan? I know how to force game to check it..   {if $player->race == 'Fire Clan'} /* Script which executes +xx Something in mySQL */ {else} {if $player->race == 'Ice Clan'} /* Script which executes +xx Some other stuff in mySQL */ {else} {if $player->race == 'Noob Clan'} /* Script which executes +xx Some other stuff(again!) in mySQL */ {else} {/if} {/if} {/if}   Would be awesome If I could get help.. I'm noob(worse than newbie) at programming...
  18. http://pimpsnhoes.com/? Doesn't work for me...
  19. It is down already :D
  20. What can I do if I can't use ?= in path? :/ What if I use redirect to cron5min.php?code=*code* and in cronjob path put link of "redirecter"
  21. zefiux

    CronJobs

    Yes, I can choose path. It starts as: php -f /home/a*******/ and from here on, I finish path like public_html/cron5min.php
  22. I'm trying to use script which regenarates hp and energy without cronjobs - http://ezrpg.mybbmods.net/showthread.php?tid=281 But I can't get it to work. http://ezrpg.mybbmods.net/showthread.php?tid=445 - this cronjob doesn't work, as host i'm using doesn't allow Special Symbols in path for cronjob script :/ And for 3rd day can't see any1 online on ezrpg forum :/
  23. Or I'm only one who trying make something out of this?
  24. zefiux

    CronJobs

    Is CronJobs only way to set up Various renegeration in game? Host I'm using doesn't support cronjobs with special characters in it, and cronjob for that engine(ezRPG), command is: cron5min.php?code=*code* I couldn't find any tutorial for this. :/
  25. Oh thanks. I've setup Every 5 min, and every day at 00:00 midnight crons now xD Btw, is it posibble to change layout on Lite version? Edit: Still doesn't work :/   This is un-edited code of MCCode lite cron_fivemins.php: <?php /* MCCodes Lite cron_fivemins.php Rev 1.0.1 Copyright (C) 2006 Dabomstew 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 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ include "mysql.php"; global $c, $mykey; $path=$_SERVER['HTTP_HOST'].str_replace('cron_fivemins.php','',$_SERVER['SCRIPT_NAME']); if($_GET['code'] != md5($path.$mykey)) { exit; } $query="UPDATE users SET energy=energy+(maxenergy/(12.5)) WHERE energy<maxenergy"; $query2="UPDATE users SET energy=maxenergy WHERE energy>maxenergy"; $query3="UPDATE users SET will=will+10 WHERE will<maxwill"; $query4="UPDATE users SET will=maxwill WHERE will>maxwill"; mysql_query($query,$c) or die("\nError Executing Query 1 for updating users $i to $next\n$query\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query2,$c) or die("\nError Executing Query 2 for updating users $i to $next\n$query2\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query3,$c) or die("\nError Executing Query 3 for updating users $i to $next\n$query3\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query4,$c) or die("\nError Executing Query 4 for updating users $i to $next\n$query4\n".mysql_error()."\nError Code:".mysql_errno()); $query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave "; $query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave"; $query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp"; $query4="UPDATE users SET hp=maxhp WHERE hp>maxhp"; mysql_query($query,$c) or die("\nError Executing Query 1 for updating users $i to $next\n$query\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query2,$c) or die("\nError Executing Query 2 for updating users $i to $next\n$query2\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query3,$c) or die("\nError Executing Query 3 for updating users $i to $next\n$query3\n".mysql_error()."\nError Code:".mysql_errno()); mysql_query($query4,$c) or die("\nError Executing Query 4 for updating users $i to $next\n$query4\n".mysql_error()."\nError Code:".mysql_errno()); ?>   I'm noob at programing, and cna't find anything that would cause problems :/
×
×
  • Create New...