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

Help

Comments in 'Plugin Development' started by Legomite, Apr 26, 2014.

  1. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    It's been a while but I am working on Siri again. There is an annoying bug that when I run like /siri what minecraft and under it it won't respond. Can someone help me?

    PHP:
    if (strpos($subcmd'hi') !== false || strpos($subcmd'hey') !== false || strpos($subcmd'hello') !== false || strpos($subcmd'howdy') !== false || strpos($subcmd'greetings') !== false) {
                
    $issuer -> sendChat($hello[array_rand($hello)]);
            } elseif (
    strpos($subcmd'kill') !== false || strpos($subcmd'murder') !== false || strpos($subcmd'slaughter') !== false) {
                if (
    strpos($subcmd'everyone') !== false || strpos($subcmd'all') !== false || strpos($subcmd'every') !== false) {
                    
    $issuer -> sendChat($kill[array_rand($kill)]);
                    
    $this -> api -> console -> run("kill @a");
                }
                } elseif (
    strpos($subcmd'day') !== false || strpos($subcmd'increase') !== false || strpos($subcmd'light') !== false || strpos($subcmd'up') !== false) {
                        if (
    strpos($subcmd'adjust') !== false || strpos($subcmd'set') !== false || strpos($subcmd'change') !== false|| strpos($subcmd'brightness') !== false) {
                    
    $issuer -> sendChat($brightincrease[array_rand($brightincrease)]);
                    
    $this -> api -> time -> day();
                } elseif (
    strpos($subcmd'night') !== false || strpos($subcmd'decrease') !== false || strpos($subcmd'dark') !== false || strpos($subcmd'down') !== false) {
                   if (
    strpos($subcmd'adjust') !== false || strpos($subcmd'set') !== false || strpos($subcmd'change') !== false|| strpos($subcmd'brightness') !== false) {
                    
    $issuer -> sendChat($brightdecrease[array_rand($brightdecrease)]);
                    
    $this -> api -> time -> night();
                } elseif (
    strpos($subcmd'weather') !== false || strpos($subcmd'forecast') !== false) {
                    
    $issuer -> sendChat($weather[array_rand($weather)]);
                }
                } elseif (
    strpos($subcmd'what') !== false || strpos($subcmd'search') !== false) {
                    if (
    strpos($subcmd'minecraft') !== false) {
                        
    $issuer -> sendChat($minecraft[array_rand($minecraft)]);
                        
    $issuer -> sendChat("Minecraft was made back in 2009");
                        
    $issuer -> sendChat("Minecraft was founded my Notch");
                        
    $issuer -> sendChat("Notch gave the lead development");
                        
    $issuer -> sendChat("of Minecraft to Jeb");
                        
    $issuer -> sendChat("for more info go to http://minecraft.gamepedia.com/");
                    } elseif (
    strpos($subcmd'love') !== false || strpos($subcmd'feelings') !== false) {
                            if (
    strpos($subcmd'i') !== false || strpos($subcmd'you') !== false || strpos($subcmd'me') !== false) {
                        
    $user strtolower($args[0]);
                        
    $issuer -> sendChat($love[array_rand($love)]);
                    } elseif (
    strpos($subcmd'kill') !== false || strpos($subcmd'murder') !== false || strpos($subcmd'slaughter') !== false) {
                        if (
    strpos($subcmd'me') !== false || strpos($subcmd'myself') !== false || strpos($subcmd'drugs') !== false) {
                            
    $user strtolower($args[0]);
                            
    $issuer -> sendChat($bad[array_rand($bad)]);
                        } elseif (
    strpos($subcmd'old') !== false || strpos($subcmd'what') !== false) {
                            if (
    strpos($subcmd'obama') !== false) {
                                
    $user strtolower($args[0]);
                                
    $issuer -> sendChat($obama[array_rand($obama)]);
                            } elseif (
    strpos($subcmd'next') !== false || strpos($subcmd'upcoming') !== false || strpos($subcmd'new') !== false) {
                                if (
    strpos($subcmd'update') !== false || strpos($subcmd'version') !== false || strpos($subcmd'features') !== false) {
                                    
    $user strtolower($args[0]);
                                    
    $issuer -> sendChat("<Siri> My sources says it will be 9.0");
                                    
    $issuer -> sendChat("more on minecraft.gamepedia.com/Pocket_Edition_upcoming_features");
                                } elseif (
    strpos($subcmd'cake') !== false) {
                                    if (
    strpos($subcmd'like') !== false || strpos($subcmd'love') !== false || strpos($subcmd'crave') !== false) {
                                        
    $user strtolower($args[0]);
                                        
    $issuer -> sendChat($cake[array_rand($cake)]);
                                    } elseif (
    strpos($subcmd'like') !== false || strpos($subcmd'love') !== false) {
                                        if (
    strpos($subcmd'singers') !== false || strpos($subcmd'rockstars') !== false || strpos($subcmd'bruno mars') !== false) {
                                            
    $user strtolower($args[0]);
                                            
    $issuer -> sendChat($like[array_rand($like)]);
                                        } elseif (
    strpos($subcmd'you') !== false || strpos($subcmd'your') !== false) {
                                            if (
    strpos($subcmd'very') !== false || strpos($subcmd'are') !== false || strpos($subcmd'really') !== false) {
                                                
    $user strtolower($args[0]);
                                                
    $issuer -> sendChat($very[array_rand($very)]);
                                            } elseif (
    strpos($subcmd'switch') !== false || strpos($subcmd'gamemode') !== false) {
                                                if (
    strpos($subcmd'creative') !== false || strpos($subcmd'creativemode') !== false || strpos($subcmd'build') !== false) {
                                                    
    $user strtolower($args[0]);
                                                    
    $username $issuer -> username;
                                                    
    $issuer -> sendChat($creative[array_rand($creative)]);
                                                    
    $this -> api -> console -> run("gamemode 1 " $username);
                                                } elseif (
    strpos($subcmd'switch') !== false || strpos($subcmd'gamemode') !== false) {
                                                    if (
    strpos($subcmd'survival') !== false || strpos($subcmd'survivalmode') !== false || strpos($subcmd'survive') !== false) {
                                                        
    $user strtolower($args[0]);
                                                        
    $username $issuer -> username;

                                                        
    $issuer -> sendChat($survival[array_rand($survival)]);
                                                        
    $this -> api -> console -> run("gamemode 0" $username);
                                                    }
  2. Legomite
    Offline

    Legomite Active Member Plugin Developer

    Joined:
    Sep 8, 2013
    Posts:
    470
    Plugins:
    2
    Minecraft User:
    Legomite
    Yes yes, it does look a lot like Falks, but trust me. I rewritten it.

Share This Page

Advertisement