Jump to content
  • 0

Rental NPC With Different Function


Dolphin86

Question


  • Group:  Members
  • Topic Count:  256
  • Topics Per Day:  0.06
  • Content Count:  707
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

hi i would like to ask for help, i have 4 type of npc with different function, name and sprites, how can i combine it all into 1 npc and player just need to pick which type npc he wanted to spawn at that location, e.g ( Healer, Kafra, etc ) and this npc will spawn with it own function, name and sprite within the selected time ( max 7 days ), once the time runs out the npc will revert back to its original, and player will have to bring an item ( according to which function he wanted ) to use it again, also would be nice if there is an option to extend the timer for additional 7 more days..

also even if the server stop, or restart it will remain the same as it current state..

#in short, there is 1 dummy npc in 1 location, player talk to that npc to select which function he needs, and bring the required item (each function npc will need diffrent item), if he got the item npc will ( disguise ? ) to the selected function including change it name and sprites, (e.g helaer, kafra, warper, etc..) npc will remain with the selected function for the next 7 days as it was spawned, and revert back to dummy npc when the timer done.

 

my try out script which didn't work..

Spoiler
//====================================================
neko_isle,82,131,5	script	Healer#rent	757,{

	// item to rent NPC
	.@item_id = 512;
	// rent NPC for how many days
	//.@rent_day = 30;
	.@rent_day = 1;
	
	if(BasicWorkbench == 1) {
		mes "Workbench";
		close;	
	}
	
	if(Butchertable == 1) {
		mes "Butchertable";
		close;	
	}
	
	
	mes "Select";
	next;
	switch(select("- Make Workbench:- Buther table:- Cancel")) {
		
		case 1:
			if ( countitem( .@item_id ) ) {
			mes "Make Basic Workbench ?";
			mes "Require: 1 x ";
			
			if ( select( "Yes","No" ) == 1 ) {
			delitem(512, 1);
			set BasicWorkbench,1;
			$rent_duration = gettimetick(2) + ( .@rent_day * 60 ); 
			mes "NPC belong to you.";
				}
			}
			else {
			mes "NPC isnt available.";
			mes "Please select function";
			}
			close;
		
		case 2:
			if ( countitem( .@item_id ) ) {
			mes "Make Butcher Table ?";
			mes "Require: 1 x ";
			
			if ( select( "Yes","No" ) == 1 ) {
			delitem(512, 1);
			set Butchertable,1;
			$rent_duration = gettimetick(2) + ( .@rent_day * 60 ); 
			mes "NPC belong to you.";
				}
			}
			else {
			mes "NPC isnt available.";
			mes "Please select function";
			}
			close;
		}


}

 

 

Edited by Dolphin86
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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