Jump to content
  • 0

Help error clear


Giant Whisper

Question

23 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   22
  • Joined:  10/24/14
  • Last Seen:  

10 minutes ago, Giant Whisper said:

how to solve this problem

2heajwl.jpg

Morpho.txt

Hey,

clear; is script function:

*clear;

This command will clear the dialog text and continue the script without player interaction.

Just rename it.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

the error is corrected but the script does not work

morpho.gif

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  90
  • Reputation:   34
  • Joined:  10/01/18
  • Last Seen:  

13 minutes ago, Giant Whisper said:

the error is corrected but the script does not work

morpho.gif

The script itself 100% working you just have to set-up properly the "OnInit: part.

I don't see any problems at the script at all.
Example:

set .top_morpho,2220; // That is Hat

Then try it in-game see if it works.

Keep in mind there are some ranges of headgears are allowed to be used in-game.

if( (.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196) ) { // 5001 && 5859 - Check them at RateMyServer 6000 && 61996 It's a Custom Headgears


 

Capture.PNG

Edited by Royr
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

if it changes shape the problem comes to stop using the item

are my ID 60000, 61196 are custom, But that's not the problem

How could I solve this problem?

Edited by Giant Whisper
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

I fixed some typos and changed it a bit: https://pastebin.com/raw/tQy1eLNS

I'd have changed more if I had a test server.

Tell me how it goes.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

it when trying to transform the upper Morpho # 5232, the legend comes out

 

---------------[Morpho Helper]---------------

Sorry, I didn't understand the option you have
have given me. Please type 'help' for more info

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

This is weird. I don't see anything wrong with the inarray.

Did you use @loadnpc or @reloadscript?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Well tell me how this one goes. I put the keywords var outside of OnInit, if it works it means OnInit wasn't being executed or something.

//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	-1,{
OnWhisperGlobal:
	//Array of keywords for the script
	setarray .@keywords$[0],"help","upper","middle","lower","clear","info","upperdawn","middledawn","lowerdawn";
	set .@var0$, @whispervar0$;
	set .@var1, atoi(@whispervar1$);
	if(inarray(.morpho_disallowed, .@var1) != -1){
		dispbottom "Sorry, you cannot change your Morpho into this headgear. Please try another.";
		end;
	}
	set .@i,inarray(.@keywords$, .@var0$);
	if(.@i == -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;
	} else {
		switch(.@i){

		case 0:

			goto help;

		case 1:

			goto tophead;

		case 2:

			goto midhead;

		case 3:

			goto lowhead;

		case 4:

			goto clear_h;

		case 5:

			goto info;

		case 6:

			goto topheadlow;
		case 7:

			goto midheadlow;

		case 8:

			goto lowheadlow;
		}
	}

	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.";
		end;

	tophead:

		if(!isequipped(.top_morpho)){
			goto wrong_headgear;
		}
		if((.@var1 >= 5001 && .@var1 <= 5859) || (.@var1 >= 60000 && .@var1 <= 61196)){
			set .@viewid,getiteminfo(.@var1,11);
			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,11);
		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,11);
		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,11);
			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,11);
		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,11);
		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_h:

		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;

	wrong_headgear:

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

		end;

	OnInit:

		//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,60683;
		set .mid_morpho,60684;
		set .low_morpho,60685;
		end;
}

//Use 'callfunc "MorphoEquip",<1,2,3>;' 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;
			}
			setlook LOOK_HEAD_TOP,viewid_top;
			break;
		case 2: //Mid
			if (!viewid_mid) {
				dispbottom "No headgear set for middle. PM \"NPC:Morpho\" with the word \"help\" for more information.";
				end;
			}
			setlook LOOK_HEAD_MID,viewid_mid;
			break;
		case 3: //Lower
			if (!viewid_low) {
				dispbottom "No headgear set for lower. PM \"NPC:Morpho\" with the word \"help\" for more information.";
				end;
			}
			setlook LOOK_HEAD_BOTTOM,viewid_low;
			break;
    }
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Do you have rAthena updated? There was a fix for inarray in this commit: https://github.com/rathena/rathena/commit/9cba66c22eed86a95c24a3066404ac9fa037520c

Edited by n0tttt
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

now it works but it does the same as before as in the screens above,  if it changes shape the problem comes to stop using the item

morpho.gif

Edited by Giant Whisper
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

https://pastebin.com/raw/rJRLy63e

And add

callfunc "MorphoUnequip",1;

callfunc "MorphoUnequip",2;

callfunc "MorphoUnequip",3;

to its respective places in the field next to the callfunc "MorhoEquip",(1 or 2 o3 );

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

now the hat is replaced whenever it is by the same morpho hat, but if I replace or remove the morpho hat follow the look hat

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

the unmodified morpho script works without problems in eAthena but in current rAthena not

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

I don't know if I understood well what you want... temporary? If so, I changed it all with changelook.

https://pastebin.com/raw/kw2dezD5

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

I do not want you to be upset, but it still does not work

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

Do you have your item like this?

60683,Hat,Hat,4,1000,,200,,2,,0,0xFFFFFFFF,63,2,256,,0,1,16,{callfunc "MorphoEquip",1;},{},{callfunc "MorphoUnEquip",1;}

This is an example.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

yes it works but when you replace the morpho with another hat the hat no morpho is invisible

Excuse me for not explaining myself well used google translator

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

I understood now.

Try changing the MorphoUnequip function to:

function	script	MorphoUnEquip	{
	set .@equipslot,getarg(0);
	switch(.@equipslot) {
		case 1: // Top
			if(!getequipisequiped(EQI_HEAD_TOP))
				changelook LOOK_HEAD_TOP,0;
			break;
		case 2: //Mid
			if(!getequipisequiped(EQI_HEAD_MID))
				changelook LOOK_HEAD_MID,0;
			break;
		case 3: //Lower
			if(!getequipisequiped(EQI_HEAD_LOW))
				changelook LOOK_HEAD_BOTTOM,0;
			break;
	}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

morpho already transformed does not give problems when changing hat no morpho

but if morpho transform again when switching to hat not not visible

20181129191646.JPG

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

I changed the setlooks to changelooks.

Tell me how it goes.

https://pastebin.com/raw/uEyspaCt

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  190
  • Reputation:   3
  • Joined:  04/11/12
  • Last Seen:  

thank you very much, it works wonders now and I apologize for being annoying
long life at Ragnarok Online

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...