-
Posts
90 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Renji Abarai
-
Q>How Does This Script Works??? Does it give me 1 point per Recruit ??? or 1 Zeny per Recruit ??? Can you explain me how to buy in Recruit Reward Shop or the Mechanics of this Script, because i dont know what will i get after i recruit 1 player? I can't test it because i'm only using Test Server.. //===== eAthena Script ================================================================================ //= Referral System //===== By: =========================================================================================== //= rahuldev345 //===== Current Version: ============================================================================== //= V.1 //===== Compatible With: ============================================================================== //= eAthena SVN, SQL Only //===== Description: ================================================================================== //= Referral System Working: /* Player A : Old player (Invited player B and C) Player B and C : New comers 1: As Player B and Player C logs in, they need to find npc "Referral Npc" and must Sign with NPC by choosing option "- My Friend Called me!" and Enter the exact name of his friend and then complete process by choosing option "Complete the process". 2: The Player will be asked to Relog to Start with the System. 3: As he relog, a timer will start attaching to player and it will run till he completes his todays work, i.e Play/ Stay online for 5 Hours at your server.(as per below con- figuration, can be changed according to needs). ********************************************************\ set $@hourstoplay, 5; // No. of hours to play everyday. \******************************************************* 4: But, the reward wont be given just yet, the NPC will do constant checking, to see whether players B and C are active, for at least *days( Depends on you. ). Being active means, any(or) all of these; * Logs in and plays atleast X (won't mention this) hours a day. * The npc keeps checking IP's Everytime the players logs in, ( You can set the no. of octets you want to check of ip-address ) Eg; Referrals starting with first 3 octets being the same, ex: 204.152.10.25 and 204.152.10.75, won't count and it will dispbottom the warning. 5: If they meet all those requirements, the inviter, will be rewared with some items. */ //===== Additional Comments: =========================================================================== //= Let me know, if you find any bugs. //===== Changelogs: ==================================================================================== // V.2 (a) Now the npc name is more suitable to edit. // ( Now Recruits can't enter new players name than him. - thanks to Topher08 for pointing that out. // V.3 (a) Prevent players those who completed job, but still able to apply as recruits. //====================================================================================================== // - SQL TABLE /* CREATE TABLE IF NOT EXISTS `callfrnd` ( `id` int(11) NOT NULL auto_increment, `account_id` int(11) NOT NULL default '0', `name` varchar(23) NOT NULL default '', `last_ip` varchar(100) NOT NULL default '', `last_ip2` varchar(100) NOT NULL default '', `ref_name` varchar(23) NOT NULL default '', `ref_id` int(11) NOT NULL default '0', `mins` tinyint(3) unsigned NOT NULL default '0', `days` tinyint(3) unsigned NOT NULL default '0', `task_end` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`account_id`), KEY (`id`) ) ENGINE=MyISAM; */ //====================================================================================================== //====================================================================================================== // Edit Configurations here: //====================================================================================================== - script Ref_config -1,{ OnInit: set $@daystoplay, 2; // total no of days to play. set $@noofplayers, 2; // min. no. of players to call to server to be eligible to get the price. set $@hourstoplay, 6; // No. of hours to play everyday. set $@noofoctet, 3; // No. of octects, that script will check. set $@new_aid, 2000000; // To be sure that the player is really new to server. Put the latest registered account id here. set $@name$,"^E41B17[Call Your Friend]^000000"; // Edit npc name here. end; } //====================================================================================================== // The main NPC: //====================================================================================================== prt_in,45,109,3 script Recruit NPC 469,{ mes $@name$; mes "^616D7EI am one of the staff members of GM Team. And i am assigned to award players who bring players to our server and contribute to server population."; mes " "; next; mes $@name$; mes "^616D7ESo, How may I help you?"; next; switch(select("- My Friend Called me!:- I have called My Friend's:- Close")) { mes $@name$; case 1: if ( getcharid(3) < $@new_aid ) { mes "^616D7EYou doesn't seems to be new to server."; close; } mes "^616D7EOh.. Nice, so would you like to proceed with the Referral System?"; switch(select("Yes")) { case 1: if (#CallFrnd >= 1) { mes "^616D7EYou are already Registered on our database."; close; } goto ReferralSystem; } case 2: if ( #YCallFrnd ) { mes "^0000ffThanks! for supporting our server."; close; } query_sql("SELECT count(ref_id) from `callfrnd` where ref_id = " + getcharid(3) + " AND task_end = 1",.@count); if(.@count >= $@noofplayers) { mes "^616D7ECongratulations, It seems you have Recruited [^880000 " + .@count + " ^000000] Players, to our server."; next; set #YCallFrnd, 1; mes $@name$; mes "^616D7EAll Process has been completed successfully. Now are eligible of buying any but only one Item from the Referral Award Shop."; mes " "; mes "^616D7EHave a pleasent Stay at our server.!"; close; } mes "^616D7ENot Enough Recruitment's. Work Hard."; close; case 3: mes "^616D7EI wish!, if you could have helped me. :("; close; } end; ReferralSystem: next; mes $@name$; mes " "; mes "^ff0000NOTE: ^000000^616D7EThe Entered Name should match with your friend's name or he won't get the prize."; mes " "; mes "^616D7EEnter your Friend name: "; next; input .@frnd$; if ( .@frnd$ == strcharinfo(0) ) { mes $@name$; mes "^616D7ESorry, you are not allowed to Enter your name."; close; } mes $@name$; mes "^616D7ESo you have been called by [ ^ff000f" + .@frnd$ + "^000000 ]? ^616D7EIs that right??"; next; if(select("Yes:Back")==2) goto ReferralSystem; mes $@name$; mes "^616D7EIf you play more than [ ^2B60DE" + $@daystoplay + " days ^000000] and spend more than x hours to our server every day. Your friend will get a New Item from the list."; next; switch(select("Next:Show me the item List")) { case 1: break; case 2: mes $@name$; mes "^616D7ETalk to my Neighbour Npc to check the Item List Or Read forums."; close; } mes $@name$; mes "^616D7EAnd, if you Call your [ ^2B60DE" + $@noofplayers + " Friends ^000000] to our server, and they play more than [ ^2B60DE" + $@daystoplay + " days ^000000] and x no. of hours every day. Then you will also have a chance to win a Free Item."; next; mes $@name$; mes "^616D7EIts, Just that you need to follow some rules: "; mes " "; next; switch(select("Exit:Complete the process")) { case 1: mes $@name$; mes "^616D7ENevermind~, You can come back again!"; close; case 2: query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lastip$); // recruits ip address set .@frnd, query_sql ("SELECT name, char.account_id, last_ip FROM `char` LEFT JOIN `login` ON login.account_id = char.account_id where name = '" + escape_sql(.@frnd$) + "'",.@chname$, .@account_id, .@flastip$); // recruiter ip address and information if (!.@frnd) { mes $@name$; mes "^ff0000FAILED! FAILED! FAILED!"; mes " "; mes "^616D7ESorry, We didn't found your friend's name in our database. Make sure that you Enter's Everything correctly."; close; } if ( .@account_id == getcharid(3) ) { mes $@name$; mes "^ff0000WARNING: ^616D7EThis Player is found on your account. Sorry, Unable to proceed further!!!"; mes " "; mes "Enter some other name"; close; } if ( .@account_id > getcharid(3) ) { // i am older than my frnd mes $@name$; mes "^616D7EIt seems, your friend is newer than you to our server. Damn you cheaters. "; close; } if ( .@lastip$ == .@flastip$ ) { mes $@name$; mes "^616D7EIt seems you and your friend are from IP Address: ^ff0000" + .@flastip$ + "^000000. Sorry, but its not allowed."; close; } set #CallFrnd, 1; query_sql("INSERT INTO `callfrnd` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lastip$ + "','None','" + escape_sql(.@frnd$) + "'," + .@account_id + ",0,0,0)"); mes $@name$; mes "^616D7EYour registration is now accepted."; mes "^ff0000Now, you should relog to make changes save and start properly.^000000"; mes " "; mes "and ^0000ff~ We Welcome's you to our server."; close; OnInit: waitingroom "Recruit NPC",0; } } //====================================================================================================== // Keep Checking Records and performs accordingly. //====================================================================================================== - script timeplayed -1,{ OnPCLoginEvent: if (#CallFrnd != 1) end; // Task still not started or is completed query_sql("SELECT ref_id, mins, days from `callfrnd` where account_id = " + getcharid(3), @ref_id, @minute, consecutive_days); query_sql("SELECT SUBSTRING_INDEX(last_ip,'.'," + ($@noofoctet) + ") from `login` where account_id = " + @ref_id,.@fip$); query_sql("SELECT SUBSTRING_INDEX(last_ip,'.'," + ($@noofoctet) + ") from `login` where account_id = " + getcharid(3),@myip$); if((#lastDayOnlineC == gettimetick(2)/86400)) end; // If today's job is completed or not. if( #lastDayOnlineC < ((gettimetick(2)/86400)-1) ) { // if login was not yesterday set consecutive_days, 0; set @minute, 0; goto TimerStart; } if( #lastDayOnlineC == ((gettimetick(2)/86400)-1) ) { // if login was yesterday goto TimerStart; } TimerStart: if(.@fip$ == @myip$) { dispbottom "Referral system Stopped because you and your friend(s) ip is same."; end; } attachnpctimer ""+strcharinfo(0); initnpctimer; end; OnTimer30000: if(checkvending() == 1 || checkchatting() == 1) { //Check if Vending or chatting dispbottom "The timer stopped because you are vending/chatting. Please relog if you wish to start again."; stopnpctimer; end; } getmapxy( .@map$, .@x, .@y, 0 ); //Check if Idle if(@map$ == .@map$ && @x == .@x && @y == .@y) { set @afk, @afk + 1; } else { set @afk, 0; } set @map$, .@map$; set @x, .@x; set @y, .@y; if(@afk == 5) { // if afk for 5 mins reduce 4 mins from their total minutes. set @minute, @minute - 4; dispbottom "The timer stopped because you were Idle for 5 minutes. Please relog if you wish to start again."; stopnpctimer; end; } end; OnTimer60000: //Check every 1 Minute set @minute, @minute + 1; if(@minute == ($@hourstoplay*60)) { set @minute,0; query_sql("UPDATE `callfrnd` SET days = (days+1) WHERE account_id = " + getcharid(3) +";"); set #lastDayOnlineC, gettimetick(2)/86400; set consecutive_days, consecutive_days +1; if( consecutive_days == $@daystoplay ) { set #CallFrnd, 2; query_sql("UPDATE `callfrnd` SET task_end = 1 WHERE account_id = " + getcharid(3) +";"); stopnpctimer; end; } end; } initnpctimer; end; OnPCLogoutEvent: if (#CallFrnd != 1) end; query_sql("INSERT INTO `callfrnd` (id,account_id,mins) VALUES (NULL," + getcharid(3) + ","+@minute+") ON DUPLICATE KEY UPDATE account_id= " + getcharid(3) + ",last_ip='"+@myip$+"',mins="+@minute); end; } //====================================================================================================== // Shop NPC: // NOTE: This npc lets you buy only one item of quantity one. //====================================================================================================== prt_in,45,102,3 script Recruit Reward Shop 480,{ callshop "Ref#shop1",1; npcshopattach "Ref#shop1"; end; OnBuyItem: if(#YCallFrnd == 1) { set @cost,0; if ( @bought_quantity > 1) { message strcharinfo(0), "You are only allowed to buy one item."; end; } getitem @bought_nameid,@bought_quantity; set #YCallFrnd, 2; deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; } else { mes "[ " + strnpcinfo(3) + " ]"; mes "What? " + ((#YCallFrnd==0)? "you haven't Referred anyone to our server.":"you have alredy Received the price."); close; } OnInit: waitingroom "Recruit Reward Shop",0; end; npcshopattach "Ref#shop1"; end; } - shop Ref#shop1 83,1750:-1,1751:-1,1752:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1
-
may i know when this script will give prize?????
-
how about a script of 1 Vote Proof and it will convert to 1 Vote Points ????
-
Lucy Pick Event Mechanics: i want a Lucy Pick Event that will 1. Randomly choose only "1 player currently online" in the server. 2. it will Randomly choose only "1 player currently online" in Random Time also 3. The choosen one will recieve reward Donation_Ticket item id 7179. check the script below if it is correct???
-
Can i have the Step By Step Guide of this? With Picture
Renji Abarai replied to Renji Abarai's question in Web Support
HELP WHEN I TALK TO NPC THE NPC WILL NOT TALK OR NOTHING HAPPEN -
MY PVP WARPER IS NOT WORKING PROPERLY :(
Renji Abarai replied to Renji Abarai's question in Scripting Support
thanks guys it's working )) forgot to edit item_noequip.txt sorry again thank you guys!!! -
Can i have the Step By Step Guide of this? With Picture
Renji Abarai posted a question in Web Support
Can i have the Step By Step Guide of this??? With Picture -
Can i have the Step By Step Guide of this? With Picture
Renji Abarai posted a question in Web Support
Can i have the Step By Step Guide of this??? With Picture http://rathena.org/board/files/file/2344-fluxcp-addon-vote-for-points/ -
I'm Still new in Flux CP editing. can i have the Step by step process of this Vote For Points with screen shots??? i will really appreciate it
-
MY PVP WARPER IS NOT WORKING PROPERLY :(
Renji Abarai replied to Renji Abarai's question in Scripting Support
Annie is right.. dont use that code.. it will bypass... I use Lord Knight i can still enter in "No potion pvp" with restrict YGG = Item ID 607 and other id's 608,504 // items not allowed in PVP NoPotion setarray .NoPotion_ids[0],607,608,504; <<<<<<<<<<<<< IM USING LORD KNIGHT (( I CAN STILL ENTER IN "NO POTION PVP" EVEN I HAVE THIS ITEMS IN MY INVENTORY -
HOW TO CHANGE THE TIME OF KOE EVENT EVERY SATURDAY?
Renji Abarai replied to Renji Abarai's question in Scripting Support
@annieruru i love yeah your the best!!! <3 -
REQ Transcend Card Item_db.txt Script
Renji Abarai replied to Renji Abarai's question in Database Requests
i know the basic script, i only dont know the code for "if ref 9 or 10" bla bla bla ; </3 can i have the code of "if refine 9,10;" pluease??? :''> -
REQ Transcend Card Item_db.txt Script
Renji Abarai replied to Renji Abarai's question in Database Requests
thanks but i dont get it -
Thanks its now working i love yeah guys!
-
REQ Transcend Card Item_db.txt Script
Renji Abarai replied to Renji Abarai's question in Database Requests
Thanks for reply how about this one?? -
REQ Transcend Card Item_db.txt Script
Renji Abarai replied to Renji Abarai's question in Database Requests
Client Side is done.. all i need now is the Item_db.txt script -
i got error (( http://postimg.org/image/qjs1k211d/ i got error (( http://postimg.org/image/qjs1k211d/
-
REQUESTING for Transcend Card Item_db.txt Script Can somebody Help me ??? ((
-
can i have the pastebin of this one? http://www.eathena.ws/board/index.php?showtopic=270783
-
can i request script like this.. the recruiter will get item when he/she recruit a new player.. its similar to this one >>> http://www.eathena.ws/board/lofiversion/index.php/t207281.html bump
-
HOW TO CHANGE THE TIME OF KOE EVENT EVERY SATURDAY?
Renji Abarai posted a question in Scripting Support
HOW TO CHANGE THE TIME OF KOE EVENT EVERY SATURDAY??? OR CAN YOU MAKE IT THE GM HAVE MENU TO START & END THE KoE EVENT SAME AS WOE CONTROLLER??? HERE's THE KING OF THE HILL SCRIPT i will very appreciate your help guys