Jump to content
  • 0

help script announce


ryusama2007

Question


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   0
  • Joined:  04/20/12
  • Last Seen:  

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?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


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


if ( titu01 )

announce "xxxxxxxxxxxxxxxxxxxxxxxx",0;

else if ( titu02 )

announce "yyyyyyyyyyyyyyyyyyyyyyyyyyyy",0;

end;

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2351
  • Joined:  10/28/11
  • Last Seen:  

Does not work

 

what is "Does not work" ??? /hmm

error ? or what ? show it ... elaborate more...

never said only "Does not work" .... 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   0
  • Joined:  04/20/12
  • Last Seen:  

nothing happens not appear any message for either type.

 

remembering that message and launched by npc nobody clicks sends nothing to her.

Edited by ryusama2007
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Are you using rAthena? Or maybe there's something wrong with your script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   0
  • Joined:  04/20/12
  • Last Seen:  

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;
 
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   0
  • Joined:  04/20/12
  • Last Seen:  

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?

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...