Lord Ganja Posted April 29, 2013 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Share Posted April 29, 2013 (edited) Hello. I tried making a script which sets the looks of the player into nothing even when they are equipped with headgears. Can anyone here modify this script or tell me what script should I use in order to detect a player if they try to change equips. Thanks in advance! look at this script: - script autochange -1,{ OnPCLoadMapEvent: if (getgmlevel() > 0) end; getmapxy(.@map$,.@x,.@y,0); if(.@map$=="pvp_c_room") attachnpctimer ""+strcharinfo(0)+""; goto a_timer; end; a_timer: initnpctimer; end; OnTimer1000: end; OnTimer1100: <script that detects a player if they changed equip?> atcommand "@changelook 1 0"; atcommand "@changelook 2 0"; atcommand "@changelook 3 0"; stopnpctimer; end; } else { goto a_timer; stopnpctimer; end; } OnPCDieEvent: getmapxy(.@map$,.@x,.@y,0); if(.@map$=="pvp_c_room") stopnpctimer; end; OnPCLogoutEvent: getmapxy(.@map$,.@x,.@y,0); if(.@map$=="pvp_c_room") stopnpctimer; end; } EDIT: maybe anyone could provide a new and much better script. That would be much appreciated. Thanks! Edited April 29, 2013 by Lord Ganja Quote Link to comment Share on other sites More sharing options...
Lary Posted April 29, 2013 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 116 Reputation: 3 Joined: 04/03/13 Last Seen: July 9, 2015 Share Posted April 29, 2013 wake and bake.... Quote Link to comment Share on other sites More sharing options...
Emistry Posted April 29, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted April 29, 2013 when the script 1st running ... save the "equipment ID" into a temporary variable...example .@equip_id = getequipid( <equipment slot> ); then....when the time come ... or whenever you want to check it.. if( .@equip_id != getequipid( <equipment slot> ) ){ mes "Dame you changed equipments."; } refer getequipid Quote Link to comment Share on other sites More sharing options...
Lord Ganja Posted April 29, 2013 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Author Share Posted April 29, 2013 (edited) when the script 1st running ... save the "equipment ID" into a temporary variable...example .@equip_id = getequipid( <equipment slot> ); then....when the time come ... or whenever you want to check it.. if( .@equip_id != getequipid( <equipment slot> ) ){ mes "Dame you changed equipments."; } refer getequipid Thanks Emistry. but, could you modify my script? I don't know where to put it in my script. EDIT: I came up with this script, but it doesn't work. would anyone help me with this? Thanks! - script autochange -1,{ OnPCLoadMapEvent: if (getgmlevel() > 0) end; getmapxy(.@map$,.@x,.@y,0); if(.@map$=="pvp_c_room") { set .@equip_top, getequipid(EQI_HEAD_TOP); set .@equip_mid, getequipid(EQI_HEAD_MID); set .@equip_bot, getequipid(EQI_HEAD_LOW); attachnpctimer ""+strcharinfo(0)+""; goto a_timer; } end; a_timer: initnpctimer; end; OnTimer1000: end; OnTimer1100: if( .@equip_top != getequipid(EQI_HEAD_TOP) ) { set .@equip_top, getequipid(EQI_HEAD_TOP); atcommand "@changelook 1 0"; goto a_timer; stopnpctimer; end; } if( .@equip_mid != getequipid(EQI_HEAD_MID) ) { set .@equip_mid, getequipid(EQI_HEAD_MID); atcommand "@changelook 2 0"; goto a_timer; stopnpctimer; end; } if( .@equip_bot != getequipid(EQI_HEAD_LOW) ) { set .@equip_bot, getequipid(EQI_HEAD_LOW); atcommand "@changelook 3 0"; goto a_timer; stopnpctimer; end; } else { goto a_timer; stopnpctimer; end; } OnPCDieEvent: getmapxy(.@map$,.@x,.@y,0); if(.@map$=="pvp_c_room") stopnpctimer; end; OnPCLogoutEvent: getmapxy(.@map$,.@x,.@y,0); if(.@map$=="pvp_c_room") stopnpctimer; end; } Edited May 1, 2013 by Lord Ganja Quote Link to comment Share on other sites More sharing options...
Lord Ganja Posted May 6, 2013 Group: Members Topic Count: 141 Topics Per Day: 0.03 Content Count: 444 Reputation: 22 Joined: 06/18/12 Last Seen: August 11, 2018 Author Share Posted May 6, 2013 BUMP! * Quote Link to comment Share on other sites More sharing options...
Question
Lord Ganja
Hello. I tried making a script which sets the looks of the player into nothing even when they are equipped with headgears.
Can anyone here modify this script or tell me what script should I use in order to detect a player if they try to change equips.
Thanks in advance!
look at this script:
EDIT:
maybe anyone could provide a new and much better script. That would be much appreciated. Thanks!
Edited by Lord GanjaLink to comment
Share on other sites
4 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.