Jump to content
  • 0
ThyroDree

Morphogenic Hat Script Convert

Question

I just found this script on rathena, which i think is cool to have it to. LINK

In this script, you have to custom headgear with no sprite id when equip, it will use callfunc from the script to copy other headgear without getting its effect. Just its looks.

At this time I have the custom headgear and the script running on Hercules.

 

Which is surprisingly no error, but the problem is when is tried to copy item look.

It doesn't show. but the commands works properly.

 

Item_db2.conf (for custom headgear)

{
	Id: 33300
	AegisName: "Dyna_Upper"
	Name: "Dyna Upper"
	Type: 5
	Buy: 10
	Def: 0
	Loc: 256
	Slots: 4
	Refine: false
	Script: <"
		callfunc "MorphoEquip", 1;
	">
},

On this attached picture, I commanded to Custom Headgear to look Pink Drooping Cat with ID#5232 (upper#5232)

screenLoki 000.jpg

Edited by ThyroDree

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hello, tried this and still same. Did I do right?

//Morphogenic Hat Script
//Allows a player to change their look to absolutely any hat available or to a defined upper limit. Check the "OnInit" label for information on this.
//
//By Slam

-	script	Morpho	FAKE_NPC,{
OnWhisperGlobal:
		goto Validation_whisp;
		end;

	Validation_whisp:
		set .@var0$, atoi(@whispervar0$);
		set .@var1, atoi(@whispervar1$);
		set .@i,0;
		while(.@i < getarraysize(.morpho_disallowed)){
			if(.@var1 == .morphodisallowed$[.@i]){
				goto denied_unauthorized;
			} else {
				set .@i,.@i+1;
			}
		}
		set .@ii,0;
		while(.@ii < 9){
			if(@whispervar0$ == .keywords$[.@ii]){
				goto keyword;
			}
		set .@ii,.@ii+1;
		}
		dispbottom "---------------[Morpho Helper]---------------";
		dispbottom " ";
		dispbottom "Sorry, I didn't understand the option you have";
		dispbottom "have given me. Please type 'help' for more info";
		dispbottom " ";
		end;

	keyword:

	switch(.@ii){
		case 0:
			goto help;

		case 1:
			goto tophead;

		case 2:
			goto midhead;

		case 3:
			goto lowhead;

		case 4:
			goto clear;

		case 5:
			goto info;

		case 6:
			goto topheadlow;

		case 7:
			goto midheadlow;

		case 8:
			goto lowheadlow;
		}

help:
		dispbottom "---------------[Morpho Helper]---------------";
		dispbottom "Welcome to the Morpho Settings NPC!";
		dispbottom "I can help you set what your Morphohat looks like";
		dispbottom " ";
		dispbottom "To use this NPC, whisper NPC:Morpho (you should";
		dispbottom "know this already) with upper/middle/lower or ";
		dispbottom "wing. The wing section is not yet implemented";
		dispbottom "however. Now, to set your Morphohat use the ";
		dispbottom "following layout:";
		dispbottom " ";
		dispbottom "upper#5232 - This will make it a Pink Kitty";
		dispbottom " ";
		dispbottom "Protip: Use RateMyServer.net for item IDs.";
		end;

tophead:

		if(!isequipped(.top_morpho)){
			goto wrong_headgear;
		}
		if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
		set .@viewid,getiteminfo(.@var1, ITEMINFO_VIEWID);
		set .@equipslot,getiteminfo(.@var1,5);
		if(.@equipslot != 256 && .@equipslot != 768){ //Upper and Upper+Mid Only. Comment out this line and the two below it to remove this functionality.
			goto denied_wrongslot;
		}
		set #viewid_top,.@viewid;
		dispbottom "Selected headgear ID: "+.@viewid;
		setlook 4,.@viewid;

		end;
		}
		dispbottom "Unavailable ID";
		end;

midhead:

	if(!isequipped(.mid_morpho)){
		goto wrong_headgear;
		}
	if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
        	set .@viewid,getiteminfo(.@var1, ITEMINFO_VIEWID);
		set .@equipslot,getiteminfo(.@var1,5);
	if(.@equipslot != 512 && .@equipslot != 513){ //Mid and Mid+Lower only. Comment out this line and the two below it to remove this functionality.
		goto denied_wrongslot;
	}
		set #viewid_mid,.@viewid;
		dispbottom "Selected headgear ID: "+.@viewid;
	setlook 5,.@viewid;
	end;

	}
	dispbottom "Unavailable ID";
	end;

lowhead:
	if(!isequipped(.low_morpho)){
		goto wrong_headgear;
	}
	if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
		set .@viewid,getiteminfo(.@var1, ITEMINFO_VIEWID);
		set .@equipslot,getiteminfo(.@var1,5);
	if(.@equipslot != 1){ // Lower Only. Comment out this line and the two below it to remove this functionality.
		goto denied_wrongslot;
	}
		set #viewid_low,.@viewid;
		dispbottom "Selected headgear ID: "+.@viewid;
		setlook 3,.@viewid;
	end;
}
	dispbottom "Unavailable ID";
end;

topheadlow:
	if(!isequipped(.top_morphos)){
		goto wrong_headgear;
	}
	if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
		set .@viewid,getiteminfo(.@var1$, ITEMINFO_VIEWID);
		set .@equipslot,getiteminfo(.@var1,5);
	if(.@equipslot != 256 && .@equipslot != 768){ //Upper and Upper+Mid Only. Comment out this line and the two below it to remove this functionality.
		goto denied_wrongslot;
	}
		set #viewid_tops,.@viewid;
		dispbottom "Selected headgear ID: "+.@viewid;
		setlook 4,.@viewid;
	end;
}
	dispbottom "Unavailable ID";
end;

midheadlow:
	if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
	if(!isequipped(.mid_morphos)){
		goto wrong_headgear;
	}
		set .@viewid,getiteminfo(.@var1$, ITEMINFO_VIEWID);
		set .@equipslot,getiteminfo(.@var1,5);
	if(.@equipslot != 512){ // Lower Only. Comment out this line and the two below it to remove this functionality.
		goto denied_wrongslot;
	}
		set #viewid_mids,.@viewid;
		dispbottom "Selected headgear ID: "+.@viewid;
		setlook 5,.@viewid;
	end;
}
	dispbottom "Unavailable ID";
end;

lowheadlow:
	if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
	if(!isequipped(.low_morphos)){
		goto wrong_headgear;
	}
		set .@viewid,getiteminfo(.@var1$, ITEMINFO_VIEWID);
		set .@equipslot,getiteminfo(.@var1,5);
	if(.@equipslot != 1){ // Lower Only. Comment out this line and the two below it to remove this functionality.
		goto denied_wrongslot;
	}
		set #viewid_lows,.@viewid;
		dispbottom "Selected headgear ID: "+.@viewid;
		setlook 3,.@viewid;
	end;
}
	dispbottom "Unavailable ID";
end;

clear:
		set #viewid_low, 1;
		set #viewid_mid, 2;
		set #viewid_top, 3;
		if (getequipid(1) == .top_morpho)
			setlook 5,0;
		if (getequipid(9) == .mid_morpho)
			setlook 4,0;
		if (getequipid(10) == .low_morpho)
			setlook 3,0;
		dispbottom "Your Morphing Hats list has been cleared.";
		end;

info:

		dispbottom "---------------[Morpho Helper]---------------";
		dispbottom " ";
		dispbottom "You currently have the following items set for your Morpho hat:";
		dispbottom "Upper - "+getitemname(#viewid_top);
		dispbottom "Middle - "+getitemname(#viewid_mid);
		dispbottom "Lower - "+getitemname(#viewid_low);
		end;

denied_wrongslot:
		dispbottom "Sorry, this headgear was not designed for this headgear slot.";
		end;

denied_unauthorized:

		dispbottom "Sorry, you cannot change your Morpho into this headgear. Please try another.";
		end;

wrong_headgear:

		dispbottom "Sorry, you do not currently have your Morpho equipped. Please equip it and try again!";

		end;

OnInit:
		//Array of keywords for the script
		setarray .keywords$[0],"help","upper","middle","lower","clear","info","upperdawn","middledawn","lowerdawn";

		//Change this to the upper limit of the headgears that you wish to make available
		setarray .morpho_disallowed$[0], "9001"; //inb4OVERNINETHOUSAND

		//Equip IDs - Change these to the ID numbers of the hat you wish to designate as the Morphing hat
		set .top_morpho,33300;
		set .mid_morpho,33302;
		set .low_morpho,33301;
		end;
}

//Use 'callfunc "MorphoEquip",<1,2,3,4,5,6>;' for the "OnEquip" script to let people know that they need to set the view ID or to set the viewid if the person has already set one.
//If you wish to make the "Morph" an Account bound variable, simply change all instances of "viewid_" with "#viewid_"
function	script	MorphoEquip	{
	set .@equipslot,getarg(0);
	switch(.@equipslot) {
		case 1:  //Upper
			if (!viewid_top) {
				dispbottom "No headgear set for upper. PM \"NPC:Morpho\" with the word \"help\" for more information.";
				end;
			}
			changelook LOOK_HEAD_TOP,#viewid_top;
			end;
		case 2: //Mid
			if (!viewid_mid) {
				dispbottom "No headgear set for middle. PM \"NPC:Morpho\" with the word \"help\" for more information.";
				end;
			}
			changelook LOOK_HEAD_MID,#viewid_mid;
			end;
		case 3: //Lower
			if (!viewid_low) {
				dispbottom "No headgear set for lower. PM \"NPC:Morpho\" with the word \"help\" for more information.";
				end;
    			}
			changelook LOOK_HEAD_BOTTOM,#viewid_low;
			end;

}
}

 

Share this post


Link to post
Share on other sites
  • 0

Hi again sir @Kenpachi,

 

I looked for getiteminfo(.@var1$,11) to change it to getiteminfo(.@var1$, ITEMINFO_VIEWSPRITE) - after making this changes, and did some test. when i run command upper#5232 or 5138 or any upper headgears, the script will dispbottom Selected headgear ID: -1, the sprite of 5232 or 5138 didn't show up.

 

 

I tried to making changes to make sprite show.

I remove the $ from getiteminfo(.@var1$, ITEMINFO_VIEWSPRITE), so it will look like getiteminfo(.@var1, ITEMINFO_VIEWSPRITE) which works. trying upper#5232 or 5138 and the sprite shows

but It seems the sprite doesn't save to specific headgear. when I unequip and equip the headgear again.

I also found 1 more problem, when i equipped the 3 headgears (Upper,Middle, and Lower) and changed their sprites. when I unequip one of the headgears the sprite stays on.

 

Check out the problems here too. SCREENSHOTS

Share this post


Link to post
Share on other sites
  • 1

Hi.

 

Here you go:

Spoiler

//Morphogenic Hat Script
//Allows a player to change their look to absolutely any hat available or to a defined upper limit. Check the "OnInit" label for information on this.
//
//By Slam

-	script	Morpho	FAKE_NPC,{

OnWhisperGlobal:
	.@keyword$ = @whispervar0$;
	.@item_id = atoi(@whispervar1$);



	if (.@item_id != 0 && (getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_ARMOR || (getiteminfo(.@item_id, ITEMINFO_LOC) & EQP_HELM) == 0)) {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Item " + .@item_id + " is not a headgear!");
		dispbottom(" ");
		end;
	}



	if ((.@keyword$ == "upper" && !isequipped(.top_morpho))
	    || (.@keyword$ == "middle" && !isequipped(.mid_morpho))
	    || (.@keyword$ == "lower" && !isequipped(.low_morpho))) {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Sorry, you do not currently have your Morpho equipped.");
		dispbottom("Please equip it and try again!");
		dispbottom(" ");
		end;
	}



	if ((.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower")
	    && !callfunc("MorphoValidateLocation", .@keyword$, .@item_id)) {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Sorry, this headgear was not designed for this headgear slot.");
		dispbottom(" ");
		end;
	}



	.@view_id = getiteminfo(.@item_id, ITEMINFO_VIEWSPRITE);

	if ((.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") && .@view_id <= 0) {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Invalid headgear ID.");
		dispbottom(" ");
		end;
	}



	//for (.@i = 0; .@i < getarraysize(.morpho_disallowed); .@i++) {
	//	if (.@item_id == .morpho_disallowed[.@i]) {
	//		dispbottom("---------------[Morpho Helper]---------------");
	//		dispbottom(" ");
	//		dispbottom("Sorry, you cannot change your Morpho into this headgear.");
	//		dispbottom("Please try another.");
	//		dispbottom(" ");
	//		end;
	//	}
	//}



	if (.@keyword$ == "help") {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Welcome to the Morpho Settings NPC!");
		dispbottom("I can help you set what your Morphohat looks like");
		dispbottom(" ");
		dispbottom("To use this NPC, whisper NPC:Morpho (you should");
		dispbottom("know this already) with upper/middle/lower or ");
		dispbottom("wing. The wing section is not yet implemented");
		dispbottom("however. Now, to set your Morphohat use the ");
		dispbottom("following layout:");
		dispbottom(" ");
		dispbottom("upper#5232 - This will make it a Pink Kitty");
		dispbottom(" ");
		dispbottom("Protip: Use RateMyServer.net for item IDs.");
		dispbottom(" ");
		end;
	}



	if (.@keyword$ == "info") {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("You currently have the following items set for your Morpho hat:");
		dispbottom("Upper - " + ((morpho_id_top == 0) ? "None" : getitemname(morpho_id_top)));
		dispbottom("Middle - " + ((morpho_id_mid == 0) ? "None" : getitemname(morpho_id_mid)));
		dispbottom("Lower - " + ((morpho_id_low == 0) ? "None" : getitemname(morpho_id_low)));
		dispbottom(" ");
		end;
	}



	if (.@keyword$ == "clear") {
		morpho_id_top = 0;
		morpho_id_mid = 0;
		morpho_id_low = 0;

		if (getequipid(EQI_HEAD_TOP) == .top_morpho)
			setlook(LOOK_HEAD_TOP, 0);

		if (getequipid(EQI_HEAD_MID) == .mid_morpho)
			setlook(LOOK_HEAD_MID, 0);

		if (getequipid(EQI_HEAD_LOW) == .low_morpho)
			setlook(LOOK_HEAD_BOTTOM, 0);

		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Your Morphing Hats list has been cleared.");
		dispbottom(" ");
		end;
	}



	if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") {
		if (.@keyword$ == "upper") {
			morpho_id_top = .@item_id;
			setlook(LOOK_HEAD_TOP, .@view_id);
		}

		if (.@keyword$ == "middle") {
			morpho_id_mid = .@item_id;
			setlook(LOOK_HEAD_MID, .@view_id);
		}

		if (.@keyword$ == "lower") {
			morpho_id_low = .@item_id;
			setlook(LOOK_HEAD_BOTTOM, .@view_id);
		}

		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Selected headgear ID: " + .@item_id);
		dispbottom(" ");
		end;
	}



	dispbottom("---------------[Morpho Helper]---------------");
	dispbottom(" ");
	dispbottom("Sorry, I didn't understand the option you have");
	dispbottom("have given me. Please type 'help' for more info");
	dispbottom(" ");
	end;



OnInit:
	// Change this to the upper limit of the headgears that you wish to make available
	setarray(.morpho_disallowed[0],	9001, 5386, 5387, 5391, 5394, 5407, 5408, 5419, 5428, 5436,
					5437, 5438, 5439, 5440, 5441, 5442, 5443, 5444, 5445, 5446,
					5447, 5448, 5449, 5459, 5481, 5486, 5487, 5488, 5492, 5493,
					5494, 5495, 5508, 5516, 5517, 5520, 5532, 5533, 5534, 5535,
					5540, 5541, 5542, 5543, 5544, 5551, 5552, 5553, 5560, 5561,
					5562, 5571, 5575, 5576, 5577, 5578, 5583, 5584, 5587, 5595,
					5600, 5601, 5602, 5603, 5604, 5605, 5606, 5607, 5608, 5609,
					5610, 5611, 5612, 5613, 5614, 5615, 5616, 5617, 5618, 5619,
					5620, 5621, 5622, 5623, 5624, 5625, 5626, 5627, 5628, 5629,
					5630, 5631, 5632, 5633, 5634, 5635, 5636, 5637, 5638, 5639,
					5640, 5641, 5642, 5643, 5644, 5645, 5646, 5647, 5648, 5649,
					5650, 5651, 5652, 5653, 5654, 5655, 5656, 5657, 5658, 5659,
					5660, 5661, 5662, 5663, 5664, 5665, 5666, 5667, 5668, 5669,
					5670, 5671, 5672, 5673, 5674, 5675, 5676, 5677, 5678, 5679,
					5680, 5681, 5682, 5683, 5684, 5685, 5686, 5687, 5688, 5689,
					5690, 5691, 5692, 5693, 5694, 5695, 5696, 5697, 5698, 5699,
					5700, 5701, 5702, 5703, 5704, 5705, 5706, 5707, 5708, 5709,
					5710, 5711, 5712, 5713, 5714, 5715, 5716, 5717, 5718, 5719,
					5720, 5721, 5722, 5723, 5724, 5725, 5726, 5727, 5728, 5729,
					5730, 5731, 5732, 5733, 5734, 5735, 5736, 5737, 5738, 5739,
					5740, 5741, 5742, 5743, 5744, 5745, 5746, 5747, 5748, 5749,
					5750, 5751, 5752, 5753, 5754, 5755, 5756, 5757, 5758, 5759,
					5760, 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768, 5769,
					5770, 5771, 5772, 5773, 5774, 5775, 5776, 5777, 5778, 5779,
					5780, 5781, 5782, 5783, 5784, 5785, 5786, 5787, 5788, 5789,
					5790, 5791, 5792, 5793, 5794, 5795, 5796, 5797, 5798, 5799,
					5809, 5812, 5814, 5824, 23134, 5070); //inb4OVERNINETHOUSAND

	// Equip IDs - Change these to the ID numbers of the hat you wish to designate as the Morphing hat
	.top_morpho = 25092;
	.mid_morpho = 25093;
	.low_morpho = 25094;
	end;
}



// If you wish to make the "Morph" an Account bound variable, simply change all instances of "morpho_id_*" with "#morpho_id_"
function	script	MorphoEquip	{
	.@equipslot = getarg(0);

	switch(.@equipslot) {
	case 1: // Upper
		if (morpho_id_top == 0)
			dispbottom("No headgear set for upper. PM \"NPC:Morpho\" with the word \"help\" for more information.");
		else
			setlook(LOOK_HEAD_TOP, getiteminfo(morpho_id_top, ITEMINFO_VIEWSPRITE));

		end;
	case 2: // Mid
		if (morpho_id_mid == 0)
			dispbottom("No headgear set for middle. PM \"NPC:Morpho\" with the word \"help\" for more information.");
		else
			setlook(LOOK_HEAD_MID, getiteminfo(morpho_id_mid, ITEMINFO_VIEWSPRITE));

		end;
	case 3: // Lower
		if (morpho_id_low == 0)
			dispbottom("No headgear set for lower. PM \"NPC:Morpho\" with the word \"help\" for more information.");
		else
			setlook(LOOK_HEAD_BOTTOM, getiteminfo(morpho_id_low, ITEMINFO_VIEWSPRITE));

		end;
	}
}




// Validates if a headgear fits in the passed location.
//
// getarg(0) - The location keyword ("upper", "middle", "lower")
// getarg(1) - The item ID of the desired headgear
//
// Returns 1 on success, or 0 on failure.
function	script	MorphoValidateLocation	{
	.@keyword$ = getarg(0);
	.@location = getiteminfo(getarg(1), ITEMINFO_LOC);

	// Upper and Upper+Mid only. Comment out the two lines below to remove this functionality.
	//if (.@keyword$ == "upper" && .@location != EQP_HEAD_TOP && .@location != (EQP_HEAD_TOP | EQP_HEAD_MID))
	//	return 0;

	// Mid and Mid+Lower only. Comment out the two lines below to remove this functionality.
	//if (.@keyword$ == "middle" && .@location != EQP_HEAD_MID && .@location != (EQP_HEAD_MID | EQP_HEAD_LOW))
	//	return 0;

	// Lower only. Comment out the two lines below to remove this functionality.
	//if (.@keyword$ == "lower" && .@location != EQP_HEAD_LOW)
	//	return 0;

	return 1;
}

 

 

I re-wrote the original script, so if you have modifications in your version, you have to apply them again. Sorry.

 

 

~Kenpachi

Share this post


Link to post
Share on other sites
  • 0
7 hours ago, Kenpachi said:

Hi.

 

That's odd. I'll check the whole script later today when I come home. I'll edit this post and send you a PM when I'm done.

 

 

~Kenpachi

Thank you @Kenpachi , do you mind checking on this too LINK

It seems to be part or similar with commit fix about aggressive mob 6 days ago.

 

Share this post


Link to post
Share on other sites
  • 0

@Kenpachi sir, is it possible to add like a requirement item everytime time they will change the dyna look?

Example:

Dyna Upper

upper#5137 (Alice Doll)

then it will consume the "required item", if you dont have it will not change.

Share this post


Link to post
Share on other sites
  • 0

Hi.

 

Add this:

// Required item ID/amount for morphing.
.morpho_req_id = 501;
.morpho_req_amount = 1;

Below:

// Equip IDs - Change these to the ID numbers of the hat you wish to designate as the Morphing hat
.top_morpho = 25092;
.mid_morpho = 25093;
.low_morpho = 25094;

 

And replace:

	if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") {
		if (.@keyword$ == "upper") {
			morpho_id_top = .@item_id;
			setlook(LOOK_HEAD_TOP, .@view_id);
		}

With:

	if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") {
		if (countitem(.morpho_req_id) < .morpho_req_amount) {
			dispbottom("---------------[Morpho Helper]---------------");
			dispbottom(" ");
			dispbottom("You need " + .morpho_req_amount + "x " + getitemname(.morpho_req_id) + " for morphing.");
			dispbottom(" ");
			end;
		}

		delitem(.morpho_req_id, .morpho_req_amount);

		if (.@keyword$ == "upper") {
			morpho_id_top = .@item_id;
			setlook(LOOK_HEAD_TOP, .@view_id);
		}

 

 

~Kenpachi

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, Kenpachi said:

Hi.

 

Add this:

// Required item ID/amount for morphing. .morpho_req_id = 501; .morpho_req_amount = 1;


// Required item ID/amount for morphing.
.morpho_req_id = 501;
.morpho_req_amount = 1;

Below:

// Equip IDs - Change these to the ID numbers of the hat you wish to designate as the Morphing hat .top_morpho = 25092; .mid_morpho = 25093; .low_morpho = 25094;


// Equip IDs - Change these to the ID numbers of the hat you wish to designate as the Morphing hat
.top_morpho = 25092;
.mid_morpho = 25093;
.low_morpho = 25094;

 

And replace:

if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") { if (.@keyword$ == "upper") { morpho_id_top = .@item_id; setlook(LOOK_HEAD_TOP, .@view_id); }


	if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") {
		if (.@keyword$ == "upper") {
			morpho_id_top = .@item_id;
			setlook(LOOK_HEAD_TOP, .@view_id);
		}

With:

if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") { if (countitem(.morpho_req_id) < .morpho_req_amount) { dispbottom("---------------[Morpho Helper]---------------"); dispbottom(" "); dispbottom("You need " + .morpho_req_amount + "x " + getitemname(.morpho_req_id) + " for morphing."); dispbottom(" "); end; } delitem(.morpho_req_id, .morpho_req_amount); if (.@keyword$ == "upper") { morpho_id_top = .@item_id; setlook(LOOK_HEAD_TOP, .@view_id); }


	if (.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") {
		if (countitem(.morpho_req_id) < .morpho_req_amount) {
			dispbottom("---------------[Morpho Helper]---------------");
			dispbottom(" ");
			dispbottom("You need " + .morpho_req_amount + "x " + getitemname(.morpho_req_id) + " for morphing.");
			dispbottom(" ");
			end;
		}

		delitem(.morpho_req_id, .morpho_req_amount);

		if (.@keyword$ == "upper") {
			morpho_id_top = .@item_id;
			setlook(LOOK_HEAD_TOP, .@view_id);
		}

 

 

~Kenpachi

This really works! can we also put like range? Like on old script

if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){

if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 30000 && .@var1 <= 31000)){

--I think 5001 to 5859 are Allowed Official Headgear ----- 30000 to 31000 are Allowed Custom Headgear-------

Any headgear you will morph within the range will be morphed. but if you morph 5860 or 31001 it will say

Sorry, this headgear was not designed for this headgear slot.

Share this post


Link to post
Share on other sites
  • 0

Hi.

 

Add this:

	if (.@item_id < 5001 || (.@item_id > 5859 && .@item_id < 30000) || .@item_id > 31000) {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Sorry, this headgear was not designed for this headgear slot.");
		dispbottom(" ");
		end;
	}

Below:

	if ((.@keyword$ == "upper" || .@keyword$ == "middle" || .@keyword$ == "lower") && .@view_id <= 0) {
		dispbottom("---------------[Morpho Helper]---------------");
		dispbottom(" ");
		dispbottom("Invalid headgear ID.");
		dispbottom(" ");
		end;
	}

 

 

~Kenpachi

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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