Jump to content
  • 0

NPC spawn random on map


Vincent

Question


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Hello,

how can i make that a NPC spawns on a random location at a map?

 

This make no error at the server but also dont work.

 

quiz_01,0,0,0    script    NPC     123,{
 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

my bad..it is missing a npc name parameter..

should be

movenpc strnpcinfo(0),.@rand_x,.@rand_y;
Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Dont work:

 

I changed (because of an error that say a argument is missing)

movenpc .@rand_x,.@rand_y;

to:

movenpc .@rand_x,.@rand_y,5;

And now geting this error:

[Warning]: Unexpected type for argument 1. Expected string.
[Debug]: Data: variable name='.@rand_x' index=0
[Debug]: Function: movenpc
[Debug]: Source (NPC): Sample at prontera (155,181)
[Debug]: Source (NPC): Sample at prontera (155,181)
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...