Jump to content

Rivers

Members
  • Posts

    237
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Rivers

  1. Does anyone know how I can make this NPC chat box show the numbers counting upward instead of down?

    //Script by Normynator v1.1
    prontera,140,180,5    script    Item    80,{
    function EndEvent;
        if(getgmlevel() >= 99){
            .@s = select("Start:Stop:Chancel");
            if(.@s == 1){
                mes "Start";
                set $giveaway, 0;
                announce "Give away has just started!!", 0;
                close;
            }else if(.@s == 2){
                mes "Stop";
                set $giveaway, 50;
                EndEvent;
                close;
            }else{
                close;
            }
        }
        if($giveaway == 50){
            mes "All items are gone!";
            close;
        }else{
            set .@left, 50 - $giveaway;
            mes "Hi";
            mes .@left + " Items left.";
            //mes $giveaway;
            if (#AlreadyGot){
                mes "You already got your item.";
                close;
            }
            set #AlreadyGot, 1;
            mes "An Apple for you";
            getitem 512, 1;
            set $giveaway, $giveaway + 1;
            if($giveaway == 50){
                EndEvent;
            }
            close;
        }
    EndEvent:
            announce "Give away has just ended!!", 0;
            query_sql "DELETE FROM `rathena`.`global_reg_value` WHERE `str`='#AlreadyGot'";
        end;
    }

     

  2. I did something similar to this, instead of a random prize form an NPC, which I could not make, I decided to make a new Box with a rarity scale in it, exactly like Old Blue Box. This way the box can also become another type of currency for the game, or you can account lock it. ? 
    Check the Old Blue Box text file and perhaps consider making a new one following the format it has.

  3. Good day, does anyone know where I can find the file, or anything, that has all the commands for skills in files like battle.cpp ?
    Example of what I'm looking for:

    	if (battle_config.weapon_defense_type) {
    		vit_def += def1*battle_config.weapon_defense_type;
    		def1 = 0;
    	}
    wd.damage = battle_attr_fix(src, target, wd.damage, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv

     

  4. Try this script. Works well, just change the items IDs and quantities you want.

    //===== EinherjarRO Scripts ================================== 
    //= Requested 
    //===== By: ================================================== 
    //= Stolao
    //===== Current Version: =====================================
    //= 2.1C
    //===== Compatible With: =====================================
    //= rAthena SVN
    //===== Description: =========================================
    //= A reward system for players who play more frequently
    //===== Todo =================================================
    //= Make Logging out then it continue count
    //===== Additional Comments: =================================
    //= 2.00 Origional Make
    //= 2.01 Fixed Logic Bug
    //= 2.02 Fixed Year Multiplier
    //= 2.03 Added an IP check
    //= 2.04 Split Rewards up
    //= 2.05 Move ip check to Daily reward collection
    //= 2.06 Added ability to see next day via commands/relogging
    //= 2.07 Added Delay
    //= 2.08 Moved Delay to none VIP only
    //= 2.09 Removed some useless lines
    //= 2.0A Removed Menus due to bugs
    //= 2.0B Fixed VIP Cutin
    //= 2.0C Added it showing previos day cutin
    //= 2.0D Added a for loop
    //= 2.0E Fixed Ramined logged in time calculation (visual bug)
    //= 2.0F Added a F_InsertPlural to "more minute"
    //= 2.10 Added a Mac Check
    //= 2.11 Changed the IP check to [Sader1992] version
    //= 2.12 Enable Bound Type
    //= 2.13 Added 'collectreward', 'dailyreward', 'collectdaily' Commands
    //= 2.14 Added 'nextreward' Command
    //= 2.15 Added Daily Buffs
    //= 2.16 Added Exp Rewards
    //= 2.17 Removed Reards for Autotraders
    //= 2.18 Move Buffs to Daily so VIP wont trigger twice
    //= 2.19 Optimized Slightly
    //= 2.1A Fixed a bug with VIP getting bonus rewards in normal rewards
    //= 2.1B Fixed some documentaion
    //= 2.1C Fixed extra '['
    //===== Contact Info: ========================================
    //= [Stolao] 
    //= Email: [email protected]
    //============================================================
    prontera,5,5,5	script	LOGIN	111,{
    OnPCLoginEvent:
    	if(!@logintime)
    		@logintime = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE);
    OnLoginCmnd:
    	.@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH);
    	if(.Reset && .@i > #LastDailyReward + 1)
    		#DRewardCon = 0;
    	if(.Reset && .@i > #LastVIPReward + 1)
    		#VIPRewardCon = 0;
    	.@VIPSize = getarraysize(.VIPRewards$);
    	.@Size = getarraysize(.Rewards$);
    	if(#DRewardCon >= .@Size && #VIPRewardCon >= .@VIPSize){
    		#LastDailyReward = .@i;
    		#LastVIPReward = .@i;
    		end;
    	}
    	sleep2 1000;
    	for(.@k = 0; .@k < 2; .@k++){
    		if(!.@k){
    			if(!vip_status(VIP_STATUS_ACTIVE) && .VIPRewards$[#VIPRewardCon + 1] != ""){
    				//message strcharinfo(0),"[Daily Rewards]: Become a VIP for more rewards.";
    				continue;
    			} else if(#VIPRewardCon >= .@VIPSize){
    				message strcharinfo(0),"[Daily Rewards]: No more VIP rewards remaining this month.";
    				continue;
    			} else if(.@i <= #LastVIPReward){
    				message strcharinfo(0),"[Daily Rewards]: VIP Rewards already collected today";
    				continue;
    			}
    		} else {
    			if(#DRewardCon >= .@Size){
    				message strcharinfo(0),"[Daily Rewards]: No more rewards remaining this month.";
    				continue;
    			} else if(.@i <= #LastDailyReward){
    				message strcharinfo(0),"[Daily Rewards]: Rewards already collected today.";
    				continue;
    			}
    		}
    		if(!.@k)
    			explode(.@XT$,.VIPRewards$[#VIPRewardCon + 1],",");
    		else {
    			if(.IPCheck){
    				query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+getcharip()+"'", .@AccountId);
    				.@Size = getarraysize(.@AccountId);
    				for(.@i=0; .@i < .@Size; .@i++){
    					query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId[.@i]+"' AND `key` = '#LastDailyReward'",.@LastIp2);
    					if(.@i <= .@LastIp2){
    						message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per IP sorry.";
    						continue;
    					}
    				}
    			}
    			if(.MacCheck){
    				query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@last_unique_id$);
    				query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@last_unique_id$+"'", .@AccountId2);
    				.@Size = getarraysize(.@AccountId2);
    				for(.@i=0; .@i < .@Size; .@i++){
    					query_sql("SELECT `value` FROM `acc_reg_num` WHERE `account_id` = '"+.@AccountId2[.@i]+"' AND `key` = '#LastDailyReward'",.@MacCheck2);
    					if(.@i <= .@MacCheck2){
    						message strcharinfo(0),"[Daily Rewards]: Rewards are limited to 1 per computer sorry.";
    						continue;
    					}
    				}
    			}
    			if(.Rest){
    				.@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE);
    				if(.@time < @logintime + .Rest){
    					.@delay = @logintime + .Rest - .@time;
    					message strcharinfo(0),"[Daily Rewards]: to collect reward you must remain logged in for "+callfunc("F_InsertPlural",.@delay,"more minute")+".";
    					continue;
    				}	
    			}
    			deletearray .@XT$[0],getarraysize(.@XT$);
    			.@NextDay = #DRewardCon + 1;
    			explode(.@XT$,.Rewards$[.@NextDay],",");
    		}
    		if(checkvending() & 2 && .Mode & 256){
    			message strcharinfo(0),"[Daily Rewards]: Venders cannot recive rewards.";
    			end;
    		}
    		.@Size = getarraysize(.@XT$);
    		deletearray .@TT[0],getarraysize(.@TT);
    		deletearray .@itms[0],getarraysize(.@itms);
    		deletearray .@qnts[0],getarraysize(.@qnts);
    		for(.@x = y = 0; .@x < .@Size; .@x++)
    			.@TT[.@x] = atoi(.@XT$[.@x]);
    		if(.Mode & 1 && (.@TT[4] > 0 || .@vip[4] > 0)){
    			.@Size = getarraysize(.@TT);
    			for(.@x = 4; .@x <= .@Size - 1 ; .@x += 2){
    				.@itms[.@y] = .@TT[.@x];
    				.@qnts[.@y] = .@TT[.@x + 1];
    				.@y++;
    			}
    			if(checkweight2(.@itms,.@qnts)){
    				for(.@x = 0; .@x < .@y; .@x++){
    					if(.Mode & 128)
    						getitembound  .@itms[.@x], .@qnts[.@x], .Bound_Mode;
    					else	getitem  .@itms[.@x], .@qnts[.@x];
    				}
    			} else {
    				message strcharinfo(0),"[Daily Rewards]: You cannot carry the prizes, please use storage and relog.";
    				continue;
    			}
    		}
    		if(.Mode & 2 && (.@TT[1])){
    			#Loyalty += .@TT[1];
    			message strcharinfo(0),"[Daily Rewards]: Recieved "+ .@TT[1] +" "+.Points$;
    		}
    		if(.Mode & 4 && (.@TT[0])){
    			zeny += .@TT[0];
    			message strcharinfo(0),"[Daily Rewards]: Recieved "+ .@TT[0] +"z";
    		}
    		if(.Mode & 8 && (.@TT[3] || .@TT[4]))
    			getexp .@TT[3], .@TT[4];
    
    		if(!.@k){
    			if(.Mode & 32)
    				cutin .VIPCutins$[#VIPRewardCon],4;
    			#VIPRewardCon++;
    			#LastVIPReward = .@i;
    			sleep2 1000;
    			if(.Mode & 64)
    				cutin .VIPCutins$[#VIPRewardCon],4;
    			message strcharinfo(0),"[Daily Rewards]: You have collected your VIP reward, for "+callfunc("F_InsertPlural",#VIPRewardCon,"day")+" this month.";
    		} else {
    			if(.Mode & 16){
    				.@Size = getarraysize(.BuffInfo);
    				for(.@x = 0; .@x < .@Size; .@x += 4){
    					if(.@NextDay == .BuffInfo[.@x + 1])
    						sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3];
    				}
    			}
    			if(.Mode & 32)
    				cutin .Cutins$[#DRewardCon],4;
    			#DRewardCon++;
    			#LastDailyReward = .@i;
    			sleep2 1000;
    			if(.Mode & 64)
    				cutin .Cutins$[#DRewardCon],4;
    			message strcharinfo(0),"[Daily Rewards]: You have collected your daily reward, for "+callfunc("F_InsertPlural",#DRewardCon,"day")+" this month.";
    		}	
    		if(.Mode & 32 || .Mode & 64){
    			sleep2 15000;
    			cutin "",255;
    		}
    	}
    	end;
    
    OnNextCmnd:
    	.@time = gettime(DT_YEAR) * 60 * 24 * 365 + gettime(DT_DAYOFYEAR) * 60 * 24 + gettime(DT_HOUR) * 60 + gettime(DT_MINUTE);
    	if(.@time >= @logintime + .Rest){
    		message strcharinfo(0),"[Daily Rewards]: your next reward is available.";
    	} else {
    		.@i = gettime(DT_YEAR) * 12 * 31 + gettime(DT_MONTH) * 31 + gettime(DT_DAYOFMONTH);
    		if(.@i <= #LastDailyReward)
    			message strcharinfo(0),"[Daily Rewards]: Your next reward will be aviable tomorrow.";
    		else {
    			.@days = (.@time >= @logintime + .Rest) / 60 / 24;
    			.@hours = ((.@time >= @logintime + .Rest) / 60) % 24;
    			.@mins = (.@time >= @logintime + .Rest) % 60;
    			message strcharinfo(0),"[Daily Rewards]: You have "+ ((.@days) ? .@days +" Days " : "") + ((.@hours) ? .@hours +" Hours " : "") + ((.@mins) ? .@mins +" Minutes " : "") +"till your next reward.";
    		}
    		if(.Mode & 32 || .Mode & 64){
    			if(.@NextDay >= getarraysize(.Rewards$))
    				.@g = 0;
    			else	.@g = #DRewardCon + 1;
    			cutin .Cutins$[.@g],4;
    		}
    	}
    	end;
    
    OnHour00:
    	if(gettime(DT_DAYOFMONTH) == 1){
    		query_sql("DELETE FROM `acc_reg_num` WHERE `key` = '#DRewardCon' OR `key` = '#VIPRewardCon' OR `key` = '#LastVIPReward' OR `key` = '#LastDailyReward'");
    		addrid(0);
    		#DRewardCon = #VIPRewardCon = #LastVIPReward = #LastDailyReward = 0;
    	}
    	end;
    
    OnInit:
    	// Basic Settings
    	//   1: Item | 2: Points | 4: Zeny | 8: Exp
    	//   16: Gain Buffs
    	//   32: Show Cutins | 64: Show Next Day Cutin
    	//   128: Item Rewards Bound
    	//   256: No Rewards for Autotraders 
    	//     (a bit value, e.g. 3 = Items & Points from Multi)
    	.Mode = 1|2|4|16|32|64|128|256;
    
    	// Item Binding Mode
    	//	 Bound_Account : Account Bound item
    	//	 Bound_Guild   : Guild Bound item
    	//	 Bound_Party   : Party Bound item
    	//	 Bound_Char    : Character Bound item
    	.Bound_Mode = Bound_Account;
    
    	// To disable the command '@loginreward' comment the next lines
    	// * Needs extra commands for typos
    	bindatcmd("relog","LOGIN::OnLoginCmnd",0,99);
    	bindatcmd("collectreward",strnpcinfo(3)+"::OnLoginCmnd",0,99);
    	bindatcmd("dailyreward",strnpcinfo(3)+"::OnLoginCmnd",0,99);
    	bindatcmd("collectdaily",strnpcinfo(3)+"::OnLoginCmnd",0,99);
    	bindatcmd("nextreward",strnpcinfo(3)+"::OnNextCmnd",0,99);
    
    	// Reset days back to 0 on a skipped day.
    	// Toggle 
    	// [0] = Off
    	// [1] = On
    	.Reset = 0;
    
    	// .Rest
    	// Delay after login to collect rewards
    	// In Minutes
    	.Rest = 0;
    
    	// Point Name
    	.Points$ = "Loyalty Points";
    
    	// Ip check to prevent multi accounts
    	// Toggle 
    	// [0] = Off
    	// [1] = On
    	.IPCheck = 0;
    
    	// Consecutive Days Buff
    	// Each buff contains 4 variables
    	// <Type>,<Days>,<Duration>,<Rate>, // Buff 1
    	// <Type>,<Days>,<Duration>,<Rate>, // Buff 2
    	//   ...;
    	//
    	//  Example: 188,7,45,3
    	//    -On the 7th day logged in Player gains +3 Str for 45 mins
    	//
    	//  Type is 188, which references which SC_ to use, SC_INCSTR in this example
    	//     -For a full list of SC_ visit the db/const.txt
    	//  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
    	//  Duration is buff duration is Minuits, in this example 45 mins
    	//  Rate is buff val1, in this example player gains 3 Str
    	setarray .BuffInfo
    				,196,2,1440,25	// Life Insurance for 360 on 2nd Day
    				,198,3,1440,10	// +10% Hp for 120 Mins on 3rd Day
    				,196,4,1440,25	// Life Insurance for 360 on 4th Day
    				,198,5,1440,10	// +25 Flee for 120 Mins on 5th Day
    				,196,6,1440,25	// +10% Hp for 120 Mins on 6th Day
    				,198,7,1440,10	// +50% Exp for 240 Mins on 7th Day
    				,196,8,1440,25	// Life Insurance for 360 on 8th Day
    				,198,9,1440,10	// +10% Hp for 120 Mins on 9th Day
    				,196,10,1440,25	// +25 Flee for 120 Mins on 10th Day
    
    				,198,12,1440,10	// +10% Hp for 120 Mins on 12th Day
    				,196,14,1440,25	// +50% Exp for 240 Mins on 14th Day
    				,198,15,1440,10	// +25 Flee for 120 Mins on 15th Day
    				,196,16,1440,25	// Life Insurance for 360 on 16th Day
    
    				,198,18,1440,10	// +10% Hp for 120 Mins on 18th Day
    				,196,20,1440,25	// +25 Flee for 120 Mins on 20th Day
    				,198,21,1440,10	// +50% Exp for 240 Mins on 21st Day
    				,196,22,1440,25	// Life Insurance for 360 on 22nd Day
    
    				,198,24,1440,10	// +10% Hp for 120 Mins on 24th Day
    				,196,25,1440,25	// +25 Flee for 120 Mins on 25th Day
    				,198,26,1440,10	// Life Insurance for 360 on 26th Day
    				,196,27,1440,25// +10% Hp for 120 Mins on 27th Day
    				,198,28,1440,10	// +50% Exp for 240 Mins on 28th Day
    
    				,196,30,1440,25;	// +25 Flee for 120 Mins on 30th Day
    
    	// Daily Prize items:
    	//   "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc", // Day 1
    	//   "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc"  // Day 2
    	//   ...;
    	// Total length of any days string must be 255 or shorter
    	setarray .Rewards$[1],
    		"0,0,0,0,35077,100,35061,1",				// Day 1: 100 Event Coin + Costume I Ticket
    		"0,0,0,0,35077,100,9027,1",					// Day 2: Alice Egg
    		"0,0,0,0,35077,100,14216,1",				// Day 3: BGum *5
    		"0,0,0,0,35077,100,12103,5",				// Day 4: Blood Branch *5
    		"0,0,0,0,35077,100,14216,1",				// Day 5: BGum *5
    		"0,0,0,0,35077,100,9010,1",					// Day 6: Baby Desert Wolf Egg
    		"0,0,0,0,35077,100,35062,1",				// Day 7: Costume Ticket II
    		"0,0,0,0,35077,100,12103,5",				// Day 8: Blood Branch *5
    		"0,0,0,0,35077,100,14216,1",				// Day 8: BGum *5
    		"0,0,0,0,35077,100,35011,3",				// Day 9: Credit *3
    		"0,0,0,0,35077,100,9024,1",					// Day 10: Bapho Jr Egg
    		"0,0,0,0,35077,100,7776,3",					// Day 11: Gym Pass *2
    		"0,0,0,0,35077,100,14216,1",				// Day 12: BGum *5
    		"0,0,0,0,35077,100,12339,1",				// Day 13: Treasure Edition Box
    		"0,0,0,0,35077,100,12103,5",				// Day 14: Blood Branch *5
    		"0,0,0,0,35077,100,9023,1,x,0",				// Day 15: Deviruchi Egg
    		"0,0,0,0,35077,100,35011,3",				// Day 16: Credit *3
    		"0,0,0,0,35077,100,14216,1",				// Day 17: BGum *5
    		"0,0,0,0,35077,100,7776,3",					// Day 18: Gym Pass *2
    		"0,0,0,0,35077,100,12103,5",				// Day 19: Blood Branch *5
    		"0,0,0,0,35077,100,12248,1",				// Day 20: Masquerade Ball Box
    		"0,0,0,0,35077,100,35011,3",				// Day 21: Credit *3
    		"0,0,0,0,35077,100,9049,1",					// Day 22: Dullahan Egg
    		"0,0,0,0,35077,100,14216,1",				// Day 23: BGum *5
    		"0,0,0,0,35077,100,12103,5",				// Day 24: Blood Branch *5
    		"0,0,0,0,35077,100,35011,5",				// Day 25: Credit *5
    		"0,0,0,0,35077,100,35063,1",				// Day 27: Costume Ticket III
    		"0,0,0,0,35077,100,12103,10",				// Day 28: Blood Branch *10
    		"0,0,0,0,35077,100,12902,1",				// Day 29: BGum *10
    		"0,0,0,0,35077,100,9046,1,";				// Day 30: Goblin Leader Egg
    		
    
    	// VIP Prize items:
    	//   "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc", // Day 1
    	//   "<Zeny>,<Points>,<BaseExp>,<JobExp>,<itemID-1>,<amount-1>,<itemID-2>,<amount-2>...etc"  // Day 2
    	//   ...;
    	// Total length of any days string must be 255 or shorter
    	//
    	// Note VIPs Collect both VIP and Normal Player rewards
    	setarray .VIPRewards$[1],
    		"1000",				// Day 1: 1000 Zeny
    		"0,0,0,0,501,5",		// Day 2: 5 Red Potion
    		"0,0,0,0,506,5",		// Day 3: 5 Green Potion
    		"2000",				// Day 4: 2000 Zeny
    		"2000",				// Day 5: 2000 Zeny
    		"0,0,0,0,502,5",		// Day 6: 5 Orange Potion
    		"0,0,0,0,12208,1",		// Day 7: 1 Battle Manual
    		"2500",				// Day 8: 2500 Zeny
    		"2500",				// Day 8: 2500 Zeny
    		"2500",				// Day 9: 2500 Zeny
    		"0,0,0,0,503,5",		// Day 10: 5 White Potion
    		"2500",				// Day 11: 2500 Zeny
    		"2500",				// Day 12: 2500 Zeny
    		"2500",				// Day 13: 2500 Zeny
    		"0,0,0,0,503,5,506,3",		// Day 14: 5 White Potion + 3 Green Potion
    		"2500",				// Day 15: 2500 Zeny
    		"2500",				// Day 16: 2500 Zeny
    		"2500",				// Day 17: 2500 Zeny
    		"0,0,0,0,503,5,506,3",		// Day 18: 5 White Potion + 3 Green Potion
    		"2500",				// Day 19: 2500 Zeny
    		"2500",				// Day 20: 2500 Zeny
    		"0,0,0,0,604,3",		// Day 21: 1 Dead Branch
    		"2500",				// Day 22: 2500 Zeny
    		"0,0,0,0,503,5,506,3",		// Day 23: 5 White Potion + 3 Green Potion
    		"2500",				// Day 24: 2500 Zeny
    		"2500",				// Day 25: 2500 Zeny
    		"0,0,0,0,503,5,506,3",		// Day 26: 5 White Potion + 3 Green Potion
    		"2500",				// Day 27: 2500 Zeny
    		"2500";				// Day 28: 2500 Zeny
    
    	// Cutin Array
    	//	Shows a cutin before collecting for each date
    	//	Start at 0 if showing next day
    	setarray .Cutins$,
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_08",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_08",
    			"kafra_09",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03";
    
    	// Cutin Array
    	//	Shows a cutin on collecting for each date
    	setarray .VIPCutins$,
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_08",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03",
    			"kafra_04",
    			"kafra_05",
    			"kafra_06",
    			"kafra_07",
    			"kafra_08",
    			"kafra_09",
    			"kafra_01",
    			"kafra_02",
    			"kafra_03";
    end;
    }

     

  5. Good day, I'm having some issues setting up this Soul Link mod into my server. Does anyone know what to do? This is the script below.
     

    diff --git a/db/soul_link.yml b/db/soul_link.yml
    new file mode 100644
    index 0000000000..bdcf72cb0c
    --- /dev/null
    +++ b/db/soul_link.yml
    @@ -0,0 +1,74 @@
    +# Custom soul link buffs.
    +# Author: Secret <Secret@rathena.org>
    +#
    +# Format
    +# <SL_ constant>: <YAML string literal with a pair of enclosing bracket for the script>
    +#
    +# You can code the script just like an item script.
    +#
    +# Use ONLY spaces to indent.
    +# DONT USE TABS
    +
    +Header: # Metadata for future use
    +    Version: 1
    +    Type: MOD_SECRET_SOUL_LINK
    +SL_ALCHEMIST: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_MONK: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_STAR: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_SAGE: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_CRUSADER: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_SUPERNOVICE: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_KNIGHT: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_WIZARD: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_PRIEST: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_BARDDANCER: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_ROGUE: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_ASSASIN: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_BLACKSMITH: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_HUNTER: |
    +    {
    +        bonus bStr,1;
    +    }
    +SL_SOULLINKER: |
    +    {
    +        bonus bStr,1;
    +    }
    diff --git a/src/map/script.cpp b/src/map/script.cpp
    index 0b2386c32d..b696158ca1 100644
    --- a/src/map/script.cpp
    +++ b/src/map/script.cpp
    @@ -66,6 +66,7 @@
     #include "mob.hpp"
     #include "channel.hpp"
     #include "achievement.hpp"
    +#include "status.hpp"
     
     struct eri *array_ers;
     DBMap *st_db;
    diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp
    index 2f7f44d3b1..105fe90b81 100644
    --- a/src/map/script_constants.hpp
    +++ b/src/map/script_constants.hpp
    @@ -13,6 +13,23 @@
     	export_constant(INT_MIN);
     	export_constant(INT_MAX);
     
    +	/* soul links */
    +	export_constant(SL_ALCHEMIST);
    +	export_constant(SL_MONK);
    +	export_constant(SL_STAR);
    +	export_constant(SL_SAGE);
    +	export_constant(SL_CRUSADER);
    +	export_constant(SL_SUPERNOVICE);
    +	export_constant(SL_KNIGHT);
    +	export_constant(SL_WIZARD);
    +	export_constant(SL_PRIEST);
    +	export_constant(SL_BARDDANCER);
    +	export_constant(SL_ROGUE);
    +	export_constant(SL_ASSASIN);
    +	export_constant(SL_BLACKSMITH);
    +	export_constant(SL_HUNTER);
    +	export_constant(SL_SOULLINKER);
    +
     	/* server defines */
     	export_constant(PACKETVER);
     	export_constant(MAX_LEVEL);
    diff --git a/src/map/status.cpp b/src/map/status.cpp
    index af4c3afb00..ee34868dfa 100644
    --- a/src/map/status.cpp
    +++ b/src/map/status.cpp
    @@ -7,6 +7,7 @@
     #include <math.h>
     #include <string>
     #include <functional>
    +#include <unordered_map>
     #include <yaml-cpp/yaml.h>
     
     #include "../common/cbasetypes.h"
    @@ -65,6 +66,8 @@ bool running_npc_stat_calc_event; /// Indicate if OnPCStatCalcEvent is running.
     // We need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only to avoid cards exploits
     short current_equip_opt_index; /// Contains random option index of an equipped item. [Secret]
     
    +std::unordered_map<int, script_code*> soul_link;
    +
     unsigned int SCDisabled[SC_MAX]; ///< List of disabled SC on map zones. [Cydh]
     
     sc_type SkillStatusChangeTable[MAX_SKILL];
    @@ -3716,6 +3719,13 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
     		current_equip_opt_index = -1;
     	}
     
    +	if (sd && sc->count && sc->data[SC_SPIRIT]) {
    +		auto spirit = sc->data[SC_SPIRIT];
    +		if (spirit != nullptr && soul_link.find(spirit->val2) != soul_link.end() && soul_link[spirit->val2] != nullptr) {
    +			run_script(soul_link[spirit->val2], 0, sd->bl.id, 0);
    +		}
    +	}
    +
     	if (sc->count && sc->data[SC_ITEMSCRIPT]) {
     		struct item_data *data = itemdb_exists(sc->data[SC_ITEMSCRIPT]->val1);
     		if (data && data->script)
    @@ -14492,6 +14502,45 @@ static bool status_readdb_attrfix(const char *basedir,bool silent)
     	return true;
     }
     
    +void status_read_soullink_db(char* file_name) {
    +	YAML::Node root;
    +	int count = 0;
    +	try {
    +		root = YAML::LoadFile(file_name);
    +		if (root.IsMap()) {
    +			for (auto node : root) {
    +				struct script_code *code;
    +				std::string key = node.first.as<std::string>();
    +				int constant = 0;
    +				if (key.compare(0, 3, "SL_")) {
    +					ShowWarning("status_read_soullink_db: Expected a constant with SL_ prefix, got %s.\n", key.c_str());
    +					continue;
    +				}
    +				if (!script_get_constant(key.c_str(), &constant)) {
    +					ShowWarning("status_read_soullink_db: Tried to assign custom buff to nonexistent constant %s.\n", key.c_str());
    +					continue;
    +				}
    +				if ((code = parse_script(node.second.as<std::string>().c_str(), file_name, node.second.Mark().line, 0)) == NULL) {
    +					ShowWarning("status_read_soullink_db: Invalid or empty script on custom soul link %s.\n", key.c_str());
    +					continue;
    +				}
    +				if (soul_link[constant] != nullptr)
    +					script_free_code(soul_link[constant]);
    +				soul_link[constant] = code;
    +				count++;
    +			}
    +		}
    +		else {
    +			ShowError("status_read_soullink_db: The file's structure is broken. Root node is not a map.\n");
    +		}
    +	}
    +	catch (...) {
    +		ShowError("status_read_soullink_db: Cannot load custom soul link buffs from %s.\n", file_name);
    +	}
    +
    +	ShowInfo("status_read_soullink_db: Done reading %d custom soul links.\n", count);
    +}
    +
     /**
      * Sets defaults in tables and starts read db functions
      * sv_readdb reads the file, outputting the information line-by-line to
    @@ -14560,6 +14609,8 @@ int status_readdb(void)
     		aFree(dbsubpath1);
     		aFree(dbsubpath2);
     	}
    +
    +	status_read_soullink_db("db/soul_link.yml");
     	return 0;
     }
     

     

  6. Does anyone know how I might be able to add stats, or a percentage of stats to each Soul link? 
     

    			if (skill_id == AS_SONICBLOW && sc->data[SC_SPIRIT]->val2 == SL_ASSASIN) {
    				ATK_ADDRATE(wd->damage, wd->damage2, map_flag_gvg2(src->m) ? 25 : 100); //+25% dmg on woe/+100% dmg on nonwoe
    				RE_ALLATK_ADDRATE(wd, map_flag_gvg2(src->m) ? 25 : 100 + &battle_config.delay_rate,100); //+25% dmg on woe/+100% dmg on nonwoe +-100% delay rate

     

  7. How do I change the Lottery rewards in this script to be an item ID instead of Zeny?
     

    prontera,129,218,4	script	Lottery Generator	406,{
    OnInit:
    	set $L_TicketPrice,100000; // TICKET COST
    	set $L_Prize_Money,2000000000; // JACKPOT AMOUNT
    	set $L_Prize_Money_Small,500000000; // SECONDARY PRIZE
    	if ($LID == 0) goto L_GenID;
    	end;
    
    	//Modify for own time
    OnClock2045:
    	// CHECKS IF LOTTERY IS RIGGED
    	if ($L_Rigged == 1) goto L_Rigged_Draw;
    	// GENERATES RANDOM NUMBERS 1-40
    Pick1:
    	set $LW1,rand (1,40);
    
    Pick2:
    	set $LW2,rand (1,40);
    	if ($LW2 == $LW1) goto Pick2;
    
    Pick3:
    	set $LW3,rand (1,40);
    	if ($LW3 == $LW2) goto Pick3;
    	if ($LW3 == $LW1) goto Pick3;
    
    Pick4:
    	set $LW4,rand (1,40);
    	if ($LW4 == $LW2) goto Pick4;
    	if ($LW4 == $LW1) goto Pick4;
    	if ($LW4 == $LW3) goto Pick4;
    
    Pick5:
    	set $LW5,rand (1,40);
    	if ($LW5 == $LW1) goto Pick5;
    	if ($LW5 == $LW2) goto Pick5;
    	if ($LW5 == $LW3) goto Pick5;
    	if ($LW5 == $LW4) goto Pick5;
    
    Pick6:
    	set $LW6,rand (1,40);
    	if ($LW6 == $LW1) goto Pick6;
    	if ($LW6 == $LW2) goto Pick6;
    	if ($LW6 == $LW3) goto Pick6;
    	if ($LW6 == $LW4) goto Pick6;
    	if ($LW6 == $LW5) goto Pick6;
    
    	// BROADCASTS DRAW
    L_Broadcast:
    	Announce "Lottery: Welcome to tonight's lotto draw!",8;
    	Announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]",8;
    	Announce "Congratulations to the winners of tonight!",8;
    
    	// GENERATES DRAW ID CODE
    L_GenID:
    	set $LID2,$LID;
    	// SETS TOMORROW'S ID NUMBER
    	set $LID,rand (100000,999999);
    	end;
    
    	// SETS DRAW TO RIGGED NUMBERS
    L_Rigged_Draw:
    	set $LW1,$LR1;
    	set $LW2,$LR2;
    	set $LW3,$LR3;
    	set $LW4,$LR4;
    	set $LW5,$LR5;
    	set $LW6,$LR6;
    	set $L_Rigged,0;
    	goto L_Broadcast;
    }
    
    prontera,130,215,5	script	Lottery	76,{
    L_Begin:
    	mes "[Lottery]";
    	mes "Winning Lotto Numbers ("+$LID2+"):";
    	mes "^0000FF[" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]^000000";
    	if ($LID > 99999) mes "Your Ticket ("+#LID+"):";
    	if ($LID > 99999) mes "^FF0000[" + #LW1 + "] [" + #LW2 + "] [" + #LW3 + "] [" + #LW4 + "] [" + #LW5 + "] [" + #LW6 + "]^000000";
    	mes "Next Draw-ID: ^FF0000" + $LID + "^000000.";
    	next;
    	if (getgmlevel() > 90) goto L_GM;
    	menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"Cancel",L_Cancel;
    
    // PURCHASE TICKET
    L_Buy:
    	if (#LID == $LID && #L1 != 0) goto L_DoubleTicket;
    	mes "[Lottery]";
    	mes "Tickets cost ^0000FF" + $L_TicketPrice + "z^000000.";
    	mes "The Jackpot is ^FF0000" + $L_Prize_Money + "z^000000.";
    	next;
    	menu "Buy Ticket",-,"Cancel",L_Cancel;
    	if (Zeny < $L_TicketPrice) goto L_NoZeny;
    	set Zeny, Zeny-$L_TicketPrice;
    	mes "[Lottery]";
    	mes "Would you like your numbers hand picked or computer generated?";
    	next;
    	menu "Computer Generated",L_ComputerGen,"Hand Picked",L_HandPick,"Renew Ticket",L_Renew;
    
    // RENEW LAST TICKET
    L_Renew:
    	if ($LID < 99999) goto L_Invalid;
    	set #LID,$LID;
    	goto L_Confirm2;
    
    L_ComputerGen:
    // SELECTS RANDOM NUMBERS
    	set @L1,0;
    	set @L2,0;
    	set @L3,0;
    	set @L4,0;
    	set @L5,0;
    	set @L6,0;
    Pick1:
    	set @L1,rand (1,40);
    Pick2:
    	set @L2,rand (1,40);
    	if (@L2 == @L1) goto Pick2;
    Pick3:
    	set @L3,rand (1,40);
    	if (@L3 == @L2) goto Pick3;
    	if (@L3 == @L1) goto Pick3;
    Pick4:
    	set @L4,rand (1,40);
    	if (@L4 == @L2) goto Pick4;
    	if (@L4 == @L1) goto Pick4;
    	if (@L4 == @L3) goto Pick4;
    Pick5:
    	set @L5,rand (1,40);
    	if (@L5 == @L1) goto Pick5;
    	if (@L5 == @L2) goto Pick5;
    	if (@L5 == @L3) goto Pick5;
    	if (@L5 == @L4) goto Pick5;
    Pick6:
    	set @L6,rand (1,40);
    	if (@L6 == @L1) goto Pick6;
    	if (@L6 == @L2) goto Pick6;
    	if (@L6 == @L3) goto Pick6;
    	if (@L6 == @L4) goto Pick6;
    	if (@L6 == @L5) goto Pick6;
    	mes "[Lottery]";
    	mes "The computer has selected the following numbers:";
    	mes "^0000FF" + @L1 + " " + @L2 + " " + @L3 + " " + @L4 + " " + @L5 + " " + @L6 + "^000000";
    	next;
    	menu "Confirm",L_Confirm,"Re-Generate",L_ComputerGen;
    
    // HAND PICK LOTTERY NUMBERS
    L_HandPick:
    	mes "[Lottery]";
    	mes "Please pick your numbers (1-40):";
    	set @L1,0;
    	set @L2,0;
    	set @L3,0;
    	set @L4,0;
    	set @L5,0;
    	set @L6,0;
    Input1:
    	input @L1;
    	if (@L1 < 1 || @L1 > 40) goto Input1;
    	mes @L1;
    Input2:
    	input @L2;
    	if (@L2 < 1 || @L2 > 40) goto Input2;
    	if (@L2 == @L1) goto Input2;
    	mes @L2;
    Input3:
    	input @L3;
    	if (@L3 < 1 || @L3 > 40) goto Input3;
    	if (@L3 == @L1) goto Input3;
    	if (@L3 == @L2) goto Input3;
    	mes @L3;
    Input4:
    	input @L4;
    	if (@L4 < 1 || @L4 > 40) goto Input4;
    	if (@L4 == @L1) goto Input4;
    	if (@L4 == @L2) goto Input4;
    	if (@L4 == @L3) goto Input4;
    	mes @L4;
    Input5:
    	input @L5;
    	if (@L5 < 1 || @L5 > 40) goto Input5;
    	if (@L5 == @L1) goto Input5;
    	if (@L5 == @L2) goto Input5;
    	if (@L5 == @L3) goto Input5;
    	if (@L5 == @L4) goto Input5;
    	mes @L5;
    Input6:
    	input @L6;
    	if (@L6 < 1 || @L6 > 40) goto Input6;
    	if (@L6 == @L1) goto Input6;
    	if (@L6 == @L2) goto Input6;
    	if (@L6 == @L3) goto Input6;
    	if (@L6 == @L4) goto Input6;
    	if (@L6 == @L5) goto Input6;
    	mes @L6;
    	next;
    	mes "[Lottery]";
    	mes "Your numbers are:";
    	mes "^0000FF" + @L1 + " " + @L2 + " " + @L3 + " " + @L4 + " " + @L5 + " " + @L6 + "^000000";
    	next;
    	menu "Confirm",L_Confirm,"Re-Pick",L_HandPick;
    
    L_Confirm:
    	set #LW1,@L1;
    	set #LW2,@L2;
    	set #LW3,@L3;
    	set #LW4,@L4;
    	set #LW5,@L5;
    	set #LW6,@L6;
    	set #LID,$LID;
    L_Confirm2:
    	mes "[Lottery]";
    	mes "The live broadcasted draw is at 9pm.";
    	mes "You can claim your ticket between then and the next draw.";
    	next;
    	mes "[Lottery]";
    	mes "Good luck!";
    	close;
    
    L_Claim:
    	// CHECKS TICKET VALIDILITY
    	if (#LID != $LID2) goto L_Invalid;
    	// CHECKS HOW MANY NUMBERS MATCHED
    	set @LPrize,0;
    	if (#LW1 == $LW1) set @LPrize,@LPrize+1;
    	if (#LW1 == $LW2) set @LPrize,@LPrize+1;
    	if (#LW1 == $LW3) set @LPrize,@LPrize+1;
    	if (#LW1 == $LW4) set @LPrize,@LPrize+1;
    	if (#LW1 == $LW5) set @LPrize,@LPrize+1;
    	if (#LW1 == $LW6) set @LPrize,@LPrize+1;
    	if (#LW2 == $LW1) set @LPrize,@LPrize+1;
    	if (#LW2 == $LW2) set @LPrize,@LPrize+1;
    	if (#LW2 == $LW3) set @LPrize,@LPrize+1;
    	if (#LW2 == $LW4) set @LPrize,@LPrize+1;
    	if (#LW2 == $LW5) set @LPrize,@LPrize+1;
    	if (#LW2 == $LW6) set @LPrize,@LPrize+1;
    	if (#LW3 == $LW1) set @LPrize,@LPrize+1;
    	if (#LW3 == $LW2) set @LPrize,@LPrize+1;
    	if (#LW3 == $LW3) set @LPrize,@LPrize+1;
    	if (#LW3 == $LW4) set @LPrize,@LPrize+1;
    	if (#LW3 == $LW5) set @LPrize,@LPrize+1;
    	if (#LW3 == $LW6) set @LPrize,@LPrize+1;
    	if (#LW4 == $LW1) set @LPrize,@LPrize+1;
    	if (#LW4 == $LW2) set @LPrize,@LPrize+1;
    	if (#LW4 == $LW3) set @LPrize,@LPrize+1;
    	if (#LW4 == $LW4) set @LPrize,@LPrize+1;
    	if (#LW4 == $LW5) set @LPrize,@LPrize+1;
    	if (#LW4 == $LW6) set @LPrize,@LPrize+1;
    	if (#LW5 == $LW1) set @LPrize,@LPrize+1;
    	if (#LW5 == $LW2) set @LPrize,@LPrize+1;
    	if (#LW5 == $LW3) set @LPrize,@LPrize+1;
    	if (#LW5 == $LW4) set @LPrize,@LPrize+1;
    	if (#LW5 == $LW5) set @LPrize,@LPrize+1;
    	if (#LW5 == $LW6) set @LPrize,@LPrize+1;
    	if (#LW6 == $LW1) set @LPrize,@LPrize+1;
    	if (#LW6 == $LW2) set @LPrize,@LPrize+1;
    	if (#LW6 == $LW3) set @LPrize,@LPrize+1;
    	if (#LW6 == $LW4) set @LPrize,@LPrize+1;
    	if (#LW6 == $LW5) set @LPrize,@LPrize+1;
    	if (#LW6 == $LW6) set @LPrize,@LPrize+1;
    
    	if (@LPrize == 6) goto LWinBig;
    	if (@LPrize > 3 && @LPrize < 6) goto LWinSmall;
    
    // NO WINNER
    	mes "[Lottery]";
    	mes "Bad luck, it appears you do not hold a winning ticket.";
    	next;
    	mes "[Lottery]";
    	mes "Better luck next time!.";
    	close;
    
    // MATCHED ALL SIX
    LWinBig:
    	mes "[Lottery]";
    	mes "You have matched all six numbers!";
    	mes "Jackpot!";
    	mes "You've won ^0000FF" + $L_Prize_Money + "z^000000.";
    	set Zeny, Zeny+$L_Prize_Money;
    	Announce "Lottery: " + strcharinfo(0) + " has won the JACKPOT of " + $L_Prize_Money + "z!",8;
    	set #LID,0;
    	close;
    
    // MATCHED AT LEAST 4
    LWinSmall:
    	mes "[Lottery]";
    	mes "You have matched at least 4 numbers!";
    	mes "You've won ^0000FF" + $L_Prize_Money_Small + "z^000000.";
    	set Zeny, Zeny+$L_Prize_Money_Small;
    	Announce "Lottery: " + strcharinfo(0) + " has won a prize of " + $L_Prize_Money_Small + "z!",8;
    	set #LID,0;
    	close;
    
    // NO ZENY
    L_NoZeny:
    	mes "[Lottery]";
    	mes "You can't afford a lottery ticket.";
    	close;
    
    // INVALID TICKET
    L_Invalid:
    	mes "[Lottery]";
    	mes "I'm sorry but it appears that you have an invalid ticket.";
    	close;
    
    // DOUBLE TICKET
    L_DoubleTicket:
    	mes "[Lottery]";
    	mes "It appears that you already have a ticket for today.";
    	mes "You may only purchase one ticket per draw.";
    	close;
    
    L_Cancel:
    	mes "[Lottery]";
    	mes "Come back soon!";
    	close;
    
    // GM MENU (Lets you manually do draws)
    L_GM:
    	menu "Claim Prize",L_Claim,"Buy New Ticket",L_Buy,"[GM]Do Draw Now",-,"[GM]Rig the Lottery",L_GM_Rig,"Cancel",L_Cancel;
    
    	// CHECKS IF LOTTERY IS RIGGED
    	if ($L_Rigged == 1) goto L_Rigged_Draw;
    	// GENERATES RANDOM NUMBERS 1-40
    GMPick1:
    	set $LW1,rand (1,40);
    
    GMPick2:
    	set $LW2,rand (1,40);
    	if ($LW2 == $LW1) goto GMPick2;
    
    GMPick3:
    	set $LW3,rand (1,40);
    	if ($LW3 == $LW2) goto GMPick3;
    	if ($LW3 == $LW1) goto GMPick3;
    
    GMPick4:
    	set $LW4,rand (1,40);
    	if ($LW4 == $LW2) goto GMPick4;
    	if ($LW4 == $LW1) goto GMPick4;
    	if ($LW4 == $LW3) goto GMPick4;
    
    GMPick5:
    	set $LW5,rand (1,40);
    	if ($LW5 == $LW1) goto GMPick5;
    	if ($LW5 == $LW2) goto GMPick5;
    	if ($LW5 == $LW3) goto GMPick5;
    	if ($LW5 == $LW4) goto GMPick5;
    
    GMPick6:
    	set $LW6,rand (1,40);
    	if ($LW6 == $LW1) goto GMPick6;
    	if ($LW6 == $LW2) goto GMPick6;
    	if ($LW6 == $LW3) goto GMPick6;
    	if ($LW6 == $LW4) goto GMPick6;
    	if ($LW6 == $LW5) goto GMPick6;
    
    // BROADCASTS DRAW
    L_Broadcast:
    	Announce "Lottery: Welcome to the special GM's lotto draw!",8;
    	Announce "The numbers are as follows: [" + $LW1 + "] [" + $LW2 + "] [" + $LW3 + "] [" + $LW4 + "] [" + $LW5 + "] [" + $LW6 + "]",8;
    	Announce "Congratulations to the winners!",8;
    
    // GENERATES DRAW ID CODE
    L_GenID:
    	set $LID2,$LID;
    	// SETS TOMORROW'S ID NUMBER
    	set $LID,rand (100000,999999);
    	close;
    
    // SETS DRAW TO RIGGED NUMBERS
    L_Rigged_Draw:
    	set $LW1,$LR1;
    	set $LW2,$LR2;
    	set $LW3,$LR3;
    	set $LW4,$LR4;
    	set $LW5,$LR5;
    	set $LW6,$LR6;
    	set $L_Rigged,0;
    	goto L_Broadcast;
    
    // ALLOWS GM TO DO A RIGGED DRAW
    L_GM_Rig:
    	mes "[Lottery]";
    	mes "Please pick your numbers (1-40):";
    	set $LR1,0;
    	set $LR2,0;
    	set $LR3,0;
    	set $LR4,0;
    	set $LR5,0;
    	set $LR6,0;
    GMInput1:
    	Input $LR1;
    	if ($LR1 < 1 || $LR1 > 40) goto GMInput1;
    	mes $LR1;
    GMInput2:
    	Input $LR2;
    	if ($LR2 < 1 || $LR2 > 40) goto GMInput2;
    	if ($LR2 == $LR1) goto GMInput2;
    	mes $LR2;
    GMInput3:
    	Input $LR3;
    	if ($LR3 < 1 || $LR3 > 40) goto GMInput3;
    	if ($LR3 == $LR1) goto GMInput3;
    	if ($LR3 == $LR2) goto GMInput3;
    	mes $LR3;
    GMInput4:
    	Input $LR4;
    	if ($LR4 < 1 || $LR4 > 40) goto GMInput4;
    	if ($LR4 == $LR1) goto GMInput4;
    	if ($LR4 == $LR2) goto GMInput4;
    	if ($LR4 == $LR3) goto GMInput4;
    	mes $LR4;
    GMInput5:
    	Input $LR5;
    	if ($LR5 < 1 || $LR5 > 40) goto GMInput5;
    	if ($LR5 == $LR1) goto GMInput5;
    	if ($LR5 == $LR2) goto GMInput5;
    	if ($LR5 == $LR3) goto GMInput5;
    	if ($LR5 == $LR4) goto GMInput5;
    	mes $LR5;
    GMInput6:
    	Input $LR6;
    	if ($LR6 < 1 || $LR6 > 40) goto GMInput6;
    	if ($LR6 == $LR1) goto GMInput6;
    	if ($LR6 == $LR2) goto GMInput6;
    	if ($LR6 == $LR3) goto GMInput6;
    	if ($LR6 == $LR4) goto GMInput6;
    	if ($LR6 == $LR5) goto GMInput6;
    	mes $LR6;
    	next;
    	mes "[Lottery]";
    	mes "Lottery rigged for next draw.";
    	set $L_Rigged,1;
    	close;
    }

     

  8. Many people have been asking me how I got my server, or theirs, working online using AndRO apk.

    This guide works for v260 , v288 & v323 

    • Next, take all necessary files for running a server. These are the files from a fresh kRO, or in most cases a "Lite" version of a server. (In this example I used my Lite server files.) Below is a compiled folder of the files you need. Modify the clientinfo.xml to contain your information, add your client.exe, add your patcher, & your server grf.
      https://www.mediafire.com/file/hc1h491a0v4eux7/Lite+Files.zip/file
    •  
    • Then, I zipped everything into a RAR file. Downloading that onto my mobile device, in the Downloads folder. (Create new folder for version 288 and above)
    • Using almost any RAR extractor tool from Google Play Store you can extract all the files into your Downloads folder. Once completed you will then run your AndRO application. (NOTE: This will not create a custom icon for your server. To do that you need to buy the APK version of your server from AndRO Workshop.)
      https://play.google.com/store/apps/details?id=com.rarlab.rar&hl=en_CA
       

    clieninfo.xml

    • Now you might have some questions about the clientinfo.xml that you'll need to put into your main GRF. Below is an example of what mine looks like. This allows my server to read everything in plain English and not Acsii.
    Quote

    <?xml version="1.0" encoding="euc-kr" ?> 
    <clientinfo> 
        <servicetype>america</servicetype>
        <servertype>primary</servertype>
        <connection>
        <display>[ SERVER TITLE HERE ]</display>
        <address>000.00.00.000</address>
        <port>6900</port>
        <version>55</version>
        <langtype>1</langtype>
        <packetver>20180620</packetver>
        <increase_max_hairstyles>500</increase_max_hairstyles>
        <increase_max_haircolors>600</increase_max_haircolors>
        <read_data_directory_first>true</read_data_directory_first>
        <iteminfo>itemInfo.lua</iteminfo>
        <hide_quickcashshop_button>true</hide_quickcashshop_button>
        <max_guildpositions>76</max_guildpositions>
        <registrationweb>https://www.website.net/</registrationweb>
        <aid>
        <admin>2000000</admin>
        <admin>2000001</admin>
        </aid>
        <loading>
        <image>loading00.jpg</image>
        <image>loading01.jpg</image>
        </loading>
        <patchserver>
        <type>thor</type>
        <http>http://website.net/patch/plist.txt</http>
        <ftp>http://website.net/patch/data/</ftp>
        <grf>custom.grf</grf>
        <inf>updates.dat</inf>
        </patchserver>
        </connection>
    </clientinfo>

     

    Common errors:

    • Unable to Find Resource values : Fixed by re-selecting the directory. If this fails, your clientinfo may not be there or it can't read your GRF; this is common with incorrectly encrypted GRFs. V260
    • Crashes after selecting server directory, with no error : Fixed by disabling Gepard. If you have Gepard and want to keep it active you will need the paid version mentioned above. V260
    • Item Descriptions not in Enlgish : Fixed by changing clientinfo.xml to read data folder first and selecting it to read itemInfo.lua files. V260
    • Application will not read Downloads folder : Fixed by giving AndRO application Storage permissions. V260
    • Fatal Error: java.net.UnknownHostException: Unable to resolve host "host.name.here.net": No Address associated with hostname. : Fixed by closing App completely, reloading app, "change" directory, reselect Downloads folder and reopening the directory. sounds annoying, because it is, but it works! V260
    • data/sprite/인간족/머리통/여/2073_여.spr : Fixed by adjusting your Packet version in the packet line of clientinfo.xml. V260
    • data/sprite/인간족/머리통/남/33_남.spr : Fixed by reseting look to default. Many pallets and hairstyles are not working. V260
    • File format error. Try to delete your client folder "/directory/". Failed to Parse LUA file: /data/user/0/com.rowork-shop.androlocalclientfiles/tmp.lub:30000 (or any other combination of numbers) unexpected symbol near 'symbol/text_error'Fixed by scrolling to the specified line of your LUA/LUB and adjusting the improper values. V260
    • Failed to connect to resource serverFixed by adding the patch directory to the clientinfo.xml / If your GRF is encrypted you will need to decrypt it. V260
    • Patch list error 1 at line 1Fixed by removing Patch and Website lines from your GRF. This is for those who don't use websites for their server. V260
    • Failed to connect to map server : Fixed by double checking the patch directory on the clientinfo.xml. It is important to have both patch directory lines in it to receive connections. V260
    • Fatal error Failed to load map: * : Fixed by either reselecting the Path in Settings and changing it, even if it's identical to what you have now; or by reinstalling the AndRO Freeware. V260
    • Failed to parse LUA: Only supporting v5.0, sorry : May have an older version that is not compatible with the latest AndRO. V260
    • Game crash without error/AndRO apk has stopped working : This can be because you are in @hide. Unhide to be able to load the game again. This can also be an issue with the version, I downloaded v288 and this issue resolved itself. V260
    • Attempt to invoke virtual method 'void . . 3.. (int, int)' on a null object reference : This error is still being investigated. It is believed to be the same error as the Game Crash/AndRO apk has stopped working. V288

     

    More will be added and polished as I learn more. Thanks for reading thus far. If you need assistance compiling your mobile server let me know and I'll try my best to help.

    • Upvote 4
    • Love 3
    • MVP 2
  9. Good day, I hope this is in the correct section...
    I am looking for something to help my players in Asia get a lower ping to my server. Is there a relay service that can do this? I asked my host and they don't offer this type of service, but they will support it.

×
×
  • Create New...