Giant Whisper Posted October 4, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Share Posted October 4, 2018 how to solve this problem Morpho.txt Quote Link to comment Share on other sites More sharing options...
0 Sehrentos Posted October 4, 2018 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 91 Reputation: 22 Joined: 10/24/14 Last Seen: November 1, 2024 Share Posted October 4, 2018 10 minutes ago, Giant Whisper said: how to solve this problem 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. Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted October 4, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted October 4, 2018 the error is corrected but the script does not work Quote Link to comment Share on other sites More sharing options...
0 Royr Posted October 4, 2018 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 90 Reputation: 34 Joined: 10/01/18 Last Seen: January 9, 2023 Share Posted October 4, 2018 (edited) 13 minutes ago, Giant Whisper said: the error is corrected but the script does not work 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 Edited October 4, 2018 by Royr Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted October 4, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted October 4, 2018 (edited) 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 October 4, 2018 by Giant Whisper Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 26, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 26, 2018 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. Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 26, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 26, 2018 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 Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 27, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 27, 2018 This is weird. I don't see anything wrong with the inarray. Did you use @loadnpc or @reloadscript? Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 27, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 27, 2018 add the script and I turned on the server Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 28, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 28, 2018 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; } } Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 28, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 28, 2018 still unchanged Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 29, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 29, 2018 (edited) Do you have rAthena updated? There was a fix for inarray in this commit: https://github.com/rathena/rathena/commit/9cba66c22eed86a95c24a3066404ac9fa037520c Edited November 29, 2018 by n0tttt Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 29, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 29, 2018 (edited) 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 Edited November 29, 2018 by Giant Whisper Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 29, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 29, 2018 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 ); Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 29, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 29, 2018 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 Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 29, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 29, 2018 the unmodified morpho script works without problems in eAthena but in current rAthena not Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 29, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 29, 2018 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 Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 29, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 29, 2018 I do not want you to be upset, but it still does not work Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 29, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 29, 2018 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. Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 29, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 29, 2018 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 Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 30, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 30, 2018 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; } } Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 30, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 30, 2018 morpho already transformed does not give problems when changing hat no morpho but if morpho transform again when switching to hat not not visible Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted November 30, 2018 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: Saturday at 05:58 AM Share Posted November 30, 2018 I changed the setlooks to changelooks. Tell me how it goes. https://pastebin.com/raw/uEyspaCt 1 Quote Link to comment Share on other sites More sharing options...
0 Giant Whisper Posted November 30, 2018 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 190 Reputation: 3 Joined: 04/11/12 Last Seen: March 24 Author Share Posted November 30, 2018 thank you very much, it works wonders now and I apologize for being annoyinglong life at Ragnarok Online Quote Link to comment Share on other sites More sharing options...
Question
Giant Whisper
how to solve this problem
Morpho.txt
Link to comment
Share on other sites
23 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.