Jump to content
  • 0

Using progressbar and passing variables for all players?


Question

Posted

Hi guys,

 

i'm currently developing a small little instance script, but frankly i'm not sure how do i set this to work. currently the main goal is to get 3 progressbar done and talking to the initial NPC should then give you a different conversation

 

this is what i'm currently envisioning it at the moment.

prontera,150,150,4	script	guy#1	791,{

	if(pillar == 3)
		{
		mes "you've finished all 3 pillars!";
		close;
		}
	mes "talk to the 3 pillars first";
	close;
	}
	
prontera,151,151,4	script	pillar#1	791,{

	progressbar "0xFFFF00",10;
	set pillar++;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
	}

prontera,152,152,4	script	pillar#2	791,{

	progressbar "0xFFFF00",10;
	set pillar++;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
	}

prontera,153,153,4	script	pillar#3	791,{

	progressbar "0xFFFF00",10;
	set pillar++;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
	}	
	

 

But the issue with this variable will be passed only to that particular character that talked to the pillar NPC,  how do i make in a way where no matter which player talks to the pillar, it would then be recognized by the first npc? Thus having 3 different people talking to 3 different pillar would then complete this portion of the quest perhaps.

5 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, ToiletMaster said:

Hi guys,

 

i'm currently developing a small little instance script, but frankly i'm not sure how do i set this to work. currently the main goal is to get 3 progressbar done and talking to the initial NPC should then give you a different conversation

 

this is what i'm currently envisioning it at the moment.


prontera,150,150,4	script	guy#1	791,{

	if(pillar == 3)
		{
		mes "you've finished all 3 pillars!";
		close;
		}
	mes "talk to the 3 pillars first";
	close;
	}
	
prontera,151,151,4	script	pillar#1	791,{

	progressbar "0xFFFF00",10;
	set pillar++;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
	}

prontera,152,152,4	script	pillar#2	791,{

	progressbar "0xFFFF00",10;
	set pillar++;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
	}

prontera,153,153,4	script	pillar#3	791,{

	progressbar "0xFFFF00",10;
	set pillar++;
	disablenpc instance_npcname(strnpcinfo(0));
	end;
	}	
	

 

But the issue with this variable will be passed only to that particular character that talked to the pillar NPC,  how do i make in a way where no matter which player talks to the pillar, it would then be recognized by the first npc? Thus having 3 different people talking to 3 different pillar would then complete this portion of the quest perhaps.

Question: 
3 Different People Should Activate the pillar  And Each People Have different conversation after activating the pillar? :))

  • 0
Posted (edited)
29 minutes ago, crazyarashi said:

Question: 
3 Different People Should Activate the pillar  And Each People Have different conversation after activating the pillar? :))

Yes! That would be correct, once all 3 are activated by different people, they should all have the different conversation from there.

Since this is an instance, therefore whoever finishes the activation of pillar will add 1 count to the final npc and once it reaches 3, all of them should see the new conversation. 

Similar to malangdo culvert, but I noticed malangdo culvert uses a timer instead which might work, but I wanted to know if it's possible without a timer for this to happen. 

Thanks for replying! 

Edited by ToiletMaster
Grammar
  • 0
Posted
48 minutes ago, ToiletMaster said:

Yes! That would be correct, once all 3 are activated by different people, they should all the different conversation from there.

Since this is an instance, therefore whoever finishes the activation of pillar will add 1 count to the final npc and once it reaches 3, all of them should see the new conversation. 

Similar to malangdo culvert, but I noticed malangdo culvert uses a timer instead which might work, but I wanted to know if it's possible without a timer for this to happen. 

Thanks for replying! 

1@instance,123,123,4	script	guy#1	791,{

	if( getvariableofnpc (.pillar1,"pillar#1" && .pillar2,"pillar#2" && .pillar3,"pillar#3" )) {
		mapannounce "1@instance", "Guy - All 3 Pillars has been activated, to the activators please talk to me."
		donpcevent instance_npcname("guy#1")+"::OnDisable";
		donpcevent instance_npcname("guy#2")+"::OnEnable";
		end;
		
} else {
		mes "Guy";
		mes "I want you talk to the 3 pillars first";
		close;
	
	donpcevent instance_npcname("pillar#1")+"::OnEnable";
	donpcevent instance_npcname("pillar#2")+"::OnEnable";
	donpcevent instance_npcname("pillar#3")+"::OnEnable";
	end;
	
	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("guy#1");
		end;

	OnEnable:
		hideoffnpc instance_npcname("guy#1");
		end;
	}
	
1@instance,123,123,4	script	guy#2	791,{
	if(.clicker1$ == 1){
	mes "Number 1";
	close;
	} else {
	if(.clicker2$ == 1)
	mes "Number 2";
	close;
	} else {
	if(.clicker3$ == 1)
	mes "Number 3";
	close;
	}
}

	
1@instance,124,124,4	script	pillar#1	791,{

	progressbar "0xFFFF00",10;
	set .pillar1, 1;
	set .clicker1$, strcharinfo(0);
	donpcevent instance_npcname("pillar#1")+"::OnDisable"; 
	end;
	
	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("pillar#1");
		end;

	OnEnable:
		hideoffnpc instance_npcname("pillar#1");
		end;
	}

1@instance,125,125,4	script	pillar#2	791,{

	progressbar "0xFFFF00",10;
	set .pillar2, 1;
	set .clicker2$, strcharinfo(0);
	donpcevent instance_npcname("pillar#2")+"::OnDisable"; 
	end;
	
	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("pillar#2");
		end;

	OnEnable:
		hideoffnpc instance_npcname("pillar#2");
		end;
	}

1@instance,126,126,4	script	pillar#3	791,{

	progressbar "0xFFFF00",10;
	set .pillar3, 1;
	set .clicker3$, strcharinfo(0);
	donpcevent instance_npcname("pillar#3")+"::OnDisable"; 
	end;

	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("pillar#3");
		end;
		
	OnEnable:
		hideoffnpc instance_npcname("pillar#3");
		end;

	}

Try this haven't tried im only on mobile phone :))

  • Upvote 1
  • 0
Posted (edited)
4 hours ago, crazyarashi said:

1@instance,123,123,4	script	guy#1	791,{

	if( getvariableofnpc (.pillar1,"pillar#1" && .pillar2,"pillar#2" && .pillar3,"pillar#3" )) {
		mapannounce "1@instance", "Guy - All 3 Pillars has been activated, to the activators please talk to me."
		donpcevent instance_npcname("guy#1")+"::OnDisable";
		donpcevent instance_npcname("guy#2")+"::OnEnable";
		end;
		
} else {
		mes "Guy";
		mes "I want you talk to the 3 pillars first";
		close;
	
	donpcevent instance_npcname("pillar#1")+"::OnEnable";
	donpcevent instance_npcname("pillar#2")+"::OnEnable";
	donpcevent instance_npcname("pillar#3")+"::OnEnable";
	end;
	
	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("guy#1");
		end;

	OnEnable:
		hideoffnpc instance_npcname("guy#1");
		end;
	}
	
1@instance,123,123,4	script	guy#2	791,{
	if(.clicker1$ == 1){
	mes "Number 1";
	close;
	} else {
	if(.clicker2$ == 1)
	mes "Number 2";
	close;
	} else {
	if(.clicker3$ == 1)
	mes "Number 3";
	close;
	}
}

	
1@instance,124,124,4	script	pillar#1	791,{

	progressbar "0xFFFF00",10;
	set .pillar1, 1;
	set .clicker1$, strcharinfo(0);
	donpcevent instance_npcname("pillar#1")+"::OnDisable"; 
	end;
	
	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("pillar#1");
		end;

	OnEnable:
		hideoffnpc instance_npcname("pillar#1");
		end;
	}

1@instance,125,125,4	script	pillar#2	791,{

	progressbar "0xFFFF00",10;
	set .pillar2, 1;
	set .clicker2$, strcharinfo(0);
	donpcevent instance_npcname("pillar#2")+"::OnDisable"; 
	end;
	
	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("pillar#2");
		end;

	OnEnable:
		hideoffnpc instance_npcname("pillar#2");
		end;
	}

1@instance,126,126,4	script	pillar#3	791,{

	progressbar "0xFFFF00",10;
	set .pillar3, 1;
	set .clicker3$, strcharinfo(0);
	donpcevent instance_npcname("pillar#3")+"::OnDisable"; 
	end;

	OnInstanceInit:
	OnDisable:
		hideonnpc instance_npcname("pillar#3");
		end;
		
	OnEnable:
		hideoffnpc instance_npcname("pillar#3");
		end;

	}

Try this haven't tried im only on mobile phone :))

Thanks for the script! i've tried and unfortunately only this part doesn't work after tinkering around, it looks like it only allows 1 variable from 1 NPC rather than many, is there a possibility to get multiple variables from multiple NPCs? i could do multiple ifs as a workaround as such if within another if.

 

if(getvariableofnpc(.pillar1,"pillar#1") == 1){

	mes "You done it!";
  	close;
} else
  	mes "You've not done it :(";
	close;

 

However thanks alot for the help though! your initial script had a few errors but i've fixed them all so it's all good :D

Edit:
-----
as a workaround i did this instead which worked great.

 

		if(getvariableofnpc(.pillar1,"pillar#1") == 1){ //&& .pillar2,"pillar#2" && .pillar3,"pillar#3" )
			if(getvariableofnpc(.pillar2,"pillar#2") == 1){
				if(getvariableofnpc(.pillar3,"pillar#3") == 1){
		mapannounce instance_mapname("prontera"), "Guy - All 3 Pillars has been activated, to the activators please talk to me.",bc_all;
		donpcevent instance_npcname("guy#1")+"::OnDisable";
		//donpcevent instance_npcname("guy#2")+"::OnEnable";
		end; 
		}
			}
				}

 

Edited by ToiletMaster
  • 0
Posted
45 minutes ago, ToiletMaster said:

Thanks for the script! i've tried and unfortunately only this part doesn't work after tinkering around, it looks like it only allows 1 variable from 1 NPC rather than many, is there a possibility to get multiple variables from multiple NPCs? i could do multiple ifs as a workaround as such if within another if.

 


if(getvariableofnpc(.pillar1,"pillar#1") == 1){

	mes "You done it!";
  	close;
} else
  	mes "You've not done it :(";
	close;

 

However thanks alot for the help though! your initial script had a few errors but i've fixed them all so it's all good :D

Edit:
-----
as a workaround i did this instead which worked great.

 


		if(getvariableofnpc(.pillar1,"pillar#1") == 1){ //&& .pillar2,"pillar#2" && .pillar3,"pillar#3" )
			if(getvariableofnpc(.pillar2,"pillar#2") == 1){
				if(getvariableofnpc(.pillar3,"pillar#3") == 1){
		mapannounce instance_mapname("prontera"), "Guy - All 3 Pillars has been activated, to the activators please talk to me.",bc_all;
		donpcevent instance_npcname("guy#1")+"::OnDisable";
		//donpcevent instance_npcname("guy#2")+"::OnEnable";
		end; 
		}
			}
				}

 

Thats good then! :))

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...