Jump to content

Euphy

Members
  • Posts

    2997
  • Joined

  • Last visited

  • Days Won

    73

Posts posted by Euphy

  1. Now Available on GitHub!

     

    As some of you might have noticed already, rAthena now has an up-to-date repository on GitHub. We've added basic support for it in our repository, so you'll be able to choose between running a GIT- or SVN-based server.

    Why GIT?

    GIT's non-linear environment allows users to choose specific commits to merge, making updating less of a hassle for more-customized servers. Users can easily submit pull requests to add their own code to rAthena, following a review by our developers.

     

    GitHub also allows users to comment on commits and specific lines of code, and offers its own code viewer and Timeline for commits.

    How this affects you

    If you're happy with SVN (still hosted by SourceForge), this change will not affect you at all. All of our GIT commits will be automatically pushed into our SVN, so you'll be--at most--one minute behind on updates. We'll continue to reference changes with revision numbers. And even though we now have GIT Timeline, Trac will remain available for use.

    Thanks for reading!

    • Upvote 13
  2. Both would involve setting and checking a variable upon executing your commands.

     

    -If the user leaves the channel, they will not automatically rejoin again, they have to manually rejoin each time.

    You can set a bit variable via source upon executing "@channel leave <>", or bind the atcommand to a script and set the variable that way.

     

    or -an @command that will disable autojoining channels for that user.

    Much easier. Bind an atcommand that sets the variable.

    -	script	#chan_control	-1,{
    OnInit:
    	bindatcmd("channeljoin",strnpcinfo(0)+"::OnChannelJoin");
    	end;
    OnChannelJoin:
    	set channel_join_off, !channel_join_off;
    	message strcharinfo(0),"Channel auto-join is now "+((channel_join_off)?"disabled":"enabled")+".";
    	end;
    OnPCLoginEvent:
    	if (!channel_join_off) {
    		atcommand "@join #main";
    		atcommand "@join #support";
    		atcommand "@join #trade";
    	}
    	end;
    }
    
    • Upvote 2
    • MVP 1
  3. Here's a small example of instancing Prontera.

    10,Instanced Prontera,3600,prontera,155,150,prontera
    prontera,150,150,0	script	Instanced Prontera#a	101,{

    set .@instance$, "Instanced Prontera";

    if (instance_id()) {

    if (select("Enter Instance.:Cancel.") == 2) end;

    if (instance_enter(.@instance$) != 0) {

    mes "Instance entrance ^FF0000failed^000000.";

    close;

    }

    } else {

    if (select("Create Instance.:Cancel.") == 2) end;

    if (instance_create(.@instance$) < 0) {

    mes "Instance creation ^FF0000failed^000000.";

    close;

    }

    mes "Instance created.";

    close2;

    instance_enter(.@instance$);

    }

    end;

    OnInstanceInit:

    disablenpc instance_npcname(strnpcinfo(0));

    end;

    }

    prontera,150,150,0 script Instanced Prontera#b 101,{

    if (.Finished) {

    specialeffect2 EF_MVP;

    getitem 512,1;

    dispbottom "Congratulations!";

    instance_destroy;

    end;

    }

    mes "Are you ready to begin?";

    next;

    if(select("Yes.:No.") == 1) {

    mes "Good luck.";

    donpcevent instance_npcname("#ins_prontera_mobs")+"::OnEnable";

    donpcevent instance_npcname(strnpcinfo(0))+"::OnDisable";

    } else

    mes "Take your time.";

    close;

    OnInstanceInit:

    enablenpc instance_npcname(strnpcinfo(0));

    set .Finished,0;

    waitingroom "Click me!",0;

    end;

    OnDisable:

    disablenpc instance_npcname(strnpcinfo(0));

    end;

    OnEnable:

    enablenpc instance_npcname(strnpcinfo(0));

    set .Finished,1;

    end;

    OnInit:

    disablenpc strnpcinfo(0);

    end;

    }

    prontera,0,0,0 script #ins_prontera_mobs -1,{

    OnEnable:

    set .@map$, instance_mapname("prontera");

    set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";

    mapannounce .@map$,"Welcome to Instanced Prontera.",bc_all;

    sleep 4000;

    mapannounce .@map$,"Kill 50 monsters for a prize.",bc_all;

    sleep 1000;

    freeloop(1);

    for(set .@j,0; .@j<10; set .@j,.@j+1) {

    set .@size, query_sql("SELECT ID FROM `mob_db` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 ORDER BY rand() LIMIT 100", .@mob);

    for(set .@i,0; .@i<.@size; set .@i,.@i+1)

    monster .@map$,0,0,"--ja--",.@mob[.@i],1,.@label$;

    set .MyMobCount, .MyMobCount + .@size;

    }

    freeloop(0);

    end;

    OnMyMobDead:

    set .@map$, instance_mapname("prontera");

    set .@label$, instance_npcname(strnpcinfo(0))+"::OnMyMobDead";

    if (.MyMobCount - mobcount(.@map$,.@label$) >= 50) {

    killmonster .@map$,.@label$;

    mapannounce .@map$,"Congrats. We're done here! Please return to me as soon as possible.",bc_all;

    donpcevent instance_npcname("Instanced Prontera#b")+"::OnEnable";

    }

    end;

    }

  4. It's actually pretty easy to do with my new version of the Endless Tower script (v2.2).

    • Add the 'nomobloot' mapflag to all x@tower maps, which will disable drops from all monsters except MVPs.
    • In the "OnMyMobDead" labels, create your desired drops with either 'makeitem' or simply 'getitem' (using any conditions you need).
×
×
  • Create New...