Jump to content

dubstep

Members
  • Posts

    35
  • Joined

  • Last visited

Posts posted by dubstep

  1. Hi All, anyone knows why this script not showing and not getting the reward if you're the only 1 in the map? There is no announcement too that you're the winner.

    In this screenshot, I already killed my 2nd account and I am the only one in the map:

    unknown.png

    -	script	event_start	-1,{
    OnMinute00:
    	announce "Death Match Event starts in a few minutes!",0;
    	sleep 5000;
    	announce "Register at the NPC 'Death Match'. You have 2 minutes to sign up!",0;
    	pvpoff "guild_vs2";
    	enablenpc "Death Match";
    	donpcevent "agasper_dm::OnDM";
    	end;
    }
    
    prontera,150,170,5	script	Death Match	811,{
    	mes "[ Death Match ]";
    	mes "Hi, "+strcharinfo(0)+"!";
    	mes "Cost of registration: ^ff0000"+.reg_price+"^000000 Zeny!";
    	if (select("I agree:Exit") == 2)
    		close;
    	if (BaseClass == Job_Novice) {
    		next;
    		mes "[ Death Match ]";
    		mes "Beginners can not participate in the event!";
    		close;
    	}
    	if (Zeny < .reg_price){
    		next;
    		mes "[ Death Match ]";
    		mes "Where's the money?";
    		close;
    	}
    	set Zeny, Zeny - .reg_price;
    	set .@index, getarraysize(.player_list);
    	if (.@index == 0)
    		set .@index, 1;
    	set .player_list[.@index], getcharid(3);
    	set deathmatch_index, .@index;
    	warp "guild_vs2", 50, 50;
    	close;
    
    OnInit:
    	set .reg_price, 500000;
    	disablenpc "Death Match";
    	end;
    }
    -	script	agasper_dm	-1,{
    OnClear:
    	deletearray getvariableofnpc(.player_list[0], "Death Match"), getarraysize(getvariableofnpc(.player_list, "Death Match"));
    	return;
    
    OnDM:
    	sleep 120000;
    	disablenpc "Death Match";
    	if(getmapusers("guild_vs2") < 2){
    		announce "In the Event gathered less than 2-man! Event is canceled!",0;
    		callsub(OnClear);
    		mapwarp "guild_vs2", "prontera", 150, 170;
    		end;
    	}
    	announce "Event 'Death Match' is start!",0;
    	pvpon "guild_vs2";
    	initnpctimer;
    	end;
    
    OnPCDieEvent:
    	set .@dead, 1;
    OnPCLogoutEvent:
    	if (strcharinfo(3) != "guild_vs2")
    		end;
    	if (deathmatch_index < 1)
    		end;
    
    	set getvariableofnpc(.player_list[deathmatch_index], "Death Match"), -1;
    
    	if (.@dead == 1) {
    		warp "SavePoint", 0, 0;
    		atcommand "@alive"+strcharinfo(0);
    		dispbottom "[Death Match]: You lose =(";
    	}
    	end;
    
    OnTimer5000:
    	switch(getmapusers("guild_vs2")) {
    		case 0:
    			announce "Event 'Death Match' end as the players in the event is not!", 0;
    			stopnpctimer;
    			callsub(OnClear);
    			break;
    		case 1:
    			callsub(OnWin);
    			break;
    		default:
    			mapannounce "guild_vs2", getmapusers("guild_vs2")+" Player(s) are still in the event!", 0;
    			initnpctimer;
    		break;
    	}
    	end;
    
    OnWin:
    	for(set .@i, 0; .@i < getarraysize(getvariableofnpc(.player_list, "Death Match")); set .@i, .@i + 1) {
    		if (getvariableofnpc(.player_list[.@i], "Death Match") != -1) {
    			set .@account_id, .player_list[.@i];
    			break;
    		}
    	}
    	if (attachrid(.@account_id)) {
    		callsub(OnPCKillEvent);
    	}
    	end;
    
    OnPCKillEvent:
    	.@players = getarraysize(getvariableofnpc(.player_list, "Death Match"));
    	if(strcharinfo(3) == "guild_vs2" && getmapusers("guild_vs2") < 2) {
    		stopnpctimer;
    		announce "Player "+strcharinfo(0)+" won the event 'Death Match' and get "+ .reg_price * .@players +" Zeny!",0;
    		set Zeny, Zeny + .reg_price * .@players;
    		message strcharinfo(0),"You get "+ .reg_price*.@players +" Zeny!";
    		warp "SavePoint",0,0;
    		callsub(OnClear);
    	}
    	end;
    
    }
    
    guild_vs2	mapflag	noteleport
    guild_vs2	mapflag	nowarp
    guild_vs2	mapflag	nowarpto
    guild_vs2	mapflag	nobranch
    guild_vs2	mapflag	noicewall
    guild_vs2	mapflag	pvp_noguild
    guild_vs2	mapflag	pvp_noparty
    guild_vs2	mapflag	nomemo
    guild_vs2	mapflag	nodrop

     

  2. Hi, anyone know why my server gets lag everytime I change the system time? 

    This is the scenarios:

    1st scenario: Server is running and under maintenance. I changed the system time to UTC+8 with this command: 

    date -s "9 OCT 2018 11:14:00"

    After that, my server is now hanging even it has 5Gb Ram, 2 CPUs, 300 HDD Drive (not full).

    2nd scenario: I rebooted the VPS of my server to refresh all the processes. The very first command I used after I login thru SSH is the command to set the date then after that, the commands to make the server up. But still, the server still too lag.

    3rd scenario: I rebooted the VPS of the server again without doing anything in TIME and yes, the lags vanished. This already happened for 2 maintenance already.

    Note: There is no error message(s) in console

    Anyone have a suggestion?

    Thanks!

  3. Hi there! Is it possible to automatically change the HP of a specific mob (1288-Emperium) everyday?

    E.g.:

    Monday = 1m

    Tuesday = 5m

    Wed = 1m

    Thurs = 5m

    Can you give me a script if it's possible? Thank you in advance!

  4. Hi Sir, I have fixed Euphy's Woe Controller but my problem now is how to make the NPC only 1st job can enter the castle? Cause I already tried many times but still, I can't make it that only 1st jobs can enter :(

            if ((eaclass()&(EAJL_2|EAJL_UPPER)) || BaseLevel>=60) {
                mes "I'm sorry, you can't enter the sacred Novice Castles place.";
                emotion e_sry;
            } else if (select("Warp me to Novice Castles","Cancel") == 1)

     

    I think the problem is in if function. Already tried various function but still failed. Can you fix that for me, sir? :( Sorry for bad english

     

  5. I've read that the WoE Controller can only handle 34 Castles and it is already 32 Castles included in the controller.

    I responded to Brynner somewhere else about this, but here it is again. I can't include Novice castles in my script due to the way I wrote it - I used a bit integer to hold all the castle values (so the max would be 32) and I'd have 34 castles if I included Novice castles~

    Also, you can probably just cut and paste Toasty's chatroom if you really want it, but it's not needed imo. e.e

    Link: https://rathena.org/board/topic/67001-novice-castle-woe/

×
×
  • Create New...