kotsumu Posted June 6, 2012 Posted June 6, 2012 (edited) 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 June 6, 2012 by kotsumu Quote
Euphy Posted June 6, 2012 Posted June 6, 2012 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~ 1 Quote
kotsumu Posted June 7, 2012 Author Posted June 7, 2012 (edited) 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 June 7, 2012 by kotsumu Quote
_Dynosawr_ Posted June 7, 2012 Posted June 7, 2012 (edited) 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 June 7, 2012 by Joey Quote
Euphy Posted June 7, 2012 Posted June 7, 2012 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>}; Quote
kotsumu Posted June 7, 2012 Author Posted June 7, 2012 (edited) 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 June 7, 2012 by kotsumu Quote
_Dynosawr_ Posted June 7, 2012 Posted June 7, 2012 No problem! Except I didn't really code it. o.o (All I did was fix the error xD) 1 Quote
kotsumu Posted June 7, 2012 Author Posted June 7, 2012 Nah, I was talking about Euphy. It was his code, lol. I'd like to thank both of you for the help however! 1 Quote
Question
kotsumu
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?
Instead of specifying where it will spawn, I want to specify where it won't spawn instead.
Edited by kotsumu8 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.