Jump to content
  • 0

[Need Help] About Checking Char ID in Quest


Ice Bear

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   26
  • Joined:  11/20/11
  • Last Seen:  

Any One Can Help Me Out About a Quest Restriction Per Character

I Used This But It Affect The Whole Acc

This is For Whole Acc:

set QWeight,1;

if(QWeight == 10) goto Q_END;

I Need For Per Char Only:

Anyone Got The Solution For Me Thanks ~

Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Any One Can Help Me Out About a Quest Restriction Per Character

I Used This But It Affect The Whole Acc

This is For Whole Acc:

set QWeight,1;

if(QWeight == 10) goto Q_END;

I Need For Per Char Only:

Anyone Got The Solution For Me Thanks ~

That would be correct already o.o:

name - permanent character integer variable

name$ - permanent character string variable

@name - temporary character integer variable

@name$ - temporary character string variable

#name - permanent local account integer variable

#name$ - permanent local account string variable

The "name" and "name$" is for character based variables

"@name" and "@name$" are temporary character variables.

"#name" and "#name$" are for the entire account.

Side-Note:

"$" at the end of the variable means that the variable allows text input.

Without this it only allows numbers.

Regards,

Chris

Edited by llchrisll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

Any One Can Help Me Out About a Quest Restriction Per Character

I Used This But It Affect The Whole Acc

This is For Whole Acc:

set QWeight,1;

if(QWeight == 10) goto Q_END;

I Need For Per Char Only:

Anyone Got The Solution For Me Thanks ~

That does not affect the whole account, for whole account it would be:

set #QWeight,1;

for a permanent character variable, as your as asking for, it's correct like you're doing it.

set QWeight,1;

Maybe if you could explain to us, what is exactly what you want to do, I could figure it out and code it myself for yah~

----------------------------------------------------------------------------

integers

set QWeight,1; (perm. character var)

set @QWeight,1; (temp. character var)

set $QWeight,1; (perm. global var)

set $@QWeight,1; (temp. global var)

set .QWeight,1; (temp. npc var)

set .@QWeight,1; (temp-scope. npc var)

set #QWeight,1; (perm. account var)

set ##QWeight,1; (perm-global. accounts var)

Scope can be:
global	- global to all servers
local	 - local to the server
account   - attached to the account of the character identified by RID
character - attached to the character identified by RID
npc	   - attached to the NPC
scope	 - attached to the scope of the instance

Extent can be:
permanent - They still exist when the server resets.
temporary - They cease to exist when the server resets.

also

Prefix: scope and extent
nothing  - A permanent variable attached to the character, the default variable
	   type. They are stored with all the account data in "saveathena.txt"
	   in TXT versions and in the SQL versions in the `global_reg_value`
	   table using type 3.
"@"	  - A temporary variable attached to the character.
	   SVN versions before 2094 revision and RC5 version will also treat
	   'l' as a temporary variable prefix, so beware of having variable
	   names starting with 'l' if you want full backward compatibility.
"$"	  - A global permanent variable.
	   They are stored in "savemapreg.txt" or database table `mapreg`,
	   depending on server type.
"$@"	 - A global temporary variable.
	   This is important for scripts which are called with no RID
	   attached, that is, not triggered by a specific character object.
"."	  - A NPC variable.
	   They exist in the NPC and disappear when the server restarts or the
	   NPC is reloaded. Can be accessed from inside the NPC or by calling
	   'getvariableofnpc'.
".@"	 - A scope variable.
	   They are unique to the instance and scope. Each instance has it's
	   own scope that ends when the script ends. Calling a function with
	   callsub/callfunc starts a new scope, returning from the function
	   ends it. When a scope ends, it's variables are converted to values
	   ('return .@var;' returns a value, not a reference).
"#"	  - A permanent local account variable.
	   They are stored with all the account data in "saveaccreg.txt" in
	   TXT versions and in the SQL versions in the 'global_reg_value'
	   table using type 2.
"##"	 - A permanent global account variable stored by the login server.
	   They are stored in "saveaccount.txt" and in the SQL versions in the
	   'global_reg_value' table, using type 1. The only difference you will
	   note from normal # variables is when you have multiple char-servers
	   connected to the same login server. The # variables are unique to
	   each char-server, while the ## variables are shared by all these
	   char-servers.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  23
  • Reputation:   3
  • Joined:  12/10/11
  • Last Seen:  

I guest What you want is something like a quest that one char / Acc can do only ten time or do something 10 times for end quest.

If it's right, I suggest you to use this

For Per Char Quest

set QWeight,QWeight+1;
if(QWeight == 10) goto Q_END;

For Per Account Quest

set #QWeight,#QWeight+1;
if(#QWeight == 10) goto Q_END;

P.s. I think you confuse something about char and account.Plese check it what you want to do and what you've already done.

Edited by Magic-Maker
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

Guys.... I'm just saying, but he says something about "Per Char":

Any One Can Help Me Out About a Quest Restriction Per Character

I Used This But It Affect The Whole Acc

But he thinks that his script affects the whole acc which isn't the case o.o.

Regards,

Chris

Edited by llchrisll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   26
  • Joined:  11/20/11
  • Last Seen:  

All i want is to make the quest 10 times usage per character

Here is my Script >>

prontera,156,170,5 script Weight Quest 416,{
 set .npcname$,"^0000EE[Weight Quest]^000000";
 set .MaxWeight,500;
 set @req$,"^FF030DRequirements :^000000";

 if(QWeight == 10) goto Q_END;
 mes "[Warning]";
 mes "This Quest is 10 Time's Only & Per Account";
 mes "Before Using";
 mes "This Weight Increase Sets For Ever in Your Char";
 mes "Next to Proceed";
 next;
 mes .npcname$;
 mes "This Quest is 10 Time's Only & Per Account";
 mes "^0276FD[~Requirements]^000000";
 mes "^0276FD[250pcs]^000000 Handcuff's";
 mes "^0276FD[250pcs]^000000 Bank Note's";
 mes "+ [^0000EE"+.MaxWeight+"^000000] Weight Each Quest";
 menu "I have the requirements",Q_START,"Cancel",Q_CANCEL;
 close;
Q_START:
next;
mes .npcname$;
mes "Hello there "+strcharinfo(0);
mes "Are You Ready!?";
menu "Increase Now! +500 Weights",Q_START2,"Cancel",Q_CANCEL;
close;
Q_START2:
if((countitem(7345)<250) ||
(countitem(501)<250))
goto Q_REQ;
delitem 7345,250;
delitem 501,250;
set MaxWeight,MaxWeight+5000;
set QWeight,1;
dispbottom "Increased Weight by "+.MaxWeight+"";
close;
Q_REQ:
next;
mes .npcname$;
mes "This Quest is 10 Time's Only & Per Account";
mes "Complete The Requirements First";
close;

Q_END:
next;
mes .npcname$;
mes "This Quest is 10 Time's Only & Per Account";
mes "Limit Exceed";
close;
Q_CANCEL:
next;
mes .npcname$;
mes "Ok "+strcharinfo(0);
mes "Come Back Again";
close;
OnInit:
waitingroom "Weight Quest",0;
end;
}
close;
}

i try to use my script but when ive got 10 times finished the quets by my one character

and ive try to use my second char it says already did the quest =.=

Link to comment
Share on other sites


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

10 time ?

since you ae checking on this variable... QWeight

so you have to change this

set QWeight,1;

into this

set QWeight,QWeight + 1;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   26
  • Joined:  11/20/11
  • Last Seen:  

how about here emistry is this right ? if (QWeight == 5) goto Q_END;

Link to comment
Share on other sites


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

 if (QWeight == 5) goto Q_END; 

this will lead player to "access" the Q_END Label when his QWeight is equal to 5 when he talking to the NPC.

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