Valiente Posted October 27, 2012 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 132 Reputation: 8 Joined: 07/19/12 Last Seen: January 29, 2017 Share Posted October 27, 2012 (edited) Simple Warper NPC This is just a simple script that I coded in a matter of 2 days wherein players can type the name of the map (eg. prontera, ra_san01, /etc) that they want to warp to. It also comes with a last warp system so that players won't have to type the same map name over and over again. The npc is placed in Prontera only. It's up to you whether you want to add new duplicates. Special thanks to AnnieRuru for giving helpful advices. Enjoy everyone. Suggestions to improve the script are encouraged! http://pastebin.com/XXNt13cy Edited October 27, 2012 by Valiente Quote Link to comment Share on other sites More sharing options...
Euphy Posted October 27, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted October 27, 2012 I highly suggest setting all your arrays as NPC variables OnInit so they don't load every time a player wants to warp. I'd also suggest removing the special payment cases, or at least make a note of it in your description. While I can see what you were attempting with your spacing, it's still much more difficult to read than scripts with standard indentation. :3 Quote Link to comment Share on other sites More sharing options...
Valiente Posted October 27, 2012 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 132 Reputation: 8 Joined: 07/19/12 Last Seen: January 29, 2017 Author Share Posted October 27, 2012 Thanks for that. What do you exactly mean by OnInit. Sorry but I'm kinda new with the scripting commands. I'm trying to learn the language lol. Quote Link to comment Share on other sites More sharing options...
Euphy Posted October 27, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted October 27, 2012 Everything you need is here: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/script_commands.txt OnInit:OnInit will execute every time the scripts loading is complete, including when they are reloaded with @reloadscript command. Set all of your arrays once as NPC variables (.var[] instead of .@var[]) under that label, so you won't have to keep re-setting those large lists. Quote Link to comment Share on other sites More sharing options...
Valiente Posted October 27, 2012 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 132 Reputation: 8 Joined: 07/19/12 Last Seen: January 29, 2017 Author Share Posted October 27, 2012 Okay, I'll do the changes to qualify your advice. Thanks for the info. Quote Link to comment Share on other sites More sharing options...
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.