Jump to content
  • 0

[SOLVED] Ingame Realtime GMs Broadcast NPC


Xtremist

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  196
  • Reputation:   20
  • Joined:  11/20/11
  • Last Seen:  

eA.ws Reference

SQL

create table hourly_announcer (
id tinyint(4) unsigned primary key,
message varchar(211)
) engine = myisam;

eA script

prontera,154,188,5 script announcera 100,{
if ( getgmlevel() < 99 ) end;
set .@nb, query_sql("select * from hourly_announcer order by id", .@id, .@msg$);
if ( .@nb == 0 ) mes " ";
for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 )
 mes "^FF0000"+ .@id[.@i] +". ^000000"+ .@msg$[.@i];
next;
set .@i, select("1:2:3:4:5:6:7:8:9:test");
if ( .@i == 10 ) goto OnMinute00;
do {
 set .@tmp, .@tmp +1 ;
 input getd(".@tmp"+ .@tmp +"$");
} while ( getstrlen( getd(".@tmp"+ .@tmp +"$") ) > 50 && .@tmp < 3 );
if ( .@tmp1$ == " " )
 query_sql "delete from hourly_announcer where id = "+ .@i;
else
 query_sql "replace into hourly_announcer values ( "+ .@i +", '"+ escape_sql(.@tmp1$) + escape_sql(.@tmp2$) + escape_sql(.@tmp3$) +"' )";
close;
OnMinute00:
announce "The Server Time is Now "+ gettime(3) + gettimestr(":%M %p",10), 16;
sleep 2500;
set .@nb, query_sql("select message from hourly_announcer order by id", .@msg$);
for ( set .@i, 0; .@i < .@nb; set .@i, .@i +1 ) {
 announce .@msg$[.@i], 16;
 sleep 2500;
}
end;
}

Problem is :

While I use the "Test" the window remains there.

I m not getting how to get the close button on it.

More enhancement to this if possible smile.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  201
  • Reputation:   47
  • Joined:  11/17/11
  • Last Seen:  

Just add a close2; in this spot (With minor edits ^^)

if ( .@i == 10 ) goto OnMinute00;

to

if ( .@i == 10 ) {
close2;
goto OnMinute00;
}

Edited by Truly
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...