Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ALTER TABLE `char` ADD `pvp_notification` TINYINT(3) UNSIGNED NOT NULL;
- */
- prontera,157,184,3 script PvP Warper 730,{
- set .@gid,getcharid(0);
- query_sql( "SELECT `pvp_notification` FROM `char` WHERE `char_id` = "+.@gid+" LIMIT 1",.@notification );
- switch( select(
- "Yes,I want to enter.",
- "No, thanks.",
- ( .@notification )?"Disable Notification.":"Notify me when someone enter."
- )) {
- case 1:
- warp .pvp_map$,0,0;
- query_sql( "SELECT `account_id`,`char_id` FROM `char` WHERE `char_id` <> "+.@gid+" AND `online` = 1 AND `pvp_notification` = 1 LIMIT 128",.@aid,.@cid );
- set .@aid_size,getarraysize( .@aid );
- set .@char_name$, strcharinfo(0);
- while ( .@i < .@aid_size ) {
- if ( isloggedin( .@aid[.@i],.@cid[.@i] ) )
- if ( attachrid( .@aid[.@i] ) )
- if ( strcharinfo( 3 ) == .pvp_map$ ) {
- dispbottom .@char_name$+" entered PVP Room!";
- announce .@char_name$+" entered PvP Room!",bc_self;
- }
- set .@i,.@i + 1;
- }
- detachrid;
- end;
- case 3:
- set .@notification,!.@notification;
- query_sql( "UPDATE `char` SET `pvp_notification` = "+.@notification+" WHERE `char_id` = "+.@gid+" LIMIT 1" );
- dispbottom "Notification "+( ( .@notification ) ? "Enabled":"Disabled" )+".";
- default:
- break;
- }
- close;
- OnInit:
- set .pvp_map$, "5@tower";
- setmapflag .pvp_map$,mf_pvp;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement