Jump to content
  • 0

NPC getitem 1 per account every 4hours


celeron0134

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

new_1-3,85,167,4    script    asdfg    1162,{
if (!isequipped(5009)) { mes "Please use Safety Helmet[0] Before Talk."; close; }
if( gettimetick(2) < wait_time ) { mes "You can only receive rewards once every 4hours."; close; }
progressbar "ffff00",10;
getitem 7179, 1;
set wait_time, gettimetick(2) + ( 3600 * 4 );
mes "Here are your Rewards";
mes "Come Back Again After 4 hours";
close;
}

}

the problem is i can just character select and pick another character and get the rewards 

id like to have this once per account for every 4hours thankyou

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

It's because you are using character variables

You can replace wait_time to #wait_time

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   1
  • Joined:  12/13/16
  • Last Seen:  

On 6/29/2020 at 1:37 PM, Patskie said:

It's because you are using character variables

You can replace wait_time to #wait_time

Hello @Patskie thank you for your reply.. i will try it now 

@Patskie thankyou it worked.. so meaning # sign is for account okay thanks again

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

46 minutes ago, celeron0134 said:

@Patskie thankyou it worked.. so meaning # sign is for account okay thanks again

 

Variables
---------

The meat of every programming language is variables - places where you store
data.

In the rAthena scripting language, variable names are not case sensitive.

Variables are divided into and uniquely identified by the combination of:
prefix  - determines the scope and extent (or lifetime) of the variable
name    - an identifier consisting of '_' and alphanumeric characters
postfix - determines the type of the variable: integer or string

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.

Prefix: scope and extent
nothing  - A permanent variable attached to the character, the default variable
           type. They are stored by char-server in the `char_reg_num` and
           `char_reg_str`.
"@"      - 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 by map-server in database table `mapreg`.
"$@"     - 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'. Function objects can also have .variables which
           are accessible from inside the function, however 'getvariableofnpc'
           does NOT work on function objects.
".@"     - A scope variable.
           They are unique to the instance and scope. Each instance has its
           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, its variables are converted to values
           ('return .@var;' returns a value, not a reference).
"'"      - An instance variable.
           These are used with the instancing system and are unique to each
           instance type. Can be accessed from inside the instance or by calling
           'getvariableofinstance'.
"#"      - A permanent local account variable.
           They are stored by char-server in the `acc_reg_num` table and
           `acc_reg_str`.
"##"     - A permanent global account variable stored by the login server.
           They are stored in the `global_acc_reg_num` table and
		   `global_acc_reg_str`.
           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.

Postfix: integer or string
nothing - integer variable, can store positive and negative numbers, but only
          whole numbers (so don't expect to do any fractional math)
'$'     - string variable, can store text

Examples:
  name  - permanent character integer variable
  name$ - permanent character string variable
 @name  - temporary character integer variable
 @name$ - temporary character string variable
 $name  - permanent global integer variable
 $name$ - permanent global string variable
$@name  - temporary global integer variable
$@name$ - temporary global string variable
 .name  - NPC integer variable
 .name$ - NPC string variable
.@name  - scope integer variable
.@name$ - scope string variable
 'name  - instance integer variable
 'name$ - instance string variable
 #name  - permanent local account integer variable
 #name$ - permanent local account string variable
##name  - permanent global account integer variable
##name$ - permanent global account string variable

 

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