REKT 10 Posted December 6, 2015 (edited) Hi, Sorry if i'm not allowed in here since i'm rAthena user. i just wanna ask for support about script of AnnieRURU's script Dressing Girl. How to add something like this: Category: Upper Middle Lower And Arrays for category .upper[0] .middle[0] .lower[0] egg1.gat, 275, 178, 5 script Dressing Girl 1_F_MARIA,{ addtimer 1, strnpcinfo(0)+"::OnChangeBack"; mes "do you want to try out the look of some awesome headgear?"; next; .@s = select( .menu$ ) -1; if ( getiteminfo( .headgear[.@s], 5 ) & 256 ) changelook LOOK_HEAD_TOP, getiteminfo( .headgear[.@s], 11 ); else if ( getiteminfo( .headgear[.@s], 5 ) & 512 ) changelook LOOK_HEAD_MID, getiteminfo( .headgear[.@s], 11 ); else if ( getiteminfo( .headgear[.@s], 5 ) & 1 ) changelook LOOK_HEAD_BOTTOM, getiteminfo( .headgear[.@s], 11 ); else { mes "this is not a headgear."; close; } mes "That's look nice on you"; close;OnChangeBack: .@top = getequipid(EQI_HEAD_TOP); changelook LOOK_HEAD_TOP, ( .@top == -1 )? 0 : getiteminfo( .@top, 11 ); .@mid = getequipid(EQI_HEAD_MID); changelook LOOK_HEAD_MID, ( .@mid == -1 )? 0 : getiteminfo( .@mid, 11 ); .@low = getequipid(EQI_HEAD_LOW); changelook LOOK_HEAD_BOTTOM, ( .@low == -1 )? 0 : getiteminfo( .@low, 11 ); end;OnInit: setarray .headgear[0], // Add as many as possible 29488, 29489; .headgearsize = getarraysize(.headgear); //for ( .@i = 0; .@i < .headgearsize; ++.@i ) Hercules for ( .@i = 0; .@i < .headgearsize; .@i++ ) .menu$ = .menu$ + getitemname(.headgear[.@i]) +":"; end;} And also it gives me [Debug] Source (NPC) Dressing Girl at egg1 (275,178,) Thank you in Advance Edited December 6, 2015 by Vlync Quote Share this post Link to post Share on other sites
0 KirieZ 88 Posted December 6, 2015 (edited) This debug didn't appear to me. egg1.gat, 275, 178, 5 script Dressing Girl 1_F_MARIA,{ addtimer 1, strnpcinfo(0)+"::OnChangeBack"; mes "do you want to try out the look of some awesome headgear?"; next; .@headId = 0; switch(select("Upper:Middle:Lower")) { case 1: .@headId = select(.upperMenu$) - 1; .@headId = .upper[.@headId]; break; case 2: .@headId = select(.middleMenu$) - 1; .@headId = .middle[.@headId]; break; case 3: .@headId = select(.lowerMenu$) - 1; .@headId = .lower[.@headId]; break; } if ( getiteminfo( .@headId, 5 ) & 256 ) changelook LOOK_HEAD_TOP, getiteminfo( .@headId, 11 ); else if ( getiteminfo( .@headId, 5 ) & 512 ) changelook LOOK_HEAD_MID, getiteminfo( .@headId, 11 ); else if ( getiteminfo( .@headId, 5 ) & 1 ) changelook LOOK_HEAD_BOTTOM, getiteminfo( .@headId, 11 ); else { mes "this is not a headgear."; close; } mes "That's look nice on you"; close;OnChangeBack: .@top = getequipid(EQI_HEAD_TOP); changelook LOOK_HEAD_TOP, ( .@top == -1 )? 0 : getiteminfo( .@top, 11 ); .@mid = getequipid(EQI_HEAD_MID); changelook LOOK_HEAD_MID, ( .@mid == -1 )? 0 : getiteminfo( .@mid, 11 ); .@low = getequipid(EQI_HEAD_LOW); changelook LOOK_HEAD_BOTTOM, ( .@low == -1 )? 0 : getiteminfo( .@low, 11 ); end;OnInit: // Upper headgear setarray .upper[0], 29488; // middle headgear setarray .middle[0], 29489; // lower header setarray .lower[0], 29490; for ( .@i = 0; .@i < getarraysize(.upper); .@i++ ) .upperMenu$ = .upperMenu$ + getitemname(.upper[.@i]) +":"; for ( .@i = 0; .@i < getarraysize(.middle); .@i++ ) .middleMenu$ = .middleMenu$ + getitemname(.middle[.@i]) +":"; for ( .@i = 0; .@i < getarraysize(.lower); .@i++ ) .lowerMenu$ = .lowerMenu$ + getitemname(.lower[.@i]) +":"; end;} Edited December 6, 2015 by KirieZ Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted December 6, 2015 hmm ? I don't have any problem prontera.gat, 155, 185, 5 script Dressing Girl 1_F_MARIA,{ addtimer 1, strnpcinfo(0)+"::OnChangeBack"; mes "do you want to try out the look of some awesome headgear?"; next; .@s = select( .menu$ ) -1; if ( getiteminfo( .headgear[.@s], 5 ) & 256 ) changelook LOOK_HEAD_TOP, getiteminfo( .headgear[.@s], 11 ); else if ( getiteminfo( .headgear[.@s], 5 ) & 512 ) changelook LOOK_HEAD_MID, getiteminfo( .headgear[.@s], 11 ); else if ( getiteminfo( .headgear[.@s], 5 ) & 1 ) changelook LOOK_HEAD_BOTTOM, getiteminfo( .headgear[.@s], 11 ); else { mes "this is not a headgear ..."; close; } mes "that look nice on you"; close;OnChangeBack: .@top = getequipid(EQI_HEAD_TOP); changelook LOOK_HEAD_TOP, ( .@top == -1 )? 0 : getiteminfo( .@top, 11 ); .@mid = getequipid(EQI_HEAD_MID); changelook LOOK_HEAD_MID, ( .@mid == -1 )? 0 : getiteminfo( .@mid, 11 ); .@low = getequipid(EQI_HEAD_LOW); changelook LOOK_HEAD_BOTTOM, ( .@low == -1 )? 0 : getiteminfo( .@low, 11 ); end;OnInit: setarray .headgear, // add as many as possible 5081, 5082, 5083, 5084, 5085, 5086, 5087; .headgearsize = getarraysize(.headgear); for ( .@i = 0; .@i < .headgearsize; .@i++ ) .menu$ = .menu$ + getitemname(.headgear[.@i]) +":"; end;}I did like your having space in the map name and coordinate, the script works just fine Quote Share this post Link to post Share on other sites
0 REKT 10 Posted December 6, 2015 @@KirieZ ill try this Thank you friend.@@AnnieRuru yeah, i usually do spacing with coordinates all of my script Lemme check this and thank you both i appreciate that! Quote Share this post Link to post Share on other sites
0 REKT 10 Posted December 7, 2015 This script really works @@KirieZ thanks for this, but everytime the conversation close. this pop-up in my map-server. egg1.gat, 275, 178, 5 script Dressing Girl 1_F_MARIA,{ addtimer 1, strnpcinfo(0)+"::OnChangeBack"; mes "do you want to try out the look of some awesome headgear?"; next; .@headId = 0; switch(select("- Upper:- Middle:- Lower")) { case 1: .@headId = select(.upperMenu$) - 1; .@headId = .upper[.@headId]; break; case 2: .@headId = select(.middleMenu$) - 1; .@headId = .middle[.@headId]; break; case 3: .@headId = select(.lowerMenu$) - 1; .@headId = .lower[.@headId]; break; } if ( getiteminfo( .@headId, 5 ) & 256 ) changelook LOOK_HEAD_TOP, getiteminfo( .@headId, 11 ); else if ( getiteminfo( .@headId, 5 ) & 512 ) changelook LOOK_HEAD_MID, getiteminfo( .@headId, 11 ); else if ( getiteminfo( .@headId, 5 ) & 1 ) changelook LOOK_HEAD_BOTTOM, getiteminfo( .@headId, 11 ); else { mes "this is not a headgear."; close; } mes "That's look nice on you"; close; OnChangeBack: .@top = getequipid(EQI_HEAD_TOP); changelook LOOK_HEAD_TOP, ( .@top == -1 )? 0 : getiteminfo( .@top, 11 ); .@mid = getequipid(EQI_HEAD_MID); changelook LOOK_HEAD_MID, ( .@mid == -1 )? 0 : getiteminfo( .@mid, 11 ); .@low = getequipid(EQI_HEAD_LOW); changelook LOOK_HEAD_BOTTOM, ( .@low == -1 )? 0 : getiteminfo( .@low, 11 ); end; OnInit: // Upper headgear setarray .upper[0], 29080; // middle headgear setarray .middle[0], 29466; // lower header setarray .lower[0], 29490; for ( .@i = 0; .@i < getarraysize(.upper); .@i++ ) .upperMenu$ = .upperMenu$ + getitemname(.upper[.@i]) +":"; for ( .@i = 0; .@i < getarraysize(.middle); .@i++ ) .middleMenu$ = .middleMenu$ + getitemname(.middle[.@i]) +":"; for ( .@i = 0; .@i < getarraysize(.lower); .@i++ ) .lowerMenu$ = .lowerMenu$ + getitemname(.lower[.@i]) +":"; end;} Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted December 7, 2015 I don't have that error on my latest rathena test server that error probably come from script.c try look for SCRIPT_CMD_FAILURE from BUILDIN_FUNC(addtimer) script command one of them giving this message Quote Share this post Link to post Share on other sites
0 REKT 10 Posted December 7, 2015 I don't have that error on my latest rathena test server that error probably come from script.c try look for SCRIPT_CMD_FAILURE from BUILDIN_FUNC(addtimer) script command one of them giving this message Thanks for the respond Annie, currently i'm using a47af46 or 15149 /*========================================== *------------------------------------------*/ BUILDIN_FUNC(addtimer) { int tick = script_getnum(st,2); const char* event = script_getstr(st, 3); TBL_PC* sd; check_event(st, event); sd = script_rid2sd(st); if( sd == NULL ) return SCRIPT_CMD_SUCCESS; if (!pc_addeventtimer(sd,tick,event)) { ShowWarning("buildin_addtimer: Event timer is full, can't add new event timer. (cid:%d timer:%s)n",sd->status.char_id,event); return SCRIPT_CMD_FAILURE; } return SCRIPT_CMD_SUCCESS; } Quote Share this post Link to post Share on other sites
0 AnnieRuru 957 Posted December 7, 2015 maybe change this 4 lines if (!pc_addeventtimer(sd,tick,event)) { ShowWarning("buildin_addtimer: Event timer is full, can't add new event timer. (cid:%d timer:%s)n",sd->status.char_id,event); return SCRIPT_CMD_FAILURE; }into thispc_addeventtimer(sd,tick,event);.. but shouldn't happen I think ... if it really run that return SCRIPT_CMD_FAILURE; it should also run that ShowWarning ... no idea since I cannot reproduce your problem Quote Share this post Link to post Share on other sites
Hi, Sorry if i'm not allowed in here since i'm rAthena user. i just wanna ask for support about script of AnnieRURU's script Dressing Girl.
How to add something like this:
Category:
Upper
Middle
Lower
And Arrays for category
.upper[0]
.middle[0]
.lower[0]
And also it gives me [Debug] Source (NPC) Dressing Girl at egg1 (275,178,)
Thank you in Advance
Edited by VlyncShare this post
Link to post
Share on other sites