arokken Posted April 16, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 04/01/17 Last Seen: May 7, 2017 Share Posted April 16, 2017 Hello guys, can u help me give a script OnPCLoadMapEvent for speed change as fast as "@speed 1", only when player stay on the Map, when player leave the Map they speed back to normal. Thanks Quote Link to comment Share on other sites More sharing options...
1 Technoken Posted April 17, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 17, 2017 (edited) Try - script autospeed -1,{ OnInit: setarray .map_list$[0],"prontera","payon"; // Map lists .map_size = getarraysize(.map_list$); for( .@i = 0; .@i < .map_size; .@i++ ) { .@map$ = .map_list$[.@i]; setmapflag .@map$,mf_loadevent; } end; OnPCLoadMapEvent: for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) == .map_list$[.@i] ) { atcommand "@speed 1"; @speed = 1; } } end; OnPCStatCalcEvent: if( !@speed )end; for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) == .map_list$[.@i] ) end; // don't remove speed } atcommand "@speed 150"; // Put normal speed here @speed = 0; end; } Edited April 17, 2017 by Technoken 2 Quote Link to comment Share on other sites More sharing options...
0 Jey Posted April 17, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 249 Reputation: 73 Joined: 10/20/12 Last Seen: August 16, 2018 Share Posted April 17, 2017 OnPCStatCalcEvent: if( !@speed )end; for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) == .map_list$[.@i] ) { end; // don't remove speed } } atcommand "@speed 150"; // Put normal speed here @speed = 0; end; @Technoken Sadly the player has to re-log to get back his "normal" speed with modifiers like agi-up, Moonlight Flower, etc. after it has been changed by `@speed` 1 Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 17, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 17, 2017 @Jey I am confused. Your script looks the same with mine, the condition was just changed. and yeah. I just test it now and moonlight flower card can't override the @speed command. XD Quote Link to comment Share on other sites More sharing options...
0 arokken Posted April 17, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 04/01/17 Last Seen: May 7, 2017 Author Share Posted April 17, 2017 2 hours ago, Technoken said: Try - script autospeed -1,{ OnInit: .map_list$[0],"prontera","payon"; // Map lists .map_size = getarraysize(.map_list$); for( .@i = 0; .@i < .map_size; .@i++ ) { .@map$ = .map_list$[.@i]; setmapflag .@map$,mf_loadevent; } end; OnPCLoadMapEvent: for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) == .map_list$[.@i] ) { atcommand "@speed 1"; @speed = 1; } } end; OnPCStatCalcEvent: if( !@speed )end; for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) != .map_list$[.@i] ) { atcommand "@speed 150"; // Put normal speed here @speed = 0; } } end; } Thanks Technoken for the script, i have some problem here, what's wrong? Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 17, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 17, 2017 Sorry. It was an array and I forgot to set it as an array. replace .map_list$[0],"prontera","payon"; // Map lists with setarray .map_list$[0],"prontera","payon"; // Map lists Quote Link to comment Share on other sites More sharing options...
0 arokken Posted April 17, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 04/01/17 Last Seen: May 7, 2017 Author Share Posted April 17, 2017 19 minutes ago, Technoken said: Sorry. It was an array and I forgot to set it as an array. replace .map_list$[0],"prontera","payon"; // Map lists with setarray .map_list$[0],"prontera","payon"; // Map lists thanks a lot Technoken, it works. it's not my problem, but this script doesn't work if i insert town_map like prontera or payon, but another map like dungeon, field, or custom_map great! Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 17, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 17, 2017 1 hour ago, arokken said: thanks a lot Technoken, it works. it's not my problem, but this script doesn't work if i insert town_map like prontera or payon, but another map like dungeon, field, or custom_map great! It doesn't work on towns? try to check if the loadevent mapflag is being set. Use @mapinfo and see if Other Flags2 has a loadevent mapflag. If it's not there maybe you have a script that sets mapflag loadevent off after the script I provided was executed. Quote Link to comment Share on other sites More sharing options...
0 Jey Posted April 17, 2017 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 249 Reputation: 73 Joined: 10/20/12 Last Seen: August 16, 2018 Share Posted April 17, 2017 7 hours ago, Technoken said: @Jey I am confused. Your script looks the same with mine, the condition was just changed. and yeah. I just test it now and moonlight flower card can't override the @speed command. XD @Technoken It's just a small difference. Take a closer look. Your script removes the speed bonus if the player isn't standing on every map of .map_list$. That is impossible if there is more than one map in .map_list$ ;> 2 1 Quote Link to comment Share on other sites More sharing options...
0 Technoken Posted April 17, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share Posted April 17, 2017 @Jey I get it now. Thanks for clearing that up! I'll edit my first post. 2 Quote Link to comment Share on other sites More sharing options...
0 skymia Posted April 11, 2018 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 02/19/17 Last Seen: May 26, 2024 Share Posted April 11, 2018 how about for GM only? if you login your gm account it will auto the speed to zero Quote Link to comment Share on other sites More sharing options...
0 CyberDevil Posted June 14, 2019 Group: Members Topic Count: 40 Topics Per Day: 0.02 Content Count: 242 Reputation: 37 Joined: 02/25/18 Last Seen: December 2, 2024 Share Posted June 14, 2019 (edited) On 4/11/2018 at 10:30 AM, skymia said: how about for GM only? if you login your gm account it will auto the speed to zero - script GMLogin -1,{ OnPCLoginEvent: if(getgmlevel() > 60) { atcommand "@speed 0"; //auto speed atcommand "@hide"; //auto hide } end; } ...another question... it's possibile to have different speeds in different maps (towns)? How can I modified the script in post #1? Edited June 14, 2019 by CyberDevil Quote Link to comment Share on other sites More sharing options...
0 CyberDevil Posted May 3, 2020 Group: Members Topic Count: 40 Topics Per Day: 0.02 Content Count: 242 Reputation: 37 Joined: 02/25/18 Last Seen: December 2, 2024 Share Posted May 3, 2020 I made a recent update of rAthena and from this point onwards this script to increase the speed in the city is creating me many problems... first of all the skills (like Cart Boost) and the buffs and potions that increase the speed of movement, they go into conflict when entering the city (also the debuffs movement speed from monsters castedt o players)... players lose speed despite the buff icon remains active and even if you leave the city the speed remains inoperative. To make it work you have to get out of the city, log out of the game and re-enter, but every time you enter a city where this script is active, it messes up all over again. Do you know how to solve it? Quote Link to comment Share on other sites More sharing options...
0 Onairda Posted February 3, 2021 Group: Members Topic Count: 74 Topics Per Day: 0.02 Content Count: 177 Reputation: 9 Joined: 12/30/16 Last Seen: 2 hours ago Share Posted February 3, 2021 On 4/17/2017 at 10:33 AM, Technoken said: Try - script autospeed -1,{ OnInit: setarray .map_list$[0],"prontera","payon"; // Map lists .map_size = getarraysize(.map_list$); for( .@i = 0; .@i < .map_size; .@i++ ) { .@map$ = .map_list$[.@i]; setmapflag .@map$,mf_loadevent; } end; OnPCLoadMapEvent: for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) == .map_list$[.@i] ) { atcommand "@speed 1"; @speed = 1; } } end; OnPCStatCalcEvent: if( !@speed )end; for( .@i = 0; .@i < .map_size; .@i++ ) { if( strcharinfo(3) == .map_list$[.@i] ) end; // don't remove speed } atcommand "@speed 150"; // Put normal speed here @speed = 0; end; } Hello I just tried your script but . when I leave the town the speed didn't change. Thanks Quote Link to comment Share on other sites More sharing options...
Question
arokken
Hello guys,
can u help me give a script OnPCLoadMapEvent for speed change as fast as "@speed 1", only when player stay on the Map, when player leave the Map they speed back to normal.
Thanks
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.