[Tut-Release]How to Fix MPOG Item Shop

Results 1 to 14 of 14
  1. #1
    Valued Member Pauliinho is offline
    MemberRank
    Apr 2009 Join Date
    140Posts

    [Tut-Release]How to Fix MPOG Item Shop

    Not Hard to Fix and i dont know if it works 100% but the basic works






    REALLY IMPORTANT!!!!:
    to work you need to change in zitem IsCashItem="false" to IsCashItem="true"







    First:
    Execute this Fix For Central Bank:
    PHP Code:
    CREATE TABLE [dbo].[AccountItems](
        [
    AID] [intNULL,
        [
    ItemID] [intNULL,
        [
    AIID] [intIDENTITY(1,1NOT NULL,
        [
    RentPeriodRemainder] [intNULL
    ON [PRIMARY
    PHP Code:
    CREATE PROCEDURE [dbo].[spBringAccountItem]
        -- 
    Add the parameters for the stored procedure here
        
    @nAID INT,
        @
    nCID INT,
        @
    nAIID INT
    AS
    BEGIN
        
    -- SET NOCOUNT ON added to prevent extra result sets from
        
    -- interfering with SELECT statements.
        
    SET NOCOUNT ON;

        DECLARE @
    nItemID INT
        SELECT 
    @nItemID=ItemID
        FROM AccountItems
        WHERE AID 
    = @nAID AND AIID = @nAIID

        DELETE FROM AccountItems
        WHERE AID 
    = @nAID AND AIID = @nAIID AND ItemID = @nItemID

        INSERT INTO Items VALUES 
    (@nCID, @nItemIDNULL)
    SELECT 0 As OrderCIID, @nItemID As ItemID

    END 
    PHP Code:
    CREATE PROCEDURE [dbo].[spBringBackAccountItem]
        -- 
    Add the parameters for the stored procedure here
        
    @nAID INT,
        @
    nCID INT,
        @
    nCIID INT
    AS
    BEGIN
        
    -- SET NOCOUNT ON added to prevent extra result sets from
        
    -- interfering with SELECT statements.
        
    SET NOCOUNT ON;

        DECLARE @
    nItemID INT
        SELECT 
    @nItemID=ItemID
        FROM Items
        WHERE CID 
    = @nCID AND CIID = @nCIID

        DELETE FROM Items
        WHERE CID 
    = @nCID AND CIID = @nCIID AND ItemID = @nItemID

        INSERT INTO AccountItems VALUES 
    (@nAID, @nItemIDNULL)

    END 
    PHP Code:
    CREATE PROCEDURE [dbo].[spSelectAccountItem]
        -- 
    Add the parameters for the stored procedure here
        
    @AID INT
    AS
    BEGIN
        
    -- SET NOCOUNT ON added to prevent extra result sets from
        
    -- interfering with SELECT statements.
        
    SET NOCOUNT ON;

        
    SELECT RentPeriodRemainder,AIID,ItemID
        FROM
        AccountItems
        WHERE AID 
    = @AID
    END 
    After That Fix Tables And Scripts :
    Quote Originally Posted by diosz
    good
    Here are the files to the shop working properly = P

    Just go to your database "GunzDB" -> tables -> Right click on "CasShop" Design and then choose edit in my image .....



    do not edit the latest image bn let the "MaxWeight" sorry jiji

    Okz

    then replaced my files for your own and now works

    go to the Web as admin and go to "Add Item to Shop" and add the weapon = P

    Remember to do back up a file and the DB

    Files = http://forum.ragezone.com/attachment...0&d=1233191164
    The last part =)

    Open dbo.AccountItem table And Right Click > Design :



    Now Try To Add, Buy , Use the Items . It Works *-*
    i dont remenber if i forgot something :D

    Credits: Me,Vicio,Diosz,Wesman2232
    Last edited by Pauliinho; 20-05-09 at 06:38 PM.


  2. #2
    Valued Member Alkyron is offline
    MemberRank
    Jun 2007 Join Date
    100Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Nice release , thanks

  3. #3
    Account Upgraded | Title Enabled! JuanMedina is offline
    MemberRank
    Feb 2009 Join Date
    VenezuelaLocation
    227Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Excelent release, 10/10

  4. #4
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    What is this?
    1. What is AccountItems and why is it needed?
    Vico's Central Bank fix? Show me a link, probably old as hell xD
    EDIT : As I thought, the thread was back in 2007. You can't trust anything old to work :P
    Here's my scripts since they look like they have way more information than these ones.

    sp.BringAccountItem :
    Code:
    USE [GunzDB]
    GO
    /****** Object:  StoredProcedure [dbo].[spBringAccountItem]    Script Date: 05/13/2009 22:19:50 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    
    -- 창고 아이템 내 캐릭터로 가져오기 ----------
    CREATE PROC [dbo].[spBringAccountItem]
    	@AID		int,
    	@CID		int,
    	@AIID		int
    AS
    SET NoCount On
    
    DECLARE @ItemID int
    DECLARE @CAID int
    DECLARE @OrderCIID int
    
    DECLARE @RentDate			DATETIME
    DECLARE @RentHourPeriod		SMALLINT
    DECLARE @Cnt				SMALLINT
    
    SELECT @ItemID=ItemID, @RentDate=RentDate, @RentHourPeriod=RentHourPeriod, @Cnt=Cnt
    FROM AccountItem WHERE AIID = @AIID
    
    
    SELECT @CAID = AID FROM Character WHERE CID=@CID
    
    IF @ItemID IS NOT NULL AND @CAID = @AID
    BEGIN
    	BEGIN TRAN ----------------
    	DELETE FROM AccountItem WHERE AIID = @AIID
    	IF 0 <> @@ERROR BEGIN
    		ROLLBACK TRAN 
    		RETURN
    	END
    
    	INSERT INTO CharacterItem (CID, ItemID, RegDate, RentDate, RentHourPeriod, Cnt)
    	VALUES (@CID, @ItemID, GETDATE(), @RentDate, @RentHourPeriod, @Cnt)
    	IF 0 <> @@ERROR BEGIN 
    		ROLLBACK TRAN
    		RETURN 
    	END
    
    	SET @OrderCIID = @@IDENTITY
    
    	INSERT INTO BringAccountItemLog	(ItemID, AID, CID, Date)
    	VALUES (@ItemID, @AID, @CID, GETDATE())
    	IF 0 <> @@ERROR BEGIN
    		ROLLBACK TRAN
    		RETURN
    	END
    
    	COMMIT TRAN ---------------
    
    	SELECT @OrderCIID AS ORDERCIID, @ItemID AS ItemID, (@RentHourPeriod*60) - (DateDiff(n, @RentDate, GETDATE())) AS RentPeriodRemainder
    END
    sp.BringBackAccountItem :
    Code:
    USE [GunzDB]
    GO
    /****** Object:  StoredProcedure [dbo].[spBringBackAccountItem]    Script Date: 05/13/2009 22:19:36 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    
    -- 내 캐릭터 캐쉬아이템을 창고에 넣기 ---------
    CREATE PROC [dbo].[spBringBackAccountItem]
    	@AID		int,
    	@CID		int,
    	@CIID		int
    AS
    SET NOCOUNT ON
    
    DECLARE @ItemID int
    DECLARE @RentDate		DATETIME
    DECLARE @RentHourPeriod	SMALLINT
    DECLARE @Cnt			SMALLINT
    
    DECLARE @HeadCIID 	int
    DECLARE @ChestCIID	int
    DECLARE @HandsCIID	int
    DECLARE @LegsCIID	int
    DECLARE @FeetCIID	int
    DECLARE @FingerLCIID	int
    DECLARE @FingerRCIID	int
    DECLARE @MeleeCIID	int
    DECLARE @PrimaryCIID	int
    DECLARE @SecondaryCIID	int
    DECLARE @Custom1CIID	int
    DECLARE @Custom2CIID	int
    
    SELECT 
    @HeadCIID=head_slot, @ChestCIID=chest_slot, @HandsCIID=hands_slot, 
    @LegsCIID=legs_slot, @FeetCIID=feet_slot, @FingerLCIID=fingerl_slot, @FingerRCIID=fingerr_slot, 
    @MeleeCIID=melee_slot, @PrimaryCIID=primary_slot, @SecondaryCIID=secondary_slot, 
    @Custom1CIID=custom1_slot, @Custom2CIID=custom2_slot
    FROM Character(nolock) WHERE cid=@CID AND aid=@AID
    
    SELECT @ItemID=ItemID, @RentDate=RentDate, @RentHourPeriod=RentHourPeriod, @Cnt=Cnt
    FROM CharacterItem WHERE CIID=@CIID AND CID=@CID
    
    IF ((@ItemID IS NOT NULL) AND (@ItemID >= 400000) AND
       (@HeadCIID IS NULL OR @HeadCIID != @CIID) AND
       (@ChestCIID IS NULL OR @ChestCIID != @CIID) AND 
       (@HandsCIID IS NULL OR @HandsCIID != @CIID) AND
       (@LegsCIID IS NULL OR @LegsCIID != @CIID) AND 
       (@FeetCIID IS NULL OR @FeetCIID != @CIID) AND
       (@FingerLCIID IS NULL OR @FingerLCIID != @CIID) AND 
       (@FingerRCIID IS NULL OR @FingerRCIID != @CIID) AND
       (@MeleeCIID IS NULL OR @MeleeCIID != @CIID) AND 
       (@PrimaryCIID IS NULL OR @PrimaryCIID != @CIID) AND
       (@SecondaryCIID IS NULL OR @SecondaryCIID != @CIID) AND 
       (@Custom1CIID IS NULL OR @Custom1CIID != @CIID) AND
       (@Custom2CIID IS NULL OR @Custom2CIID != @CIID))
    BEGIN
    	BEGIN TRAN -------------
    	UPDATE CharacterItem SET CID=NULL WHERE CIID=@CIID AND CID=@CID
    	IF 0 = @@ROWCOUNT BEGIN
    		ROLLBACK TRAN
    		RETURN
    	END
    
    	INSERT INTO AccountItem (AID, ItemID, RentDate, RentHourPeriod, Cnt) 
    	VALUES (@AID, @ItemID, @RentDate, @RentHourPeriod, @Cnt)
    	IF 0 <> @@ERROR BEGIN
    		ROLLBACK TRAN
    		RETURN
    	END
    	COMMIT TRAN -----------
    END
    sp.SelectAccountItem :
    Code:
    USE [GunzDB]
    GO
    /****** Object:  StoredProcedure [dbo].[spSelectAccountItem]    Script Date: 05/13/2009 22:17:14 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    
    /* 중앙은행 아이템 보기 */
    CREATE PROC [dbo].[spSelectAccountItem]
    	@AID			int
    AS
    SET NOCOUNT ON
    
    DECLARE @NowTime DATETIME
    SELECT @NowTime = GETDATE()
    
    SELECT AIID, ItemID, (RentHourPeriod*60) - (DateDiff(n, RentDate, @NowTime)) AS RentPeriodRemainder
    FROM AccountItem(NOLOCK)
    WHERE AID=@AID ORDER BY AIID

  5. #5
    I am THE DON Joe9099 is offline
    MemberRank
    Jan 2007 Join Date
    England, UkLocation
    3,655Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    O_o who uses mpog?.. Those who have anti sql injection then i feel good for, those who dont, sorry but meh u gonna get haxed some time >.>

  6. #6
    Infraction Banned MicroManiacs is offline
    MemberRank
    Apr 2009 Join Date
    326Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Still not working.lol...
    zitem.xml < iscashitem="true" />
    But Ingame still can't put it in the storage.

  7. #7
    Valued Member Pauliinho is offline
    MemberRank
    Apr 2009 Join Date
    140Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    o Fixed SQL Injection :D Remade some parts of MPOG, and i dont use it.


    @Wes - Micro

    i fixed mine doing this and works(add,buy,use)

  8. #8
    Member jdla1990 is offline
    MemberRank
    Nov 2008 Join Date
    Venezuela - MaracaiboLocation
    93Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    where can I download the complete website?

  9. #9
    Valued Member Pauliinho is offline
    MemberRank
    Apr 2009 Join Date
    140Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Search For MPOG :D

  10. #10
    Valued Member Pauliinho is offline
    MemberRank
    Apr 2009 Join Date
    140Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Quote Originally Posted by MicroManiacs View Post
    Still not working.lol...
    zitem.xml < iscashitem="true" />
    But Ingame still can't put it in the storage.
    Sorry for DP and Thanks Micro, Forgot that =/

  11. #11
    My Religion: Love ♥ diosz is offline
    MemberRank
    Feb 2008 Join Date
    IDK~Location
    314Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Very Nice ^^
    joOJoj

  12. #12
    Valued Member Pauliinho is offline
    MemberRank
    Apr 2009 Join Date
    140Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Quote Originally Posted by diosz View Post
    Very Nice ^^
    joOJoj
    Thanks diosz :D

  13. #13
    Infraction Banned MicroManiacs is offline
    MemberRank
    Apr 2009 Join Date
    326Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    Still not work lol !
    The item's I put it to the storage , It work fine but I can't see the item's in the central bank !
    Well , When i relog it back to my Inventory !
    I think your forget some part :D

  14. #14
    Proficient Member bunny1995 is offline
    MemberRank
    Jul 2008 Join Date
    -Next To You-Location
    193Posts

    Re: [Tut-Release]How to Fix MPOG Item Shop

    excute the sql but dun work, errors?



Advertisement