Jump to content
MakeWebGames

zefiux

Members
  • Posts

    26
  • Joined

  • Last visited

zefiux's Achievements

Newbie

Newbie (1/14)

0

Reputation

  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}
×
×
  • Create New...