Vincentore Posted April 1, 2016 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 60 Reputation: 33 Joined: 02/17/15 Last Seen: January 28, 2024 Share Posted April 1, 2016 (edited) Hello, here is my first script! LoginGift Script V1.0: 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 April 2, 2016 by Vincentore Quote Link to comment Share on other sites More sharing options...
Emistry Posted April 2, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 2 hours ago Share Posted April 2, 2016 Please follow the Script Release Rules and Regulations.Thank you. Quote Link to comment Share on other sites More sharing options...
Vincentore Posted April 2, 2016 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 60 Reputation: 33 Joined: 02/17/15 Last Seen: January 28, 2024 Author Share Posted April 2, 2016 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. Check2. Check3. Check4. Can't provide more hosts for now.5. No Links.6. Which to use?7. Check8. 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. Quote Link to comment Share on other sites More sharing options...
Emistry Posted April 2, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 2 hours ago Share Posted April 2, 2016 no. 5 and 6. do not use the code tag to release your script. Quote Link to comment Share on other sites More sharing options...
rizkiolivia Posted September 19, 2016 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 13 Reputation: 1 Joined: 03/10/16 Last Seen: July 22, 2023 Share Posted September 19, 2016 Vincentore Can u send file image cutin? Quote Link to comment Share on other sites More sharing options...
hadie Posted June 6, 2017 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 86 Reputation: 1 Joined: 03/11/12 Last Seen: January 11 Share Posted June 6, 2017 can you add command @reward to see how many time left to get reward? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.