IN a little php programming.

Results 1 to 6 of 6
  1. #1
    0% Interested Chaitanya is offline
    MemberRank
    Apr 2011 Join Date
    Planet EarthLocation
    330Posts

    IN a little php programming.

    Hello Guys,
    I want to start my private server.
    For that I am using ACP provided by Karthik.

    I want to make a change in one of its elements that,
    The RB is using wz.
    I want to make it RB using stuff, SO can any1 help me in this please ??

    Thanks in Advance !


  2. #2
    Member cigu is offline
    MemberRank
    Apr 2009 Join Date
    77Posts

    Re: IN a little php programming.

    Instead of doing a check on Wz, make the script look into inventory for a particular item code

  3. #3
    0% Interested Chaitanya is offline
    MemberRank
    Apr 2011 Join Date
    Planet EarthLocation
    330Posts

    Re: IN a little php programming.

    Hmm Actually I am short of this programming language..
    I dnt knw a single command in it..
    So i want a help...
    Can u do it for me plz ?

    After the stuff verification and RB success, It should be destroy frm inventory..
    Karthik did programming for That stuff will get replaced by A HP Candy..
    I'll use that feature as RB Gift..

    But I want sm1 to do that programming for me...

    Plz plz plz Its a kind request
    Last edited by Chaitanya; 12-07-11 at 02:47 PM.

  4. #4
    Member ast009 is offline
    MemberRank
    Apr 2011 Join Date
    65Posts

    Re: IN a little php programming.

    Try out php online tutor
    PHP Tutorial
    php.net/manual/en/tutorial.php
    PHP Tutorial - Introduction

    one of the best once from which i have learnt

  5. #5
    Ŋ cvrdheeraj is offline
    MemberRank
    Jul 2006 Join Date
    IndiaLocation
    1,210Posts

    Re: IN a little php programming.

    Do the Following
    PHP Code:
    $m_body = <m_body of character>;
    $m_bodySubstr explode("\_1",$m_body
    So, $m_bodySubstr will be an array which stores the substrings in the m_body. Hence $m_bodySubstr[5] will contain the string for Inventory. It would be

    Code:
    INVEN=9586;32;45386404;0
    We need to remove the "INVEN=" string from the above code.
    PHP Code:
    $InvenItems=substring($m_bodySubstr[5],5);
    $InvenItemsArray explode(";",$InvenItems); 
    $InvenItemsArray will have all the item codes and other attibutes. So $InvenItemsArray[0] is the ItemID, $InvenItemsArray[1] is the Attribute and $InvenItemsArray[2] is the UniqueID and every 3rd element is the Item Code of another item.

    In this way you could check for RB requirement. And if you need to remove any item, empty the Array index which is carrying the value. Write a for loop to construct the array back to the string for both the arrays. You will end up getting a m_body field as a string with the required changes done.
    Last edited by cvrdheeraj; 13-07-11 at 03:13 PM.

  6. #6
    0% Interested Chaitanya is offline
    MemberRank
    Apr 2011 Join Date
    Planet EarthLocation
    330Posts

    Re: IN a little php programming.

    @ cvr Thx for repyl bro..
    As I said , I am short of php programming language,
    Now To edit this, I'll read Basics of php frm tutorials :)
    Last edited by Chaitanya; 13-07-11 at 04:14 PM.



Advertisement