Jump to content
  • 0

Monster spawn error


Tomahawk

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   7
  • Joined:  07/17/18
  • Last Seen:  

setarray .mvplist[0],1832,1511,1647,1785,1630,1039,1874,2068,1272,1719,1046,1389,1112,1115,1418,1871,1252,1768,1885,1649,1651,1492,1734,1251,1779,1688,1646,1373,1147,1059,1150,1087,1190,1038,1157,1159,1623,1650,1583,1312,1751,1685,1648,1658;
.@mobid = .mvplist[rand(0,getarraysize(.mvplist))];
monster "map_x",0,0,strmobinfo(2,.@mobid),.@mobid,1,"mvpspawn::OnMVPDead";

sometimes gives this error:

error.png.deef07b74e0ab5f6fa306fc85b02529b.png

 

Can anyone help me? I'm just not getting what i'm doing wrong.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

1 hour ago, Tomahawk said:

setarray .mvplist[0],1832,1511,1647,1785,1630,1039,1874,2068,1272,1719,1046,1389,1112,1115,1418,1871,1252,1768,1885,1649,1651,1492,1734,1251,1779,1688,1646,1373,1147,1059,1150,1087,1190,1038,1157,1159,1623,1650,1583,1312,1751,1685,1648,1658;
.@mobid = .mvplist[rand(0,getarraysize(.mvplist))];
monster "map_x",0,0,strmobinfo(2,.@mobid),.@mobid,1,"mvpspawn::OnMVPDead";

sometimes gives this error:

error.png.deef07b74e0ab5f6fa306fc85b02529b.png

 

Can anyone help me? I'm just not getting what i'm doing wrong.

.@mobid = .mvplist[rand(getarraysize(.mvplist))];

*monster     "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};

monster "map_x",0,0,--ja--,.@mobid,1,"mvpspawn::OnMVPDead";


    monster "place",60,100,"Poring",1002,1,"NPCNAME::OnLabel";

monster "map_x",0,0,"~I am King~",.@mobid,1,"mvpspawn::OnMVPDead";
Edited by utofaery
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

most people still confuse about this

rand(2) generate 0,1
rand(0,2) generate 0,1,2

it should be

.@mobid = .mvplist[rand(getarraysize(.mvplist))];
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   7
  • Joined:  07/17/18
  • Last Seen:  

Thank you.

 

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