Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: jack en poy (chatroom)

  1. #1
    Senior Member
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    225
    Thanks
    4
    Thanked 8 Times in 4 Posts
    Rep Power
    5

    Default 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 Attached Files
    Last edited by capofret; 08-06-09 at 04:11.
    [Only registered and activated users can see links. Click Here To Register...]
    site closed.
    im busy with other things in life like facebook , send me PM so i can add you
    www.pinoySG.com

    don't ask for help if you're not even helping yourself!
    i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


    [Only registered and activated users can see links. Click Here To Register...]

  2. #2
    Senior Member
    Join Date
    Apr 2009
    Posts
    217
    Thanks
    4
    Thanked 70 Times in 10 Posts
    Rep Power
    0

    Question

    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 at 08:57.

  3. #3
    Senior Member
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    225
    Thanks
    4
    Thanked 8 Times in 4 Posts
    Rep Power
    5

    Default

    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.

  4. #4
    Junior Member
    Join Date
    Mar 2009
    Posts
    13
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    any jnp script for ori's modded version?

  5. #5
    Senior Member
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    225
    Thanks
    4
    Thanked 8 Times in 4 Posts
    Rep Power
    5

    Default

    Quote Originally Posted by coolboiz1 [Only registered and activated users can see links. Click Here To Register...]
    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.

  6. #6
    Senior Member
    Join Date
    Apr 2009
    Posts
    217
    Thanks
    4
    Thanked 70 Times in 10 Posts
    Rep Power
    0

    Default

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

  7. #7
    Senior Member
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    225
    Thanks
    4
    Thanked 8 Times in 4 Posts
    Rep Power
    5

    Default

    Quote Originally Posted by huwad [Only registered and activated users can see links. Click Here To Register...]
    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.

  8. #8
    Senior Member robzky's Avatar
    Join Date
    May 2009
    Posts
    210
    Thanks
    15
    Thanked 7 Times in 4 Posts
    Rep Power
    5

    Default Usage code

    Can you post the usage code?

  9. #9
    Senior Member
    Join Date
    Apr 2009
    Posts
    217
    Thanks
    4
    Thanked 70 Times in 10 Posts
    Rep Power
    0

    Talking

    Quote Originally Posted by robzky [Only registered and activated users can see links. Click Here To Register...]
    Can you post the usage code?
    no usage for Jack En Poy, just change this according to your room id

    Code:
    if($rid=="ROOM ID HERE")

  10. #10
    Senior Member
    Join Date
    Apr 2009
    Posts
    217
    Thanks
    4
    Thanked 70 Times in 10 Posts
    Rep Power
    0

    Thumbs down

    Quote Originally Posted by capofret [Only registered and activated users can see links. Click Here To Register...]
    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.
    LOL.. ived seen the script!! how come it will work without the form to make bet?
    review your script!! :D the form is not included!! other wapsite made it work
    because they mixed it with pinoyaztig's jnp chat script!! but using that single script you uploaded?
    haha!! talk to the hand!! roflmao

    >>Tom Cruise B)
    Attached Files Attached Files
    Last edited by huwad; 08-06-09 at 03:12.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Chatroom problem
    By Pablo in forum Site / Script testing and error fixing
    Replies: 16
    Last Post: 07-05-09, 20:59
  2. Jack En Poy
    By scotspaul in forum Scripts Forum
    Replies: 3
    Last Post: 03-03-09, 03:22
  3. To Modify Messages In Chatroom
    By Leviathan73 in forum Coding Forum
    Replies: 4
    Last Post: 20-01-09, 14:34
  4. Chatroom With Options
    By karimov in forum Coding Forum
    Replies: 3
    Last Post: 04-02-08, 16:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19