Jump to content
  • 0
Sign in to follow this  
joven15

Mapname Selft Announcer

Question

Can anyone help me please.

 

4iekuw.jpg

 

 

- script Sample -1,{
OnInit:
setarray .Map$, // <mapname>,<Map Nick>,
 
"c_tower3_","Clock Tower, 3nd Floor",
"artz_pvp","TrivalRO PVP";
 
for( set .i,0; .i < getarraysize( .Map$ ) - 1; set .i,.i + 2 )
setmapflag .Map$[.i],mf_loadevent;
end;
 
OnPCLoadMapEvent:
for( set .i,0; .i < getarraysize( .Map$ ) - 1; set .i,.i + 2 )
if( strcharinfo(3) == .Map$[.i] )
announce "You entered map : "+.Map$[.i+1]+" .",bc_self;
end;
}

 

Share this post


Link to post
Share on other sites

37 answers to this question

Recommended Posts

  • 0
-	script	Sample	-1,{	OnInit:		setarray .Maps$[0], "prontera","Prontera Midgard",							"payon","Payon Forest";		.size = getarraysize( .Maps$ );		for ( .@i = 0; .@i < .size; .@i += 2 )			setmapflag .Maps$[ .@i ], mf_loadevent;		end;	OnPCLoadMapEvent:		getmapxy( .@map$, .@x, .@y, 0 );		for ( .@i = 0; .@i < .size; .@i += 2 ) {			if ( .@map$ == .Maps$[ .@i ] )			announce "You entered map : " + .Maps$[ .@i + 1 ] + ".",bc_self;		}		end;}

Share this post


Link to post
Share on other sites
  • 0

Still the same the error on my first post.

 

 

- script Sample -1,{
OnInit:
setarray .Maps$[0], "prontera","Prontera Midgard",
"payon","Payon Forest";
.size = getarraysize( .Maps$ );
for ( .@i = 0; .@i < .size; .@i += 2 )
setmapflag .Maps$[ .@i ], mf_loadevent;
end;
OnPCLoadMapEvent:
getmapxy( .@map$, .@x, .@y, 0 );
for ( .@i = 0; .@i < .size; .@i += 2 ) {
if ( .@map$ == .Maps$[ .@i ] )
announce "You entered map : " + .Maps$[ .@i + 1 ] + ".",bc_self;
}
end;
}

Share this post


Link to post
Share on other sites
  • 0

 

seems like the encoding of your txt file is messed up :P try to create a new file and paste it

can u help me ? i try it many times but still

 

try this

Share this post


Link to post
Share on other sites
  • 0

 

 

seems like the encoding of your txt file is messed up :P try to create a new file and paste it

can u help me ? i try it many times but still

 

try this

still got error. i told u :( :( 

Share this post


Link to post
Share on other sites
  • 0

 

 

 

seems like the encoding of your txt file is messed up :P try to create a new file and paste it

can u help me ? i try it many times but still

 

try this

still got error. i told u :( :(

 

you used the downloaded file? or the old one? I got no error with the downloaded file

Share this post


Link to post
Share on other sites
  • 0

I have same script like this and it's working only on my 2 custom maps, other map like prontera, morroc etc it doesn't announce the name of the map please check thanks..

 

here's the script.. help please!

 

- script where_am_i -1,{
OnPCLoadMapEvent:
set .@map$, replacestr(replacestr(strcharinfo(3), "@","_"), "-","_");
if (getd("."+.@map$+"$") != "")
  announce " [ " + getd("."+.@map$+"$") + " ] ",bc_self,;
end;

OnInit:

set .prontera$, "Prontera City, Capital of Rune Midgard";
set .morocc$, "Morroc Town";
set .06guild_03$, "Guild War Arena";
set .06guild_04$, "Guild War Arena";

end

}

 

Thanks!

Edited by P r o p e r t i e s

Share this post


Link to post
Share on other sites
  • 0

I have same script like this and it's working only on my 2 custom maps, other map like prontera, morroc etc it doesn't announce the name of the map please check thanks..

 

here's the script.. help please!

 

- script where_am_i -1,{

OnPCLoadMapEvent:

set .@map$, replacestr(replacestr(strcharinfo(3), "@","_"), "-","_");

if (getd("."+.@map$+"$") != "")

  announce " [ " + getd("."+.@map$+"$") + " ] ",bc_self,;

end;

OnInit:

 

set .prontera$, "Prontera City, Capital of Rune Midgard";

set .morocc$, "Morroc Town";

set .06guild_03$, "Guild War Arena";

set .06guild_04$, "Guild War Arena";

end

}

 

Thanks!

 

do those maps got loadevent mapflag?

Share this post


Link to post
Share on other sites
  • 0

 

 

 

 

seems like the encoding of your txt file is messed up :P try to create a new file and paste it

can u help me ? i try it many times but still

 

try this

still got error. i told u :( :(

 

you used the downloaded file? or the old one? I got no error with the downloaded file

i uses downloaded file. :( but still.

Share this post


Link to post
Share on other sites
  • 0

 

 

 

 

seems like the encoding of your txt file is messed up :P try to create a new file and paste it

can u help me ? i try it many times but still

 

try this

still got error. i told u :( :(

 

you used the downloaded file? or the old one? I got no error with the downloaded file

oqj9li.jpg

 

STILL :( :( :( :( GOT ERROR :( :( :( :(

Share this post


Link to post
Share on other sites
  • 0

 

I have same script like this and it's working only on my 2 custom maps, other map like prontera, morroc etc it doesn't announce the name of the map please check thanks..

 

here's the script.. help please!

 

- script where_am_i -1,{

OnPCLoadMapEvent:

set .@map$, replacestr(replacestr(strcharinfo(3), "@","_"), "-","_");

if (getd("."+.@map$+"$") != "")

  announce " [ " + getd("."+.@map$+"$") + " ] ",bc_self,;

end;

OnInit:

 

set .prontera$, "Prontera City, Capital of Rune Midgard";

set .morocc$, "Morroc Town";

set .06guild_03$, "Guild War Arena";

set .06guild_04$, "Guild War Arena";

end

}

 

Thanks!

 

do those maps got loadevent mapflag?

before im using old hercules rev. and it's working properly.. now im using the latest..

 

where to see loadevent for every town? and where will i put that?

Edited by P r o p e r t i e s

Share this post


Link to post
Share on other sites
  • 0

Please don't save your scripts on UTF encoding, this is what causes these problems since first characters added on an UTF encoded files is the Byte-Order Mask (BOM).

 

Try saving your scripts with ANSI encoding or as UTF without BOM and try loading your script again.

 

You can know more about the BOM if you go look more information about the UTF file standard on Wikipedia.

Share this post


Link to post
Share on other sites
  • 0

Please don't save your scripts on UTF encoding, this is what causes these problems since first characters added on an UTF encoded files is the Byte-Order Mask (BOM).

 

Try saving your scripts with ANSI encoding or as UTF without BOM and try loading your script again.

 

You can know more about the BOM if you go look more information about the UTF file standard on Wikipedia.

WOW YOUR RIGHT..... THANK YOU VERY MUCH> YOU SOLVED MY PROBLEM :( :( ANY THANKS ALSO TO YOU EVIL PUNKER. 

Share this post


Link to post
Share on other sites
  • 0

Please don't save your scripts on UTF encoding, this is what causes these problems since first characters added on an UTF encoded files is the Byte-Order Mask (BOM).

 

Try saving your scripts with ANSI encoding or as UTF without BOM and try loading your script again.

 

You can know more about the BOM if you go look more information about the UTF file standard on Wikipedia.

btw i got some error.

 

 

[Error]: run_script: inifity loop !
[Debug] Source (NPC): Announcer (inivisible/not on a map)
 
can u help me how to fix it?

Share this post


Link to post
Share on other sites
  • 0

which script are you using? the one of the first post or the second one?

help me please :( the second one the you revised it? can u please help me? where do i put the loop etc.

Share this post


Link to post
Share on other sites
  • 0

 

I have same script like this and it's working only on my 2 custom maps, other map like prontera, morroc etc it doesn't announce the name of the map please check thanks..

 

here's the script.. help please!

 

- script where_am_i -1,{

OnPCLoadMapEvent:

set .@map$, replacestr(replacestr(strcharinfo(3), "@","_"), "-","_");

if (getd("."+.@map$+"$") != "")

  announce " [ " + getd("."+.@map$+"$") + " ] ",bc_self,;

end;

OnInit:

 

set .prontera$, "Prontera City, Capital of Rune Midgard";

set .morocc$, "Morroc Town";

set .06guild_03$, "Guild War Arena";

set .06guild_04$, "Guild War Arena";

end

}

 

Thanks!

 

do those maps got loadevent mapflag?

@evilpuncker

can you help me also w/ this?

Share this post


Link to post
Share on other sites
  • 0

 

 

I have same script like this and it's working only on my 2 custom maps, other map like prontera, morroc etc it doesn't announce the name of the map please check thanks..

 

here's the script.. help please!

 

- script where_am_i -1,{

OnPCLoadMapEvent:

set .@map$, replacestr(replacestr(strcharinfo(3), "@","_"), "-","_");

if (getd("."+.@map$+"$") != "")

  announce " [ " + getd("."+.@map$+"$") + " ] ",bc_self,;

end;

OnInit:

 

set .prontera$, "Prontera City, Capital of Rune Midgard";

set .morocc$, "Morroc Town";

set .06guild_03$, "Guild War Arena";

set .06guild_04$, "Guild War Arena";

end

}

 

Thanks!

 

do those maps got loadevent mapflag?

@evilpuncker

can you help me also w/ this?

 

your script is pretty broken lol xD use this one instead and add your custom maps: http://upaste.me/r/d51c1147949c141ff

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.