Jump to content

Dolphin86

Members
  • Posts

    757
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Dolphin86

  1. 40 minutes ago, Chaos92 said:

    Can you explain on u didnt get the random chance item ?

    From what I saw in the script;

     

    			if(countitem(40106) == 1){ //T2 Butchering
    								if(countitem(40026) > 1 || rentalcountitem(40058) > 1){
    									if(rand(100) <= .@Chance){
    									getitem .@MakeShiftBoneDagger[rand(getarraysize(.@MakeShiftBoneDagger))], 1;
    									getitem 40036, 1;
    												}
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    										close;
    											}
    										}
    

    So, make sure your item 40106 = 1, not more than that. item 40026 and 40058 rent item is exist.

    it start on this part here:

    case 2:
    							if(countitem(40043) == 1){ //T1 Butchering
    								if(countitem(40026) < 1 || rentalcountitem(40058) < 1){
    									mes "Require :-";
    									mes "- [1] Monster Loot.";
    									mes "- [1] Stone Blade.";
    									close;
    										}
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    										close;
    									}
    							
    							if(countitem(40106) == 1){ //T2 Butchering
    								if(countitem(40026) > 1 || rentalcountitem(40058) > 1){
    									if(rand(100) <= .@Chance){
                                        //random chance start here
    									getitem .@MakeShiftBoneDagger[rand(getarraysize(.@MakeShiftBoneDagger))], 1;
    									getitem 40036, 1;
    												}
                                      		//if no luck gets normal item
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    										close;
    											}
    										}
    									else
    										mes "Require :-";
    										mes "- [1] Monster Loot.";
    										mes "- [1] Make Shift .";
    										close;

     

  2. hye i had crafted this script, but somehow after a couple day of testing, i had not even 1 single time got the random chance item, even after i had increase the chance to 99%

    can someone check them for error and help me fix it?

    Spoiler
    new_1-3,87,138,6	script	Public Butcher Table	665,{
    			
    			setarray .@MakeShiftBoneDagger[0], 40101,40102,40103,40104,40105;
    			.@Chance = 99;
    			
    			
    			
    			mes "Select :-"; 
    			switch(select("- Take Bone only:- Take Meat Only:- Take Monster Skin Only:- Cancel")) {
    			
    				case 1:
    					switch(select("- Use Stone Blade:- Use Make Shift Bone Blade:- Cancel")) {
    					
    						case 1:
    							if(countitem(40043) == 1){ //T1 Butchering
    								if(countitem(40026) < 1 || rentalcountitem(40024) < 1){
    									mes "Require :-";
    									mes "- [1] Monster Loot.";
    									mes "- [1] Stone Blade.";
    									close;
    										}
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    									}
    							
    							if(countitem(40106) == 1){ //T2 Butchering
    								if(countitem(40026) < 1 || rentalcountitem(40024) < 1){
    									mes "Require :-";
    									mes "- [1] Monster Loot.";
    									mes "- [1] Stone Blade.";
    									close;
    										}
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    									}
    							else
    							mes "Require :-";
    							mes "- [1] Monster Loot.";
    							mes "- [1] Stone Blade.";
    							close;
    							
    						case 2:
    							if(countitem(40043) == 1){ //T1 Butchering
    								if(countitem(40026) < 1 || rentalcountitem(40058) < 1){
    									mes "Require :-";
    									mes "- [1] Monster Loot.";
    									mes "- [1] Stone Blade.";
    									close;
    										}
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    										close;
    									}
    							
    							if(countitem(40106) == 1){ //T2 Butchering
    								if(countitem(40026) > 1 || rentalcountitem(40058) > 1){
    									if(rand(100) <= .@Chance){
                                        //random chance start here
    									getitem .@MakeShiftBoneDagger[rand(getarraysize(.@MakeShiftBoneDagger))], 1;
    									getitem 40036, 1;
    												}
                                      		//if no luck gets normal item
    										delitem 40026, 1;
    										getitem 40036, 1;
    										getitem 40011, 2;
    										close;
    											}
    										}
    									else
    										mes "Require :-";
    										mes "- [1] Monster Loot.";
    										mes "- [1] Make Shift .";
    										close;
    							
    						case 3:
    							mes "Cancel";
    							close3;
    						
    					}
    					
    					
    					
    						
    				case 2:
    						mes "WIP";
    						close3;
    				
    				case 3:
    						mes "WIP";
    						close3;
    				case 4:
    						mes "Process Cancel";
    						close3;
    						}
    }
    //Duplicate
    //=====================================================
    chry_fld,81,74,6	duplicate(Public Butcher Table)	Public Butcher Table#1	665
    ma_fild01,317,289,6	duplicate(Public Butcher Table)	Public Butcher Table#2	665
    ma_fild01,264,358,6	duplicate(Public Butcher Table)	Public Butcher Table#3	665
    
    ma_fild01,231,316,6	duplicate(Public Butcher Table)	Public Butcher Table#4	665
    ma_fild01,144,285,6	duplicate(Public Butcher Table)	Public Butcher Table#5	665
    ma_fild01,54,193,6	duplicate(Public Butcher Table)	Public Butcher Table#6	665
    ma_fild01,91,91,6	duplicate(Public Butcher Table)	Public Butcher Table#7	665
    
    ma_fild01,196,185,6	duplicate(Public Butcher Table)	Public Butcher Table#8	665
    ma_fild01,234,240,6	duplicate(Public Butcher Table)	Public Butcher Table#9	665
    ma_fild01,182,107,6	duplicate(Public Butcher Table)	Public Butcher Table#10	665
    ma_fild01,281,120,6	duplicate(Public Butcher Table)	Public Butcher Table#11	665

     

     

  3. hi i would like to ask for a an npc script which give player items base on the set of item the player give,

    example to make a sword ( configurable - sword A, sword B and list goes on ) player need 3 basic item ( in this case we call them category - configurable as i might need to add more category  ) to give to the npc, 

    Blade, Handle, Rope

    now for Blade there are serval item to pick, example :

    1002,1003,1004,1005,1006

    same goes with handle and rope, so each of the category have different set of item which player can choose to input ( read below for more details )

    when the player talk to the npc and pick to craft a sword, the npc will ask player to choose material each category,

    take note the npc will only show aviable option of material for each category base on what material player have in his inventory, all player need to do is pick which material he wish to input for each category, also each category of materials might need more then 1.

    and after that npc will show all the details which player input to confirm before starting to craft..

    when player have select all the material for all those category and confirm it,  the npc will start crafting with a timer let say 1 minute ( configurable ), so player need to wait for the timer to cool down, also there will be a chatbox on top of the npc "CRAFTING" while under crafting, and if the timer is done chat box will change to "Completed", only then player who craft it can pick it up, unless the player who craft it did not pick it up within time 3 minute after it was crafted, the crafted item can be picked up by any players, also the chatbox must remain "Completed" until the item is taken out,

    also there is a secrets, if the player input in correct order, let say for blade 1010, handle 1017, and for rope 1022 player will get a different type of sword,

    and there will be different list of secrets recipe, ( means i can add more type of sword reward result base on the secrets material list )    

    and also i plan to use it as duplicate.

     

    thanks!

     

     

  4. Spoiler

     

    14 hours ago, Racaae said:

    Hi, find this line:

    setarray(getd("$wrkb_" + .@wrkb_id + "_products"),40036,1, 40011, 1);

    and replace to:

    if (countitem(40101) && rand(100) < 10) {
    	// if have Butchering T2 has 10% chance to get the following items
    	setarray(getd("$wrkb_" + .@wrkb_id + "_products"),40036,1, 948,1, 929,1);
    }
    
    else {
    	// Butchering 1 list / commom items
    	setarray(getd("$wrkb_" + .@wrkb_id + "_products"),40036,1, 40011, 1);
    }

     

    this great but i think this part:

    setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40101,2, 40102,2, 40103,2 ,40104,2 ,40105,2);

    i need either one of the item, not all of it?

  5. hye i need help on getting random chance if player had (40101) Butchering's Tier 2, from the script below, if player had (40043) Butchering's Tier 1, it will proceed to craft the item with current script which all thanks to @Winterfox who created it, but I'm kind of confused how to add on the second option which is random chance to gain some different item result by 10%, if else player will just get a normal item (40011) Low Quality Bone, 

     

    also the script need a little improvement, when the time is up the chat box disappear, while the item are still have not taken out, i would like the chat box disappear only when the item had been taken out only, thanks  

    Spoiler
    new_1-3,87,138,6	script	Public Butcher Table	665,{
    
    			.@wrkb_id = atoi(strnpcinfo(2));
    
    			if($wrkb_crafting_state[.@wrkb_id] == 1) {
    			mes "Please wait until the cooking process is finished. ";
    			close;
    			}
    
    			if($wrkb_crafting_state[.@wrkb_id] == 2) {
    			mes "Here are your crafted items.";
    			for(.@i = 0; .@i < getarraysize(getd("$wrkb_" + .@wrkb_id + "_products")); .@i += 2)
    			getitem(getd("$wrkb_" + .@wrkb_id + "_products[" + .@i + "]"), getd("$wrkb_" + .@wrkb_id + "_products[" + (.@i + 1) + "]"));
    
    			delwaitingroom;
    			$wrkb_crafting_state[.@wrkb_id] = 0;
    			close;
    			}
    			
    			
    			mes "Select :-"; 
    			next;
    			switch(select("- Take Bone only:- Take Meat Only:- Take Monster Skin Only:- Cancel")) {
    			
    				case 1:
    					switch(select("- Use Stone Blade:- Use Make Shift Bone Blade:- Cancel")) {
    					
    						case 1:
    							if(countitem(40043) == 1){ // T1 Butchering
    								if(countitem(40026) < 1 || rentalcountitem(40024) < 1) {
    									mes "Take Out Bone";
    									mes "Require:-"; 
    									mes "[1] Monster Loot";
    									mes "[1] Stone Blade";
    									close3;
    									}
    								delitem(40026, 1);
    								getitem(40036, 1); // Prove Of Butchering
    								setarray(getd("$wrkb_" + .@wrkb_id + "_products"),40036,1, 40011, 1);
    
    								goto OnCraftingStart;
    								}
    							
    							if(countitem(40106) == 1){
    								
    								mes "How to add random chance?";
    								close3;
    								
    								}
    						
    						case 2:
    							mes "WIP";
    							close3;
    						case 3:
    							mes "Cancel";
    							close3;
    						
    					}
    					
    					
    					
    						
    				case 2:
    						mes "WIP";
    						close3;
    				
    				case 3:
    						mes "WIP";
    						close3;
    				case 4:
    						mes "Process Cancel";
    						close3;
    						}
    
    		OnCraftingStart:
    		$wrkb_crafting_state[.@wrkb_id] = 1;
    		waitingroom("Butchering...", 0);
    		initnpctimer;
    		end;
    
    	OnTimer10000:
    		$wrkb_crafting_state[atoi(strnpcinfo(2))] = 2;
    		delwaitingroom;
    		waitingroom("COMPLETED!", 0);
    		end;
    
    	OnInit:
    		.@wrkb_id = atoi(strnpcinfo(2));
    		if(.@wrkb_id < 1) end;
    
    		if($wrkb_crafting_state[.@wrkb_id] == 1) goto OnCraftingStart;
    }
    //Duplicate
    //=====================================================
    chry_fld,81,74,6	duplicate(Public Butcher Table)	Public Butcher Table#1	665
    ma_fild01,317,289,6	duplicate(Public Butcher Table)	Public Butcher Table#2	665
    ma_fild01,264,358,6	duplicate(Public Butcher Table)	Public Butcher Table#3	665
    
    ma_fild01,231,316,6	duplicate(Public Butcher Table)	Public Butcher Table#4	665
    ma_fild01,144,285,6	duplicate(Public Butcher Table)	Public Butcher Table#5	665
    ma_fild01,54,193,6	duplicate(Public Butcher Table)	Public Butcher Table#6	665
    ma_fild01,91,91,6	duplicate(Public Butcher Table)	Public Butcher Table#7	665
    
    ma_fild01,196,185,6	duplicate(Public Butcher Table)	Public Butcher Table#8	665
    ma_fild01,234,240,6	duplicate(Public Butcher Table)	Public Butcher Table#9	665
    ma_fild01,182,107,6	duplicate(Public Butcher Table)	Public Butcher Table#10	665
    ma_fild01,281,120,6	duplicate(Public Butcher Table)	Public Butcher Table#11	665

     

     

  6. 4 minutes ago, Winterfox said:
    -	script	::TALL_GRASS_MAIN	FAKE_NPC,{
    	mes "=== Select Tools ===";
    	switch(select("- Stone Blade:- Bone Blade:- Cancel")) {
    		clear;
    		case 1:
    			if (!rentalcountitem(40024)) {
                    mes "Stone Blade is needed.";
                    close;
                }
                
    			if(!countitem(40044) && !countitem(40067)) end;
     
                if(countitem(40067)) {
    				if(rand(1, 100) <= .drop_chances[0])
    					getitem(.@stone_items[rand(getarraysize(.@stone_items))], 1);
    			}
    
    			getitem(40006, 1);
    			getitem(40008, 1);
    			end;
    		case 2:
    			if (!rentalcountitem(40058)) {
    				mes "Stone Blade is needed.";
    				close;
    			}
    
    			if(!countitem(40044) && !countitem(40067)) end;
    
    			if(countitem(40067)) {
    				if(rand(1, 100) <= .drop_chances[1]) 
    					getitem(.@bone_items[rand(getarraysize(.@bone_items))], 1);
    			}
    
    			getitem(40008, 1);
    			getitem(40006, 1);
    			end;
    		case 3:
    			mes "Gathering Cancel";
    			close;
    	}
    
        OnInit:
            setarray(.stone_items[0], 40068, 40069, 40070, 40071, 40072);
            setarray(.bone_items[0], 40068, 40069, 40070, 40071, 40072);
            setarray(.drop_chances, 5, 10);
    }
    
    // Duplicates
    //============================================================
    neko_isle,75,122,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new11	666
    new_1-3,111,73,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new12	666
    new_1-3,115,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new13	666
    new_1-3,119,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new14	666
    new_1-3,123,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new15	666
    new_1-3,127,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new16	666
    new_1-3,131,72,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new17	666

     

    thanks

  7. @sader1992 sorry to interrupt, but what if i need another set of random item array with different random chance ? 

    -	script	::TALL_GRASS_MAIN	-1,{
    	setarray .@itemid[0], 40068,40069,40070,40071,40072; // random array set 1
    	.@Chance = 5; // random array set 1
    	
    	mes "=== Select Tools ===";
    	switch(select("- Stone Blade:- Bone Blade:- Cancel")) {
    		clear;
    		case 1:
    			if (rentalcountitem(40024) == 1){ // 40024 (item A)
    				if(countitem(40044) == 1){ // 40044 (item B)
    					getitem 40006, 1;
    					getitem 40008, 1;
    					end;
    				}
    				if(countitem(40067) == 1){ // 40067 (item C)
    					if(rand(100) <= .@Chance){ 
    						getitem .@itemid[rand(getarraysize(.@itemid))], 1; // ( array random set 1 )
    					}
    					getitem 40008, 1;
    					getitem 40006, 1;
    					end;
    					}
    			}
    			mes "Stone Blade is needed.";
    			close;
    		case 2:
    			if (rentalcountitem(40058) == 1){ // 40058 (item D)
    				if(countitem(40044) == 1){ // 40044 (item B)
    					getitem 40006, 1;
    					getitem 40008, 1;
    					end;
    				}
    				if(countitem(40067) == 1){ // 40067 (item C)
    					if(rand(100) <= .@Chance){
    						getitem .@itemid[rand(getarraysize(.@itemid))], 1; // ( array random set 2 )
    					}
    					getitem 40008, 1;
    					getitem 40006, 1;
    					end;
    					}
    			}
    		case 3:
    			mes "Gathering Cancel";
    			close;
    	}
    end;
    }
    // Duplicates
    //============================================================
    neko_isle,75,122,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new11	666
    new_1-3,111,73,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new12	666
    new_1-3,115,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new13	666
    new_1-3,119,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new14	666
    new_1-3,123,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new15	666
    new_1-3,127,71,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new16	666
    new_1-3,131,72,6	duplicate(TALL_GRASS_MAIN)	Tall Grass#new17	666

     

  8. the plan was if the player bring item A and item B he will get normal item.

    but if he bring item A and item C, there is 10% chance to get unique item.. but it did not work as plan, i cant even click on the npc..

    -	script	Tall Grass	-1,{
    
    OnInit:
    	setarray .itemid[0], 40062,40063,40064,40065,40066;
    	setarray .itemchance[0], 10,10,10,10,10;
    	end;
    	
    	mes "=== Select Tools ===";
    	next;
    	switch(select("- Stone Blade:- Bone Blade:- Cancel")) {
    	
    	case 1:
    		if (rentalcountitem(40024) == 1 && countitem(40044) == 1 ){
    			getitem 40006, 1;
    			getitem 40008, 1;
    			end;
    		}
    		if (rentalcountitem(40024) == 1 && countitem(40067) == 1 ){
    			getitem .temp_array[rand(0, getarraysize(.temp_array))], 1;
    			getitem 40006, 1;
    			end;
    		}
    		else
    		mes "Stone Blade is needed.";
    		close;
    		
    	case 2:
    		if (rentalcountitem(40058) == 1 && countitem(40044) == 1 ){
    			getitem 40006, 1;
    			getitem 40008, 1;
    			end;
    		}
    		else
    		mes "Bone Blade is needed.";
    		close;
    	case 3:
    		mes "Gathering Cancel";
    		close;
    	}
    }
    // Duplicates
    //============================================================
    neko_isle,75,122,6	duplicate(Tall Grass)	Tall Grass#new11	666
    new_1-3,111,73,6	duplicate(Tall Grass)	Tall Grass#new12	666
    new_1-3,115,71,6	duplicate(Tall Grass)	Tall Grass#new13	666
    new_1-3,119,71,6	duplicate(Tall Grass)	Tall Grass#new14	666
    new_1-3,123,71,6	duplicate(Tall Grass)	Tall Grass#new15	666
    new_1-3,127,71,6	duplicate(Tall Grass)	Tall Grass#new16	666
    new_1-3,131,72,6	duplicate(Tall Grass)	Tall Grass#new17	666

     

  9. 41 minutes ago, llchrisll said:

    That's one way of doing it, here your spoon to fed with ^^:
     

    new_1-3,95,60,6	script	Test	808,{
    	if (rentalcountitem(item_id) < 1 || rentalcountitem(item_id) < 1 || rentalcountitem(item_id) < 1){
    		mes "Hello, Good day huh?";
    		close;
    	}
    	mes "Oh you want this juice?":
    	mes "let me have a look that (either item)";
    	next;
    	mes "Nice!, thanks for showing me,";
    	mes "you can have this juice !";
    	getitem 7709, 1;
    	close;
    }

    just edit the "item_id" to yours and should be good

    well it did work, but it will only work if i have 3 of the items, the plan was if player had either 1 of the item it will work ahaha thanks for the golden spoon

  10. problem solved.. with redneck solution 

    new_1-3,95,60,6	script	Test	808,{
    
    	if (rentalcountitem(40024) > 1) {
    	goto have;
    	}
    	if (rentalcountitem(40046) > 1) {
    	goto have;
    	}
    	else if (rentalcountitem(40052) > 1) {
    	goto have;
    	}
    
    	mes "Hello, Good day huh?";
    	close;
    	
    have:
    	mes "Yuhuuuuuuu";
    	close;
    }
    

     

  11. new_1-3,95,60,6	script	Test	808,{
    	if (countitem("40024")) {
    	.@itemid = 40024;
    	}
    	else if (countitem("40046")) {
    	.@itemid = 40046;
    	}
    	else if (countitem("40052")) {
    	.@itemid = 40052;
    	}
    
    	if (!.@itemid) {
    	mes "Hello, Good day huh?";
    	close;
    }
    
    mes "Oh you want this juice?";
    mes "let me have a look that " + getitemname(.@itemid);
    next;
    mes "Nice!, thanks for showing me,";
    mes "you can have this juice !";
    getitem 7709, 1;
    close;
    }
    

    Untitled.png.0f5b1b6fbab245ebd4c13b4a81a77c29.png

  12. 28 minutes ago, Tokei said:

    You have many ways of doing it. You could use a loop with an array, but this one is pretty straightfoward:

    if (countitem(A)) {
    	.@itemid = A;
    }
    else if (countitem(B)) {
    	.@itemid = B;
    }
    else if (countitem(C)) {
    	.@itemid = C;
    }
    
    if (!.@itemid) {
    	mes "Hello, Good day huh?";
    	close;
    }
    
    mes "Oh you want this juice?":
    mes "let me have a look that " + getitemname(.@itemid);
    next;
    mes "Nice!, thanks for showing me,";
    mes "you can have this juice !";
    getitem 7709, 1;
    close;

     

    thanks @Tokei for correcting, but the items are rental weapons, how can i make it possible? either the item is equipped or not equipped ?

    i think this is the correct way, but how can i add this to my test script?

    @inventorylist_expire[]    - expire time (Unix time stamp). 0 means never expires.

     

  13. hi i have totally no idea how can i make this script..

    player will bring either of this item before he can talk to the npc, 

    Note : Item A, Item B and Item C are rental weapon, equipped or not equipped, not matter as long its with the player

    example:

    if (check item (A) <1, or check item (B) <1, or check item (C) <1 ){
    
    	mes "Hello, Good day huh?";
    	close;
    }
    
    	mes "Oh you want this juice?":
    	mes "let me have a look that (either item)";
    	next;
    	mes "Nice!, thanks for showing me,";
    	mes "you can have this juice !";
    	getitem 7709, 1;
    	close;

    it wont delete player item, just to enable the npc to trigger the other massage and npc give item to the player

  14. hi i would like to ask a script when player use custom commands as @status it will pop up an NPC massage box as normal, and when check item in player inventory it will display text,

    example when player use @status

    (when use @status this massage will pop up)
    menu:
    mes "=== (Player Name) status ===";
    switch(select("- Weapon Skill:- Bow Skill:- Cancel")){
      case 1:
        mes "Your (check item in inventory = Wepon skill lvl 1 )";
        switch(select("- Check other skill:- Cancel")){
          case 1:
            goto menu;
            end;
           
          case 2:
            mes "cancel";
            close;
       		 }
      case 2:
            mes "Your (check item in inventory = Bow skill lvl 1 )";
        switch(select("- Check other skill:- Cancel")){
          case 1:
            goto menu;
            end;
           
          case 2:
            mes "cancel";
            close;
       		 }
    	}
    }
    inventory items :
    40040 Weapon skill lvl 1 (etc)
    40041 Bow Skill lvl 1 (etc)

     

  15. 11 hours ago, Winterfox said:

    It would be helpful if you would explain exactly what is not working and how you expect it to.

    well as u can see on the script below, all i need is to bring 2 items only the 3rd item is kinda like tool item, before i was able to craft the final item result, but im not sure what happen since i did not edit any part of the npc as it was consider done, but when i re-test the scipt i was not able to carft even when i have all the materials in my inventory

    Spoiler
    case 4:
    			next;
    			switch(select("- Animal Skin Armor:- Cancel")) {	
    				
    				case 1:
    				if(countitem(40028) < 2 || countitem(40029) < 2 || countitem(40030) < 1 ) {	
    				mes "^ff0000 Animal Skin Armor ^000000";
    				mes "Requires:-";
    				mes "- [2] Padded Leaf";
    				mes "- [2] Tanned Skin";
    				mes "- [1] Needle";
    				close;
    				}
    
    				delitem(40028, 2);
    				delitem(40029, 2);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40032, 1);
    
    				goto OnCraftingStart;
    				
    				case 2:
    					mes "Crafting Cancel.";
    					close;
    				}

     

     

  16. as title i did manage to make the item using the requirement before, but some how now its not working as it should?

    script :

    Spoiler
    case 4:
    			next;
    			switch(select("- Animal Skin Armor:- Cancel")) {	
    				
    				case 1:
    				if(countitem(40028) < 2 || countitem(40029) < 2 || countitem(40030) < 1 ) {	
    				mes "^ff0000 Animal Skin Armor ^000000";
    				mes "Requires:-";
    				mes "- [2] Padded Leaf";
    				mes "- [2] Tanned Skin";
    				mes "- [1] Needle";
    				close;
    				}
    
    				delitem(40028, 2);
    				delitem(40029, 2);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40032, 1);
    
    				goto OnCraftingStart;
    				
    				case 2:
    					mes "Crafting Cancel.";
    					close;
    				}

     

     item db :

    Spoiler
      - Id: 40030
        AegisName: Wood Needle
        Name: Wood Needle
        Type: Etc
        Weight: 10
        Trade:
          NoDrop: true
          NoTrade: true
          NoSell: true
          NoCart: true
          NoStorage: true
          NoGuildStorage: true
          NoMail: true
          NoAuction: true
    
      - Id: 40028
        AegisName: Padded Leaf
        Name: Padded Leaf
        Type: Etc
        Weight: 10
    
      - Id: 40029
        AegisName: Tanned Skin
        Name: Tanned Skin
        Type: Etc
        Weight: 10

     

    Full Script:

    Spoiler
    -	script	Workbench	FAKE_NPC,{
    	.@wrkb_id = atoi(strnpcinfo(2));
    
    	if($wrkb_crafting_state[.@wrkb_id] == 1) {
    		mes "Please wait until the crafting process is finished. ";
    		close;
    	}
    
    	if($wrkb_crafting_state[.@wrkb_id] == 2) {
    		mes "Here are your crafted items.";
    		for(.@i = 0; .@i < getarraysize(getd("$wrkb_" + .@wrkb_id + "_products")); .@i += 2)
    			getitem(getd("$wrkb_" + .@wrkb_id + "_products[" + .@i + "]"), getd("$wrkb_" + .@wrkb_id + "_products[" + (.@i + 1) + "]"));
    
    		delwaitingroom;
    		$wrkb_crafting_state[.@wrkb_id] = 0;
    		close;
    	}
    
    	mes "==============================";
    	mes "^ff0000 Any item crafted by using the public Workbench can be stolen by other players !! ^000000";
    	mes "==============================";
    	next;
    	mes "What do you want to craft?";
    	next;
    	switch(select("- Material Crafting:- Tool Crafting:- Weapon Crafting:- Armor Crafting:- Cancel")) {
    	
    		case 1:
    			next;
    			switch(select("- Rock Chunk:- Rope:- Blade:- Handle:- Padded Leaf:- Tanned Skin:- Cancel")) {	
    			
    			case 1:
    				if(countitem(40005) < 4) {
    				mes "^ff0000 Rock Chunk ^000000";
    				mes "Requires:-";
    				mes "- [4] Rock";
    				close;
    			}
    
    				delitem(40005, 4);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40018, 1);
    
    			goto OnCraftingStart;
    		
    			case 2:
    				if(countitem(40008) < 4) {
    				mes "^ff0000 Ropes ^000000";
    				mes "Require:-";
    				mes "- [4] Stalk";
    				close;
    			}
    
    				delitem(40008, 4);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40014, 1);
    			
    				goto OnCraftingStart;
    		
    			case 3:
    				if(countitem(40021) < 4) {
    				mes "^ff0000 Blade ^000000";
    				mes "Require:-";
    				mes "- [4] Boulder";
    				close;
    			}
    
    			delitem(40021, 4);
    			setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40022, 1);
    			
    			goto OnCraftingStart;
    			
    			case 4:
    				if(countitem(40002) < 2) {
    				mes "^ff0000 Handle ^000000";
    				mes "Require:-";
    				mes "- [2] Log";
    				close;
    			}
    
    				delitem(40002, 2);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40023, 1);
    			
    				goto OnCraftingStart;
    			
    			case 5:
    				if(countitem(40004) < 4) {
    				mes "^ff0000 Padded Leaf ^000000";
    				mes "Require:-";
    				mes "- [4] Leaf";
    				close;
    			}
    
    				delitem(40004, 4);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40028, 1);
    			
    				goto OnCraftingStart;	
    			
    			case 6:
    				if(countitem(40027) < 4) {
    				mes "^ff0000 Tanned Skin ^000000";
    				mes "Require:-";
    				mes "- [4] Skin";
    				close;
    			}
    
    				delitem(40027, 4);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40029, 1);
    			
    				goto OnCraftingStart;	
    		}	
    		
    		case 2:
    			next;
    			next;
    			switch(select("- Stone Dagger:- Stone Axe:- Stone Hammer:- Wood Needle :- Cancel")) {
    			
    			case 1:
    				if(countitem(40005) < 4) {
    				mes "^ff0000 Stone Dagger ^000000";
    				mes "Requires:-";
    				mes "- [4] Rocks";
    				close;
    				}
    
    				delitem(40005, 4);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40009, 1);
    
    				goto OnCraftingStart;
    			
    			case 2:
    				if(countitem(40018) < 1 || countitem(40014) < 2 || countitem(40003) < 1 ) {	
    				mes "^ff0000 Stone Axe ^000000";
    				mes "Requires:-";
    				mes "- [1] Rock Chunk";
    				mes "- [2] Ropes";
    				mes "- [1] Branch";
    				close;
    				}
    
    				delitem(40018, 1);
    				delitem(40014, 2);
    				delitem(40003, 1);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40017, 1);
    
    				goto OnCraftingStart;
    				
    			case 3:
    				if(countitem(40018) < 1 || countitem(40014) < 2 || countitem(40003) < 1 ) {	
    				mes "^ff0000 Stone Hammer ^000000";
    				mes "Requires:-";
    				mes "- [1] Rock Chunk";
    				mes "- [2] Ropes";
    				mes "- [1] Branch";
    				close;
    				}
    
    				delitem(40018, 1);
    				delitem(40014, 2);
    				delitem(40003, 1);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40020, 1);
    
    				goto OnCraftingStart;
    				
    			case 4:
    				if(countitem(40003) < 2 || countitem(40018) < 1 || !isequipped(40016) ) {	
    				mes "^ff0000 Wood Needle ^000000";
    				mes "Requires:-";
    				mes "- [2] Branch";
    				mes "- [1] Stone Chunk";
    				mes "- [1] Stone Axe";
    				close;
    				}
    
    				delitem(40003, 2);
    				delitem(40018, 1);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40033, 1);
    
    				goto OnCraftingStart;
    			
    			}
    		case 3:
    			next;
    			switch(select("- Stone Blade:- Cancel")) {	
    				
    				case 1:
    				if(countitem(40023) < 2 || countitem(40022) < 1 || countitem(40014) < 2 || !isequipped(40019) ) {	
    				mes "^ff0000 Stone Blade ^000000";
    				mes "Requires:-";
    				mes "- [2] Handle";
    				mes "- [1] Blade";
    				mes "- [2] Rope";
    				mes "- [1] Stone Hammer";
    				close;
    				}
    
    				delitem(40023, 2);
    				delitem(40022, 1);
    				delitem(40014, 2);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40025, 1);
    
    				goto OnCraftingStart;
    				
    				case 2:
    					mes "Cancel Crafting.";
    					close;
    				}
    			
    		
    		case 4:
    			next;
    			switch(select("- Animal Skin Armor:- Cancel")) {	
    				
    				case 1:
    				if(countitem(40028) < 2 || countitem(40029) < 2 || countitem(40030) < 1 ) {	
    				mes "^ff0000 Animal Skin Armor ^000000";
    				mes "Requires:-";
    				mes "- [2] Padded Leaf";
    				mes "- [2] Tanned Skin";
    				mes "- [1] Needle";
    				close;
    				}
    
    				delitem(40028, 2);
    				delitem(40029, 2);
    				setarray(getd("$wrkb_" + .@wrkb_id + "_products"), 40007, 1, 40032, 1);
    
    				goto OnCraftingStart;
    				
    				case 2:
    					mes "Crafting Cancel.";
    					close;
    				}
    		case 5:
    			mes "Crafting Cancel.";
    			close;
    			
    		}
    
    	end;
    
    	OnCraftingStart:
    		$wrkb_crafting_state[.@wrkb_id] = 1;
    		waitingroom("CRAFTING...", 0);
    		initnpctimer;
    		end;
    
    	OnTimer60000:
    		$wrkb_crafting_state[atoi(strnpcinfo(2))] = 2;
    		delwaitingroom;
    		waitingroom("COMPLETED!", 0);
    		end;
    
    	OnInit:
    		.@wrkb_id = atoi(strnpcinfo(2));
    		if(.@wrkb_id < 1) end;
    
    		if($wrkb_crafting_state[.@wrkb_id] == 1) goto OnCraftingStart;
    }
    //Duplicate
    //=====================================================
    new_1-3,98,58,6	duplicate(Workbench)	Workbench#1	665
    new_1-3,98,50,6	duplicate(Workbench)	Workbench#2	665
    new_1-3,98,43,6	duplicate(Workbench)	Workbench#3	665
    chry_fld,58,89,6	duplicate(Workbench)	Workbench#4	665
    chry_fld,55,85,6	duplicate(Workbench)	Workbench#5	665
    chry_fld,52,81,6	duplicate(Workbench)	Workbench#6	665
    chry_fld,63,86,6	duplicate(Workbench)	Workbench#7	665
    chry_fld,60,81,6	duplicate(Workbench)	Workbench#8	665
    chry_fld,57,77,6	duplicate(Workbench)	Workbench#9	665
    chry_fld,68,83,6	duplicate(Workbench)	Workbench#10	665
    chry_fld,65,78,6	duplicate(Workbench)	Workbench#11	665
    chry_fld,61,74,6	duplicate(Workbench)	Workbench#12	665

     

     

  17. Good news, i was able to add password system, the only problem now is how can i add more map/island for rent? as by default this will only let player rent 1 map only... and how to add notification on how many time left  Days, Hours Minute, and Seconds ?

    Spoiler
    neko_isle,88,127,5	script	sdfjhsdfk	100,{
    
    	// item to rent NPC
    	.@item_id = 7539;
    	// rent NPC for how many days
    	.@rent_day = 1;
    	
    	.@room = getcharid(3);
    	if ( $rent_room && $rent_duration > gettimetick(2) ) {
    	
    		// function if rented
    		if ( $rent_room == .@room ) {
    			switch(select("- Set Password:- Warp to my island:- Cancel")) { 
    			
    				case 1:
    					mes "[Island Agent]";
    					mes "Hello, would you like to change the password?"; next;
    					if(!(select("Yes:No")&2)) {
    					mes "[Island Agent]";
    					mes "Alright input a new password!";
    					next;
    					input .@lb_pass$;
    					mes "[Island Agent]";
    					mes "Password successfully changed to ["+.@lb_pass$+"].";
    					set($lb_pass$,.@lb_pass$);
    					close;
    					}
    			
    				case 2:
    					mes "[Island Agent]";
    					mes "Do you wish to warp to your island ?";
    					if ( select( "Yes","No" ) == 1 ) {
    					warp "neko_isle",84,125;
    					end;
    					}
    				
    				case 3:
    					mes "[Island Agent]";
    					mes "Have a nice day";
    					close;
    			
    			}
    		}
    		// if others click on it
    		if ( $rental_cost ) {
    			// no idea
    		}
    			mes "[Island Agent]";
    			mes "Enter the password.";
    			next;
    			input .@lb_pass$;
    			if(.@lb_pass$ != $lb_pass$){
    				mes "[Men In Black]";
    				mes "Incorrect password.";
    				close;
    			}
    			
    			mes "[Island Agent]";
    			mes "Correct password, teleporting to the map..";
    			close2;
    			warp "neko_isle",84,125;
    			end;
    			}
    			
    	else if ( countitem( .@item_id ) ) {
    		
    		mes "[Island Agent]";
    		mes "Rent this island ?";
    		mes "Rental Cost: 1 x "+getitemname( .@item_id );
    		
    		if ( select( "Yes","No" ) == 1 ) {
    			delitem .@item_id,1;
    			$rent_room = .@room;
    			$rent_duration = gettimetick(2) + ( .@rent_day * 120 ); 
    			mes "[Island Agent]";
    			mes "This island belong to you.";
    		}
    	}
    	else {
    		mes "[Island Agent]";
    		mes "Island is aviable for rent.";
    		mes "Rental Cost: 1 x "+getitemname( .@item_id );
    	}
    	close;
    }

     

     

  18. Soo i have found a script which did almost what i wanted which is MVP Room, the only question i had is how can i change the requirement from zeny to item (which later deleted) and for any other player friend to join need a password? which means only those with the password can enter that private island, and the owner can change the password any time to his like, also would be great if can edit the time left notification to from minute and seconds to days, minute and seconds...

    i just notice that the rent would over or reset when server restart, reboot or stopped, how to prevent this?

    script:

    Spoiler
    
    
    
    //	~~~~~ Please use this latest int__ function that support negative numbers ~~~~~
    function	script	int__	{
    	.@i = getstrlen( .@str$ = getarg(0) ) -3;
    	.@is_negative = charat( .@str$, 0 ) == "-";
    	while ( .@i > .@is_negative ) {
    		.@str$ = insertchar( .@str$, ",", .@i );
    		.@i -= 3;
    	}
    	return .@str$;
    }
    
    //===== eAthena Script ======================================
    //= Private MVP/Branch Room
    //===== By: ===============================================
    //= by ~AnnieRuru~
    //===== Current Version: ======================================
    //= 1.5
    //===== Compatible With: ===================================== 
    //= rAthena 2019-01-10
    //===== Description: ========================================= 
    //= Player can rent Neko Island for the player him/herself, for party or for guilds
    //===== Topic =================================================
    //= http://www.eathena.ws/board/index.php?showtopic=187654
    //= http://rathena.org/board/topic/72376-mvp-summon-script
    //= http://herc.ws/board/topic/4841-annies-mvp-room-disable-spawn/
    //===== Additional Comments: ================================== 
    //= 1.0 
    //= ---- break the tradition which a script only for a player, or only for a party.
    //=      now 1 room can be use for party and another room can use for guilds.
    //= ---- timeout feature to prevent player owns the room indefinitely,
    //=      by create a new account and sit/@at'ing inside overnight.
    //= ---- can disable mvp/boss summon via configuration and becomes a branch room script.
    //= ---- a double check to prevent players rent all the rooms for himself.
    //= 1.0a
    //= ---- fix a critial bug that the time count too fast -_-"
    //= 1.1
    //= ---- added item cost to rent or to summon
    //= ---- added a config to limit summoning per session
    //= ---- added flood control option
    //= 1.2
    //= ---- rewrite the waitingroom counter
    //= ---- optimize the script in a way can add custom summon group
    //= ---- add config to kill the monsters if the room just being left empty
    //= ---- add GM can kick room in use
    //= ---- add able to spawn in numbers
    //= ---- add limitspawn can configure to negative to limit spawn in that group instead of individual one
    //= 1.3
    //= ---- fix chatroom countdown issue due to rev13269
    //= ---- fix a bug if 2 people rent a room at same time, the later 1 will get the room
    //= ---- add a feature so the GM can know how long the room has rented or abandoned
    //= 1.4
    //= ---- update with new mvp and mini bosses
    //= ---- fix an exploit if server allow to use @mail, player can send item/Zeny away to prevent item/Zeny deletion when registering the room
    //= ---- players die inside Neko Island shouldn't lose exp
    //= 1.4a
    //= ---- fix this to use in rathena
    //= 1.4b
    //= ---- fix this to use in hercules
    //= 1.5
    //= ---- fix a server crash bug in rathena
    //========================================================
    
    //	This is the shop for this Branch room IF you already enable it. Can sell whatever things you want.
    -	shop	Neko Island#branch	-1,604:100000,12103:1000000
    
    
    
    -	script	MVP Summoner	-1,{
    	goto L_Start;
    
    OnInit:
    	if ( !getstrlen( strnpcinfo(2) ) ) {
    	
    //	Config ---------------------------------------------------------------------------------------
    
    	// Time for rent a room IN MINUTES. When time out, players inside the room will kick out. Do Not set this as 0
    	set .timeout, 5;
    	// if the room left empty for # minutes, will be treated as give up the room. Do Not set this as 0
    	set .nobodygiveup, 5;
    
    	// NOTE : The script only search item OR Zeny. if you specify item amount, then it will ask for the item. If item amount is 0, then it will ask for Zeny.
    
    	// the cost to rent a room
    	set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin
    	set .rentitemamount, 1; // amount of items to rent a room
    	set .rentcost, 0; // otherwise, Zeny cost to rent a room
    
    	// limit each room can only summon 1 monster at a time. (only the Summoning option)
    	// Turn it off (0) means the player can summon a lot of monsters as long as the player has enough Zeny/item. High rate server players love the room with a lot MVPs
    	// Turn it on (1) means the player have to kill existing monster before can summon a new one. Low rate server player prefer to take out MVP 1 by 1
    	set .floodcontrol, 0;
    
    	// if .floodcontrol is turn off, your players might experience lag if they summoned too many MVPs
    	// so what is the maximum input to limit your players summon too many ?
    	set .inputlimit, 30;
    
    	// If the room has left over monsters while nobody in the room and the room not give up yet, shall we kill monsters in empty room ?
    	set .killmonster, 1; // Default is yes
    
    	//	Options menu setting for MVP Summoner NPC.
    	set .@menu[0], 0; // Turn Heal option On/Off
    	set .@menu[1], 0; // Turn Group 1 summons On/Off -> MVP
    	set .@menu[2], 0; // Turn Group 2 summons On/Off -> mini boss
    	set .@menu[3], 0; // Turn Group 3 summons On/Off
    	set .@menu[4], 0; // Turn Group 4 summons On/Off
    	set .@menu[5], 0; // Turn Group 5 summons On/Off
    	set .@menu[6], 0; // Turn Group 6 summons On/Off
    	set .@menu[7], 0; // Turn Group 7 summons On/Off
    	set .@menu[8], 0; // Turn Group 8 summons On/Off
    	set .@menu[9], 0; // Turn Group 9 summons On/Off
    	set .@menu[10], 0; // Sell shop items options On/Off ( shop npc above )
    
    	//	set respawn point when they leave the room. Obviously warp to the Private Island Warper npc
    	set .respawnmap$, "prontera"; // Note : "SavePoint" does NOT work
    	set .respawnx, 150;
    	set .respawny, 174;
    
    	// The minimum GM level can kick a room in use
    	set .gmlvlkick, 80;
    
    	// .limitspawn in previous revision changed to .grouplimit .
    	// it is for limit each monster spawn per session, prevent them only killing same monster again and again
    	// Now you can configure one group has limited summon, and another group has unlimited summon
    	// Tips: if you server has an insane custom MVP, you can put your custom mob to Group 3~9 with insane item cost, and limit only 1 summon per session
    	// .grouplimit use amount, means if group1limit set to 10, then each session can only summon up to 10 amount of that kind of monster. 0 is unlimited
    
    	// ---------
    	// Group 1 -> MVP 
    	// ---------
    	set .group1name$, "MVP"; // Group 1 name
    	set .group1itemid, 674; // item id use for summon any Group 1 monster - 674 - mithil coin
    	set .group1itemamount, 0; // amount of items to summon a Group 1 monster
    	set .group1cost, 100000; // if no item is specify, Zeny cost to summon a Group 1 monster
    	set .group1limit, 0; // limit of summon of Group 1 monster per session, prevent them only killing same monster again and again
    	setarray .group1id,
    		1511,//	Amon Ra
    		1647,// Assassin Cross Eremes
    		1785,//	Atroce
    		1630,//	Bacsojin
    		1039,//	Baphomet
    		1874,//	Beelzebub
    		1272,//	Dark Lord
    		1719,//	Datale
    		1046,//	Doppelgangger
    		1389,//	Dracula
    		1112,//	Drake
    		1115,//	Eddga
    		1418,//	Evil Snake Lord
    		1871,//	Fallen Bishop
    		1252,//	Garm
    		1768,//	Gloom Under Night
    		1086,//	Golden Thief Bug
    		1885,//	Gopinich
    		1649,// High Priest Magaleta
    		1651,// High Wizard Katrinn
    		1832,//	Ifrit
    		1492,//	Incantation Samurai
    		1734,//	Kiel D-01
    		1251,//	Knight of Windstorm
    		1779,//	Ktullanux
    	//	1980,// Kubkin ( I think this mvp is still new )
    		1688,//	Lady Tanee
    		1646,// Lord Knight Seyren
    		1373,//	Lord of Death
    		1147,//	Maya
    		1059,//	Mistress
    		1150,//	Moonlight Flower
    		1087,//	Orc Hero
    		1190,//	Orc Lord
    		1038,//	Osiris
    		1157,//	Pharaoh
    		1159,//	Phreeoni
    		1623,//	RSX 0806
    		1650,// Sniper Shecil
    		1583,//	Tao Gunka
    		1708,//	Thanatos
    		1312,//	Turtle General
    		1751,//	Valkyrie Randgris
    		1685,// Vesper
    		1648,// Whitesmith Harword
    		1917,// Wounded Morroc
    		1658;//	Ygnizem
    
    	// ---------
    	// Group 2 -> mini boss
    	// ---------
    	set .group2name$, "mini boss"; // Group 2 name
    	set .group2itemid, 674; // item id use for summon any Group 2 monster - 674 - mithil coin
    	set .group2itemamount, 0; // amount of items to summon a Group 2 monster
    	set .group2cost, 10000; // if no item is specify, Zeny cost to summon a Group 2 monster
    	set .group2limit, 0; // limit of summon of Group 2 monster per session, prevent them only killing same monster again and again
    	setarray .group2id,
    		1096,// Angeling
    		1388,// Archangeling
    		1795,// Bloody Knight
    		1830,// Bow Guardian
    		1839,// Byorgue
    		1309,// Cat O' Nine Tail
    		1283,// Chimera
    		1302,// Dark Illusion
    		1198,// Dark Priest
    		1582,// Deviling
    		1091,// Dragon Fly
    		1093,// Eclipse
    		1205,// Executioner
    		1783,// Galion
    		1592,// Gangster
    		1120,// Ghostring
    		1259,// Gryphon
    		1720,// Hydro
    		1090,// Mastering
    		1289,// Maya Purple
    		1262,// Mutant Dragon
    		1203,// Mysteltainn
    		1870,// Necromancer
    		1295,// Owl Baron
    		1829,// Sword Guardian
    		1204,// Tirfing
    		1089,// Toad
    		1092,// Vagabond Wolf
    		1765;// Valkyrie
    
    	// ---------
    	// Group 3
    	// ---------
    	set .group3name$, "Poring-Family"; // Group 3 name
    	set .group3itemid, 12109; // item id use for summon any Group 3 monster - 12109 - Poring box
    	set .group3itemamount, 1; // amount of items to summon a Group 3 monster
    	set .group3cost, 0; // if no item is specify, Zeny cost to summon a Group 3 monster
    	set .group3limit, -5; // limit of summon of Group 3 monster per session, prevent them only killing same monster again and again
    	setarray .group3id,
    		1002,// Poring
    		1113,// Drops
    		1031,// Poporing
    		1242,// Marin
    		1062,// Santa Poring
    		1613,// Metaling
    		1784,// Stapo
    		1090,// Mastering
    		1096,// Angeling
    		1120,// Ghostring
    		1582,// Deviling
    		1388,// Arc Angeling
    		1502;// Pori Pori
    
    	// ---------
    	// Group 4
    	// ---------
    	set .group4name$, ""; // Group 4 name
    	set .group4itemid, 0; // item id use for summon any Group 4 monster
    	set .group4itemamount, 0; // amount of items to summon a Group 4 monster
    	set .group4cost, 0; // if no item is specify, Zeny cost to summon a Group 4 monster
    	set .group4limit, 0; // limit of summon of Group 4 monster per session, prevent them only killing same monster again and again
    	setarray .group4id,
    		1001,
    		1002;
    
    	// ---------
    	// Group 5
    	// ---------
    	set .group5name$, ""; // Group 5 name
    	set .group5itemid, 0; // item id use for summon any Group 5 monster
    	set .group5itemamount, 0; // amount of items to summon a Group 5 monster
    	set .group5cost, 0; // if no item is specify, Zeny cost to summon a Group 5 monster
    	set .group5limit, 0; // limit of summon of Group 5 monster per session, prevent them only killing same monster again and again
    	setarray .group5id,
    		1001,
    		1002;
    
    	// ---------
    	// Group 6
    	// ---------
    	set .group6name$, ""; // Group 6 name
    	set .group6itemid, 0; // item id use for summon any Group 6 monster
    	set .group6itemamount, 0; // amount of items to summon a Group 6 monster
    	set .group6cost, 0; // if no item is specify, Zeny cost to summon a Group 6 monster
    	set .group6limit, 0; // limit of summon of Group 6 monster per session, prevent them only killing same monster again and again
    	setarray .group6id,
    		1001,
    		1002;
    
    	// ---------
    	// Group 7
    	// ---------
    	set .group7name$, ""; // Group 7 name
    	set .group7itemid, 0; // item id use for summon any Group 7 monster
    	set .group7itemamount, 0; // amount of items to summon a Group 7 monster
    	set .group7cost, 0; // if no item is specify, Zeny cost to summon a Group 7 monster
    	set .group7limit, 0; // limit of summon of Group 7 monster per session, prevent them only killing same monster again and again
    	setarray .group7id,
    		1001,
    		1002;
    
    	// ---------
    	// Group 8
    	// ---------
    	set .group8name$, ""; // Group 8 name
    	set .group8itemid, 0; // item id use for summon any Group 8 monster
    	set .group8itemamount, 0; // amount of items to summon a Group 8 monster
    	set .group8cost, 0; // if no item is specify, Zeny cost to summon a Group 8 monster
    	set .group8limit, 0; // limit of summon of Group 8 monster per session, prevent them only killing same monster again and again
    	setarray .group8id,
    		1001,
    		1002;
    
    	// ---------
    	// Group 9
    	// ---------
    	set .group9name$, ""; // Group 9 name
    	set .group9itemid, 0; // item id use for summon any Group 9 monster
    	set .group9itemamount, 0; // amount of items to summon a Group 9 monster
    	set .group9cost, 0; // if no item is specify, Zeny cost to summon a Group 9 monster
    	set .group9limit, 0; // limit of summon of Group 9 monster per session, prevent them only killing same monster again and again
    	setarray .group9id,
    		1001,
    		1002;
    
    //	Config Ends ------------------------------------------------------------------------
    
    		if ( .timeout == 0 ) set .timeout, 5;
    		if ( .nobodygiveup == 0 ) set .nobodygiveup, 5;
    		if ( .inputlimit < 1 ) set .inputlimit, 1;
    
    		if ( .rentitemid && .rentitemamount ) {
    			if ( getitemname(.rentitemid) == "null" ) {
    				debugmes "Private Island: Rent a room is using invalid item id.";
    			}
    		}
    		set .@i, 1;
    		while ( .@i <= 9 ) {
    			if ( .@menu[.@i] && getd(".group"+ .@i +"itemid") && getd(".group"+ .@i +"itemamount") ) {
    				if ( getitemname( getd(".group"+ .@i +"itemid") ) == "null" ) {
    					debugmes "Private Island: Group no. "+ .@i +" is using invalid item id.";
    				}
    			}
    			set .@i, .@i +1 ;
    		}
    		set .menu$, ( (.@menu[0])?"Heal":"" )+":"+( (.@menu[1])?"Summon "+ .group1name$:"" )+":"+( (.@menu[2])?"Summon "+ .group2name$:"" )+":"+( (.@menu[3])?"Summon "+ .group3name$:"" )+":"+( (.@menu[4])?"Summon "+ .group4name$:"" )+":"+( (.@menu[5])?"Summon "+ .group5name$:"" )+":"+( (.@menu[6])?"Summon "+ .group6name$:"" )+":"+( (.@menu[7])?"Summon "+ .group7name$:"" )+":"+( (.@menu[8])?"Summon "+ .group8name$:"" )+":"+( (.@menu[9])?"Summon "+ .group9name$:"" )+":"+( (.@menu[10])?"Buy branches":"" )+":Leave this room:Give up this room";
    
    		set .@i, 1;
    		while ( .@i <= 9 ) {
    			setd ".group"+ .@i +"idsize", getarraysize( getd(".group"+ .@i +"id") );
    			if ( .@menu[.@i] && getd(".group"+ .@i +"limit") <= 0 ) {
    				set .@j, 0;
    				while ( .@j < getd(".group"+ .@i +"idsize") ) {
    					setd ".group"+ .@i +"menu$", getd(".group"+ .@i +"menu$") + getmonsterinfo( getd(".group"+ .@i +"id["+ .@j +"]"), 0) +":";
    					set .@j, .@j +1 ;
    				}
    			}
    			set .@i, .@i +1 ;
    		}
    	}
    	else {
    		getmapxy .@map$, .@x, .@y, 1;
    		setmapflag .@map$, mf_nowarpto;
    		setmapflag .@map$, mf_noteleport;
    		setmapflag .@map$, mf_nomemo;
    		setmapflag .@map$, mf_nosave;
    		setmapflag .@map$, mf_nopenalty;
    	//	setmapflag .@map$, mf_nowarp;
    	//	setmapflag .@map$, mf_noreturn;
    	//	setmapflag .@map$, mf_nomobloot;
    	//	setmapflag .@map$, mf_nomvploot;
    	//	setmapflag .@map$, mf_monster_noteleport;
    	//	setmapflag .@map$, mf_noicewall;
    	//	setmapflag .@map$, mf_nobaseexp;
    	//	setmapflag .@map$, mf_nojobexp;
    	//	setmapflag .@map$, mf_novending;
    		sleep 1;
    		mapannounce .@map$, "Admin has refresh the server, please register the room again.", 1;
    		mapwarp .@map$, .respawnmap$, .respawnx, .respawny;
    	}
    	end;
    
    L_Start: // I hate gotos ... but ...
    	set .@dif, strnpcinfo(2);
    	if ( .remind[.@dif] == 0 ) {
    		set .remind[.@dif], 1;
    		initnpctimer;
    	}
    	mes "[MVP Summoner]";
    	mes "Hi, what can I do for you ?";
    	next;
    	switch ( select(.menu$) ) {
    		case 1:
    			mes "[MVP Summoner]";
    			if ( mobcount("this","") > 0 ) {
    				mes "I cannot offer heal service when there are monsters around.";
    				close;
    			}
    			sc_end SC_STONE;
    			sc_end SC_SLOWDOWN;
    			sc_end SC_FREEZE;
    			sc_end SC_SLEEP;
    			sc_end SC_CURSE;
    			sc_end SC_SILENCE;
    			sc_end SC_CONFUSION;
    			sc_end SC_BLIND;
    			sc_end SC_BLEEDING;
    			sc_end SC_DECREASEAGI;
    			sc_end SC_POISON;
    			sc_end SC_HALLUCINATION;
    			sc_end SC_STRIPWEAPON;
    			sc_end SC_STRIPARMOR;
    			sc_end SC_STRIPHELM;
    			sc_end SC_STRIPSHIELD;
    			sc_end SC_CHANGEUNDEAD;
    			sc_end SC_ORCISH;
    			sc_end SC_BERSERK;
    			sc_end SC_SKE;
    			sc_end SC_SWOO;
    			sc_end SC_SKA;
    			percentheal 100,100;
    			specialeffect2 EF_HEAL;
    			mes "You have completely healed.";
    			close;
    		default:
    			set .@group, @menu -1;
    			if ( .floodcontrol && mobcount("this","") > 0 ) {
    				mes "[MVP Summoner]";
    				mes "I cannot summon another monster when there are monsters around.";
    				close;
    			}
    			else if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
    				mes "[MVP Summoner]";
    				mes "The cost to summon a "+ getd(".group"+ .@group +"name$") +" is "+ getd(".group"+ .@group +"itemamount") +" "+ getitemname( getd(".group"+ .@group +"itemid") ) +".";
    				if ( getd(".group"+ .@group +"limit") < 0 )
    					mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) ) )+") more summons for this group.";
    				next;
    			}
    			else if ( getd(".group"+ .@group +"cost") ) {
    				mes "[MVP Summoner]";
    				mes "The cost to summon a "+ getd(".group"+ .@group +"name$") +" is "+ callfunc("int__", getd(".group"+ .@group +"cost") ) +" Zeny.";
    				if ( getd(".group"+ .@group +"limit") < 0 )
    					mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) ) )+") more summons for this group.";
    				next;
    			}
    			else if ( getd(".group"+ .@group +"limit") < 0 ) {
    				mes "[MVP Summoner]";
    				mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd(".group"+ .@group +"limit"+ .@dif) ) )+") more summons for this group.";
    				next;
    			}
    			if ( getd(".group"+ .@group +"limit") < 0 && getd(".group"+ .@group +"limit"+ .@dif) >= ~getd(".group"+ .@group +"limit")+1 ) {
    				mes "[MVP Summoner]";
    				mes "I'm sorry, but you can't summon any more monster for this group.";
    				close;
    			}
    			else if ( getd(".group"+ .@group +"limit") > 0 ) {
    				for ( set .@i, 0; .@i < getd(".group"+ .@group +"idsize"); set .@i, .@i +1 )
    					set .@menu$, .@menu$ +( ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") >= getd(".group"+ .@group +"limit") )?"^999999":"^000000" )+ getmonsterinfo( getd(".group"+ .@group +"id["+ .@i +"]"), 0) +" ("+ ( ( getd(".group"+ .@group +"limit") - getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") <= 0 )?0:( getd(".group"+ .@group +"limit") - getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") ) ) +")"+":";
    				set .@menu, select(.@menu$) -1;
    			}
    			else
    				set .@menu, select( getd(".group"+ .@group +"menu$") ) -1;
    			mes "[MVP Summoner]";
    			if ( .floodcontrol == 0 && .inputlimit > 1 ) {
    				mes "Input an amount of monsters to summon.";
    				next;
    				input .@amount;
    				if ( .@amount == 0 ) close;
    				else if ( .@amount > .inputlimit )
    					set .@amount, .inputlimit;
    				mes "[MVP Summoner]";
    			}
    			else
    				set .@amount, 1;
    			if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
    				if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) {
    					mes "You don't have enough "+ getitemname( getd(".group"+ .@group +"itemid") ) +" to summon a "+ getd(".group"+ .@group +"name$") +".";
    					close;
    				}
    			}
    			else if ( getd(".group"+ .@group +"cost") ) {
    				if ( Zeny < getd(".group"+ .@group +"cost") * .@amount ) {
    					mes "You don't have enough Zeny to summon a "+ getd(".group"+ .@group +"name$") +".";
    					close;
    				}
    			}
    			if ( .floodcontrol && mobcount("this","") > 0 ) {
    				mes "I cannot summon another monster when there are monsters around.";
    				close;
    			}
    			else if ( getd(".group"+ .@group +"limit") > 0 ) {
    				if ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") >= getd(".group"+ .@group +"limit") ) {
    					mes "I'm sorry, but you already summoned that monster too much. Try summon another.";
    					close;
    				}
    				else if ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) {
    					mes "The amount you input is more than the limit you can summon. Try reduce the amount.";
    					close;
    				}
    			}
    			else if ( getd(".group"+ .@group +"limit") < 0 ) {
    				if ( getd(".group"+ .@group +"limit"+ .@dif) >= ~getd(".group"+ .@group +"limit")+1 ) {
    					mes "I'm sorry, but you can't summon any more monster for this group.";
    					close;
    				}
    				else if ( getd(".group"+ .@group +"limit"+ .@dif) + .@amount > ~getd(".group"+ .@group +"limit")+1 ) {
    					mes "The amount you input is more than the limit you can summon. Try reduce the amount.";
    					close;
    				}
    			}
    			mes "Summoning "+ .@amount +" "+ getmonsterinfo( getd(".group"+ .@group +"id["+ .@menu +"]"), 0) +".";
    			mes "Ok, get ready ?";
    			close2;
    			if ( .floodcontrol && mobcount("this","") > 0 ) end;
    			if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
    				if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) end;
    				delitem getd(".group"+ .@group +"itemid"), getd(".group"+ .@group +"itemamount") * .@amount;
    			}
    			else if ( getd(".group"+ .@group +"cost") ) {
    				if ( Zeny < getd(".group"+ .@group +"cost") * .@amount ) end;
    				set Zeny, Zeny - getd(".group"+ .@group +"cost") * .@amount;
    			}
    			if ( getd(".group"+ .@group +"limit") > 0 ) {
    				if ( getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) end;
    				setd ".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]", getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu +"]") + .@amount;
    			}
    			else if ( getd(".group"+ .@group +"limit") < 0 ) {
    				if ( getd(".group"+ .@group +"limit"+ .@dif) + .@amount > ~getd(".group"+ .@group +"limit")+1 ) end;
    				setd ".group"+ .@group +"limit"+ .@dif, getd(".group"+ .@group +"limit"+ .@dif) + .@amount;
    			}
    			monster "this", 0, 0, "--ja--", getd(".group"+ .@group +"id["+ .@menu +"]"), .@amount;
    			end;
    		case 11:
    			if ( mobcount("this","") > 0 ) {
    				mes "[MVP Summoner]";
    				mes "I cannot offer this service when there are monsters around.";
    				close;
    			}
    			close2;
    			callshop "Neko Island#branch", 0;
    			end;
    		case 12:
    			mes "[MVP Summoner]";
    			mes "Are you sure you want to leave this room ?";
    			mes "If this room left empty for more than "+ .nobodygiveup +" minutes, you lost ownership for this room.";
    			if ( select( "Yes:No") == 2 ) close;
    			warp .respawnmap$, .respawnx, .respawny;
    			end;
    		case 13:
    			mes "[MVP Summoner]";
    			getmapxy .@map$, .@x, .@y, 0;
    			if ( getmapusers(.@map$) > 1 ) {
    				mes "There are still some players in this room. Make sure you are the last member in this room to use this option.";
    				close;
    			}
    			mes "Are you sure you want to give up this room ?";
    			if ( .rentcost )
    				mes "You will need to pay again to enter this room.";
    			next;
    			if ( select( "Yes:No" ) == 2 ) close;
    			warp .respawnmap$, .respawnx, .respawny;
    			set .remaintime[.@dif], -1;
    			end;
    	}
    	close;
    
    OnEnterMap:
    	set .@dif, strnpcinfo(2);
    	set .remind[.@dif], 0;
    	for ( set .@i, 1; .@i <= 9; set .@i, .@i +1 )
    		deletearray getd(".group"+ .@i +"limit"+ .@dif), getd(".group"+ .@i +"idsize");
    	set .nobodycounter[.@dif], 0;
    	getmapxy .@map$, .@x, .@y ,1;
    	set .starttime[.@dif], gettimetick(2);
    	do {
    		set .remaintime[.@dif], .timeout * 60 + .starttime[.@dif] - gettimetick(2);
    		set .@hour[.@dif], .remaintime[.@dif] / 3600 ;
    		set .@min[.@dif], .remaintime[.@dif] % 3600 / 60 ;
    		set .@sec[.@dif], .remaintime[.@dif] % 3600 % 60 ;
    		delwaitingroom strnpcinfo(0);
    		waitingroom "Time Left = "+( ( .@hour[.@dif] )?( .@hour[.@dif] +":"):"" )+( ( .@min[.@dif] < 10 )?"0"+ .@min[.@dif]: .@min[.@dif] )+":"+( ( .@sec[.@dif] < 10 )?"0"+ .@sec[.@dif]: .@sec[.@dif] ), 0;
    		if ( getmapusers(.@map$) )
    			set .nobodycounter[.@dif], 0;
    		else {
    			set .nobodycounter[.@dif], .nobodycounter[.@dif] +1 ;
    			if ( .nobodycounter[.@dif] > .nobodygiveup * 60 ) break;
    		}
    		sleep 995;
    	} while ( .remaintime[.@dif] > 1 );
    	set .remaintime[.@dif], 0;
    	delwaitingroom "MVP Summoner#"+ .@dif;
    	mapwarp .@map$, .respawnmap$, .respawnx, .respawny;
    	end;
    
    OnTimer100:
    	stopnpctimer;
    	npctalk "Hi ~ the bubble above my head is the countdown for using this room.";
    	sleep 2000;
    	npctalk "Sometimes, I can skip for about 1 second in the countdown.";
    	sleep 3000;
    	npctalk "That is because the server is experiencing minor lag problem.";
    	sleep 3000;
    	npctalk "So, don't complain about me cheated for the countdown ~ ^.^";
    	sleep 3000;
    	npctalk "Have a nice day ~";
    	end;
    }
    
    neko_isle,82,131,6	script	Private Island	100,{
    	mes "[Private Island]";
    	mes "Please select a Private Island.";
    	if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") )
    		mes "The cost to rent a room for "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes is "+ getvariableofnpc(.rentitemamount, "MVP Summoner") +" "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +".";
    	else if ( getvariableofnpc(.rentcost, "MVP Summoner") )
    		mes "The cost to rent a room for "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes is "+ callfunc("int__", getvariableofnpc(.rentcost, "MVP Summoner") ) +" Zeny.";
    	else
    		mes "You can only use the room for only "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes.";
    	mes " ";
    	for ( set .@i, 1; .@i <= 8; set .@i, .@i +1 ) {
    		if ( getvariableofnpc(.remaintime[.@i],"MVP Summoner") ) {
    			switch ( .type[.@i] ) {
    				case 1: set .@color$, "^EE8800"; break;
    				case 2: set .@color$, "^70CC11"; break;
    				case 3: set .@color$, "^0000FF"; break;
    				default: set .@color$, "^000000";
    			}
    			mes "Room #"+ .@i +" = "+ .@color$ + .whoinuse$[.@i] +"^000000";
    		}
    	}
    	next;
    	set .@room, select(
    		"Neko Island 1 "+( getvariableofnpc( .remaintime[1], "MVP Summoner" )? "["+ getmapusers("neko_isle01") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 2 "+( getvariableofnpc( .remaintime[2], "MVP Summoner" )? "["+ getmapusers("neko_isle02") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 3 "+( getvariableofnpc( .remaintime[3], "MVP Summoner" )? "["+ getmapusers("neko_isle03") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 4 "+( getvariableofnpc( .remaintime[4], "MVP Summoner" )? "["+ getmapusers("neko_isle04") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 5 "+( getvariableofnpc( .remaintime[5], "MVP Summoner" )? "["+ getmapusers("neko_isle05") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 6 "+( getvariableofnpc( .remaintime[6], "MVP Summoner" )? "["+ getmapusers("neko_isle06") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 7 "+( getvariableofnpc( .remaintime[7], "MVP Summoner" )? "["+ getmapusers("neko_isle07") +"]" : "- ^009900Available^000000" ),
    		"Neko Island 8 "+( getvariableofnpc( .remaintime[8], "MVP Summoner" )? "["+ getmapusers("neko_isle08") +"]" : "- ^009900Available^000000" ));
    	if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) {
    		if ( .inuseid[.@room] == getcharid(.type[.@room]) ) {
    			if ( getvariableofnpc(.killmonster,"MVP Summoner") && getmapusers("neko_isle0"+ .@room) == 0 )
    				killmonsterall "neko_isle0"+ .@room;
    			warp "neko_isle0"+ .@room, 0,0;
    			end;
    		} else {
    			mes "[Private Island]";
    			switch ( .type[.@room] ) {
    				case 1: set .@color$, "^EE8800Party "; break;
    				case 2: set .@color$, "^70CC11Guild "; break;
    				case 3: set .@color$, "^0000FFPlayer ";
    			}
    			mes "This room is reserved for ";
    			mes .@color$ + .whoinuse$[.@room] +"^000000 .";
    			if ( getgmlevel() < getvariableofnpc(.gmlvlkick,"MVP Summoner") ) {
    				mes "Please select another.";
    				close;
    			}
    			mes " ";
    			mes "Currently there are "+ getmapusers("neko_isle0"+ .@room) +" players";
    			mes "in that room.";
    			set .@remaintime, getvariableofnpc(.remaintime[.@room],"MVP Summoner");
    			mes "It still has "+( .@remaintime /60 )+"mn "+( .@remaintime %60 )+"s left.";
    			set .@nobodycounter, getvariableofnpc(.nobodycounter[.@room],"MVP Summoner");
    			if ( .@nobodycounter )
    				mes "And have left empty for "+( .@nobodycounter /60 )+"mn "+( .@nobodycounter %60 )+"s.";
    			mes "Kick them ?";
    			next;
    			if ( select ( "No:Yes" ) == 1 ) close;
    			set getvariableofnpc(.remaintime[.@room],"MVP Summoner"), -1;
    			mes "[Private Island]";
    			mes "Room#"+ .@room +" is empty now.";
    			close;
    		}
    	}
    	mes "[Private Island]";
    	if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
    		if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
    			mes "You don't have enough "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +" to rent a room.";
    			close;
    		}
    	}
    	else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) {
    		if ( Zeny < getvariableofnpc(.rentcost, "MVP Summoner") ) {
    			mes "You don't have enough Zeny to rent a room.";
    			close;
    		}
    	}
    	mes "You reserve this room for ...";
    	next;
    	set .@type, select("For my party members", "For my guild members", "For personal account use" );
    	if ( getcharid(.@type) == 0 ) {
    		mes "[Private Island]";
    		mes "You do not own a "+( (.@type == 1)?"Party":"Guild" )+".";
    		close;
    	}
    	else if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
    		if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
    			mes "You don't have enough "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +" to rent a room.";
    			close;
    		}
    	}
    	else if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) {
    		mes "[Private Island]";
    		mes "I'm sorry, somebody else has already register this room faster than you.";
    		close;
    	}
    	for ( set .@i, 1; .@i <= 8; set .@i, .@i +1 ) {
    		if ( getvariableofnpc(.remaintime[.@i],"MVP Summoner") && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) {
    			mes "[Private Island]";
    			mes "You already rented Room#"+ .@i +". Use that room instead.";
    			close;
    		}
    	}
    	set .type[.@room], .@type;
    	set .inuseid[.@room], getcharid(.@type);
    	set .whoinuse$[.@room], strcharinfo( (.@type == 3)?0:.@type );
    	if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
    		if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) end;
    		delitem getvariableofnpc(.rentitemid, "MVP Summoner"), getvariableofnpc(.rentitemamount, "MVP Summoner");
    	}
    	else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) {
    		if ( Zeny < getvariableofnpc(.rentcost, "MVP Summoner") ) end;
    		set Zeny, Zeny - getvariableofnpc(.rentcost, "MVP Summoner");
    	}
    	warp "neko_isle0"+ .@room, 0,0;
    	killmonsterall "neko_isle0"+ .@room;
    	donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap";
    	end;
    }
    
    neko_isle01,89,128,4	duplicate(MVP Summoner)	MVP Summoner#1	116
    neko_isle02,89,128,4	duplicate(MVP Summoner)	MVP Summoner#2	116
    neko_isle03,89,128,4	duplicate(MVP Summoner)	MVP Summoner#3	116
    neko_isle04,89,128,4	duplicate(MVP Summoner)	MVP Summoner#4	116
    neko_isle05,89,128,4	duplicate(MVP Summoner)	MVP Summoner#5	116
    neko_isle06,89,128,4	duplicate(MVP Summoner)	MVP Summoner#6	116
    neko_isle07,89,128,4	duplicate(MVP Summoner)	MVP Summoner#7	116
    neko_isle08,89,128,4	duplicate(MVP Summoner)	MVP Summoner#8	116

     

    error:

    Spoiler

    image.thumb.png.c8427d293a817880476ea3c4886d1e6e.png

     

  19. On 10/24/2023 at 11:43 AM, jasonch35 said:

    I assume you don't want a rental usable item that does that function.
    I think you can only achieve this by making several npcs and assign them to the player that call them and move them on player's location thru setunitdata.

    i could use an example, i could only understand simple script

     

    upon searching the nearest i could find was @Emistry Camp Fire script, but i had no idea how to edit it to suit my request, i have no idea how to spawn the npc with using the item, and how to recall the npc function with different item, and how to set timer on how long the npc will be staying there without being removed by server restart, reboot or stopped.. 

  20. hi i would like to ask for help, i have 4 type of npc with different function, name and sprites, how can i combine it all into 1 npc and player just need to pick which type npc he wanted to spawn at that location, e.g ( Healer, Kafra, etc ) and this npc will spawn with it own function, name and sprite within the selected time ( max 7 days ), once the time runs out the npc will revert back to its original, and player will have to bring an item ( according to which function he wanted ) to use it again, also would be nice if there is an option to extend the timer for additional 7 more days..

    also even if the server stop, or restart it will remain the same as it current state..

    #in short, there is 1 dummy npc in 1 location, player talk to that npc to select which function he needs, and bring the required item (each function npc will need diffrent item), if he got the item npc will ( disguise ? ) to the selected function including change it name and sprites, (e.g helaer, kafra, warper, etc..) npc will remain with the selected function for the next 7 days as it was spawned, and revert back to dummy npc when the timer done.

     

    my try out script which didn't work..

    Spoiler
    //====================================================
    neko_isle,82,131,5	script	Healer#rent	757,{
    
    	// item to rent NPC
    	.@item_id = 512;
    	// rent NPC for how many days
    	//.@rent_day = 30;
    	.@rent_day = 1;
    	
    	if(BasicWorkbench == 1) {
    		mes "Workbench";
    		close;	
    	}
    	
    	if(Butchertable == 1) {
    		mes "Butchertable";
    		close;	
    	}
    	
    	
    	mes "Select";
    	next;
    	switch(select("- Make Workbench:- Buther table:- Cancel")) {
    		
    		case 1:
    			if ( countitem( .@item_id ) ) {
    			mes "Make Basic Workbench ?";
    			mes "Require: 1 x ";
    			
    			if ( select( "Yes","No" ) == 1 ) {
    			delitem(512, 1);
    			set BasicWorkbench,1;
    			$rent_duration = gettimetick(2) + ( .@rent_day * 60 ); 
    			mes "NPC belong to you.";
    				}
    			}
    			else {
    			mes "NPC isnt available.";
    			mes "Please select function";
    			}
    			close;
    		
    		case 2:
    			if ( countitem( .@item_id ) ) {
    			mes "Make Butcher Table ?";
    			mes "Require: 1 x ";
    			
    			if ( select( "Yes","No" ) == 1 ) {
    			delitem(512, 1);
    			set Butchertable,1;
    			$rent_duration = gettimetick(2) + ( .@rent_day * 60 ); 
    			mes "NPC belong to you.";
    				}
    			}
    			else {
    			mes "NPC isnt available.";
    			mes "Please select function";
    			}
    			close;
    		}
    
    
    }

     

     

  21. Since my previous question is kind of odd or hard to understand, i did some search and i found out what i actually need was a warper to rent an island/map/house

    what i wanted was, if a player bring an item to this npc, i will pop up a menu and show any vacant island in green text, then he can rent for maximum 30 days, if there is an island which already been rent by any other players it will be shown in red txt, 

    if player wish to rent the island, he will need the item (which will be deleted) and he can set up a password for him and his friend to be warped to the rented island.

    i do wish any rented island will not be removed or anything during server reboot, restart of stopped.

    also i did manage to find something similar to my current request, but need a lil tweak to fit my preference.... which i had no idea how to do so..

    here is the script made by @AnnieRuru

    Spoiler
    prontera,155,187,5    script    sdfjhsdfkj    100,{
    
       // script check for empty room
       for ( .@i = 1; .@i <= 8; .@i++ )
           if ( getmapusers( "06guild_0"+ .@i ) == 0 )
               .password$[.@i] = "";
    
       mes "select a room";
       mes " ";
       for ( .@i = 1; .@i <= 8; .@i++ )
           if ( .password$[.@i] != "" )
               mes "^000000Room no."+ .@i +" = ^0000FF"+ .creater_name$[.@i];
       next;
       for ( .@i = 1; .@i <= 8; .@i++ )
           if ( .password$[.@i] == "" )
               .@menu$ = .@menu$ +"^000000Room no."+ .@i +" = ^FF0000<Free>:";
           else
               .@menu$ = .@menu$ +"^000000Room no."+ .@i +" = ^0000FF"+ .creater_name$[.@i] +":";
       .@room = select( .@menu$ );
       if ( .password$[ .@room ] == "" ) {
           if ( zeny < 50000 ) {
               mes "you need 50,000 zeny to rent a room";
               close;
           }
           mes "this room is available";
           mes "please input a password";
           mes "string length : min 4, max 30";
           next;
           if ( input( .@pass$, 4, 30 ) ) {
               mes "invalid string length";
               close;
           }
           if ( .@pass$ == " " ) close;
           mes "password set to this ?";
           mes "^FF0000"+ .@pass$;
           next;
           if ( select ( "Yes", "No" ) == 2 ) close;
    
           // double check is there anyone rent faster than you
           if ( .password$[ .@room ] != "" ) {
               mes "I'm sorry but somebody rent this room faster than you";
               close;
           }
    
           // again double check the zeny requirement because of Ragnarok stupid mail system (send mail using friend list) <.< always make a habit to counter check item and zeny requirement
           if ( zeny < 50000 ) {
               mes "don't cheat me";
               close;
           }
           zeny -= 50000; // OOOOPPSS !!
           .password$[ .@room ] = .@pass$;
           .creater_name$[ .@room ] = strcharinfo(0);
           warp "06guild_0"+ .@room, 49, 49;
           end;
       }
       mes "input the password";
    
       // always have some recovery system for GMs to recover password
       if ( getgmlevel() == 99 ) {
           mes " ";
           mes "^FF0000 Admin ONLY";
           mes "^0000FF"+ .password$[ .@room ];
       }
    
       next;
       input .@pass$;
       if ( .@pass$ != .password$[ .@room ] ) {
           mes "wrong password input";
           close;
       }
       warp "06guild_0"+ .@room, 49, 49;
       end;
    }
    
    06guild_01    mapflag    nowarpto
    06guild_02    mapflag    nowarpto
    06guild_03    mapflag    nowarpto
    06guild_04    mapflag    nowarpto
    06guild_05    mapflag    nowarpto
    06guild_06    mapflag    nowarpto
    06guild_07    mapflag    nowarpto
    06guild_08    mapflag    nowarpto

     

     

    please help... thanks

  22. hi i would like to request a script sample, when a player open or use an item it will summon an npc for a period of 7 days, which means that the npc will stay at that position for 7 days and will not be removed even if server restart or stop, it will stay the same position as it was summon even if the server restart or stop, and player can use the npc function such as heal, store item, or anything, and only the player who summon it can use the npc, if somehow the owner of that npc wish to extend it time period it will have to bring a certain item, which will extend for another 7 days, and the player/owner of the npc can cancel the npc spawn if he didn't like the location of the npc spawn,  maybe if could just use simple method like there is an option for player to input the coordinate of the npc to spawn?

    also if the time period is done the npc will vanish, unless the owner (player) bring the certain item to extend it time period for another 7 days

    p/s : i wish to plan to use the script as duplicate with each npc have different script of their own and serve for different user /player

    thank you..

  23. hi im using the latest KRO , server files and exe, can someone tell me in-depth on how can i add a custom quest on quest log, most answer are back 2018 and below which is not really explain what or how to do it, mostly the the guy who understood or know how to do it did not explain in detail on how to do it correctly just answer with ok all good, worked fine now or etc without explaining oh how the process that he/ she done it. and there is no guide in rathena mostly just bits or fragment that those who are half away doing it, which in result  the rest have to bit each and all of it to piece as a puzzle, i would like for anyone who had the knowledge to spend a lil of thier time to explain the process for the rest who are still puzzle by it for future reference...

    thank you for your help. 

  24. hi i did some google but i cant really found any in rathena, here is the situation:

     1. when a player gather an item, and he achieve gathering in amount of 100 of the item in his inventory, an npc msg will suddenly pop up, like congratulation you have gather 100 of apple, here is your reward ( anything will do i will edit it anyways) and then 100 of his apple will be deleted and he will get 1 item as reward in his inventory..

    also this effect in all map.

    thanks!  

×
×
  • Create New...