Jump to content
  • 0

Moving NPC?


hydro_ran

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  05/31/18
  • Last Seen:  

Hello, I tried making an NPC move. It worked on a smaller scale but once I transferred it to another, bigger map, it stopped moving. Any luck?

 

Quote

odin_tem03,276,236,3    script    Valkyrie Eir    1751,{

mes "Hello";
close;

OnInit:

set $valk_walkx,rand(100,299); //random x on map
set $valk_walky,rand(100,230); //random y on map
startnpctimer;
npcspeed 200;
end;

OnTimer2000:
npcwalkto $valk_walkx, $valk_walky;
end;

OnTimer10000:
npcwalkto $valk_walkx, $valk_walky;
end;

OnTimer13000:
stopnpctimer;
initnpctimer;
end;

}

I want it to move all over the map like a normal mob. Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

you need to reset the destination coordinate  so that it could keep re-roll a new destination.

odin_tem03,276,236,3    script    Valkyrie Eir    1751,{
	mes "Hello";
	close;

	OnInit:
		npcspeed 200;
	OnTimer13000:
		set $valk_walkx,rand(100,299); //random x on map
		set $valk_walky,rand(100,230); //random y on map
		initnpctimer;
		end;

	OnTimer2000:
	OnTimer10000:
		npcwalkto $valk_walkx, $valk_walky;
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   10
  • Joined:  12/03/18
  • Last Seen:  

You need to check the coordinates of that map.

set $valk_walkx,rand(100,299); //random x on map
the x coordinate might not be the same as the other map. You need to define where it really goes.

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
Answer this question...

×   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...