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

Outdated Giveaway 1.2

Drop Party's for all!!!

  1. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    DarkN3ss submitted a new plugin:

    Giveaway - Drop Party's for all!!!

    Read more about this plugin...
    decado and iksaku like this.
  2. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Good plugins!
    DarkN3ss likes this.
  3. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    Thanks, let me know what I can do to improve it if you have any ideas
  4. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
  5. codmadnesspro
    Offline

    codmadnesspro Notable Member Plugin Developer

    Joined:
    Sep 11, 2013
    Posts:
    551
    Plugins:
    1
    Minecraft User:
    Codmadnesspro
    You realize you have to pretty much do all the coding again?
  6. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    For the API update (1.4) , then yes I do know that, but its not hard
  7. DopeteK
    Offline

    DopeteK Active Member

    Joined:
    Aug 24, 2013
    Posts:
    393
    Minecraft User:
    DTeK
    Nice idea that I hope to change to random kill :D
  8. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    Haha thats a good idea to :) you are welcome to use my code as a template, just remember to give me credit when you submit the plugin :)
    DopeteK likes this.
  9. DopeteK
    Offline

    DopeteK Active Member

    Joined:
    Aug 24, 2013
    Posts:
    393
    Minecraft User:
    DTeK
    I didn't think I was allowed to upload other peoples work even if edited. But thanks.
  10. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    Unless they give you permission, which i am, and since it is a different plugin (just using the same core code) it should be fine, I only require you give me credit :)
    DopeteK likes this.
  11. DopeteK
    Offline

    DopeteK Active Member

    Joined:
    Aug 24, 2013
    Posts:
    393
    Minecraft User:
    DTeK
    Well it don't matter anyway because I can't code php and I just had a go at it. I crashed the server every time. :D
    DarkN3ss likes this.
  12. Anton Magsino
    Offline

    Anton Magsino Active Member

    Joined:
    Jan 17, 2014
    Posts:
    58
    Minecraft User:
    MinecrafterPH
    Good plugin! Suggestion, though: We can place signs that says:
    Line 1: *no text*
    Line 2: Giveaway starts in
    Line 3: *blah* hours, *blah* mins., *blah* secs.
    Line 4: *no text*
    and we can edit the time when the giveaway starts. Thanks!
    Darunia18, Spurs_Man321 and DarkN3ss like this.
  13. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    This is a good idea, I will have a look into it
  14. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
  15. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    Dude, you literally copy/pasted code from RandomItem. :/
  16. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    $RIA =$this->api->player->online();
    $RIN =rand(1,count($RIA)) -1;
    $randomPlayer =$RIA[$RIN];
  17. DarkN3ss
    Offline

    DarkN3ss Active Member Plugin Developer

    Joined:
    Dec 17, 2013
    Posts:
    143
    Plugins:
    7
    Minecraft User:
    DarkN3ss61
    Almost, you are using mt_rand where i am using rand because I find it works slightly better with this situation, and its not realy copying since its the cleanest way to get a random player.

    Here are the two methouds
    Yours:

    public function lol() {
    $path =$this->api->plugin->configPath($this);
    $RIA =$this->api->player->online();
    if(count($RIA) >2) {
    $RIN =mt_rand(1,count($RIA)) -1;
    $randLOL =$RIA[$RIN];
    $this->api->chat->broadcast("<" .$randLOL ."> LOL");​
    }
    else {
    return "Not enough players online.";​
    }​
    }

    And Mine:

    public function randPlayer()
    {
    $RIA =$this->api->player->online();
    $RIN =rand(1,count($RIA)) -1;
    $randomPlayer =$RIA[$RIN];
    return $randomPlayer;​
    }


    So as you can see there is quite a diffrence
    iJoshuaHD likes this.
  18. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    What do you think $RIA and $RIN stand for?...
  19. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,167
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    its just a function name or what ever you call it and ...

    i think he clears it out ;)
    DarkN3ss likes this.
  20. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,397
    Plugins:
    14
    I wasn't asking you.

    It is still nearly identical to RandomItem. I used some of RandomItem's code in RandomLOL.

Share This Page

Advertisement