Jump to content
  • 0

Need help for a event script


wOni

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

Hi need help to this script, i want to add after an hour all character will be go back to savepoint and announce that the event is ended.

 

 

Shod Time Enable
 
0400 ~ 0500
1200 ~ 1300
1600 ~ 1700
2300 ~ 2359

prontera,168,126,3 script Shod 689,{

mes "[ ^0065DFShod^000000 ]";
mes "Hello, im Shod";
mes "I Can Help You Warp To Your Death";
mes "You Ready?";
switch(select("Yes please:No")) {
case 1:
announce ""+ strcharinfo(0) +" Has Entered The Map",bc_all; //announce and end
warp "gld_dun01",119,20;
close;
end;
case 2:
close;

}

OnClock0400:
OnClock1200:
OnClock1600:
OnClock2300:
announce "Shod Event are now Enable.",0;
hideoffnpc "Shod";
sleep ( 60 * 60000 );


OnInit:
hideonnpc "Shod";
while (1) {
delwaitingroom;
set .@count, getmapusers("gld_dun01") + getmapusers("gld_dun02") + getmapusers("gld_dun03") + getmapusers("gld_dun04");
waitingroom "Map ["+ .@count + ((.@count==1) ? " Soul" : " Souls") +"]",0;
sleep 1000;
}
end;
}
 

i try adding additional script like this

- script AutoDoom -1,{
OnClock0501:
OnClock1301:
OnClock1701:
OnClock2401:
atcommand "@doommap gld_dun01";
atcommand "@doommap gld_dun02";
atcommand "@doommap gld_dun03";
atcommand "@doommap gld_dun04";
announce "Shod Event are now Disable.",0;
end;
}

but sad to say its not working..

 

thanks for the help

Edited by wOni
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

On 11/4/2016 at 10:36 AM, wOni said:

got this prob

update your rAthena, addrid script command has been added long ago.

 

or just change to this ...

for ( .@i = 1; .@i <= 5; .@i++ ) {
	mapwarp "gld_dun0"+.@i,"prontera",155,181;
	mapannounce "gld_dun0"+.@i,"Event Ended.",bc_all;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   345
  • Joined:  02/26/12
  • Last Seen:  

Not tested, but something like that

prontera,168,126,3 script Shod 689,{

mes "[ ^0065DFShod^000000 ]";
mes "Hello, im Shod";
mes "I Can Help You Warp To Your Death";
mes "You Ready?";

if( select( "Yes please","No" ) == 2 )
	close;


announce ""+ strcharinfo(0) +" Has Entered The Map",bc_all,0x00ff00; //announce and end
warp "gld_dun01",119,20;
end;


OnClock0400:
OnClock1200:
OnClock1600:
OnClock2300:
	stopnpctimer;
	announce "Shod Event are now Enable.",bc_all,0x00ff00;
	hideoffnpc "Shod";
	initnpctimer;
	end;


// after 1 hour kick all from map <gld_dun01-04>
OnTimer60000:
	stopnpctimer;
	announce "The even has been finished",bc_all,0x00ff00;
	for(.@i = 1; .@i < 5; .@i++) {
		addrid 5, "gld_dun0"+.@i;
		warp "SavePoint",0,0;
		detachrid;
	}
	end;


OnInit:
	hideonnpc "Shod";
	while(1) {
		delwaitingroom;
		set .@count, getmapusers("gld_dun01") + getmapusers("gld_dun02") + getmapusers("gld_dun03") + getmapusers("gld_dun04");
		waitingroom "Map ["+ .@count + ((.@count==1) ? " Soul" : " Souls") +"]",0;
		sleep 1000;
	}
	end;

}
Btw, open script_commands and find *mapwarp & *addrid, detach, and initnpctimer commands. Edited by Anacondaqq
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

On 11/3/2016 at 3:46 AM, Nero said:

killmonsterall "map";

hi, all character in map gld_dun01~04 not monster.

not monster, player. warp all to savepoint

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

Not tested, but something like that

prontera,168,126,3 script Shod 689,{

mes "[ ^0065DFShod^000000 ]";
mes "Hello, im Shod";
mes "I Can Help You Warp To Your Death";
mes "You Ready?";

if( select( "Yes please","No" ) == 2 )
	close;


announce ""+ strcharinfo(0) +" Has Entered The Map",bc_all,0x00ff00; //announce and end
warp "gld_dun01",119,20;
end;


OnClock0400:
OnClock1200:
OnClock1600:
OnClock2300:
	stopnpctimer;
	announce "Shod Event are now Enable.",bc_all,0x00ff00;
	hideoffnpc "Shod";
	initnpctimer;
	end;


// after 1 hour kick all from map <gld_dun01-04>
OnTimer60000:
	stopnpctimer;
	announce "The even has been finished",bc_all,0x00ff00;
	for(.@i = 1; .@i < 5; .@i++) {
		addrid 5, "gld_dun0"+.@i;
		warp "SavePoint",0,0;
		detachrid;
	}
	end;


OnInit:
	hideonnpc "Shod";
	while(1) {
		delwaitingroom;
		set .@count, getmapusers("gld_dun01") + getmapusers("gld_dun02") + getmapusers("gld_dun03") + getmapusers("gld_dun04");
		waitingroom "Map ["+ .@count + ((.@count==1) ? " Soul" : " Souls") +"]",0;
		sleep 1000;
	}
	end;

}
Btw, open script_commands and find *mapwarp & *addrid, detach, and initnpctimer commands.

 

 

got this prob 

 

Untitled1.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

 

On 11/11/2016 at 2:15 AM, Emistry said:

update your rAthena, addrid script command has been added long ago.

 

or just change to this ...


for ( .@i = 1; .@i <= 5; .@i++ ) {
	mapwarp "gld_dun0"+.@i,"prontera",155,181;
	mapannounce "gld_dun0"+.@i,"Event Ended.",bc_all;
}

 

i manually added  addrid  1~5

but the problem is when the event start it will never close and players dont warp on savepoint or prontera

 

trying this one 

for ( .@i = 1; .@i <= 5; .@i++ ) {
	mapwarp "gld_dun0"+.@i,"prontera",155,181;
	mapannounce "gld_dun0"+.@i,"Event Ended.",bc_all;
}
Edited by wOni
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   2
  • Joined:  04/20/13
  • Last Seen:  

SOLVED

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   2
  • Joined:  12/18/11
  • Last Seen:  

killmonsterall "map";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...