Jump to content
  • 0

help script announce


Question

Posted

The command below shows the script overall message to sever all, but I want to change a detail help me please.

 

announce "xxxxxxxxxxxxxxxxxxxxxxxx",0;

 

if I want to do so if the player is with the set titu01 it will appear ( announce "xxxxxxxxxxxxxxxxxxxxxxxx",0; ) if it is with set titu02 will appear else ( announce "yyyyyyyyyyyyyyyyyyyyyyyyyyyy",0; ) how can I do this is to help me give an example?

9 answers to this question

Recommended Posts

Posted

yes use the rathena'll post my script changes ae apra I see.

 

 
-    script    dye    -1,{
end;
 
OnInit:
    if(gettime(3) > 7 && gettime(3) < 19)
    {
        goto DIA;
 
    } else {
 
        goto NOITE;
 
    }
 
NOITE:
    night;
    announce "xxxxxxxxxxxxx",0;
    announce "yyyyyyyyyyyyy",0;
    end;
 
DIA:
    day;
    announce "xxxxxxxxxxxxx",0;
    announce "yyyyyyyyyyyyy",0;
    end;
 
 
OnHour19:
    goto NOITE;
 
OnHour07:
    goto DIA;
 
OnClock1200:
    announce "xxxxxxxxxxxxx",0;
    announce "yyyyyyyyyyyyy",0;
    end;
 
OnClock2400:
    announce "xxxxxxxxxxxxx",0;
    announce "yyyyyyyyyyyyy",0;
    end;
 
}
Posted

The only way to do this is to attach the script to all online characters and announce using the bc_self flag.

set .@j, query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1",.@aid);

for(set .@i,0; .@i<.@j; set .@i,.@i+1) {

if (attachrid(.@aid[.@i])) {

if (titu01)

announce "Message 1",bc_self;

else if (titu02)

announce "Message 2",bc_self;

}

}

end;

  • Upvote 1
Posted

The only way to do this is to attach the script to all online characters and announce using the bc_self flag.

	set .@j, query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1",.@aid);
	for(set .@i,0; .@i<.@j; set .@i,.@i+1) {
		if (attachrid(.@aid[.@i])) {
			if (titu01)
				announce "Message 1",bc_self;
			else if (titu02)
				announce "Message 2",bc_self;
		}
	}
	end;

 

and perfect for the system would be the same as mapannounce?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...