当前位置: 首页>>代码示例>>PHP>>正文


PHP Shadowrun4::getShadowDir方法代码示例

本文整理汇总了PHP中Shadowrun4::getShadowDir方法的典型用法代码示例。如果您正苦于以下问题:PHP Shadowrun4::getShadowDir方法的具体用法?PHP Shadowrun4::getShadowDir怎么用?PHP Shadowrun4::getShadowDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shadowrun4的用法示例。


在下文中一共展示了Shadowrun4::getShadowDir方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 public static function execute(SR_Player $player, array $args)
 {
     $bot = Shadowrap::instance($player);
     $path = Shadowrun4::getShadowDir() . 'dog_module/Shadowlamb/shadowlamb_motd.txt';
     if (false === ($motd = @file_get_contents($path))) {
         $bot->reply('Can not read ' . $path);
     }
     return $bot->rply('5249', array($motd));
     // 		$bot->reply(sprintf('Message of the day: %s', $motd));
     // 		return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:11,代码来源:motd.php

示例2: getExitLocation

<?php

require_once Shadowrun4::getShadowDir() . 'city/Renraku/location/Elevator.php';
final class Renraku04_Elevator extends Renraku_Elevator
{
    public function getExitLocation()
    {
        return false;
    }
    public function onLeaveLocation(SR_Party $party)
    {
        $errors = '';
        foreach ($party->getMembers() as $member) {
            $member instanceof SR_Player;
            if (false === ($item = $member->getInvItemByName('ID4Card'))) {
                $errors .= sprintf(', %s', $member->getName());
            } else {
                $member->message($this->lang($member, 'usecard', array($item->getAmount())));
                // 				$member->message(sprintf('You use one of your %d ID4 cards...', $item->getAmount()));
                $item->useAmount($member, 1);
            }
        }
        if ($errors !== '') {
            $this->partyMessage($party->getLeader(), 'nocard', array(substr($errors, 2)));
            // 			$party->notice(sprintf('%s do(es) not have an ID4Card... You hear the alarm sound!', substr($errors, 2)));
            if (false !== ($city = $this->getCityClass())) {
                $city->setAlert($party, GWF_Time::ONE_HOUR * 2);
            }
        }
    }
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:Elevator.php

示例3:

<?php

require_once Shadowrun4::getShadowDir() . 'city/Cave/location/Tunnel1.php';
final class Cave_Tunnel4 extends Cave_Tunnel1
{
}
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:Tunnel4.php

示例4: onLoadLanguage

 public static function onLoadLanguage()
 {
     $dir = Shadowrun4::getShadowDir();
     self::$LANG_CMDS = new GWF_LangTrans($dir . 'lang/cmds/cmds');
     self::$LANG_COMMANDS = new GWF_LangTrans($dir . 'lang/commands/commands');
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:7,代码来源:Shadowcmd.php

示例5: execute

 public static function execute(SR_Player $player, array $args)
 {
     require_once Shadowrun4::getShadowDir() . 'dog_module/Shadowlamb/Shadowcron.php';
     #Shadowcron::onCronjob();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:5,代码来源:gmc.php

示例6: onLoadLanguage

 public function onLoadLanguage()
 {
     $cityname = $this->getName();
     $path = sprintf('%scity/%s/lang/%s', Shadowrun4::getShadowDir(), $cityname, strtolower($cityname));
     return $this->lang = new GWF_LangTrans($path);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:6,代码来源:SR_City.php

示例7: getLangLocation

 /**
  * Get a lang file for a location.
  * @param SR_Quest $quest
  * @return GWF_LangTrans
  */
 private static function getLangLocation(SR_Location $location)
 {
     // 		$locname = $location->getName();
     $locname = $location->getLangfileName();
     if (false === isset(self::$LANG_LOCATION[$locname])) {
         $llocname = strtolower(Common::substrFrom($locname, '_'));
         $path = sprintf('%scity/%s/lang/location/%s/%s', Shadowrun4::getShadowDir(), $location->getCity(), $llocname, $llocname);
         self::$LANG_LOCATION[$locname] = new GWF_LangTrans($path);
     }
     return self::$LANG_LOCATION[$locname];
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:16,代码来源:Shadowlang.php

示例8: getNPCLevel

<?php

require_once Shadowrun4::getShadowDir() . 'city/Forest/location/Clearing.php';
final class Forest_Skeleton extends SR_NPC
{
    public function getNPCLevel()
    {
        return 21;
    }
    public function getNPCPlayerName()
    {
        return 'Skeleton';
    }
    public function getNPCMeetPercent(SR_Party $party)
    {
        return 30.0;
    }
    public function getNPCEquipment()
    {
        return array('weapon' => 'LongSword', 'armor' => 'ChainMail', 'helmet' => 'ChainHelmet', 'shield' => 'SmallShield', 'boots' => 'ChainBoots');
    }
    public function getNPCModifiers()
    {
        return array('race' => 'human', 'gender' => 'male', 'melee' => rand(8, 10), 'ninja' => rand(5, 7), 'strength' => rand(8, 10), 'quickness' => rand(5, 7), 'distance' => rand(4, 8), 'sharpshooter' => rand(5, 12), 'nuyen' => 0, 'base_hp' => rand(30, 50));
    }
    public function getNPCLoot(SR_Player $player)
    {
        # Increase some temp counter
        $leader = $player->getParty()->getLeader();
        $kills = SR_PlayerVar::getVal($player, Forest_Clearing::SKELSKEY, '0');
        $kills++;
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:Skeleton.php

示例9: isCombatCommand

<?php

require_once Shadowrun4::getShadowDir() . 'cmd/gm/gmd.php';
final class Shadowcmd_npc extends Shadowcmd_gmd
{
    public static function isCombatCommand()
    {
        return true;
    }
    public static $WHITELIST = array('u', 'ca', 'le', 'sell', 'buy', 'view', 'drop', 'eq', 'uq', 'x', 'fw', 'bw', '#', 'i', 'q', 'ks', 'a', 's', 'l');
    public static function execute(SR_Player $player, array $args)
    {
        if (count($args) < 1) {
            $player->message(Shadowhelp::getHelp($player, 'npc'));
            return false;
        }
        $party = $player->getParty();
        if (false === ($remote = $party->getMemberByArg(array_shift($args)))) {
            $player->msg('1064');
            // 			$player->message('This player is not in your party.');
            return false;
        }
        if ($remote->isHuman()) {
            $player->msg('1065');
            // 			$player->message('You can only remote control NPC.');
            return false;
        }
        if (!in_array($args[0], self::$WHITELIST, true)) {
            $player->msg('1066', array(implode(', ', self::$WHITELIST)));
            // 			$player->message(sprintf('Only the following remote commands are allowed: %s.', implode(', ', self::$WHITELIST)));
            return false;
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:npc.php

示例10: getQuestName

<?php

require_once Shadowrun4::getShadowDir() . 'city/Delaware/quest/Delaware_Exams5.php';
final class Quest_Chicago_Uni6 extends Quest_Delaware_Exams5
{
    public function getQuestName()
    {
        return 'MasterBachelor';
    }
    public function getNeededAmount()
    {
        return 3;
    }
    public function getQuestDescription()
    {
        return sprintf('Bring %d/%d fluid Auris to the Chicago University Gnome.', $this->getAmount(), $this->getNeededAmount());
    }
    public function getRewardXP()
    {
        return 3;
    }
    public function getRewardNuyen()
    {
        return 300;
    }
    public function checkQuest(SR_NPC $npc, SR_Player $player)
    {
        if (false === ($auris = $player->getInvItemByName('Auris'))) {
            return $npc->reply('Oh, you don\'t have more Auris for me?');
        }
        if (!$this->rightInTime($player)) {
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:Chicago_Uni6.php

示例11: createItemDataFile

 private static function createItemDataFile()
 {
     $out = '<?php' . "\n\$lang = array(\n";
     $player = Shadowrun4::getDummyPlayer();
     $data = array();
     foreach (SR_Item::getAllItems() as $item) {
         $item instanceof SR_Item;
         $data[(int) $item->getItemUUID()] = $player->lang($item->displayPacked($player));
     }
     ksort($data);
     foreach ($data as $uuid => $type) {
         $out .= sprintf("'%d'=>'%s',\n", $uuid, $type);
     }
     $out .= ");\n?>\n";
     $outfile = Shadowrun4::getShadowDir() . 'data/itemdata/itemdata_en.php';
     @mkdir(dirname($outfile), 0700, true);
     file_put_contents($outfile, $out);
     return true;
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:19,代码来源:SR_Install.php


注:本文中的Shadowrun4::getShadowDir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。