Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

KillRate 2.1.1

Keep track of the number of kills

  1. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Did you get a crash dump? I don't have that problem myself.
  2. rock2rap
    Offline

    rock2rap New Member

    Joined:
    Aug 23, 2013
    Posts:
    48
    Minecraft User:
    Williams
    It's not crahing. it's apper at server log

    PHP:
    2015-09-16 [20:25:21] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerDeathEvent' to 'KillRate v2.1.0dev2': Undefined variable: settings on aliuly\killrate\Main
    2015-09-16 [20:25:21] [Server thread/NOTICE]: UndefinedVariableException: "
    Undefined variablesettings" (E_NOTICE) in "/KillRate_v2.1.0dev2.phar/src/aliuly/killrate/Main" at line 378
    Last edited: Sep 16, 2015
  3. rock2rap
    Offline

    rock2rap New Member

    Joined:
    Aug 23, 2013
    Posts:
    48
    Minecraft User:
    Williams
    and this after player reach on final Level (I'm set it Level D)

    PHP:
    ocketMine-MP Crash Dump Wed Sep 16 21:43:24 ICT 2015

    Error
    Call to a member function getPrice() on boolean
    File
    : /KillRate_v2.1.0dev2.phar/src/aliuly/killrate/RankMgr
    Line
    46
    Type
    E_ERROR

    THIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN
    KillRate v2.1.0dev2

    Code
    :
    [
    37]  $rank $this->rankup->getRankStore()->getRankByName($this->defaultRank);
    [
    38]  if (!$this->rankup->getPermManager()->addToGroup($player$rank->getName())) {
    [
    39]  $this->owner->getLogger()->warning(mc::_("Unable to reset rank for %1%"$player));
    [
    40]  }
    [
    41]  }
    [
    42]  public function promote(Player $player$newscore) {
    [
    43]  if ($this->rankup === null) return;
    [
    44]     // OK, do we need to rank up?
    [45]      $nextrank $this->rankup->getRankStore()->getNextRank($player);
    [
    46]      if ($newscore $nextrank->getPrice()) return;
    [
    47]      // Yeah!  Levelling up!
    [48]      if ($this->rankup->getPermManager()->addToGroup($player,$nextrank->getName())) {
    [
    49]     $this->owner->getServer()->broadcastMessage(TextFormat::BLUE.mc::_("%1% is now %2%!",$player->getDisplayName(),$nextrank->getName()));
    [
    50]      } else {
    [
    51]        $player->sendMessage(TextFormat::RED.mc::_("Unable to award level %1%"$nextrank->getName()));
    [
    52]      }
    [
    53]  }
    [
    54] }
    [
    55]
    [
    56]
    if not set a next level it's crash!
    Last edited: Sep 16, 2015
  4. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    This update should fix these bugs.

    https://github.com/alejandroliu/pocketmine-plugins/releases/tag/KillRate-2.1.0dev3

    Attached Files:

  5. rock2rap
    Offline

    rock2rap New Member

    Joined:
    Aug 23, 2013
    Posts:
    48
    Minecraft User:
    Williams
  6. rock2rap
    Offline

    rock2rap New Member

    Joined:
    Aug 23, 2013
    Posts:
    48
    Minecraft User:
    Williams
    OK! It's Work Great! an Good to go for RPG
    Notice: It's Comsume CPU btw. for good processing
    Thanks for Quicking Development.

    How to setting point reaching on Killrate or RankUp?
  7. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    If you have timings report, I could look at the CPU usage. Not sure where would the bottlenecks be. I don't think it is too bad unless you have lots of players with lots of kills.

    Setting points to reach a rank is configure in RankUp.
    Legoboy0215 likes this.
  8. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    rock2rap and FaanMaario like this.
  9. PolarKing
    Offline

    PolarKing New Member

    Joined:
    Apr 4, 2015
    Posts:
    16
    Minecraft User:
    PolarKingMCPE
    Help! Server crash...

    PocketMine-MP Crash Dump Sat Sep 26 19:32:35 UTC 2015

    Error: Call to undefined method aliuly\killrate\KillStreak::getServer()
    File: /KillRate_v2.1.0.phar/src/aliuly/killrate/KillStreak
    Line: 38
    Type: E_ERROR

    THIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN: KillRate v2.1.0

    Code:
    [29] $newstreak = $this->owner->getScoreV2($n,"streak");
    [30] if ($newstreak == 0 || $newstreak < $this->minkills) return;
    [31] $this->owner->getServer()->getPluginManager()->callEvent(
    [32] $ev = new KillRateEndStreakEvent($this->owner,$player,$newstreak)
    [33] );
    [34] if ($ev->isCancelled()) return;
    [35] $oldstreak = $this->owner->getScoreV2($n,"best-streak");
    [36] if ($oldstreak == 0) {
    [37] $this->owner->setScore($n,$newstreak,"best-streak");
    [38] $this->getServer()->broadcastMessage(mc::_("%1% ended his first kill-streak at %2% kills", $player->getDisplayName(), $newstreak));
    [39] } elseif ($newstreak > $oldstreak) {
    [40] $this->owner->setScore($n,$newstreak,"best-streak");
    [41] $this->getServer()->broadcastMessage(mc::_("%1% beat previous streak record of %2% at %3% kills", $player->getDisplayName(), $oldstreak, $newstreak));
    [42] }
    [43] $this->owner->delScore($n,"streak");
    [44] }
    [45] public function scoreStreak(Player $player) {
    [46] if (!$this->enabled) return false;
    [47] $n = strtolower($player->getName());
    [48] $streak = $this->owner->updateDb($n,"streak");

    Backtrace:
    #0 (): pocketmine\Server->crashDump(boolean)

    PocketMine-MP version: 1.6dev #30 [Protocol 34; API 1.13.0]
    Git commit: 0000000000000000000000000000000000000000
    uname -a: Linux Zulu.HostingItAll.com 3.10.23-xxxx-std-ipv6-64 #1 SMP Tue Mar 18 14:48:24 CET 2014 x86_64
    PHP Version: 5.6.10
    Zend version: 2.6.0
    OS : Linux, linux
  10. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
  11. PolarKing
    Offline

    PolarKing New Member

    Joined:
    Apr 4, 2015
    Posts:
    16
    Minecraft User:
    PolarKingMCPE
    Yep, it is fixed! Thank you very much :)
  12. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
  13. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    Plugin Request sir!


    NPC or Head TOP?

    What does this do?

    Example

    TOP 3 KILLS
    1. CaptainKenji17
    2.Aliuly
    3.shogchips

    and you type /killrate tophead 1 {kill, streak, best-streak, or deaths} and (1 is top 1) if 2 the top 2

    what happen if you type it?

    In your location it'll generate head block with top 1's player head skin, if making head skin by block not possible yet for PM make it as NPC? it'll use NPC with player skin and on name just make it blank we will put a sign below it. so the command will be /killrate topnpc 1 {blabla}
  14. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    ... rest edited out for brevity...

    I am sorry, but I don't understand this request.
  15. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    Example Im top 3 and I have skin Herobrine

    and you type command /killrate npctop 3

    and itll places an npc with my skin and you know? There's head block now on mcpe and I Don't know if its possible to make it as someone's head too? like /killrate headtop 3 and itll replace the head block and the head will be herobrine head because that what the top 3 guy were wearing

    the "3" is the number after 'top' so like if top '1' you make it /killrate npctop 1 or headtop 1
  16. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Head block is not in PM yet. BTW, I don't think you can set head block skin yet :)
  17. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Don't think I will add it to KillRate as it is much bigger than its initial scope. It is now at 1,452 lines of code. However, the API allows this feature to be added as a separate plugin.
    CaptainKenji17 likes this.
  18. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    will you make it? :)

    thats why i said "plugin request" :)
  19. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
    Not at the moment. Busy with other projects.
    Legoboy0215 likes this.
  20. Jazzwhistle
    Offline

    Jazzwhistle Notable Member

    Joined:
    Dec 27, 2014
    Posts:
    364
    Minecraft User:
    Awzaw
    Hi, yet another great plugin :) It's working very well for me with the latest dev builds, except there's an occasional error (no crash):
    Code:
    09.10 01:48:59 [Server] Server thread/WARNING RuntimeException: "SQLite3::exec(): UNIQUE constraint failed: Scores.player, Scores.type" (E_WARNING) in "/KillRate_v2.1.1.phar/src/aliuly/killrate/SQLiteMgr" at line 72
    09.10 01:48:59 [Server] Server thread/CRITICAL "Could not pass event 'pocketmine\event\player\PlayerDeathEvent' to 'KillRate v2.1.1': SQLite3::exec(): UNIQUE constraint failed: Scores.player, Scores.type on aliuly\killrate\Main
    I'm trying to see if I can fix it myself as I know you are busy - but if you have any ideas I'd love to hear them. It seems that the unique condition of PRIMARY KEY (player,type) is failing so maybe it's trying to store player when it's null, or something like that?

    Also although [RANKINGS] signs and /killrate stats work perfectly, [STATS] signs only display money, not points. (1.6dev43)

    Thanks
    Last edited: Oct 9, 2015

Share This Page

Advertisement