Lord Ganja Posted April 29, 2013 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
Emistry Posted April 29, 2013 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
Lord Ganja Posted April 29, 2013 Author 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
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 Ganja4 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.