automatic event

Results 1 to 3 of 3
  1. #1
    cMuServices™ L1ron is offline
    MemberRank
    Jun 2014 Join Date
    315Posts

    automatic event

    hey , i just added auto event ( Guess The number ) that based on Protocol when Proto is 0x00:
    and i try make that people can guess only 3 time and after they guess 3 times they can't do it and i can't think on way to do it ;x


  2. #2
    (づ。◕‿‿◕。) Natzugen is offline
    MemberRank
    Jun 2014 Join Date
    ElbelandLocation
    1,858Posts

    Re: automatic event

    just add a counter variable in the objectstruct and make it zero when the event starts

    Code:
    for(int i = OBJMIN; i =< OBJMAX; i++)
    {
        lpObj->Counter=0;
    }
    an each time they use the command to guess th number just increase

    Code:
    if(IsTheAnswer == FALSE)
    {
       lpObj->Counter ++;
    }
    and an if to chek max tries in the command
    Code:
    if(lpObj->Counter >3)
    {
       GCServerMsgStringSend(lpObj->Index,"You used your 3 attempts.") // or whatever you want
       return;
    }
    or something like that

  3. #3
    cMuServices™ L1ron is offline
    MemberRank
    Jun 2014 Join Date
    315Posts

    Re: automatic event

    Quote Originally Posted by natzugen View Post
    just add a counter variable in the objectstruct and make it zero when the event starts

    Code:
    for(int i = OBJMIN; i =< OBJMAX; i++)
    {
        lpObj->Counter=0;
    }
    an each time they use the command to guess th number just increase

    Code:
    if(IsTheAnswer == FALSE)
    {
       lpObj->Counter ++;
    }
    and an if to chek max tries in the command
    Code:
    if(lpObj->Counter >3)
    {
       GCServerMsgStringSend(lpObj->Index,"You used your 3 attempts.") // or whatever you want
       return;
    }
    or something like that
    thanks bro its really helped me ! :)
    --------------------------------------------------------------------------------------------------------------------------------------------
    More question , that is possible to make Shatter files support Cash Shop Server ?



Advertisement