Jump to content

ShogS

Members
  • Posts

    91
  • Joined

  • Last visited

Posts posted by ShogS

  1. Admin Drop Down Menu

    <form name="form1">
    <strong>Admin</strong>:
    <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
    <?php foreach ($adminMenuItems as $menuItem) : ?>
    <option value="<?php echo $menuItem['url']; ?>"><?php echo $menuItem['name']; ?></option>
    <?php endforeach; ?>
    </select>
    </form>

    I don't know what your 'MM_jumpMenu()' function does but that code should work... Just play around

    EDIT:

    and btw,

    sprintf('<a href="%s">%s</a>', $menuItem['url'], $menuItem['name'])

    that code produce a url tag which you cannot put inside a combo box, use '<?php echo $menuItem['url']; ?>' instead if you want to get just the url of the menu and place it in the value property of an option tag

    Sir jupeto the drop down menu works but it won't redirect me on every menu i choose sample who is online. it won't go. /sob

  2. Are you trying to make a dropdown menu? If that is the case, then you can try this:

    <?php if (!empty($adminMenuItems) && Flux::config('AdminMenuNewStyle')): ?>
    <form name="form1"> <?php $mItems = array(); foreach ($adminMenuItems as $menuItem) $mItems[] = sprintf('<a href="%s">%s</a>', $menuItem['url'], $menuItem['name'])
    
    function createDropdown($arr, $frm) {
    echo '<select name="'.$frm.'" id="'.$frm.'">
    <option value="">Select one…</option>';
    foreach ($arr as $key => $value) {
    echo '<option value="'.$value.'">'.$value.'</option>';
    }
    echo '</select>';
    }
    ?>
    
    <label for="frmadminmenu">Admin Menu:</label>
    <!--?php createDropdown($mItems, 'frmadminmenu'); ?-->
    </form>
    <?php endif ?>
    
    

    still not working sir when i put you code the page won't load anymore :(

  3. Question I just want to put a Admin menu in a List/Menu or Jump Menu

    Here's my code but it won't work for me

    <form name="form1">
     <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
    
    <?php $mItems = array(); foreach ($adminMenuItems as $menuItem) $mItems[] = sprintf('<a href="%s">%s</a>', $menuItem['url'], $menuItem['name']) ?>
      <strong>Admin</strong>: <option><?php echo implode(' • ', $mItems) ?></option></select>
    <?php endif ?>
    </form>
    

    it only appears like this

    Admin: Who's OnlineItem DatabaseeA LogsCP LogsIP Ban ListAccountsCharactersGuildsReloadSend MailNewsPages

    Any one can help me pls? tnx in advance

  4. Hey bro is it possible that the npc will check if the player has a guild or not?

    No sir. all you need to do is to recall the guild who needs a Package. and the only person who can do that in that map is the Admin only. so first if you required a Guild should consist 10+ members so you need to count them first before recalling them.

    Suggestions are appreciated. for Script Updates /heh

  5. @Zhen

    http://pastebin.com/raw.php?i=CRJPUtFK

    @argelrock...

    lol..... the purpose of this script is to create a "Second Password"...

    why still need to many validation to setup a password again~...

    anyway..this is not a good way to handling this kind of security...

    Hehe sorry sir emistry I just suggest that if a player want's to change or to new the password he forgotten maybe he should put some validations to secure the players password ^^ that's all hehe

  6. Try to Replace this one

    - script poringwin -1,{

    OnMobKilled:

    dispbottom "Poring : Congratulations. You've got me.";

    killmonster "poring_w01","All";

    getitem 30005,30;

    goto L_Start;

    end;

    }

    To This one

    - script poringwin -1,{

    OnMobKilled:

    killmonster "poring_w01.gat","All";

    mapannounce "poring_w01","Poring Banker: You Got Me",0;

    atcommand "@doommap";

    getitem 30005,30;

    goto L_Start;

    end;

    }

  7. tnx again sir jupeto. I will try this tomorrow. antok na kc ako hehehe tnx again for the reply. I send you back if this work.

    1. Execute the sql below in your fluxcp database

    ALTER TABLE `ragsrvinfo`
    ADD `agit_status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `drop`;
    

    2. Download agit_status.txt. Place the file in rAthena/npc/custom/ and install it or copy below and create a new file named agit_status.txt and install

    //===== eAthena Script =======================================
    //= Agit Status Checker
    //===== By: ==================================================
    //= Entwined
    //===== Current Version: =====================================
    //= 1.1
    //===== Compatible With: =====================================
    //= eAthena SVN (SQL only)
    //===== Description: =========================================
    //= Updates WoE status, so CeresCP can display
    //= if WoE is on or off in real time.
    //===== Additional Comments: =================================
    //= Run this SQL query:
    //= ALTER TABLE `ragsrvinfo` ADD `agit_status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `drop`;
    //============================================================
    - script AGIT_STATUS -1,{
    OnInit:
    // check if `agit_status` column exists
    if (query_sql("SHOW COLUMNS FROM ragsrvinfo LIKE 'agit_status'", .@dummy$,.@dummy$,.@dummy$,.@dummy$,.@dummy$,.@dummy$) == 0) {
     // Or... if we have the ALTER privilege, try to add the column
     query_sql "SELECT DATABASE()", .@rag_db$;
     query_sql "SHOW GRANTS", .@grants$;
     for (set .@i,0; .@i<getarraysize(.@grants$); set .@i,.@i+1)
      if (compare(.@grants$[.@i], "`"+.@rag_db$+"`")) {
    if (compare(.@grants$[.@i], "ALTER,") || compare(.@grants$[.@i], "ALTER ON"))
     query_sql "ALTER TABLE `ragsrvinfo` ADD `agit_status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `drop`;";
    break;
      }
    
     // verify
     if (query_sql("SHOW COLUMNS FROM ragsrvinfo LIKE 'agit_status'", .@dummy$,.@dummy$,.@dummy$,.@dummy$,.@dummy$,.@dummy$) == 0) {
      debugmes strnpcinfo(3)+" : unable to modify SQL table (needs ALTER privilege)";
      atcommand "@unloadnpc " + strnpcinfo(3);
      end;
     }
    }
    OnAgitStart:
    OnAgitStart2:
    OnAgitEnd:
    OnAgitEnd2:
    query_sql "UPDATE ragsrvinfo SET agit_status = " + (agitcheck() || agitcheck2());
    end;
    }
    

    3. Open fluxcp/modules/server/status.php

    Copy below code and paste before ?>

    // Name : WoE Status
    // Email : [email protected]
    // Author : Jupeto
    // NOTE : Uncomment all commented lines below if you want to cache the checking of status
    // and add a line in your fluxcp/config/application.phpcredits
    /*
    find : ServerStatusTimeout
    add after :
    
    'WoEStatusCache'	 => 2,						// Store a cached woe status and refresh every X minutes.  Default: 2 minutes (value is measured in minutes).
    'WoEStatusTimeout'	=> 2,						// For each server, spend X amount of seconds to determine whether it's up or not.
    */
    // if (file_exists($cache_woe_status) && (time() - filemtime($cache_woe_status)) < (Flux::config('WoEStatusCache') * 60)) {
    // $woeStatus = unserialize(file_get_contents($cache_woe_status));
    // }
    // else {
    $woeStatus = array();
    foreach (Flux::$loginAthenaGroupRegistry as $groupsName => $loginAthenaGroup) {
     if (!array_key_exists($groupsName, $woeStatus)) {
      $woeStatus[$groupsName] = array();
     }
     foreach ($loginAthenaGroup->athenaServers as $athenaServer) {
      $serverName = $athenaServer->serverName;
      $sql = "SELECT agit_status AS woe_status FROM {$athenaServer->charMapDatabase}.ragsrvinfo WHERE `name` = '" . $serverName . "'";
      $sth = $loginAthenaGroup->connection->getStatement($sql);
      $sth->execute();
      $woe_status = $sth->fetch();
    
      $woeStatus[$groupsName][$serverName] = array(
    'woe_status' => $woe_status->woe_status
      );
     }
    }
    
    // $fp = fopen($cache_woe_status, 'w');
    // if (is_resource($fp)) {
     // fwrite($fp, serialize($woeStatus));
     // fclose($fp);
    // }
    // }
    

    Save and exit.

    4. Open fluxcp/themes/your_theme/server/status.php

    Copy below code and paste it after the end of file

    <?php foreach ($woeStatus as $privServerName => $gameServers): ?>
    <h3>War Of Emperium Status for <?php echo htmlspecialchars($privServerName) ?></h3>
    <table id="server_status">
    <tr>
     <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td>
     <td class="status">Status</td>
    </tr>
    <?php foreach ($gameServers as $serverName => $gameServer): ?>
    <tr>
     <th class="server"><?php echo htmlspecialchars($serverName) ?></th>
     <td class="status"><?php echo $this->serverUpDown($gameServer['woe_status']) ?></td>
    </tr>
    <?php endforeach ?>
    </table>
    <?php endforeach ?>
    

    Save and exit.

    This help's me a lot sir jupeto. thank you it works now. thank again for helping me

×
×
  • Create New...