Jump to content
Wynn -

Wynn's Warper

Recommended Posts

This is a warper I've made for my previous servers. The configuration is very similar Toasty's Warper.
 
Features:

  • Exploration - use an item on an avaiable map unlock it in the warper.
  • Instant warps - Say the name of the map near the NPC to warp instantly
  • Favorites
  • Search by map name or title - No more looking trough a huge list to find a specific map!
  • Remember recent maps
  • Easy configuration

The SQL tables in the beggining of the script are only neccessary for the exploration and favorites features.
 
Configuration:

Functions:
The NPC is already configured with all towns, a few dungeons and fields. To edit the menu use the following functions after "StartMenu()".

  • StartNode("<name>") - Start a Submenu.
  • EndNode() - End a submenu.
  • AddMap("<title>", "<mapName>"{, <xCoordinate>, {<yCoordinate>}}) - Add a map to the current node. The players are warped to a random spot if the coordinates aren't specified.
  • AddOption("<title>", "<functionName>") - Add a menu option to the current node. The function passed is called when the option is selected.
  • SetPrice(<amount>) - Set the amount of zeny players must pay to warp to the current map. Applies to all maps when used after StartNode().
  • SetEaJob(<eaJob>) - Set a EA job requirement. Applies to all options when used after StartNode().
  • SetGMLevel(<level>) - Set a GM Level/Group ID requirement. Applies to all options when used after StartNode().
  • SetBaseLevel(<minimum>{, <maximum>})/SetJobLevel(<minimum>{, <maximum>}) - Set a base/job level requirement. Applies to all options when used after StartNode().
  • AddSkill(<skillID>, <skillLevel>) - Add a skill requirement, can be used multiple times for a single node. Applies to all options when used after StartNode().
  • AddCondition("<functionName>") - Add a function which is called before displaying the current node. The function should return:
    • 1 - The menu item will be displayed and selectable.
    • -1 - The menu item will not be displayed.
    • 0 - The menu item will be displayed but locked. If the variable @reason$ is set, it'll be shown as the reason why the option isn't available.
  • AddFunction("<functionName>") - Add a function which is called whenever the current node is selected.
  • SetColor("<hex>") - Set the current node's menu color.
  • ShowMapName(<1|0>) - Whether to show map names along with the title in the menu. Applies to all maps when used after StartNode().
  • Exploration(<2|1|0>) - Enable/disable exploration in the current map. Applies to all maps when used after StartNode().
    • 1 - Char bound
    • 2 - Account bound
  • Favorites(<1|0>) - Enable/disable adding the current map to the favorites. Applies to all maps when used after StartNode().

Example:

StartMenu();
   AddMap("Payon Dungeon - 1st Floor", "pay_dun01", 0, 0);
   AddCondition("chk_woe");
   SetBaseLevel(10);
EndMenu();
...

function    script    chk_woe    {
    return (agitcheck() || agitcheck2() ? -1 : 1);
}

Won't display pay_dun01 when WoE is on or if the player's base level is lower than 10.

Download:
Version 1.0 - March 13, 2014

Edited by Wynn -
  • Upvote 5
Link to comment
Share on other sites

hello, thank for it but i got little script error :

line 215
    parse_callfunc: expected ')' to close argument list
   210 : 				AddMap("Kordt Forest", "gef_fild13", 41, 369);
   211 : 				AddMap("West Orc Village", "gef_fild14", 180, 357);
   212 : 			EndNode();
   213 : 		EndNode();
   214 : 		if([email protected]__warper_ticket_id && [email protected]__warper_exploration_enabled ) {
*  215 : 			setitemscript([email protected]__warper_ticket_id, "{ doevent "'_'Warper::OnSaveMap"; }", 0);
   216 : 			AddOption("Buy tickets", "_WarperExplorerTicket");
   217 : 			AddCondition("_warper_chk_exploration");
   218 : 		}
   219 : 		AddOption("Save respawn point", "_WarperSavePoint");
   220 : 	EndMenu();

 

Link to comment
Share on other sites

Did you remove the backslashes from the string?

setitemscript([email protected]__warper_ticket_id, "{ donpcevent \"_Warper::OnSaveMap\"; }", 0);

Edit: Apparently it got removed by rAthena's pastebin. I'll add nother link.

Edited by Wynn -
  • Upvote 1
Link to comment
Share on other sites

Ok done , but sorry little one again -.- : 

line 558
    parse_simpleexpr: unmatched ')'
   553 : 		}
   554 : 	}
   555 : end;
   556 : 
   557 : OnSaveMap:
*  558 : 	if(!hasachievement'('3)) end;
Link to comment
Share on other sites

Yes done, really thank you :D

 

Only debug now : 

(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _warper_chk_amatsu is not a function. ( AddCondition )
(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _warper_chk_ayothaya is not a function. ( AddCondition )
(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _warper_chk_biolab is not a function. ( AddCondition )
(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _warper_chk_ayothaya is not a function. ( AddCondition )
(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _WarperExplorerTicket is not a function. ( AddOption )
(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _warper_chk_exploration is not a function. ( AddCondition )
(03/13/2014 13:48:17) [ Debug ] : script debug : 0 110094903 : Warper: _WarperSavePoint is not a function. ( AddOption )
Link to comment
Share on other sites

Thank alot for ur job. i removed :

AddCondition("_warper_chk_exploration"); 

now all done. Thank again :D its a nice script.

Link to comment
Share on other sites

Hi,

I don't know why, but it don't work for me.

Warps players to maps available in the warper when they say "Warp: <mapName>"

 

Edited by WhiteEagle
Link to comment
Share on other sites

You can add more Dungeon warps.

/* ----------------------- Dungeons - */
		StartNode("Dungeons");
			SetColor("0890D4");
			Exploration(0);
			AddMap("Abyss Lake", "abyss_01", 262, 272);
			AddMap("Amatsu Dungeon", "ama_dun01", 229, 10);
			AddCondition("_warper_chk_amatsu");
			AddMap("Ant Hell", "anthell01", 32, 262);
			AddMap("Ancient Shrine", "ayo_dun01", 275, 18);
			AddCondition("_warper_chk_ayothaya");
			StartNode("Beach Dungeon");
				AddMap("Karu, the West cave", "beach_dun", 266, 67);
				AddMap("Ruande, the Northern cave", "beach_dun2", 154, 25);
				AddMap("Mao, the East cave", "beach_dun3", 23, 260);
			EndNode();
			AddMap("Bio Laboratory", "lhz_cube", 232, 17);
			AddCondition("_warper_chk_biolab");
			AddMap("Brasilis Dungeon", "bra_in01", 206, 182);
			AddMap("Coal Mine", "mjo_dun01", 52, 17);
			AddMap("Einbroch Mine", "ein_dun01", 21, 16);
			AddMap("Undersea Tunnel", "iz_dun00", 168, 168);
		EndNode();
Link to comment
Share on other sites

 

You can add more Dungeon warps.

/* ----------------------- Dungeons - */
		StartNode("Dungeons");
			SetColor("0890D4");
			Exploration(0);
			AddMap("Abyss Lake", "abyss_01", 262, 272);
			AddMap("Amatsu Dungeon", "ama_dun01", 229, 10);
			AddCondition("_warper_chk_amatsu");
			AddMap("Ant Hell", "anthell01", 32, 262);
			AddMap("Ancient Shrine", "ayo_dun01", 275, 18);
			AddCondition("_warper_chk_ayothaya");
			StartNode("Beach Dungeon");
				AddMap("Karu, the West cave", "beach_dun", 266, 67);
				AddMap("Ruande, the Northern cave", "beach_dun2", 154, 25);
				AddMap("Mao, the East cave", "beach_dun3", 23, 260);
			EndNode();
			AddMap("Bio Laboratory", "lhz_cube", 232, 17);
			AddCondition("_warper_chk_biolab");
			AddMap("Brasilis Dungeon", "bra_in01", 206, 182);
			AddMap("Coal Mine", "mjo_dun01", 52, 17);
			AddMap("Einbroch Mine", "ein_dun01", 21, 16);
			AddMap("Undersea Tunnel", "iz_dun00", 168, 168);
		EndNode();

 

need to add manually, haha thanks bro

Link to comment
Share on other sites

Hi just wanted to know if there is anything we have to add to the item (Tiquet Exploration) to make it work fine with the script. Any function to call or something?

 

Thanks in advance and great release, i love this warper /no1 .

Link to comment
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.



×
×
  • Create New...

Important Information

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