Jump to content

[Vincentore] Script Collection


Vincentore

Recommended Posts


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   33
  • Joined:  02/17/15
  • Last Seen:  

Hello,

 

here is my first script!

 

 

 

LoginGift Script V1.0:

 

post-31669-0-36505300-1459555379_thumb.png

 

This scipt will give the player each day another Item.

The player has to be online a minimum time to get the reward.

This script allows that the player relogs, the online time will proced as soon as he relogs.

 

Setup:

Search the Event "OnInit".

Add your items and Item amounts to the arrays.

Set the waiting time. (How long the player has to stay online)

Set the cutin image if you want.

//===== By: ================================================== 
//= Vincentore
//===== Current Version: ===================================== 
//= 1.0
//===== Compatible With: ===================================== 
//= rAthena
//===== Description: ========================================= 
//= [Official Conversion]
//= Gives a player one item on login.
//= The player can relog and go on another char withour interr
//= upting the waiting time.
//===== Additional Comments: ================================= 
//= 1.0 First version.
//============================================================ 

-	script	DailyGifts	-1,{
OnPCLoginEvent:
	if(#gotItemLastDayOfYear<gettime(8)|| #gotItemLastTimeYear<gettime(7)){set #gotAnItemTodey,0;}
	
	if(#gotAnItemTodey!=1){
		if($cutinfileName$!=""){
			cutin $cutinfileName$,3;
		}
		//Snap Current Time / Day / Hour
		#wentOnlineTimeTick = gettimetick(1);
		#waittimeleft = ($waitminutestogetItem*60000)-(#wasOnlineInSeconds*1000);
		#waittimeleftinMinutes = #waittimeleft/60000;
		
		
		sleep2 #waittimeleft; // Wait till waitingtime is over to give ab Item
		getitem $ItemsDailyIDS[#day],$ItemsAmountDaily[#day];
		
		set #gotAnItemTodey,1;
		set #day,#day+1;
		set #wasOnlineInSeconds,0; // Reset this Value for the Next day
		#gotItemLastDayOfYear =gettime(8);
		#gotItemLastTimeYear =gettime(7);
		if(#day==getarraysize($ItemsDailyIDS)){set #day,0;} //Got all items. Begin again on day 1
	}
end;

OnPCLogoutEvent:
	set #wasOnlineInSeconds ,(gettimetick(1)-#wentOnlineTimeTick)+#wasOnlineInSeconds;
	if(#wasOnlineInSeconds<1){set #wasOnlineInSeconds,0;}
	end;

OnInit:
	// The Items to give.. 676 would be on the first day
	setarray $ItemsDailyIDS[0],676,12208,616,12103,607,13607,0,0,616,7776,6864,6865;
	
	//This array should alway be as long as the ItemIDArray
	setarray $ItemsAmountDaily[0],1,1,1,2,15,1,1,1,5,1,1,1;
	
	// How many minutes has the player to be online to get the daily item? Should be at least 20 minutes so multiaccount cant be abused.
	$waitminutestogetItem = 60;
	
	//Drop an .bmp inside the Illust folder of your GRF or Data folder. Add the name here without the .bmp
	$cutinfileName$ = "DailyGifts"; 
	end;
} 
Edited by Vincentore
Link to comment
Share on other sites


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

Please follow the Script Release Rules and Regulations.
Thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   33
  • Joined:  02/17/15
  • Last Seen:  

1.Do not release scripts that are not of your own creation unless you can provide evidence of explicit permission from the original author to do so

2. Attempt to post your script in the proper section. If you're not certain as to where to post it, feel free to ask one of the Scripting Moderators

3. Your script release should contain at the very least a 3-4 sentence description that states what your script does.

4. Attempt to have multiple hosts for your scripts as to prevent dead links. 3 or more links are ideal. [ Hosting Sites ]

5. Links to your script should directly provide the script without the need for registration.

Hosting your script in X Site and requiring users to register to see the script is not permitted.

6. Do not use

 or [code=auto:0] to release your script.

7. Your script should not contain any malicious code or produce the name of any servers in game where it will be visible to other players.

8. Your script release should be tested, polished, map-server error free, and debugged fully or to a certain extent prior to release.

9. Do not create topics in this section asking for support or requesting for scripts.

 

1. Check

2. Check

3. Check

4. Can't provide more hosts for now.

5. No Links.

6. Which to use?

7. Check

8. Tested myself to an extend (I just cannot test for multiple player at once)

9. Check

 

 

Please follow the [topic=57413]Script Release Rules and Regulations[/topic].

Thank you.

 

 

Sorry, I dont want to be mean or anything. Could you explain what I did wrong? I dont really see what you mean.

Link to comment
Share on other sites


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

no. 5 and 6.

 

do not use the code tag to release your script.

Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   1
  • Joined:  03/10/16
  • Last Seen:  

Vincentore

 

 

Can u send file image cutin?

Link to comment
Share on other sites

  • 8 months later...

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  77
  • Reputation:   1
  • Joined:  03/11/12
  • Last Seen:  

can you add command @reward to see how many time left to get reward?

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
Reply to this topic...

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