Jump to content
  • 0

Send to all Online Players


Yoona

Question


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.03
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

Can someone please give me this script?

 

 

- A NPC that only GM can Talk

- A NPC that will send an Item to all Online Players except those players whose on Vend Mode and Pub

- A NPC that will show How many Players online

 

 

 

thats all i really wanted please! 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

Like this ?

prontera,155,170,5	script	Send an item	56,{
	if( getgmlevel() < 98 ) end;	// only gm >= 99 can talk
	mes "There is currently ^ff0000"+ getusers(1) +"^000000 player(s) online.";
	mes "You can add an item to all player, except whose on vending or chatting mode.";
	next;
	if( select( "Send an item ID", "Leave" ) -1 ) close;
	input .@item_id;
	if( getiteminfo( .@item_id,0 ) == -1 ) {
		mes "Unknown item id.";
		close;
	}
	set .@item_name$, getitemname( .@item_id );
	set .@gm_name$, strcharinfo(0);
	do {
		set .@size, query_sql( "SELECT `account_id`, `name` from `char` where `online` = '1' and `char_id` != "+ getcharid(0) +" order by `account_id` desc limit "+ ( .@loop *128 ) +", 128", .@account_id, .@name$ );
		for( set .@i, 0; .@i < .@size; set .@i, .@i +1 ) {
			if ( checkvending( .@name$[.@i] ) || checkchatting( .@name$[.@i] ) ) continue;
			getitem .@item_id, 1, .@account_id[.@i];
			message rid2name( .@account_id[.@i] ), "GM "+ .@gm_name$ +" give you an "+ .@item_name$ +".";
		}
		set .@loop, .@loop +1;
	}
	while( .@size );
	mes "Done.";
	close;
}
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...