kalabasa Posted August 16, 2022 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share Posted August 16, 2022 //Simple HG Hiding by crazyarashi - script Invisible -1,{ OnAtCommand: .@npc$ = "["+ strnpcinfo(1) +"]"; mes .@npc$; mes "Hello, "+strcharinfo(0); mes "Which headgear do you want to hide?"; next; setarray .@hgmenu$, "Top Headgear", "Middle Headgear", "Lower Headgear"; .@menu$ = implode(.@hgmenu$, ":"); .@i = select( .@menu$ ) - 1; .@equip = getequipid(.location$[.@i]); if( .@equip != getequipid(.location$[.@i])) { mes .@npc$; mes "You're not wearing any headgear"; close; } else { atcommand "@"+ .looks$[.@i]; dispbottom .@hgmenu$[.@i] +" is now hidden"; end; } OnInit: setarray .location$, "EQI_HEAD_TOP", "EQI_HEAD_MID", "EQI_HEAD_LOW"; setarray .looks$, "changelook 1 0", "changelook 2 0", "changelook 3 0"; bindatcmd "hidehg",strnpcinfo(0)+"::OnAtCommand"; } can someone add a checking if the equipments are already hidden when they do the command again @hidehg it will throw error message and the command will not be use. credits to crazyarashi Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted August 20, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 21 hours ago Share Posted August 20, 2022 .@i = select( .@menu$ ) - 1; setarray .@look, LOOK_HEAD_TOP, LOOK_HEAD_MID, LOOK_HEAD_BOTTOM; if (getlook(.@look[.@i]) <= 0) { dispbottom .@hgmenu$[.@i] +" is already hidden"; end; } Quote Link to comment Share on other sites More sharing options...
Question
kalabasa
can someone add a checking if
the equipments are already hidden when they do the command again @hidehg it will throw error message and the command will not be use.
credits to crazyarashi
Link to comment
Share on other sites
1 answer 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.