Jump to content
  • 0

Permanent Monster Spawning on Map and Limiter


kotsumu

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  05/31/12
  • Last Seen:  

Is it possible to use this script command to spawn monsters at the same time limit a certain area on the map so that it doesn't spawn there?

prt_fild08,0,0,0,0    monster    Poring    1002,70,0,0,0

Instead of specifying where it will spawn, I want to specify where it won't spawn instead.

Edited by kotsumu
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

No, there isn't any "limiting" argument. But it should be easy to specify areas to spawn monsters, since x1,x2,y1,y2 makes nice little rectangles~

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  05/31/12
  • Last Seen:  

Oh ok, *disappointed*

Since you're on this thread anyway, do you mind if I ask you one more question about scripting?

Original Function

function Go {
warp getarg(0),getarg(1,0),getarg(2,0);
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close; }

I'm trying to do something like...Have slight delay before actually instantiating "warp getarg(0),getarg(1,0),getarg(2,0);"

function Go {
addtimercount 2600,"My NPC::OnMyLabel";
OnMyLabel:
      deltimer "My NPC::OnMyLabel";
   warp getarg(0),getarg(1,0),getarg(2,0);
   getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
   close; }

Doesn't seem to work thought, just jumps directly into warp.

Edited by kotsumu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

Try this:

function Go {
sleep2 2600;
warp getarg(0),getarg(1,0),getarg(2,0);
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close; }

Also, addtimercount won't work unless there's already a timer running. Using addtimercount will ADD a specified amount of ticks onto the timer specified. If there is no timer that's running, it is not going to do anything.

--------------------------------------------------------------------------------------

Edit:

If you must have a timer for it, then it would look like this:

function Go {
addtimer 2600,"My NPC::OnMyLabel";
OnMyLabel:
warp getarg(0),getarg(1,0),getarg(2,0);
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close; }

From my experiences, deltimer isn't useful unless the timer is running and maybe someone does something which triggers it to cancel. Say...someone has to kill something in a specified amount of time, and they succeed. In that situation, using deltimer to delete the timer would allow that person to succeed in that task.

Edited by Joey
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Yup, as Joey posted, add a "sleep2" command before each warp. Note that I only used Go() for towns, so add it in the Pick() function as well.

*sleep2 {<milliseconds>};

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  05/31/12
  • Last Seen:  

I guess I misunderstood the script commands...

But this is just what I was looking for thanks for the suggestions!

Edit:

Here's what I changed to your script btw, just for aesthetics you know?

function Go {
specialeffect2 501;
specialeffect2 502;
sleep2 1600;
warp getarg(0),getarg(1,0),getarg(2,0);
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close; }
function Disp {
set @menu$,"";
if(getarg(0)=="") {
 set @menu$,getarg(1);
 return; }
for(set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1)
 set @menu$, @menu$+getarg(0)+" "+.@i+":";
return; }
function Pick {
if(getarg(0)=="") {
 set .@i, select(@menu$);
 specialeffect2 501;
 specialeffect2 502;
 sleep2 1600;
 warp getarg(.@i),@c[.@i*2],@c[.@i*2+1]; }
else {
 set .@i, select(@menu$)-getarg(1,0);
 specialeffect2 501;
 specialeffect2 502;
 sleep2 1600;
 warp getarg(0)+((.@i<10)?"0":"")+.@i,@c[.@i*2],@c[.@i*2+1]; }
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close; }

Btw, for the record this is a really great script! Thanks for coding it!

Edited by kotsumu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

No problem!

Except I didn't really code it. o.o (All I did was fix the error xD)

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  05/31/12
  • Last Seen:  

Nah, I was talking about Euphy. It was his code, lol.

I'd like to thank both of you for the help however!

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   10
  • Joined:  05/14/12
  • Last Seen:  

You're still very welcome /kis2

  • Upvote 1
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...