Jump to content
  • 0

Teleport when the event ends


Suigetsu

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   1
  • Joined:  12/30/19
  • Last Seen:  

Good night masters!
Could someone please help me with a script?

I need all players on the prt_are_in map to be teleported to prontera once the last TREASURE_BOX is destroyed.

Script:

Spoiler

OnClock2130: callsub ComecarWot;

ComecarWot:
		announce "[Treasure War] It will start in 5 minutes.",8;
		killmonsterall "prt_are_in";
		removemapflag "prt_are_in",mf_noskill;
		initnpctimer;
		set $woton,1;
		end;
OnTimer60000:
		announce "[Treasure War] It will start in 4 minutes.",8;
		end;
OnTimer120000:
		announce "[Treasure War] It will start in 3 minutes.",8;
		end;
OnTimer180000:
		announce "[Treasure War] It will start in 2 minutes.",8;
		end;
OnTimer240000:
		announce "[Treasure War] It will start in 1 minutes.",8;
		end;

OnTimer300000:
		gvgon "prt_are_in";
		announce "[Treasure War] Started!",8;
		set $woton,0;
		end;

OnTimer900000:
		stopnpctimer;
		setmapflag "prt_are_in",mf_noskill;
		gvgoff "prt_are_in";
		if (getmapusers("prt_are_in") == 0 ){
		end;
				}
		mapannounce "prt_are_in","There are 10 seconds left for the chests to appear.",8;
		sleep 10000;
		monster "prt_are_in",178,87,"Treasure's box",1324,1,strnpcinfo(0)+"::OnThisMobDeath";
		monster "prt_are_in",126,139,"Treasure's box",1324,1,strnpcinfo(0)+"::OnThisMobDeath";

OnThisMobDeath:
		set @GID,getcharid(2);
		set .@ACC,getcharid(3);
		query_sql "UPDATE `login` SET `pontoswot` = `pontoswot` +100 WHERE `account_id`="+.@ACC+"";
		announce "[Treasure War] The player ["+strcharinfo(0)+"] of the clan ["+getguildname(@GID)+"] just destroyed one of the chests!",8;
		atcommand "@cash 100";
		set .@GUILD,getcharid(2);
		query_sql "UPDATE `guild` SET `baus` = `baus` +1 WHERE `guild_id`="+.@GUILD+"";
		query_sql "UPDATE `guild` SET `pontosgwot` = `pontosgwot` +50 WHERE `guild_id`="+.@GUILD+"";
		end;
				}

 

Sincerely, thank you very much.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   39
  • Joined:  01/13/12
  • Last Seen:  

1 hour ago, Suigetsu said:

Good night masters!
Could someone please help me with a script?

I need all players on the prt_are_in map to be teleported to prontera once the last TREASURE_BOX is destroyed.

Script:

  Reveal hidden contents


OnClock2130: callsub ComecarWot;

ComecarWot:
		announce "[Treasure War] It will start in 5 minutes.",8;
		killmonsterall "prt_are_in";
		removemapflag "prt_are_in",mf_noskill;
		initnpctimer;
		set $woton,1;
		end;
OnTimer60000:
		announce "[Treasure War] It will start in 4 minutes.",8;
		end;
OnTimer120000:
		announce "[Treasure War] It will start in 3 minutes.",8;
		end;
OnTimer180000:
		announce "[Treasure War] It will start in 2 minutes.",8;
		end;
OnTimer240000:
		announce "[Treasure War] It will start in 1 minutes.",8;
		end;

OnTimer300000:
		gvgon "prt_are_in";
		announce "[Treasure War] Started!",8;
		set $woton,0;
		end;

OnTimer900000:
		stopnpctimer;
		setmapflag "prt_are_in",mf_noskill;
		gvgoff "prt_are_in";
		if (getmapusers("prt_are_in") == 0 ){
		end;
				}
		mapannounce "prt_are_in","There are 10 seconds left for the chests to appear.",8;
		sleep 10000;
		monster "prt_are_in",178,87,"Treasure's box",1324,1,strnpcinfo(0)+"::OnThisMobDeath";
		monster "prt_are_in",126,139,"Treasure's box",1324,1,strnpcinfo(0)+"::OnThisMobDeath";

OnThisMobDeath:
		set @GID,getcharid(2);
		set .@ACC,getcharid(3);
		query_sql "UPDATE `login` SET `pontoswot` = `pontoswot` +100 WHERE `account_id`="+.@ACC+"";
		announce "[Treasure War] The player ["+strcharinfo(0)+"] of the clan ["+getguildname(@GID)+"] just destroyed one of the chests!",8;
		atcommand "@cash 100";
		set .@GUILD,getcharid(2);
		query_sql "UPDATE `guild` SET `baus` = `baus` +1 WHERE `guild_id`="+.@GUILD+"";
		query_sql "UPDATE `guild` SET `pontosgwot` = `pontosgwot` +50 WHERE `guild_id`="+.@GUILD+"";
		end;
				}

 

Sincerely, thank you very much.

I think is it:

Spoiler

OnClock2130: callsub ComecarWot;

ComecarWot:
		announce "[Treasure War] It will start in 5 minutes.",8;
		killmonsterall "prt_are_in";
		removemapflag "prt_are_in",mf_noskill;
		initnpctimer;
		set $woton,1;
		end;
OnTimer60000:
		announce "[Treasure War] It will start in 4 minutes.",8;
		end;
OnTimer120000:
		announce "[Treasure War] It will start in 3 minutes.",8;
		end;
OnTimer180000:
		announce "[Treasure War] It will start in 2 minutes.",8;
		end;
OnTimer240000:
		announce "[Treasure War] It will start in 1 minutes.",8;
		end;

OnTimer300000:
		gvgon "prt_are_in";
		announce "[Treasure War] Started!",8;
		set $woton,0;
		end;

OnTimer900000:
		stopnpctimer;
		setmapflag "prt_are_in",mf_noskill;
		gvgoff "prt_are_in";
		if (getmapusers("prt_are_in") == 0 ){
		end;
				}
		mapannounce "prt_are_in","There are 10 seconds left for the chests to appear.",8;
		sleep 10000;
		set .mob_count, 2;
		monster "prt_are_in",178,87,"Treasure's box",1324,1,strnpcinfo(0)+"::OnThisMobDeath";
		monster "prt_are_in",126,139,"Treasure's box",1324,1,strnpcinfo(0)+"::OnThisMobDeath";

OnThisMobDeath:
		set @GID,getcharid(2);
		set .@ACC,getcharid(3);
		set .mob_count, .mob_count - 1;
		query_sql "UPDATE `login` SET `pontoswot` = `pontoswot` +100 WHERE `account_id`="+.@ACC+"";
		announce "[Treasure War] The player ["+strcharinfo(0)+"] of the clan ["+getguildname(@GID)+"] just destroyed one of the chests!",8;
		atcommand "@cash 100";
		set .@GUILD,getcharid(2);
		query_sql "UPDATE `guild` SET `baus` = `baus` +1 WHERE `guild_id`="+.@GUILD+"";
		query_sql "UPDATE `guild` SET `pontosgwot` = `pontosgwot` +50 WHERE `guild_id`="+.@GUILD+"";
		if (.mob_count <= 0)
		{
			mapwarp "prt_are_in", "prontera", 156, 191;
		}
		end;
				}

 

 

  • Like 1
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...