PewN Posted December 8, 2012 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Share Posted December 8, 2012 how can i set like that? i will set a progressbar and inputing a code when the player got hit the progressbar will stop and close the npc progressbar start during inputing the code progressbar "green",5; input .@rcode; Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted December 8, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted December 8, 2012 Input and progressbar pause the script, so you have to run a new instance of the script in parallel. Something like: doevent strnpcinfo(3)+"::OnStartProgressBar"; input .@rcode; [...] OnStartProgressBar: progressbar "green",5; Quote Link to comment Share on other sites More sharing options...
PewN Posted December 8, 2012 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Author Share Posted December 8, 2012 Input and progressbar pause the script, so you have to run a new instance of the script in parallel. Something like: doevent strnpcinfo(3)+"::OnStartProgressBar"; input .@rcode; [...] OnStartProgressBar: progressbar "green",5; how can i set if i getting hitted the npc will close? Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted December 8, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted December 8, 2012 Funny... doevent strnpcinfo(3)+"::OnStartProgressBar"; doevent strnpcinfo(3)+"::OnCheckHit"; input .@rcode; [...] OnStartProgressBar: progressbar "green", 5; end; OnCheckHit: for ( set .@last_life, HP; .@i<5; set .@i, .@i+1 ) { if ( @last_life < HP ) close; set .@last_life, HP; sleep2 1000; } Try it, but: I'm not sure if it will work to close the script like this (it should since it's the same npcid...), and there is noway to remove a npc dialog/menu/input without the need of the client (or @refresh). 1 Quote Link to comment Share on other sites More sharing options...
PewN Posted December 8, 2012 Group: Members Topic Count: 209 Topics Per Day: 0.04 Content Count: 892 Reputation: 27 Joined: 12/09/11 Last Seen: April 16, 2016 Author Share Posted December 8, 2012 Funny... doevent strnpcinfo(3)+"::OnStartProgressBar"; doevent strnpcinfo(3)+"::OnCheckHit"; input .@rcode; [...] OnStartProgressBar: progressbar "green", 5; end; OnCheckHit: for ( set .@last_life, HP; .@i<5; set .@i, .@i+1 ) { if ( @last_life < HP ) close; set .@last_life, HP; sleep2 1000; } Try it, but: I'm not sure if it will work to close the script like this (it should since it's the same npcid...), and there is noway to remove a npc dialog/menu/input without the need of the client (or @refresh). ok sir i will try this thx for this Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 9, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 9, 2012 nope this is never going to work prontera,155,179,5 script kjdhfkjshf 100,{ doevent strnpcinfo(0)+"::Onstart"; input .@name$; dispbottom "test"; close; Onstart: progressbar "", 3; end; } this one runs input 1st ... after input finish only runs progressbar prontera,155,179,5 script kjdhfkjshf 100,{ doevent strnpcinfo(0)+"::Onstart"; progressbar "", 3; dispbottom "test"; close; Onstart: input .@name$; end; } this one runs progressbar 1st, after 3 seconds finished then input only pops up input, menu, close2, progressbar.... these sort of script commands can only run 1 at a time and I have never been able to make them run at the same time not sure if source modification able to bypass this limitation ... but I don't find this useful Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted December 9, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted December 9, 2012 And what about using sleep2 ? prontera,155,179,5 script kjdhfkjshf 100,{ doevent strnpcinfo(0)+"::Onstart"; sleep2 1; // execute doevent first input .@name$; dispbottom "test"; close; Onstart: progressbar "", 3; end; } Quote Link to comment Share on other sites More sharing options...
AnnieRuru Posted December 9, 2012 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted December 9, 2012 And what about using sleep2 ? prontera,155,179,5 script kjdhfkjshf 100,{ doevent strnpcinfo(0)+"::Onstart"; sleep2 1; // execute doevent first input .@name$; dispbottom "test"; close; Onstart: progressbar "", 3; end; } input pop up 1st, then display "test", then progressbar comes in Quote Link to comment Share on other sites More sharing options...
Question
PewN
how can i set like that?
i will set a progressbar and inputing a code when the player got hit the progressbar will stop and close the npc
progressbar start during inputing the code
Link to comment
Share on other sites
7 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.