sorax Posted February 4, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 3 Reputation: 1 Joined: 01/31/12 Last Seen: October 29, 2019 Share Posted February 4, 2013 1. is it possble to create the script that let the user to adjust npc position without change it in script. and the make npc remember it new position. ( via database or permanent global var ) 2. is there anyway to do something like "NPC Scroll" when user use the scroll -> place npc to that location. Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 4, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 4, 2013 the npc CAN move outside the map with unitwarp + getnpcid prontera,155,187,5 script dsasda 100,{ .@map$ = strnpcinfo(4); npctalk "I am currently in "+ .@map$; sleep 1000; if ( .@map$ == "prontera" ) unitwarp getnpcid(0), "morocc",156,93; else if ( .@map$ == "morocc" ) unitwarp getnpcid(0), "prontera", 156,191; end; } move to script support btw 2 Quote Link to comment Share on other sites More sharing options...
Euphy Posted February 4, 2013 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 February 4, 2013 An NPC can move anywhere within a map, but not outside of it -- you need duplicates for that. // Generic 'movenpc' command. movenpc strnpcinfo(0),x,y; // Script command. { getmapxy(.@map$,.@x,.@y,0); if (.@map$ == "your_map") movenpc "NPC Name",.@x,.@y; } // Store NPC location permanently. getmapxy(.@map$,.@x,.@y,1); set $move_npc_loc$, .@map$+"|"+.@x+"|"+.@y; end; // Load NPC location OnInit. OnInit: if ($move_npc_loc$ != "") { explode(.@loc$,$move_npc_loc$,"|") movenpc strnpcinfo(0),.@loc$[0],atoi(.@loc$[1]),atoi(.@loc$[2]); } Quote Link to comment Share on other sites More sharing options...
Aly Posted February 5, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 16 Reputation: 6 Joined: 02/05/12 Last Seen: March 17, 2017 Share Posted February 5, 2013 or you can use this: http://www.eathena.ws/board/index.php?showtopic=270648 maybe it needs an update... I found errors with NPCs that use the OnInit label with this command (maybe it can't duplicate OnInit labels, i don't know) but it's a very useful command in many ways. ( btw, maybe someone can confirm the bug and fix it... ^^ ) Quote Link to comment Share on other sites More sharing options...
sorax Posted February 5, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 3 Reputation: 1 Joined: 01/31/12 Last Seen: October 29, 2019 Author Share Posted February 5, 2013 thanks you everyone . i'll try it. Quote Link to comment Share on other sites More sharing options...
Brian Posted February 6, 2013 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share Posted February 6, 2013 (edited) the npc CAN move outside the map with unitwarp + getnpcid I learned something new today! If it's that easy, we should change movenpc to allow "map",x,y Edit: I searched /npc and it's only used in 1 script, so the main issue would be notifying users of the change so they can update their custom scripts. Search "movenpc" (2 hits in 1 file) D:\svn\rathena\trunk\npc\pre-re\other\arena\arena_room.txt (2 hits) Line 762: movenpc "#arena_"+$@arenapic+"",96,28; Line 1025: movenpc "#arena_"+$@arenapic+"",1,1; Edited February 6, 2013 by Brian 1 Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted February 7, 2013 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 7, 2013 I believe there are certain kinds of tricks here shouldn't be adding into SVN like while(!getmapxy) or attachrid-all-accounts there is a limit of npc can be having on a map #define MAX_NPC_PER_MAP 512doing something like this is just like a trickas this is able to bypass the numbers of npc having on a map example, when try @mapinfo, if you have 1 npc original from prontera, and 1 npc move from morocc into prontera @mapinfo in prontera tells you only having 1 npc, but actually having 2 Quote Link to comment Share on other sites More sharing options...
fbrulz Posted February 7, 2013 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 70 Reputation: 4 Joined: 04/26/12 Last Seen: April 26, 2014 Share Posted February 7, 2013 (edited) can we make the npc move only with in a specified cell range? i mean sm thing like we set a cage and it will move only within those coordinates not outside those specified coordinates. Edited February 7, 2013 by fbrulz Quote Link to comment Share on other sites More sharing options...
fbrulz Posted February 14, 2013 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 70 Reputation: 4 Joined: 04/26/12 Last Seen: April 26, 2014 Share Posted February 14, 2013 *bump* any 1 please?? Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 14, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 14, 2013 like this ? http://pastebin.com/raw.php?i=FssaCcmX refer npcwalkto , npcspeed Quote Link to comment Share on other sites More sharing options...
Question
sorax
1.
is it possble to create the script that let the user to adjust npc position without change it in script.
and the make npc remember it new position. ( via database or permanent global var )
2.
is there anyway to do something like "NPC Scroll" when user use the scroll -> place npc to that location.
Link to comment
Share on other sites
9 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.