Jump to content
  • 0

Problem whit Cutin Script


Question

Posted (edited)

Hello Rathena

i got a problem whit a Cutin script .

its made by AnnieRuru and i found it in the forum .

the scrip works like a charm on Normal maps like Towns , but i want too use it on Instance maps too.

currently its not working there.

and current im not sure why hehe , a bit help would be nice

- script inst cutins -1,{
OnPCLoadMapEvent:
while ( strcharinfo(3) != .town$[.@i] && .@i < 4 ) .@i++;
if ( .@i == 4 || @town_map_cutin_loaded & 1 << .@i ) end;
@town_map_cutin_loaded = @town_map_cutin_loaded | 1 << .@i;
sleep2 2000;
cutin .pic$[.@i], 4;
sleep2 3000;
cutin "", 255;
end;
OnInit:
setarray .town$, "1@tower", "2@tower", "prontera";
setarray .pic$, "sign_01", "sign_02", "sign_01";
while ( .@i < 4 ) {
setmapflag .town$[.@i], mf_loadevent;
.@i++;
}
end;

Edited by ossi0110

4 answers to this question

Recommended Posts

Posted

instanced map, the map name from 1@tower becomes 0011@tower

that's why if you do

strcharinfo(3) != .town$[.@i]

will not work

perhaps

!compare( strcharinfo(3), .town$[.@i] )

might do the trick

Posted (edited)

instanced map, the map name from 1@tower becomes 0011@tower

that's why if you do

strcharinfo(3) != .town$[.@i]

will not work

perhaps

!compare( strcharinfo(3), .town$[.@i] )

might do the trick

when i use

!compare( strcharinfo(3), .town$[.@i] )

its nor Working , he drops me a error msg

never worked whit !compare befor so atm not sure why it gives the error , and the WIki dont tell me much about this command hehe

script error on instances.txt line 174
need '('
  172 : {
  173 :		OnPCLoadMapEvent:
*  174 :	 while '!'compare( strcharinfo(3), .town$[.@i] ); && .@i < 4 ) .@i++
;
  175 :		if ( .@i == 4 || @town_map_cutin_loaded & 1 << .@i ) end;
  176 :		@town_map_cutin_loaded = @town_map_cutin_loaded | 1 << .@i;
  177 :		sleep2 2000;
  178 :		cutin .pic$[.@i], 4;
  179 :		sleep2 3000;
[info]: Done loading '12926' NPCs:

Edited by ossi0110
Posted

make me spoon feed <.<

-	script	inst cutins	-1,{
OnPCLoadMapEvent:
while ( !compare( strcharinfo(3), .town$[.@i] ) && .@i < 4 ) .@i++;
if ( .@i == 4 || @town_map_cutin_loaded & 1 << .@i ) end;
@town_map_cutin_loaded = @town_map_cutin_loaded | 1 << .@i;
sleep2 2000;
cutin .pic$[.@i], 4;
sleep2 3000;
cutin "", 255;
end;
OnInit:
setarray .town$, "1@tower", "2@tower", "prontera";
setarray .pic$, "sign_01", "sign_02", "sign_01";
while ( .@i < 4 ) {
	setmapflag .town$[.@i], mf_loadevent;
	.@i++;
}
end;
}



//instance script debugging <.<
function	script	instance__	{
if ( ( .@ins = instance_create( getarg(0), getcharid(1) ) ) < 0 )
	return .@ins;
.@i = 3;
while ( getstrlen( getarg( .@i, "" ) ) ) {
	if ( !getstrlen( instance_attachmap( getarg(.@i), .@ins ) ) ) {
		instance_destroy .@ins;
		return -5;
	}
	.@i++;
}
if ( getarg(1) || getarg(2) )
	instance_set_timeout getarg(1), getarg(2), .@ins;
instance_init .@ins;
instance_attach .@ins;
return .@ins;
}
prontera,156,178,5	script	kjdfhdksfjs	100,{
if ( !getcharid(1) ) {
	mes "you need a party to get in";
	close;
}
if ( instance_id(1) ) {
	mes "your party is currently running an instance";
	close;
}
if ( ( .@inst = callfunc( "instance__", "test instance", 0, 10, "1@tower", "2@tower" ) ) < 0 ) {
	mes "failed to create instance : "+ .@inst;
	close;
}
warpparty "1@tower", 0,0, getcharid(1);
monster "this", -1,-1, "--ja--", 1002, 1, instance_npcname("dnvasdfwerq")+"::Onkill" ;
end;
}
1@tower,0,0,0	script	dnvasdfwerq	-1,{
Onkill:
if ( strcharinfo(3) == has_instance( "1@tower" ) ) {
	warpparty "2@tower", 0,0, getcharid(1);
	monster "this", -1,-1, "--ja--", 1002, 1, instance_npcname("dnvasdfwerq")+"::Onkill" ;
}
else if ( strcharinfo(3) == has_instance( "2@tower" ) ) {
	warpparty "SavePointAll", 0,0, getcharid(1);
	sleep2 1;
	instance_destroy;
}
end;
}

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...