Jump to content
  • 0

Need a little help on this


Diconfrost VaNz

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  974
  • Reputation:   41
  • Joined:  11/13/11
  • Last Seen:  

prontera,155,181,5	script	Mascot Pepe#main	757,2,2,{
	OnTouch:
		mes "Welcome to HellFire RO.";
		close;
	
	OnInit:
		// how far they can walk.
		.range = 10;
		
		npcspeed 200;
		getmapxy( .@map$,.@x,.@y,1 );
		
		.@min_x = ( .@x - .range );
		.@min_y = ( .@y - .range );		
		.@max_x = ( .@x + .range );
		.@max_y = ( .@y + .range );
		
		while ( 1 ) {
			npcwalkto rand( .@min_x,.@max_x ),rand( .@min_y,.@max_y );
			.@msg$ = F_Rand(
				"Please write us a review on www.ratemyserver.net!",
				"How are you?",
				"Happy Halloween!",
				"Don't forget to visit our Forums",
				"Cool Story, Bro!",
				"Good job on that style, man!",
				"Cool moves you got there, son!",
				"Fear nothing!",
				"Inadequacy is purely a state of mind.",
				"Trick or Treating",
				"Laugh hard, laugh long, laugh merrily."
			);
			npctalk .@msg$;
			sleep 20000;
		}
		end;
}

prontera,115,111,5	duplicate(Mascot Pepe#main)	Mascot Pepe#1	757,2,2
prontera,125,121,5	duplicate(Mascot Pepe#main)	Mascot Pepe#2	757,2,2
prontera,135,131,5	duplicate(Mascot Pepe#main)	Mascot Pepe#3	757,2,2
prontera,145,141,5	duplicate(Mascot Pepe#main)	Mascot Pepe#4	757,2,2

It works and the npc walks and talks randomly for a certain of time but it stops and never walks until you use @reloadscript again

 

I want to make it walk/talk for every 5mins.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


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


sleep ( 5 * 60000 );

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  974
  • Reputation:   41
  • Joined:  11/13/11
  • Last Seen:  

how about this one? how can i make them walk and talk in every 5mins?

hf_town,96,114,6	script	Mascot Pepe	3501,{

npcspeed 1000;
OnTouch:
 mes "[ Pepe ]";
 mes "Welcome on HellfireRO";
 close;


doitagain:
        set $guard,rand(10);
 if($guard == 0) npctalk "Please write us a review on www.ratemyserver.net!";
 if($guard == 1) npctalk "How are you?";
 if($guard == 2) npctalk "Happy Halloween!";
 if($guard == 3) npctalk "Don't forget to visit our Forums";
 if($guard == 4) npctalk "Cool Story, Bro!";
 if($guard == 5) npctalk "Good job on that style, man!";
 if($guard == 6) npctalk "Cool moves you got there, son!";
 if($guard == 7) npctalk "Fear nothing!";
 if($guard == 8) npctalk "Inadequacy is purely a state of mind.";
 if($guard == 9) npctalk "Trick or Treating";
 if($guard == 10) npctalk "Laugh hard, laugh long, laugh merrily.";
 if($guard > 10 || $guard < 0) goto doitagain;
 end;

OnInit:
initnpctimer;
end;
OnTimer10000:
npcwalkto 99,108;
goto doitagain;
end;
OnTimer30000:
npcwalkto 87,98;
goto doitagain;
end;
OnTimer60000:
npcwalkto 107,117;
end;
OnTimer80000:
npcwalkto 94,116;
goto doitagain;
end;
OnTimer110000:
npcwalkto 82,110;
goto doitagain;
end;
OnTimer130000:
npcwalkto 100,92;
goto doitagain;
end; 
}
Edited by Diconfrost VaNz
Link to comment
Share on other sites


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

script from #1 post is a totally enhanced + simplified version of your #3 post

 

for #3

OnTimer300000: // 5 minute
    npctalk "blablablablablabla";
    initnpctimer;
    end;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  974
  • Reputation:   41
  • Joined:  11/13/11
  • Last Seen:  

but it stops after a few walks and talks. how can i make it unlimited walk and talk?


 

script from #1 post is a totally enhanced + simplified version of your #3 post

 

for #3

OnTimer300000: // 5 minute
    npctalk "blablablablablabla";
    initnpctimer;
    end;

 

 

post #1, i tried to make several duplicate of this script and renaming it for some npcs and it doesn't work on those duplicates anymore. the npc are just standing.


help :3

Link to comment
Share on other sites


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

cant reproduce your issue.

npc have been walking around the prontera for over 10+ minutes

 

g9ACqaj.gif

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