Jump to content

crazyarashi

Developer
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by crazyarashi

  1. payon,139,226,5	script	Potion Converter	749,{
    	for(.@i = 0; .@i < .size; .@i += 5)
    		.@menu$ += .trade[.@i+1] + " x " + getitemname(.trade[.@i]) + " for " + .trade[.@i+3] + " x "  + getitemname(.trade[.@i+2]) + ":";
    	.@s = (select(.@menu$) - 1) * 5;
    	.@max = countitem(.trade[.@s]) / .trade[.@s+1];
    	mes "Max Amount available for trade : " + .@max;
    	next;
    	input .@amount;
    	.@amount = min(.@amount,.@max);
    	if(.@amount > .@max || .@amount == 0){
    		mes "Amount cannot be 0 or greater than the max tradeable amount.";
    		end;
    	}
    	mes "You have selected " + .trade[.@s+1] + " x " + getitemname(.trade[.@s]) + " for " + .trade[.@s+3] + " x " + getitemname(.trade[.@s+2]) + "?";
    	mes "This has " + .trade[.@s+4] + "% success rate.";
    	mes "Amount : " + .@amount;
    	mes "Note: everything you trade will be character bound potion.";
    	next;
    	if(select("Cancel:Trade") == 1)
    		end;
    	.@total = countitem(.trade[.@s+1]) * .@amount;
    	if(countitem(.trade[.@s]) < .@total){
    		mes "You don't have enough item for trade.";
    		end;
    	}
    	delitem .trade[.@s],.trade[.@s+1] * .@amount;
    	for(.@i = 0; .@i < .@amount; .@i++){
    		if(.trade[.@s+4] < rand(1,100))
    			continue;
    		.@success++;
    	}
    	mes "Successfully converted amount : " + .@success;
    	getitem .trade[.@s+2],.@success * .trade[.@s+3];
    	end;
    	
    OnInit:
    	// < ITEM FOR TRADE >, < AMOUNT >, < ITEM TRADED >, < AMOUNT >, < SUCCESS RATE >..
    	setarray .trade,
    	11503,2,32018,1,100;
    	
    	.size = getarraysize(.trade);
    end;
    }

     

    • Love 1
  2. OnInit:
    	// 1 = item reward
    	// 2 = variable/cashpoints reward
    	// If you want to set item and variable/cashpoints rewards, do 1|2.
    	// If you only want 1, just choose between 1 or 2
    	$event_options = 1|2;
    	
    	setarray $event_item_reward,
    		501, 10,
    		502, 5;
    		
    
    	setarray $event_var$,"EVENTVARIABLE1","EVENTVARIABLE2";	
    	setarray $event_var_name$,"Custom Points 1","EVENT VARIABLE2";
    	setarray $event_var_gain,1,3;
    	
    	$event_item_arr = getarraysize($event_item_reward);
    
    
    		if ( $event_options&1 ) {
    		for ( .@j = 0; .@j < $event_item_arr; .@j += 2 )
    			getitem $event_item_reward[.@j], $event_item_reward[.@j+1];
    	}
    	if ( $event_options&2 ) {
    		for(.@i = 0; .@i < getarraysize($event_var$); .@i++){
    			.@v = getd("#" + $event_var$[.@i]) + $event_var_gain[.@i];
    			setd getd("#" + $event_var$[.@i]),.@v;
    			dispbottom "You gained "+$event_var_gain[.@i]+" "+$event_var_name$[.@i]+". You now have "+getd("#" + $event_var$[.@i])+" "+$event_var_name$[.@i]+".";
            	}
    		

     

    • Upvote 1
  3. Compendium


    Compendium - A levelable battle pass inspired majority of games out there. 

    Feature :
    Easy customizable settings.
    Three types of selectable daily quest.
    Daily quest requirements are randomized.
    Daily quest count resets everyday.
    Compendium resets on the first day of the month.
    Rewards are sent via mail.
    '@compendium' command to access the compendium

    Settings :

     

    Adding a reward on the compendium
    Rewards : "Level | Reward ID, Amount, Reward ID, Amount,... ==|
    Level order doesn't matter but 'duplicates' will bug out the script.
    
    setarray .compendium_reward$, 
    "1|501:10,502:20",
    "10|501:20,502:30",
    "5|501:100,502:500";
    
    
    Adding a monster/item/mvp to hunt or collect
    Just add the ID on the following line.
    
    setarray .mvp_list
    setarray .hunt_list
    setarray .gather_list
    
    
    Changing EXP given on the quest types.
    .gathering_exp = 50;
    .hunt_exp = 50;
    .mvp_hunt_exp = 100;


     


     

    • Upvote 1
    • Love 4
  4. Equipment Recycle NPC


    A recycle NPC that uses the shop interface.

    Changing the rewards

    .reward_id = 501;
    .reward_point$ = "#KAFRAPOINT";


    Adding a recyclable equipment.

    /*
    *=============================================================================|
    * [email protected] = Refine | [email protected] = Bonus                                                 =|
    * list_add("<Equip ID>,<Value>{,<Starting [email protected]r for [email protected]b>,[email protected]:[email protected]:[email protected]:..."); =|
    *=============================================================================|	
    * Cotton_Shirt w/ +8 Starting [email protected] bonus                                      =|
    * [email protected] = 8 : 1 Bonus Item/Point                                               =|
    * [email protected] = 9 : 5 Bonus Item/Point                                               =|
    * [email protected] >= 10 : 7 Bonus Item/Point.                                            =|
    *=============================================================================|
    * list_add(2301,8,"1:5:7");                                                  =|
    ==============================================================================|
    */
    function	list_create	{
    	//= Remove samples and add here.
    	
    	list_add(2301,10,8,"1:5:7"); //Cotton_Shirt
    	list_add(1201,10,7,"1:2:3:4:5"); //Knife
    	list_add(2504,5); //Muffler_
    	
    	return;
    }

     


     

    • Upvote 1
    • Love 1
  5. -	script	invasion	-1,{
    	
    OnInit:
    	setarray .map$,"prontera","izlude";
    	function add_set;
    	function create_set;
    	create_set();
    end;
    
    OnMinute00:
    	function start_set;
    	start_set();
    end;
    
    OnMobDead:
    	if(!mobcount(.current_map$,strnpcinfo(0) + "::OnMobDead")){
    OnTimer900000:
    		function end_set;
    		end_set();
    	}
    end;
    	
    //= Add your new set here.
    function	create_set	{
    	//= add_set("Mob ID:Mob Amount{:Min amount:Max amount},....."); If min/max amount is added mob amount will be ignored. 
    	add_set("1001:50,1002:20:70:100");
    	add_set("1005:50:10:20,1001:20");
    }
    
    function	add_set	{
    	.set$[getarraysize(.set$)] = getarg(0);
    	return;
    }
    	
    function	start_set	{
    	.current_map$ = .map$[rand(getarraysize(.map$))];
    	killmonster .current_map$,strnpcinfo(0) + "::OnMobDead";
    	explode([email protected]$,.set$[rand(getarraysize(.set$))],",");
    	for([email protected] = 0; [email protected] < getarraysize([email protected]$); [email protected]++){
    		explode([email protected]$,[email protected]$[[email protected]],":");
    		if(getarraysize([email protected]$) > 2){
    			if(atoi([email protected]$[3]) == 0)
    				[email protected] = atoi([email protected]$[1]);
    			else
    				[email protected] = rand(atoi([email protected]$[2]),atoi([email protected]$[3]));
    			
    		} else
    			[email protected] = atoi([email protected]$[1]);
    		monster .current_map$,0,0,"--ja--",atoi([email protected]$[0]),[email protected],strnpcinfo(0) + "::OnMobDead";
    		deletearray [email protected]$[0],getarraysize([email protected]$);
    	}
    	announce "Invasion : Invasion has started in " + .current_map$ + ".",bc_blue;
    	initnpctimer;
    	end;
    }
    
    function	end_set	{
    	announce "Invasion : All monster has been killed.",bc_blue;
    	killmonster .current_map$,strnpcinfo(0) + "::OnMobDead";
    	end;
    }
    
    }

     

  6. prontera,255,55,5	script	NPC	123,{
    	if(!.active)
    		end;
    	mes "Event is active.";
    	close;
    
    OnInit:
    OnHour00:
    	.active = 0;
    	function check_month_end;
    	[email protected] = 10;
    	[email protected]_end = check_month_end();
    	if([email protected] > [email protected]_end)
    		[email protected] = [email protected]_end;
    	[email protected]_day = gettime(DT_DAYOFMONTH);
    	if([email protected]_day < [email protected])
    		waitingroom "Next offer appears in " + ([email protected] - [email protected]_day) + "D at 21:00",0;
    	else if([email protected]_day > [email protected])
    		waitingroom "Next offer appears in " + (([email protected]_end - [email protected]_day) + [email protected]) + "D at 21:00",0;
    	else {
    		waitingroom "OFFER DAY!",0;
    		.active = 1;
    	}
    	end;
    	
    	
    function	check_month_end	{
    	[email protected] = gettime(DT_MONTH);
    	switch([email protected]){
    		case APRIL: case JUNE: case SEPTEMBER: case NOVEMBER:
    			[email protected] = 30;
    			break;
    		
    		case FEBRUARY:
    			[email protected] = gettime(DT_YEAR);
    			if([email protected] % 4 == 0 && [email protected] % 100 != 0 || [email protected] % 400 == 0)
    				[email protected] = 29;
    			else
    				[email protected] = 28;
    			break;
    			
    		default:
    			[email protected] = 31;
    			break;
    	}
    	return [email protected];
    }
    			
    }

     

    • MVP 1
  7. prontera,255,55,5	script	exchange_tcg	123,{
    	[email protected] = Zeny/.rates;
    	mes "[ Exchanger ]";
    	mes "Do you want to exchange your ^33CC33" + .rates + "^000000 Zeny to a TCG?";
    	next;
    	if(select("Exchange:Quit") == 2)
    		end;
    	if([email protected]){
    		mes "[ Exchanger ]";
    		mes "You don't have enough zeny for the exchange.";
    		close;
    	}
    OnExchange:
    	mes "[ Exchanger ]";
    	mes "You can exchange up to ^0000FF"[email protected]+"^000000 TCG.";
    	mes "How many would you like to exchange?";
    	next;
    	input [email protected];
    	if([email protected] == 0 || [email protected] > [email protected]){
    		mes "[ Exchanger ]";
    		mes "You can't enter 0 or you can only exchange up to ^0000FF"[email protected]+"^000000 TCG.";
    		mes "Please try again.";
    		next;
    		goto OnExchange;
    	}
    	mes "[ Exchanger ]";
    	mes "Are you sure you want to exchange ^33CC33" + (.rates*[email protected]) + "^000000 Zeny for " + [email protected] + "TCG?";
    	next;
    	if(select("Yes:No") == 2)
    		end;
    	mes "[ Exchanger ]";
    	mes "Okay, Here you go!, Thank you for using my services.";
    	Zeny -= (.rates*[email protected]);
    	getitem .item_id,[email protected];
    	end;
    	
    OnInit:
    	.item_id = 501;
    	.rates = 10000000;
    	end;
    }

     

  8. if(Class == Job_Knight || Class == Job_Lord_Knight){
    	if(checkriding()){
    		setoption OPTION_DRAGON1;
    	}
    }
    
    
    //= Unequip Part of the item script
    //= Remove Dragon/Ride PecoPeco and changebase
    if(Class == Job_Knight || Class == Job_Lord_Knight){ if(checkdragon()){ setriding; setriding; } } changebase Class;

     

  9. prontera,123,123,1	script	Reward NPC	123,{
    	[email protected]_id$ = get_unique_id();
    	if($reward_status > 0 || $reward_count < 1){
    		mes "[ Reward NPC ]";
    		mes "Sorry, but the first 50 rewards are out. Better luck next time.";
    		close;
    	}
    	if(getd("$ID_" + [email protected]_id$) > 0 || #NPCREWARD > 0){
    		mes "[ Reward NPC ]";
    		mes "You have already claimed your reward.";
    		close;
    	}
    	mes "[ Reward NPC ]";
    	mes "Here's your reward. Have a nice day!";
    	setd "$ID_" + [email protected]_id$,1;
    	#NPCREWARD = 1;
    	$reward_count -= 1;
    	for([email protected] = 0; [email protected] < getarraysize(.rewards); [email protected] += 2)
    		getitem .rewards[[email protected]],.rewards[[email protected]+1];
    	if($reward_count == 0)
    		$reward_status = 1;
    	end;
    	
    OnInit:
    	.reward_count = 50;
    	if($reward_status == 0 && $reward_count == 0)
    		$reward_count = .reward_count;
    	setarray .rewards,501,10,502,10;
    	while($reward_count > 0){
    		delwaitingroom;
    		waitingroom "Rewards left - " + $reward_count, 0;
    		sleep 10000;
    	}
    	end;
    }

     

    • Upvote 1
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.