Jump to content
  • 0

message npc dyna script


Kurby

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  113
  • Reputation:   1
  • Joined:  07/15/12
  • Last Seen:  

I message NPC:Lower to change lower headgears to available headgears in script. I try message "Black Red Aura" and it doesn't change, but I message "None" it changes?

crystilia,72,82,4    script    Lower    793,{
close; //Prevent them from talking to the NPC

OnInit:

//Arrays
setarray .lowerid[0],19814;
setarray .lowername$[0],"Black Red Aura";

//Regular expressions
defpattern 1, "([^:]+):.*sNone(.*)", "L_None";
for(set .@i,0; .@i < getarraysize(.lowerid); set .@i, .@i+1) {
 defpattern 1, "([^:]+):s"+.lowerid[.@i], "L_"+.@i;  
 defpattern 1, "([^:]+):s"+.lowername$[.@i], "L_"+.@i;  
}
activatepset 1;

end; //Finished with OnInit

//Label for none
L_None:
 if(!isequipped(19807)) end;
 setlook 3,0;
 npctalk strcharinfo(0) + " has changed his Dyna Lower Look!";
end;

//Label L_.@i ,repeat a label equal your item list (L_? == set .@view_change,?
L_0:
set .@view_change,0;
goto Change_Look;

L_1:
set .@view_change,1;
goto Change_Look;

L_2:
set .@view_change,2;
goto Change_Look;


Change_Look:
 if(!isequipped(19807)) end; //Make sure they have the item equipped
 setlook 3,getiteminfo(.lowerid[.@view_change],11);   // Call viewpoint of item and setlook
 npctalk strcharinfo(0) + " has changed his Dyna Lower Look!";
end;

OnWhisperGlobal:
if(!isequipped(19807)) end;
if((@whispervar0$ == "None")) setlook 3,0;
for ( set .@i, 0; .@i < getarraysize(.@lowerid); set .@i, .@i +1 ) {
   for ( set .@i, 0; .@i < getarraysize(.@lowername$); set .@i, .@i +1 ) ;{    // Invert Number to String
    if(@whispervar0$ == .@lower_id$ || @whispervar0$ == .lowername$[.@i]) {
		    setlook 3,getiteminfo(.lowerid[.@i],11);
		    end;
            }
       }

   }
}

Actually @changelook doesn't work, it changes my equips to none everytime I try typing it or use a script..

Up..

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...