Jump to content
  • 0

Setting a Variable HELP!!


Reborn

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

Can anyone fix this for me please.. 

What I am doing is when the whole party killed a boss quest all of the member will have 

set Flower,1;

and my current script that I have is 

.@party_id = getcharid(1);
	getpartymember .@party_id, 1;
		for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
			if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
				attachrid $@partymembercid[.@i];
				if ( strcharinfo(3) == "poring_w03" )
					set Flower,7;
					sleep 5000;
					warpparty "prontera", 152, 150, .@party_id, "poring_w03";
			}
		}
end;

and what my script doing is only the one who killed the boss is the one was able to get the 

set Flower,1;

What I need is all of the party members should have 

set Flower,1;

Please help me guys.. Thanks in advance 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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

.@party_id = getcharid(1);
getpartymember .@party_id, 1;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
	if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
		attachrid $@partymemberaid[.@i];
		if ( strcharinfo(3) == "poring_w03" )
			set Flower,7;
	}
}
detachrid;
sleep 5000;
warpparty "prontera", 152, 150, .@party_id, "poring_w03";
end;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@Emistry

if we use

set Flower,1;

it will saved in char_reg_num right and also the $@partymemberaid it will get the account id of a player and there is no account id column in char_reg_num table.

Link to comment
Share on other sites

  • 0

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

the server itself already take care of saving all the value in the background ....

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@Emistry
I tried to use it however it only give the Variable on 1 player and once they do the quest again it gives the others the variable automatically while they are not yet done doing the quest.
 
This is the part of my script wherein the Boss is summoned and how the script work once the Boss is killed. Hope this one can help you solve the problem.
OnFinalRound:
	monster "poring_w02",97,96,"--ja--",3003,1,"BloodyRain::OnMyFinalBossDead";
	end;

OnMyFinalBossDead:
	mapannounce "poring_w02","Satan: Nooooooooooo.", bc_map,0xFF0000;
	.@party_id = getcharid(1);
		getpartymember .@party_id, 1;
		for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
			if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
				attachrid $@partymemberaid[.@i];
				if ( strcharinfo(3) == "poring_w02" )
					set BloodyQuest,7;
					set .MobPetDead,0;
					set .PR_Round,0;
					set getvariableofnpc(.PQStatus,"Tree of Blood"),getvariableofnpc(.PQStatus,"Tree of Blood") - 1;
			}
		}
	detachrid;
	sleep 5000;
	warpparty "prontera", 152, 150, .@party_id, "poring_w02";
	end;

 

 

Edited by neXus
Link to comment
Share on other sites

  • 0

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

15 hours ago, neXus said:

while they are not yet done doing the quest.

i didnt found any info in your provided script snippet that tell us how you check the quest progress.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

hi everyone,

can anyone help me fixing this part of my script?

	getpartymember(getcharid(1),0);
	getpartymember(getcharid(1),1);
	getpartymember(getcharid(1),2);
	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
		set .@nb,query_sql("SELECT * FROM char_reg_num_db WHERE char_id = "+$@partymembercid[.@i]+"", .@charid,.@key$,.@index,.@value ); 
			if (( .@charid != $@partymembercid[.@i] ) && ( .@key$ != "BloodQuest" ) && ( .@value != 6 )){
				mes "I'm sorry but one or some of your party member is not allowed to participate in Blood Quest.";
				close;
			}
	}
	mes "Which battlefield will you attempt?";
		if ( BloodQuest == 6 ) { switch(select("It's Bloody Rain")){
			case 1:
				.@prty = getcharid(1);
				set .PQStatus,1;
				donpcevent "BloodyRain::OnStart";
				warpparty "hell", 112, 136, .@prty, "prontera";
				end;
			}
		}

what i am trying to do here is when the party leader click the npc and tried to start the quest the whole party will be warp to the quest map if the party meets the requirement of the NPC. 

 

The only requirement is if the members was able to talk to a pre-requisite npc and get the variable of ( BloodQuest == 6 ) the whole party will be able to begin the quest, however if some of the member did not meet the requirement the party will not be able to start the quest until the member will be able to talk to a pre-requisite npc or remove from the party.

 

I hope someone can help me..

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

Bump to this topic. Does anyone knows how to do this or fix this? Please help.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

Why my topic being merge to this topic? Its pretty obvious that my second topic way different from the first one. What happened guys?

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