joven15 0 Posted March 31, 2014 Can anyone help me please. - 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; } Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted April 1, 2014 post your edited script here and I'll edit it here ---> http://upaste.me/a94711477dc295e9e see if it works http://upaste.me/r/d51c1147949c141ff Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted March 31, 2014 - 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;} Quote Share this post Link to post Share on other sites
0 joven15 0 Posted March 31, 2014 still the same. Quote Share this post Link to post Share on other sites
0 joven15 0 Posted March 31, 2014 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;} Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted March 31, 2014 seems like the encoding of your txt file is messed up try to create a new file and paste it Quote Share this post Link to post Share on other sites
0 joven15 0 Posted March 31, 2014 seems like the encoding of your txt file is messed up try to create a new file and paste it can u help me ? i try it many times but still Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted March 31, 2014 seems like the encoding of your txt file is messed up try to create a new file and paste it can u help me ? i try it many times but still try this Quote Share this post Link to post Share on other sites
0 joven15 0 Posted March 31, 2014 seems like the encoding of your txt file is messed up 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 :( Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted March 31, 2014 seems like the encoding of your txt file is messed up 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 Quote Share this post Link to post Share on other sites
0 Ragnar Lothbrok 21 Posted March 31, 2014 (edited) 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 March 31, 2014 by P r o p e r t i e s Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted March 31, 2014 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? Quote Share this post Link to post Share on other sites
0 joven15 0 Posted March 31, 2014 seems like the encoding of your txt file is messed up 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. Quote Share this post Link to post Share on other sites
0 joven15 0 Posted March 31, 2014 seems like the encoding of your txt file is messed up 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 STILL :( :( GOT ERROR :( :( Quote Share this post Link to post Share on other sites
0 Ragnar Lothbrok 21 Posted April 1, 2014 (edited) 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 April 1, 2014 by P r o p e r t i e s Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted April 1, 2014 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. Quote Share this post Link to post Share on other sites
0 joven15 0 Posted April 1, 2014 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. Quote Share this post Link to post Share on other sites
0 joven15 0 Posted April 1, 2014 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? Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted April 1, 2014 which script are you using? the one of the first post or the second one? Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted April 1, 2014 Put freeloop(1); before the loops and freeloop(0); after them. Quote Share this post Link to post Share on other sites
0 joven15 0 Posted April 1, 2014 which script are you using? the one of the first post or the second one? the second. can u please help me. Quote Share this post Link to post Share on other sites
0 joven15 0 Posted April 1, 2014 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. Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted April 1, 2014 post your edited script here and I'll edit it Quote Share this post Link to post Share on other sites
0 joven15 0 Posted April 1, 2014 post your edited script here and I'll edit it here ---> http://upaste.me/a94711477dc295e9e Quote Share this post Link to post Share on other sites
0 Ragnar Lothbrok 21 Posted April 1, 2014 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? Quote Share this post Link to post Share on other sites
0 evilpuncker 504 Posted April 1, 2014 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 Quote Share this post Link to post Share on other sites
Can anyone help me please.
Share this post
Link to post
Share on other sites