Jump to content
  • 0
Sign in to follow this  
vBrenth

loadmapevent help.

Question

I'm not sure whats the problem of this script but when i enter prtg_cas03 one of the map on the list it loads the script multiple times like how many maps flagged as loadmap maflag

 

-    script    Anti_Assump    -1,{OnInit:setarray .map$[0],"prtg_cas03","gefg_cas04","payg_cas03","schg_cas01","guild_vs1";for( set .@i,0; .@i < getarraysize( .map$ ); set .@i,.@i + 1 ){    setd( ".map_"+.map$[.@i] ),1;    setmapflag .map$[.@i],mf_loadevent;}end;OnPCLoadMapEvent:while( getd( ".map_"+strcharinfo(3) ) ){    sc_end SC_ASSUMPTIO;    message strcharinfo(0),"The assumption buff are disable in GvG/WoE maps.";}end;} 

 

 

2j48075.jpg

 

Its spam alot like this..

 

"The assumption buff are disable in GvG/WoE maps.";
Edited by Wynne

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

OnPCLoadMapEvent:
while( getd( ".map_"+strcharinfo(3) ) ){
 sc_end SC_ASSUMPTIO;
 message strcharinfo(0),"The assumption buff are disable in GvG/WoE maps.";

   end;
}
end;
}

Share this post


Link to post
Share on other sites
  • 0

May I ask what's the point in while if it's supposed to run only once on entrance?

 

I have KoE on my server and buff ticket that gives extra time on buffs.

Share this post


Link to post
Share on other sites
  • 0

this should work

-	script	Anti_Assump	-1,{OnInit:	setarray .@map$[0],"prtg_cas03","gefg_cas04","payg_cas03","schg_cas01","guild_vs1";	.@size = getarraysize( .@map$ );	for ( .@i = 0; .@i < .@size; .@i++ ) {		setd ".map_"+ .@map$[.@i], true;		setmapflag .@map$[.@i], mf_loadevent;	}	end;OnPCLoadMapEvent:	if ( getd( ".map_"+ strcharinfo(3) ) && getstatus(SC_ASSUMPTIO) ) {		sc_end SC_ASSUMPTIO;		message strcharinfo(0), "Assumptio buff are disable in GvG/WoE maps.";	}	end;}

Share this post


Link to post
Share on other sites
  • 0

Thank you annie :D but i am also having problem with one of my script it spam as well too..

 

http://pastebin.com/HUkQiKH

v7v2g.jpg

 

 

This one spam the onloadmap too >.>

Line 48; when loadmapevents trigger it buffs like the total of map as marked as loadmap

Edited by Wynne

Share this post


Link to post
Share on other sites
  • 0

I noticed at the beginning of the script, there are *mes script commands

so I guess you didn't post the duplicate npc part

 

of course it will spam the dialog because you duplicated the OnPCLoadMapEvent labels multiple times

 

change this

-	script	Buff	-1,{	mes "hi";	close;OnPCLoadMapEvent:	buffing....	end;}prontera,x,y,z	duplicate(Buff)	Buff#1	100izlude,x,y,z	duplicate(Buff)	Buff#2	100geffen,x,y,z	duplicate(Buff)	Buff#3	100
into this
-	script	Buff	-1,{	mes "hi";	close;}-	script	Buff#main	-1,{OnPCLoadMapEvent:	buffing....	end;}prontera,x,y,z	duplicate(Buff)	Buff#1	100izlude,x,y,z	duplicate(Buff)	Buff#2	100geffen,x,y,z	duplicate(Buff)	Buff#3	100
so the OnPCLoadMapEvent doesn't get duplicated

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.