lavalar pm robot

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    lavalar pm robot

    here is my pandrobots info
    PHP Code:
    $botid "9b1e19f44e34598a";
                  
    $hostname "www.pandorabots.com";
                  
    $hostpath "/pandora/talk-xml";
                  
    $sendData "botid=".$botid."&input=".urlencode($message)."&custid=".$custid;

                  
    $result PostToHost($hostname$hostpath$sendData);

                  
    $pos strpos($result"custid=\"");
                  
    $pos strpos($result"<that>"); 
    But i cant use it in my lavalair script. when i send PM to chatbot, it doesnot Reply PM

    #2
    Where to put that code

    Comment


      #3
      Maybe the bot id is deleted. Create a new bot from pandorabots.com

      Comment


        #4
        Using those bots is so old school.

        Comment


          #5
          my chat boot working fine i want to add this robot as pm robot... like if u send pm to this robot it will automatic reply your pm .. can u give me this function or example?

          Comment


            #6
            in core
            Code:
            //////////////////////Function add user to online list :P
            
            function addonline($uid,$place,$plclink)
            {
              /////delete inactive users
              $tm = (time() + $timeadjust) ;
              $timeout = $tm - 420; //time out = 5 minutes
              $deloff = mysql_query("DELETE FROM ibwf_online WHERE actvtime <'".$timeout."'");
              
              ///now try to add user to online list and add total time online
              
              
              $lastactive = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$uid."'"));
              $tolsla = (time() + $timeadjust) - $lastactive[0];
              
              $ttime = (time() + $timeadjust);
              $res = mysql_query("UPDATE ibwf_users SET lastact='".$ttime."' WHERE id='".$uid."'");
              $res = mysql_query("INSERT INTO ibwf_online SET userid='".$uid."', actvtime='".$ttime."', place='".$place."', placedet='".$plclink."'");
              ///////////////////////////////she's always online
              	mysql_query("UPDATE ibwf_users SET tottimeonl='".$totaltimeonline."' WHERE id='4'");
            
            	mysql_query("UPDATE ibwf_users SET lastact='".time()."' WHERE id='4'");
            
            	mysql_query("INSERT INTO ibwf_online SET userid='4', place='".$place."', actvtime='".$tm."'");
            
              if(!$res)
              {
                //most probably userid already in the online list
                //so just update the place and time
                $res = mysql_query("UPDATE ibwf_online SET actvtime='".$ttime."', place='".$place."', placedet='".$plclink."' WHERE userid='".$uid."'");
                
                
              }
              $maxmem=mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE id='2'"));
              
                        $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online"));
            
                      if($result[0]>=$maxmem[0])
                      {
                        $tnow = date("D d M Y - H:i", (time() + $timeadjust));
                        mysql_query("UPDATE ibwf_settings set name='".$tnow."', value='".$result[0]."' WHERE id='2'");
                      }
                      $maxtoday = mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
                      if($maxtoday[0]==0||$maxtoday=="")
                      {
                        mysql_query("INSERT INTO ibwf_mpot SET ddt='".date("d m y")."', ppl='1', dtm='".date("H:i:s")."'");
                        $maxtoday[0]=1;
                      }
                      if($result[0]>=$maxtoday[0])
                      {
                        mysql_query("UPDATE ibwf_mpot SET ppl='".$result[0]."', dtm='".date("H:i:s")."' WHERE ddt='".date("d m y")."'");
                      }
            }
            in inboxproc modify this one or just use it
            Code:
            if($action=="sendpm")
            {
                  echo "<head>\n";
            	  echo "<title>SpiderWap</title>\n";
                  echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/$theme[0]\" />";
            	  	  echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
                  echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
                  echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
            
            	  echo "</head>";
                  echo "<body>";
            
              echo "<p align=\"center\">";
              $whonick = getnick_uid($who);
              $byuid = getuid_sid($sid);
              $tm = time();
              $lastpm = mysql_fetch_array(mysql_query("SELECT MAX(timesent) FROM ibwf_private WHERE byuid='".$byuid."'"));
              $pmfl = $lastpm[0]+getpmaf();
              if($byuid==1)$pmfl=0;
                if($who==4) {
                         $botid = "ee652868ce361711";
                          $hostname = "www.pandorabots.com";
                          $hostpath = "/pandora/talk-xml";
                          $sendData = "botid=".$botid."&input=".urlencode($pmtext)."&custid=".$custid;
                          
                          $result = PostToHost($hostname, $hostpath, $sendData);
                          
                          $pos = strpos($result, "custid=\"");
                          $pos = strpos($result, "<that>");
                	if ($pos === false) {
                		$reply = "";
                	} else {
                		$pos += 6;
                		$endpos = strpos($result, "</that>", $pos);
                		$reply = unhtmlspecialchars2(substr($result, $pos, $endpos - $pos));
                		$reply = mysql_escape_string($reply);
                	}
            $uid = getuid_sid($sid);
            $res = mysql_query("INSERT INTO ibwf_private SET text='".$reply."', byuid='4', touid='".$uid."', timesent='".$tm."'");
            $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."',touid='".$who."', unread='0', timesent='".$tm."'");
            }
              if($pmfl<$tm)
              {
                if(!isblocked($pmtext,$byuid))
                {
                if((!isignored($byuid, $who))&&(!istrashed($byuid)))
                {
              $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='".$who."', timesent='".$tm."'");
              }else{
                $res = true;
              }
            
              if($res)
              {
                echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
                echo "PM was sent successfully to $whonick<br/><br/>";
                echo parsepm($pmtext, $sid);
                
              }else{
                echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
                echo "Can't Send PM to $whonick<br/><br/>";
              }
              }else{
                $bantime = time() + (7*24*60*60);
                echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
                echo "Can't Send PM to $whonick<br/><br/>";
                echo "You just sent a link to one of the crapiest sites on earth<br/> The members of these sites spam here a lot, so go to that site and stay there if you don't like it here<br/> as a result of your stupid action:<br/>1. you have lost your sheild<br/>2. you have lost all your plusses<br/>3. You are BANNED!";
                mysql_query("INSERT INTO ibwf_penalties SET uid='".$byuid."', penalty='1', exid='1', timeto='".$bantime."', pnreas='Banned: Automatic Ban for spamming for a crap site'");
                mysql_query("UPDATE ibwf_users SET plusses='0', shield='0' WHERE id='".$byuid."'");
                mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$byuid."', touid='2', timesent='".$tm."'");
              }
              }else{
                $rema = $pmfl - $tm;
                echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
                echo "Flood control: $rema Seconds<br/><br/>";
              }
              echo "<br/><br/><a href=\"inbox.php?action=main&amp;sid=$sid\">Back to inbox</a><br/>";
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "Home</a>";
              echo "</p>";
              getAd();
                echo "</body>\n";
            	echo "</html>";
            	exit();
            }
            then go register a user and make its user id to 4 or change in the coding the 4 to any userid u want to be a bot then it should work
            ________________
            Jacques
            jacques@gw-designs.co.za
            http://coding.biz.tm
            Come join and lets make it a place to learn all the noobies how to code
            __________________

            NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

            Comment


              #7
              Thankxxxxxxx riderz

              Comment


                #8
                yo riderz... thanks so much for this code... (i was gonna code it, but this made it so much easier, lol... thinking about modding that so i can try make a forum bot on one of the boards, lol... just for fun...
                C3 Themes: http://c3themes.wen.ru/index.html
                Find Files: http://mystarter.tk/?goto=X-search

                Comment


                  #9
                  thanks riderz, am on mobile so cant use the button
                  http://myfacepals.com
                  MYFACEPALS SOCIAL NETWORKsigpic

                  Comment


                    #10
                    ok, an idea is to change the last act time for the bot, i'm trying to post the code but it's giving me errors for some reason...
                    ///////////////consise code version/////////////
                    $bottime = rand(20, 45);
                    $botlastaction = time() - $bottime;
                    /////////////////////////////////////////////////////

                    so yeah, basically, you add the bot with a variable negetive time with in certain limits, makes it look more "realistic" if you will...

                    for an example check the bots in my onlines on the link in my signature...
                    C3 Themes: http://c3themes.wen.ru/index.html
                    Find Files: http://mystarter.tk/?goto=X-search

                    Comment


                      #11
                      thanxx riderz bro

                      Comment


                        #12
                        ok, i posted a chatbot script on the forum a while back... just wondering if anyone seen the demo at chatbot.mobi

                        somehow he managed to do a bbcode style function... I think that'd make an awesome addon for lava... like a chatbot you say search wap scripts to and it'll return results as it's reply...
                        C3 Themes: http://c3themes.wen.ru/index.html
                        Find Files: http://mystarter.tk/?goto=X-search

                        Comment

                        Working...
                        X