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

Any developer can me write this plugin

Comments in 'Plugin Development' started by yeungkachun, Feb 13, 2014.

  1. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
    Anyone know how to make a plugin (give items for every player each day (only for had login))
    sorry my bad English.​
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Each server day or each real day?
  3. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $this->api->schedule(24*60*60*20, array($this, "random"));
    public function random(){
    //random item code here
    }
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    My advice: Look for the word "schedule" in RandomItem, change the number after it into 24*60*60*20
  6. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
    Can I use this function to run command each 24 hr
  7. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
    can I use this function to give all player $1000 *I had install econ plugin
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes if you know about the economy API
    yeungkachun likes this.
  9. yeungkachun
    Offline

    yeungkachun New Member

    Joined:
    Feb 9, 2014
    Posts:
    19
    Minecraft User:
    yeungkachun
    where i can learn econ api how to use
  10. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Study the economyapi.php
  11. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    1. Install RandomItem.
    2. Modify the config file named "interval.txt" so that it says "86400".
    3. Restart your server. ;)
  12. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    How can I use the "schedule" function?
  13. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    $this->api->schedule(TIME IN TICKS,array($this,"FUNCTION NAME"),array(SAME TIME IN TICKS),true,"server.schedule");
  14. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Equivalent of a tick in seconds?
  15. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    20 ticks ≈ 1 second
  16. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    @LDX So then.. I can use
    Code:
    $this->api->schedule(20,array($this,"test"),array(20),true,"server.schedule");
    or
    Code:
    $this->api->schedule(20,array($this,"FUNCTION NAME"));
    ?
  17. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,429
    Plugins:
    14
    The top one.
  18. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Well I ask that because:

Share This Page

Advertisement