Jump to content

Hawke

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Hawke

  1. Hi, i'm trying this fun game event made by Goddameit, but it has one problem, at the moment that the players register and then join the game, it results that the number of players on each team are unequal, the team 1 has waaay more players than the team 2.

     
    I tried to analyze the script, but i couldn't find anything solid.
     
    I thought you could help me out with this, because i'm still learning how to create and edit some scripts.
     
    Hope you find out what it is.
     
    Heres the script:

     

    //Author Goddameit
    //Version 2012/06/09 - ''flag_event'' map
    //Web http://bit.ly/Ja4udH
    guild_room,236,283,4 script CTF-Reward 100,{
    getitem 607,1;
    warp "prontera",150,180;
    end;
    }
    prontera,150,185,4 script CTF 100,{
    if(getgmlevel())
    if(select("Activate","Join")==1)
    {
    initnpctimer;
    close;
    }
    function c_flagon {
    while(set(.@i,.@i+1)<=6)
    {
    if(getd("$@flag"+.@i+"_a")==getarg(0))
    return .@i;
    }
    return 0;
    }
    if(!.game)
    {
    mes "No game now.";
    close;
    }
    if(.game==2)
    {
    mes "Starting.";
    close;
    }
    select("Join");
    mes "OK";
    set @ctf_tid,.join==0?1:.join==1?2:.join%2;
    setd ".join_j"+.join,getcharid(3);
    set .join,.join+1;
    close;

    OnTimer120000:
    set .w,0;
    if(.ctf_tp1!=.ctf_tp2)
    {
    announce "[CTF] Team "+set(.w,(.ctf_tp1>.ctf_tp2?1:2))+" win.",0;
    for(set .@io,0;.@io<=.join;set .@io,.@io+1)
    {
    if(attachrid(getd(".join_j"+.@io)))
    {
    getmapxy(@cm$,@cx,@cy,0);
    if(@cm$=="flag_event")
    {
    if(.w==@ctf_tid)
    {
    warp "guild_room",236,283;
    }else
    warp "prontera",150,180;
    }
    setd ".join_j"+.@io,0;
    deltimer "FlagTimer::OnTimerStart";
    }
    }
    set .join,0;
    }
    mapwarp "flag_event","prontera",150,180;
    announce "[CTF] Game Over",0;
    end;
    OnTimer1:
    OnStart:
    set .game,1;
    set .join,0;
    set .ctf_tn1,0;
    set .ctf_tn2,0;
    set .ctf_tp1,0;
    set .ctf_tp2,0;
    sleep2(10000);
    set .game,2;
    setmapflag "flag_event",mf_pvp;
    setmapflag "flag_event",mf_pvp_noguild;
    removemapflag "flag_event",mf_gvg;
    announce "[CTF]!!!",0;
    for(set .@io,0;.@io<=.join;set .@io,.@io+1)
    {
    if(attachrid(getd(".join_j"+.@io)))
    {
    if(@ctf_tid==2)
    warp "flag_event",180,87;
    else
    warp "flag_event",33,93;
    }
    }
    initnpctimer "CTF-Point#1";
    initnpctimer "CTF-Point#2";
    end;
    OnPCDieEvent:
    getmapxy(@cm$,@cx,@cy,0);
    if(@cm$!="flag_event"||.game!=2||!@ctf_tid)
    end;
    addtimer 5000,"CTF-Point#"+@ctf_tid+"::OnDie";
    OnPCEnd:
    OnPCLogoutEvent:
    set @ctf_tu,0;
    set @CTF,0;
    if(set(.@i,c_flagon(getcharid(0))))
    {
    deltimer "FlagTimer::OnTimerStart";
    callfunc "CTF_LimitSkillWhenCareFlag",0;
    getmapxy(.@cm$,.@cx,.@cy,0);
    hideoffnpc "Flag#"+.@i;
    stopnpctimer "Flag#"+.@i;
    setd "$@flag"+.@i+"_a",0;
    movenpc "Flag#"+.@i,.@cx,.@cy;
    if(@ctf_xt&&@ctf_tid)
    {
    specialeffect2 666;
    set @ctf_xt,0;
    mapannounce "flag_event","[CTF] Team "+@ctf_tid+" +1",0;
    setd ".ctf_tp"+@ctf_tid,getd(".ctf_tp"+@ctf_tid)+1;
    mapannounce "flag_event","[sorce] "+.ctf_tp1+" : "+.ctf_tp2,0;
    movenpc "Flag#"+.@i,107,90;
    getmapxy(getvariableofnpc(.cm$,"Flag#"+.@i),getvariableofnpc(.cx,"Flag#"+.@i),getvariableofnpc(.cy,"Flag#"+.@i),1,"Flag#"+.@i);
    }
    end;
    }
    set @ctf_xt,0;
    end;
    }
    flag_event,107,90,4 script Flag#1 722,{
    if(getvariableofnpc(.game,"CTF")!=2||!@ctf_tid)
    end;
    function flag_tid {
    if(getarg(0)<4)
    return 1;
    else
    return 2;
    }
    set .k,atoi(strnpcinfo(2));
    getmapxy(.cm$,.cx,.cy,1);
    getmapxy(.@cm$,.@cx,.@cy,0);
    if(pow(.cx-.@cx,2)>9||pow(.cy-.@cy,2)>9)
    {
    message strcharinfo(0),"Too far!!"+rand(1000)+""+rand(1000);
    end;
    }
    if(@CTF)
    end;
    set @CTF,1;
    setd "$@flag"+.k+"_a",getcharid(0);
    hideonnpc strnpcinfo(0);
    callfunc "CTF_LimitSkillWhenCareFlag",1;
    addtimer 500,"FlagTimer::OnTimerStart";
    end;
    }
    - script FlagTimer -,{

    OnTimerStart:
    set @ctf_tu,@ctf_tu+1;
    if(@ctf_tu>120)
    {
    unitskilluseid getcharid(3),173,1;
    doevent "CTF::OnPCEnd";
    end;
    }
    specialeffect2 589;
    addtimer 500,"FlagTimer::OnTimerStart";
    end;
    }

    flag_event,33,93,4 script CTF-Point#1 111,3,3,{
    end;

    OnDie:
    if(@ctf_tid==2)
    warp "flag_event",180,87;
    else
    warp "flag_event",33,93;
    end;
    OnTouch:
    if(getvariableofnpc(.game,"CTF")!=2||!@ctf_tid)
    end;
    if(@ctf_tid!=atoi(strnpcinfo(2)))
    end;
    set @ctf_xt,1;
    doevent "CTF::OnPCEnd";
    end;

    OnTimer500:
    specialeffect 225;
    sleep(500);
    specialeffect 236;
    sleep(500);
    specialeffect 237;
    sleep(500);
    specialeffect 238;
    initnpctimer;
    end;
    }
    flag_event,180,87,4 duplicate(CTF-Point#1) CTF-Point#2 45,3,3
    flag_event mapflag nowarpto
    flag_event mapflag nosave
    flag_event mapflag nobranch
    flag_event mapflag nopenalty
    flag_event mapflag noreturn
    flag_event mapflag nowarp
    flag_event mapflag noicewall
    flag_event mapflag nomemo

    flag_event mapflag pvp

     

    But i think, this is the part that is causing the problem:

    select("Join");
    mes "OK";
    set @ctf_tid,.join==0?1:.join==1?2:.join%2;
    setd ".join_j"+.join,getcharid(3);
    set .join,.join+1;
    close;
    

    Hope you give an eye with this.

     

    Thank you. :)

  2. Hello.

     

    I have a problem in my server.

     

    I'm using rAthena and my server is set to pre-renewal mode and i can verify it cause the Free Cast is set to 150 dex, the EXP is correct, and everything is fine but... the thing is... that the mob behavior is kinda different like if it was Renewal.

     

    For example, when i use Lex Aeterna or Heal skills on a certain monster (Alligator), even if the skill is not causing any damage on it and its insta cast the mob just turns aggresive on me but it shouldn't be like that. I suppose it is some Renewal feature but i don't know how to reverse it.

     

    Should it be something on SRC files?

     

    Also the MvP behavior is not the correct one. The MvP chases the one that is nearby him not the one who is currently attacking him, and MvP heals when players are watching them not when the MvP is alone out ouf sight.

     

    I hope you could help me out with this.

     

    Thank you. :)

×
×
  • Create New...