Jump to content

mleo1

Community Contributors
  • Content Count

    314
  • Joined

  • Last visited

Posts posted by mleo1


  1. Did not test it, but this will get you the idea

    1. get this https://rathena.org/board/files/file/2344-fluxcp-addon-vote-for-points/

    -	script	voteexp	-1,{	OnDay11: //jan 1	OnDay21: //feb 1	OnDay31: //mar 1		//your normal rate	setbattleflag("base_exp_rate",100);	setbattleflag("base_exp_rate",100);		query_sql("SELECT SUM(points) FROM cp_v4p_voters", .@votes);	if(.@votes>=2000){ 		query_sql "DELETE FROM cp_v4p_voters";				//your 2x rate		setbattleflag("base_exp_rate",200);		setbattleflag("job_exp_rate",200);	}}
    prontera,144,120,6 script Da Vote 1_F_ORIENT_04,{
    query_sql("SELECT SUM(points) FROM cp_v4p_voters", .@votes);
    mes "da vote is currently "+ .@votes;
    close;
    }
     

    2.

    -	script	autopoints	-1,{OnInit:	//############# C O N F I G #############	set .max_idle, 10;				// seconds start idle mode	//####################################### check player.conf	end;OnPCLogoutEvent:	set #seconds_ap, @seconds_ap;	set #iseconds_ap, @iseconds_ap;	end;OnPCLoginEvent:	set @seconds_ap, #seconds_ap;	set @iseconds_ap, #iseconds_ap;OnSec:	if( checkvending()!=2 ){		if( checkidle()==.max_idle ){			set @iseconds_ap, @iseconds_ap + 1;		}else{			set @seconds_ap, @seconds_ap + 1;		}			if( @seconds_ap>=3600 ){			set @seconds_ap, 0;						getitem 7179, 2;			dispbottom "You get 2 pods every 1 hr online";		}				if( @iseconds_ap>=3600 ){					set @iseconds_ap, 0;			getitem 7179, 2;			dispbottom "You get 1 pods every 1 hr idle";		}								addtimer 1000, strnpcinfo(3)+"::OnSec";	}}

     

    3. have 2 maps
     

     

    - script nightday -1,{
    OnClock0600: //day
    mapwarp "mapnight","mapday",0,0;
    enablenpc "spinx#day";
    disablenpc "spinx#night";
    end;
    OnClock1800: //night
    mapwarp "mapday","mapnight",0,0;
    enablenpc "spinx#night";
    disablenpc "spinx#day";
    }
     
    //the portals that lead to spinks
    prontera,99,64,0 warp spinx#day 2,2,mapday,204,90
    prontera,99,64,0 warp spinx#night 2,2,mapnight,204,90

    //mon spawn
    mapday,0,0,0,0 monster Side Winder 1037,2,360000,180000,1
    mapnight,0,0,0,0 monster Bigfoot 1060,2,360000,180000,1

  2.  

    I'm not sure with this too please correct me if im wrong..

    -	script	PvP	-1,{	end;OnInit:	while(1) {	sleep2 5000;	waitingroom "PvP Area [ " + getmapusers("prontera") + " / 100 ] ",0;	end;	}}

    you should use sleep not sleep2 because there is no need for RID?,

    and theres an end inside the while loop, it will end, it will make static pub prolly

    -	script	PvP	-1,{	end;OnInit:	while(1) { 

    the end here is good so if you click the npc it will not run the OnINit code again.

     

     

    Answering to your second question (as the other ones have alreay been addressed): yes, you can omit the end; sentence if it's the last line of code before the closing curly brace of the NPC since it'll be assumed. Anyways, it's good practice to place it to end your script in any case wherever you'd want to end it, to avoid any possibly unexpected behavior.

    thanks, Im getting mindfuck since allmost all scripts in other replies has unnessesary end; im gonna use end if necessary only thanks.

     

     

    3.

     

     

    OnClock<hour><minute>:
    OnMinute<minute>:
    OnHour<hour>:
    On<weekday><hour><minute>:
    OnDay<month><day>:
     
    This will execute when the server clock hits the specified date or time. 
    Hours and minutes are given in military time. ('0105' will mean 01:05 AM). 
    Weekdays are Sun,Mon,Tue,Wed,Thu,Fri,Sat. Months are 01 to 12, days are 01 
    to 31. Remember the zero. :)

    okie thanks, if I searched OnMinute on scriptcommands.txt I should have seen it and not be stucked. Unluckily, I dont remember anything, lol


  3. I forgot scripting, rebeginner :sob:
    Questions

    1 I wanna make the npc make a pub/waitingroom that shows count of players on specific map for may pvp warper, I dunno how, How please

    lol maybe something like this, testing.

    while(1){waitingroomsleepdelwaitingroom}

     


    2 Do you always need an 'end' in the end of script? I always see guys use it, but I dont.

     

    -	script	test	-1,{		announce "1",0;		end;}
    -    script    test    -1,{        announce "1",0;}

     

    Same?

    3. How to run a script once every week, like 12am sunday. what will i say?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.