[Castle Siege Warfare] Auto Reward Points

Results 1 to 2 of 2
  1. #1
    Proficient Member Sinkaw140 is offline
    MemberRank
    Sep 2011 Join Date
    154Posts

    ! [Castle Siege Warfare] Auto Reward Points

    Hello Ragezone / Mu Online Community,

    I having problem on sql script on Castle Siege Warfare Auto Reward Points /

    USE [MuOnline]
    GO
    /****** Object: Trigger [dbo].[CSReward] Script Date: 09/06/2016 16:40:12 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER trigger [dbo].[CSReward] on [dbo].[MuCastle_DATA]
    after update
    as
    begin

    update REWARD set WCoinC = isnull(WCoinC,0)+1
    from inserted I
    left join deleted MUD on I.MAP_SVR_GROUP = MUD.MAP_SVR_GROUP
    join GuildMember GUM on I.OWNER_GUILD = GUM.G_Name
    join Character CHR on CHR.Name = GUM.Name
    join dbo.CashShopData REWARD on REWARD.AccountID = REWARD.AccountID
    where MUD.MAP_SVR_GROUP is not null
    and I.OWNER_GUILD<>MUD.OWNER_GUILD

    end
    I already insert this SQL Script / Trigger "Completely Successfully" But the problem is all accounts/character gained "WCC Points" after i change the OWNER_GUILD on MuCastleDATA. I just want only to add only who occupied the Castle Siege Warfare winners . . Anyone can help?

    P.S: Sorry for this shitty english xD


  2. #2

    Re: [Castle Siege Warfare] Auto Reward Points

    @jacubb @RevolGaming

    it gives to all acc/chars because
    update REWARD set WCoinC = isnull(WCoinC,0)+1

    it should be something like
    IF OWNER_GUILD = Sinkaw140 update reward set wcoinc =isnull(wcoinc,0)+1
    that tells the query only IF the owner_guild Won then it will update the wcoins, but im not sure whats the correct Column for warfare winners, try to find it and re- test.



Advertisement