Simple Warp to "Memo-saved" Map/Location Macro

Moderator: Moderators

Message
Author
kingraijun
Noob
Noob
Posts: 2
Joined: 30 Jul 2014, 11:40
Noob?: No

Simple Warp to "Memo-saved" Map/Location Macro

#1 Post by kingraijun »

I created this macro to simply warp your character to the map that you have memo-saved before (i.e. the maps/locations seen listed in your warp list). You just need to include in your console command the <macroname> together with your <parameter> destination.

For instance, if you have memo-saved Payon Town (payon), you just simply type the command: macro warpTo --payon. DO NOT FORGET to include the two hyphens or else the macro might assume that you have not written the parameter destination even if you did so (i.e. macro warpTo payon). This will of course create a syntax error for the warp command.

Another option is to use the destination warp index as seen in you Warp List. This will ensure that the destination that you want to be warped to is available. Still, do not forget the two hyphens before the warp index (--).

If in case you ran the macro, forgot to write the two hyphens and obviously got into an error, just type "warp cancel" in your console to get out from the warp mode.

The following are some of the assumptions of the macro:
(1) You have the Warp skill of course.
(2) You have blue gemstones in your inventory. If none, the console will just say that you have no blues and stops the macro.
(3) You are in a warp-available area.

The macro begins and ends by putting your character into manual mode. That is, you need to manually activate the automatic ai mode after you are being warped OR the macro did not work properly.

Lastly, I added few lines made especially for slaves (i.e., follow 1 in config.txt). I found out that the macro automatically change config follow into 0. Thus, placing a line that revert the configuration to your desired one.

Code: Select all

#########################################
###  MACRO FOR WARPING TO A SAVED MAP ###
#########################################

macro warpTo {
	$follow = @config(follow)
	$dest = $.param1
	$blues = @invamount(Blue Gemstone)
	
	$moveWait = 5
	$move = @random("east","west","south","north","northeast","northwest","southeast","southwest")
	$myPos = $.pos
	
	do ai manual
	do move stop
	
	pause 1
	
	if ($blues > 0) goto warpNow
	log You have no blue gemestone.
        #do ai on  <---------- REMOVE # to return to automatic ai mode
	stop
	
:warpNow
	do $move 4
	pause 1
	do sl 27 $myPos
	pause 2
	do warp $dest
	log do warp $dest
	pause $moveWait
	do move $myPos
	pause 1
	if ($follow == 1) do conf follow 1
        #do ai on <---------- REMOVE # to return to automatic ai mode
	stop
}