Jump to content
  • 0
REKT

Annie's Dressing Girl

Question

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 :D

Edited by Vlync

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

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 by KirieZ

Share this post


Link to post
Share on other sites
  • 0

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

post-4102-0-83038700-1449434178_thumb.jpg

Share this post


Link to post
Share on other sites
  • 0

This script really works @@KirieZ thanks for this, but everytime the conversation close.

this pop-up in my map-server.

k2G2HdO.png

 

 

  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;}

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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;
}

Share this post


Link to post
Share on other sites
  • 0

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 this
pc_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

Share this post


Link to post
Share on other sites

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

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.