jack en poy (chatroom)

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

  • huwad
    replied
    Originally posted by robzky View Post
    Can you post the usage code?
    no usage for Jack En Poy, just change this according to your room id

    Code:
    [b]if($rid=="ROOM ID HERE")[/b]

    Leave a comment:


  • robzky
    replied
    Usage code

    Can you post the usage code?

    Leave a comment:


  • capofret
    replied
    Originally posted by huwad View Post
    no need to p0st it.. capofret includes the sql inside d archieve.. but the scripts is n0t w0rking
    How can it not work when its the script used by other pinoy sites? And its working fine in my site lol. Why dont u take a look at the script, study it.

    Leave a comment:


  • huwad
    replied
    no need to p0st it.. capofret includes the sql inside d archieve.. but the scripts is n0t w0rking

    Leave a comment:


  • capofret
    replied
    Originally posted by coolboiz1 View Post
    any jnp script for ori's modded version?
    As long as its from lava, u can use it..u only need to check the tables. If it doesnt work, i will post the sql for this.

    Leave a comment:


  • coolboiz1
    replied
    any jnp script for ori's modded version?

    Leave a comment:


  • capofret
    replied
    did u look at the script? Its there. When youre at the room u have to click whos online > click user > then you would see the bet. It works fine in my site.

    Leave a comment:


  • huwad
    replied
    not working.. no form to make bet..

    Im looking for this code
    Code:
    {
       if($rid=="ROOM ID HERE")
            {    
         $uid = getuid_sid($sid);
    
    $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_jnp WHERE touid='".$uid."' AND reply='1'"));
    if($nopop[0]>0)
    {  
     $ncl = mysql_fetch_array(mysql_query("SELECT id, bet, byuid, touid FROM ibwf_jnp WHERE touid='".$uid."' ORDER BY id DESC LIMIT 1"));
    $by = getnick_uid($ncl[2]);
    echo "Jack en Poy challenge from $by BET: $ncl[1]<br/>";
     echo "<form action=\"chat.php?action=jnp&amp;sid=$sid&amp;rid=$rid&amp;time=$time\" method=\"post\">"; 
        echo "JNP Challenge: <select name=\"kamay\">";
     echo "<option value=\"0\">Decline</option>";
     echo "<option value=\"1\">Paper</option>";
      echo "<option value=\"2\">Scissors</option>";
      echo "<option value=\"3\">Rock</option>";
      echo "</select>";
    echo "<input type=\"hidden\" name=\"who\" value=\"$ncl[2]\"/>";
    echo "<input type=\"hidden\" name=\"poy\" value=\"$ncl[0]\"/>";
    echo "<input type=\"submit\" value=\"Send\"/>";    
    echo "</form>";
    }
    Last edited by huwad; 02.06.09, 08:57.

    Leave a comment:


  • capofret
    started a topic jack en poy (chatroom)

    jack en poy (chatroom)

    ok finally i made it work. just want to share it because seems like nobody wants to share it here.

    you need to match the rid with your current table. edit in the script or edit in your table.

    some codes for other rooms still dont work.

    im not a coder so the script may not be ok, i used copy paste lol. antiflood also doesnt work.

    u need to add this on core..

    Code:
    //////////////////////////////////////////// Search Id
    function iscowner($uid, $rid)
    {
      $candoit = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_rooms WHERE id='".$rid."'"));
      if($uid==$candoit[0]||ismod($uid))
      {
        return true;
      }
      return false;
    }
    
    ///////////////////////////////////////////is shielded?
    
    function kick($uid,$rid)
    {
      $not = mysql_fetch_array(mysql_query("SELECT kick FROM ibwf_kick WHERE uid='".$uid."' AND rid='".$rid."'"));
      if($not[0]=='1')
      {
        return true;
      }else{
        return false;
      }
    }
    
    function chall($byuid, $touid)
    {
        $res = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_jnp WHERE ((byuid='".$byuid."' AND touid='".$touid."') OR (byuid='".$touid."' AND touid='".$byuid."'))"));
        if($res[0]>0)
        {
          return true;
        }
        return false;
    }
    
    ///////////////////////////////////function isuser
    
    function inside($uid, $rid)
    {
       $ins = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE uid='".$uid."' AND rid='".$rid."'"));
            if($ins[0]>0)
            {
              return true;
            }else{
              return false;
    }
    }
    ///////////////////////////////////function isuser
    
    function inside2($uid, $rid)
    {
       $ins = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE chatter='".$uid."' AND rid='".$rid."'"));
            if($ins[0]>0)
            {
              return true;
            }else{
              return false;
    }
    }
    
    //////////////////////Function add user to online list :P
    
    function addplace($uid,$plc)
    {
     $res = mysql_query("UPDATE ibwf_users SET saan='".$plc."' WHERE id='".$uid."'");
      $res = mysql_query("INSERT INTO ibwf_users SET id='".$uid."', saan='".$plc."'");
      if(!$res)
      {
        //most probably userid already in the online list
        //so just update the place and time
        $res = mysql_query("UPDATE ibwf_users SET saan='".$plc."' WHERE id='".$uid."'");
    }
    }
    
    ///////////////////////////////////////////is shielded?
    
    function locked($uid, $rid)
    {
      $not = mysql_fetch_array(mysql_query("SELECT locked FROM ibwf_rooms WHERE id='".$rid."'"));
      if($not[0]=='1')
      { return true;
      }else{
        return false;
      }
    }
    ///////////////////////////////////////////is shielded?
    
    function turn($uid)
    {
      $not = mysql_fetch_array(mysql_query("SELECT hit FROM ibwf_users WHERE id='".$uid."'"));
      if($not[0]=='1')
      { return true;
      }else{
        return false;
      }
    }
    ///////////////////////////////////////////is shielded?
    
    function noact($uid)
    {
      $not = mysql_fetch_array(mysql_query("SELECT hit FROM ibwf_users WHERE id='".$uid."'"));
      if($not[0]=='3')
      { return true;
      }else{
        return false;
      }
    }
    function have()
    {
        $nopop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_quiz"));
       return $nopop[0];
    }
    function correct($answer,$id)
    {
      $uid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_quizrooms WHERE answer='".$answer."' AND id='".$id."'"));
      return $uid[0];
    }
    
    /////////////////////////////////////////////////paper
    function echo_scores($pscore,$cscore,$pchoice,$cchoice,$wld)
    {
    
    	if ($wld == "won")
             {
    	
            	$text = "You chose $pchoice. Your opponent chose $cchoice. You won.";
                
             }
            
            if ($wld == "lost")
              {
    	
               	$text = "You chose $pchoice. Your opponent chose $cchoice. You lost.";
    	    
             }
    	
            if ($wld == "drew")
              {
    	
               	$text = "You chose $pchoice. So did your opponent. You draw.";
                   
                     }
                
            echo "You: $pscore<br/>";
    	echo "Opponent: $cscore<br/>";
            echo "$text<br/>";
    	 echo $game;
            return true;
    }
    
    /////////////////////////////////////////////////paper
    function echo_scores2($uid,$poy,$pchoice,$cchoice,$wld)
    {
    $nopl = mysql_fetch_array(mysql_query("SELECT byuid FROM ibwf_jnp WHERE id='".$poy."'"));
    	$unick = getnick_uid($nopl[0]);
    if ($wld == "won")
             {
    	
            	$text = "You chose $pchoice, $unick chose $cchoice. You WON!";
                
             }
            
            if ($wld == "lost")
              {
    	
               	$text = "You chose $pchoice, $unick chose $cchoice. You LOSE!";
    	
             }
    	
            if ($wld == "drew")
              {
    	
               	$text = "You chose $pchoice, $unick chose $cchoice. DRAW!";
                   
                     }
                
            echo "$text<br/>";
    	
            return true;
    }
    
    
    function strClean($text){
    $tex = strip_tags($text);
    $tex = stripslashes(stripslashes($tex));
    return $tex;
    
    }
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////
    Attached Files
    Last edited by capofret; 08.06.09, 04:11.
Working...
X