Jump to content
  • 0

newbie here, just want to where to put this script


netcyan

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

just want to ask where can I put the HourlyBonus.txt script, because when i tried to put in on one of my npc folder.

it doesn't work, i've adjusted the time to 5mins so I can see faster if it works or not but its not working, so i've decide to change it back again
To the original content and waited for 1 hr lol, still did not work..

 

Script attached.

hourlybonus.txt

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  155
  • Reputation:   6
  • Joined:  03/30/13
  • Last Seen:  

Do you mean how to make the server read it?

 

Declare it in rathena/npc/scripts_custom.conf, and depending on the folder you put it, you have to write its direction. I suggest you to drop your .txt in rathena/npc/custom folder.

 

So you will have to declare it this way:

 

npc: npc/custom/hourlybonus.txt

 

 

Hope that helps.

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

I did not try to declare it on .conf yet, i'm going to try it now. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

just want to ask where can I put the HourlyBonus.txt script, because when i tried to put in on one of my npc folder.

it doesn't work, i've adjusted the time to 5mins so I can see faster if it works or not but its not working, so i've decide to change it back again

To the original content and waited for 1 hr lol, still did not work..

 

Script attached.

 

Or maybe you did not load it? lol

 

Command is @loadnpc npc/folder_name/npc_name.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

I tried to put it on conf and @loadnpc still the same.. this is the error im getting.
 

[status]: Event 'OnInit' executed with '1633' NPCs.
[status]: Event 'OnInterIfInit' executed with '0' NPCs.
[status]: Event 'OnInterIfInitOnce' executed with '0' NPCs.
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Stopping...
 * w1=- script hourlypoints -1,{
 * w2=
 * w3=
 * w4=
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

tab at the first line?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

tab at the first line?

- 	script	hourlypoints	-1,
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

thanks, now it seems that it doesn't have error, but this is what it says.
 

[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.

 

tab at the first line?

- 	script	hourlypoints	-1,thanks, now it seems that it doesn't have error, but this is what it says.
[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.
 

 

Edited by netcyan
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

 

thanks, now it seems that it doesn't have error, but this is what it says.

 

[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.

 

tab at the first line?

- 	script	hourlypoints	-1,thanks, now it seems that it doesn't have error, but this is what it says.
[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.
 

 

 

- 	script	hourlypoints#hourly1	-1,

By the way if you have loaded the npc once via @loadnpc, don't load it again via @loadnpc.

 

Just use @reloadscript if you have changed something on the script.

 

Now i suggest you restart your server and load it again, if you have already put it on scripts_custom.conf before starting your server there's no need to load it again.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

 

 

thanks, now it seems that it doesn't have error, but this is what it says.

 

[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.

 

tab at the first line?

- 	script	hourlypoints	-1,thanks, now it seems that it doesn't have error, but this is what it says.
[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.
 

 

 

- 	script	hourlypoints#hourly1	-1,

By the way if you have loaded the npc once via @loadnpc, don't load it again via @loadnpc.

 

Just use @reloadscript if you have changed something on the script.

 

Now i suggest you restart your server and load it again, if you have already put it on scripts_custom.conf before starting your server there's no need to load it again.

 

 

going to try that give me a few minutes, and just want to ask do I need to put a map on this? 

 

getmapxy( .@map$, .@x, .@y, 0 );
if(@map$ == .@map$ && @x == .@x && @y == .@y) {
set @afk, @afk + 1;
}
else {
set @afk, 0;
}
set @map$, .@map$; set @x, .@x; set @y, .@y;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

 

 

 

thanks, now it seems that it doesn't have error, but this is what it says.

 

[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.

 

tab at the first line?

- 	script	hourlypoints	-1,thanks, now it seems that it doesn't have error, but this is what it says.
[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
 
 
just tried it and its not giving cash points.
 

 

 

- 	script	hourlypoints#hourly1	-1,

By the way if you have loaded the npc once via @loadnpc, don't load it again via @loadnpc.

 

Just use @reloadscript if you have changed something on the script.

 

Now i suggest you restart your server and load it again, if you have already put it on scripts_custom.conf before starting your server there's no need to load it again.

 

 

going to try that give me a few minutes, and just want to ask do I need to put a map on this? 

 

getmapxy( .@map$, .@x, .@y, 0 );
if(@map$ == .@map$ && @x == .@x && @y == .@y) {
set @afk, @afk + 1;
}
else {
set @afk, 0;
}
set @map$, .@map$; set @x, .@x; set @y, .@y;

 

 

Nah, that just indicates wherever map you are you'll get points. ( As far as i understand )

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  12/26/15
  • Last Seen:  

I just tried it almost the same, and new error comes
 

[Error]: script error in file 'npc/gmh_freenpc/hourlybonus.txt' line 45 column 1
    set_label: dup label
    42: end;
    43: }
    44: end;
*   45: OnTimer1000:
        ^
    46: set @minute, @minute + 1;
    47: if(@minute == 1){
    48: set @minute,0;
[Warning]: npc_parsename: Duplicate unique name in file 'npc/gmh_freenpc/hourlybonus.txt', line '15'. Renaming 'hourlypoints' to '1_-1_0_0'.
[Debug]: this npc:
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0
[Debug]: other npc in 'npc/gmh_freenpc/hourlybonus.txt' :
   display name 'hourlypoints'
   unique name 'hourlypoints'
   map=(not on a map), x=0, y=0

bump

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

You can use this one instead.

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== Compatible With: =============================================
//= Any eAthena Version
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 3 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================
-	script	hourlypoints	-1,{
//--Start of the Script
OnPCLoginEvent:
    addtimer .timer,"hourlypoints::OnPointGet";
	dispbottom "Hourly points have started.";
    end;
    
OnPointGet:
    while(checkvending() >= 1 || checkchatting() == 1 || checkidle()>=.dlimit) {
        sleep2 .delay;
        if(.@mes$=="")
            dispbottom set(.@mes$,"The hourly points event halted because you were vending, chatting, or idle.");
    }
    set #KPoints, #KPoints + .point_amt;
    dispbottom "You received "+.point_amt+" Kaitus  Points by staying online for an hour";
    dispbottom "Current Balance = "+#KPoints+" Kaitus Points";
    set @consecutive_hour, @consecutive_hour + 1;

    //Check for 4 hours consecutive
    if(@consecutive_hour == 4) {
        set @consecutive_hour,0;
        set #KPoints, #KPoints + .cpoint_amt;
        dispbottom "You receive "+.cpoint_amt+" Kaitus  Points in playing for 4 consecutive hours";
        dispbottom "Current Balance = "+#KPoints+" Kaitus Points";
    }
    addtimer .timer,"hourlypoints::OnPointGet";
    end;

OnInit:
    set .timer, 1000*60*60; //Timer in milliseconds.
    set .cpoint_amt, 100; //Points gained for consecutive time online.
    set .point_amt, 20; //Normal points gained.
    set .delay, 1000; //Delay for idle re-check check.
    set .dlimit, 60*40; //Stop points if afk greater then in seconds.
}

Basically does the same thing and slightly more pleasant in terms of reading the script. And less use of labels too.

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