how to use cutin[without player attached]?

leloush

New member
Messages
269
Points
0
Location
in front of my laptop =)
Emulator
how to use cutin[without player attached]?

or should i say in specific map all players are able to see this "cutin" (npc_illus) example in a countdown or after the countdown it appears on screen that are on the same map and disappear after 3-2secs..

is this possible ??

thanks in advanced..

.@edit yay sry can someone move this topic to script support.. i am sorry i ddnt notice that im on source section
default_sry.gif


.

.

@edit thanks for moving it.. it won't happen again

cutin.png

 
Last edited by a moderator:
prontera,150,150,0 script Sample 100,{ query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'",.@aid; for ( .@i = 0; .@i < getarraysize(.@aid); .@i++ ) { if ( attachrid( .@aid[.@i] ) ) { if ( strcharinfo(3) == "prontera" )  cutin "kafra_07", 2; } } for ( .@x = 3; .@x > 0; .@x-- ) { announce "Count down : " +.@x,0; sleep 1000; } for ( .@y = 0; .@y < getarraysize(.@aid); .@y++ ) { if ( attachrid( .@aid[.@y] ) ) { if ( strcharinfo(3) == "prontera" )  cutin "", 255; } } end;}
Like this?

 
prontera,150,150,0 script Sample 100,{ query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'",.@aid; for ( .@i = 0; .@i < getarraysize(.@aid); .@i++ ) { if ( attachrid( .@aid[.@i] ) ) { if ( strcharinfo(3) == "prontera" )  cutin "kafra_07", 2; } } for ( .@x = 3; .@x > 0; .@x-- ) { announce "Count down : " +.@x,0; sleep 1000; } for ( .@y = 0; .@y < getarraysize(.@aid); .@y++ ) { if ( attachrid( .@aid[.@y] ) ) { if ( strcharinfo(3) == "prontera" )  cutin "", 255; } } end;}
Like this?
i will try this sir pats... thanks

@edit yes this is what im looking for sir pats... is it ok if i will rip some of the lines that i only need ? cuz im planning to make an event more lively is it ok please??

and btw the script seems very hard to understand for a newbie like me but i understand some of this

can i change this line into a easy one

    for ( .@x = 3; .@x > 0; .@x-- ) {

announce "Count down : " +.@x,0;

sleep 1000;

like

announce "Count down : 3",0;

sleep 1000;

announce "Count down : 2",0;

sleep 1000;

announce "Count down : 1",0;

sleep 1000;

like that? correct me if im wrong sir pats.. really thanks to your help..

 
Last edited by a moderator:
Changing the method to the way you described would work, but it seems you already understand what's going on. Patskie's method simply allows you to change the value of .@x within the for loop from "3" to whatever you wish it to be; that way, it will count down for however long you set it to, without cluttering your code unnecessarily.

 
Last edited by a moderator:
Changing the method to the way you described would work, but it seems you already understand what's going on. Patskie's method simply allows you to change the value of .@x within the for loop from "3" to whatever you wish it to be; that way, it will count down for however long you set it to, without cluttering your code unnecessarily.
 i mean yes sir i already understand whats going on to the script that mr.pats gave to me..

i just wanna know is it possible to make a cutin change each every second of the countdown? and how without messing the entire script

 
Last edited by a moderator:
Here's an example:
 

Code:
prontera,150,150,0	script	Sample	100,{	// Cutin file names (plays in reverse order)	setarray .@image$[0], "kafra_05", "kafra_06", "kafra_07";		// Countdown time (in seconds)	.@time = 3;		// Map name to play cutins on	.map_name$ = "prontera";		// Generate array with account IDs	query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'", .@aid;		// Loop through countdown sequence    for (.@x = .@time; .@x > 0; .@x--) {		// Loop through all online players in map		for (.@i = 0; .@i < getarraysize(.@aid); .@i++) {			if (attachrid(.@aid[.@i])) {				if (strcharinfo(3) == .map_name$) { 					cutin .@image$[.@x], 2;				}			}		}				announce "Count down : " +.@x, 0;		sleep 1000;	}		// Clear cutins	for (.@y = 0; .@y < getarraysize(.@aid); .@y++) {		if (attachrid(.@aid[.@y])) {			if (strcharinfo(3) == .map_name$) {				cutin "", 255;			}		}	}		end;	}
 
Last edited by a moderator:
hi thanks sir.. but it looks like there's a error in the part of image[0]

countdown : working

image preview: not working

here's the error

Untitled.png

 
Last edited by a moderator:
hi thanks sir.. but it looks like there's a error in the part of image[0]

countdown : working

image preview: not working

here's the error
Sorry, looks like I forgot to declare it as a string. See my previous post for the fix. .@image[] should be .@image$[]

 
Last edited by a moderator:
Sorry, looks like I forgot to declare it as a string. See my previous post for the fix. .@image[] should be .@image$[]
hehe no need to sorry since im the one who's looking for a help
default_biggrin.png


all workings

but one more thing sir

is this normal or its just a little mistake?

the cutin images isnt changing... i think it stucks on the first image and the countdown continues but the image not changing

 
Last edited by a moderator:
hehe no need to sorry since im the one who's looking for a help
default_biggrin.png


all workings

but one more thing sir

is this normal or its just a little mistake?

the cutin images isnt changing... i think it stucks on the first image and the countdown continues but the image not changing

Ah, you found another one of my mistakes lol. Change this:

cutin .@image$[.@i], 2;

to this:

cutin .@image$[.@x], 2;

...or just see my other post for the updated version.

 
Back
Top