dave23 0 Posted December 24, 2014 Hi, I'm new here. May I request a npc that summon only thanatos but will require an item and it only appears or be usable every 3 hours. THanks! Quote Share this post Link to post Share on other sites
0 Omnipotent 11 Posted December 24, 2014 prontera,100,100,4 script Thanatos Caller 100,{ setarray .@item[0], 512, 1; if ( mobcount ( "this", "Thanatos Caller::OnThan" ) ) mes "Thanatos already summoned."; else if ( gettimetick ( 2 ) - .summon < 3*60 ) { mes "Hi, I have the number of cellphone of Thanatos."; mes "I'm the only one who has it. And I can call him if you give me:"; mes .@item[1] +" "+ getitemname ( .@item[0] ); if ( countitem ( .@item[0] ) >= .@item[1] ) { select "Summon"; monster "this", 0, 0, "--ja--", THANATOS, 1, "Thanatos Caller::OnThan"; delitem .@item[0], .@item[1] ; } else mes "You don't have the required."; } else { set .@s, 3*60 - gettimetick ( 2 ) + .summon; mes "Please wait "+ .@s/3600 +"h "+ .@s/60 +"m "+ .@s%60 +"s"; } close; } Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 24, 2014 Thank you. I see an error that it said wait for -324234234234. Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 24, 2014 The time is not fix sir. Thanks! Quote Share this post Link to post Share on other sites
0 Omnipotent 11 Posted December 24, 2014 Sorry, forgot a label and had a little typo. prontera,100,100,4 script Thanatos Caller 100,{ setarray .@item[0], 512, 1; if ( mobcount ( "this", "Thanatos Caller::OnThan" ) ) mes "Thanatos already summoned."; else if ( gettimetick ( 2 ) - .summon >= 3*60 ) { mes "Hi, I have the number of cellphone of Thanatos."; mes "I'm the only one who has it. And I can call him if you give me:"; mes .@item[1] +" "+ getitemname ( .@item[0] ); if ( countitem ( .@item[0] ) >= .@item[1] ) { select "Summon"; monster "this", 0, 0, "--ja--", THANATOS, 1, "Thanatos Caller::OnThan"; delitem .@item[0], .@item[1] ; } else mes "You don't have the required."; } else { set .@s, 3*60 - gettimetick ( 2 ) + .summon; mes "Please wait "+ .@s/3600 +"h "+ .@s/60 +"m "+ .@s%60 +"s"; } close; OnThan: set .summon, gettimetick ( 2 ); end ; } Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 25, 2014 Hi, I gave him the item but it did not summon the thanatos Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted December 26, 2014 prontera,150,150,0 script Thanatos Summoner 100,{ setarray .items[ 0 ], 512, 1; .delay = 1; // in minutes if ( mobcount( strnpcinfo( 4 ), strnpcinfo( 1 ) + "::OnSummon" ) ) mes "Thanatos is here!"; else if ( gettimetick( 2 ) < #timer ) mes "Thanatos cannot be summoned this time"; else if ( countitem( .items[ 0 ] ) < .items[ 1 ] ) mes "You need " + .items[ 1 ] + "x " + getitemname( .items[ 0 ] ) + " in order to summon thanatos!"; else { mes "Are you sure you want to summon thanatos? I will delete the item requirement in order to summon him."; next; if ( select( "Yes:No" ) - 1 ) close; delitem .items[ 0 ], .items[ 1 ]; monster strnpcinfo( 4 ), 0, 0, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; } close; OnSummon: #timer = gettimetick( 2 ) + ( .delay * 60 ); end;} Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 26, 2014 It's deleting the item but not summoning thanatos. Can it also work in rathena? Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted December 26, 2014 It's deleting the item but not summoning thanatos. Can it also work in rathena? Please avoid unnecessary bumps, you can bump only after 24 hours. 1 Alexandria reacted to this Quote Share this post Link to post Share on other sites
0 karazu 33 Posted December 26, 2014 It's deleting the item but not summoning thanatos. Can it also work in rathena? Please check the error in the console so that the people that wants to help you can fix it easily.. Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 27, 2014 There's no error in the console. Sorry for the bump. Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted December 27, 2014 There's no error in the console. Sorry for the bump. Change monster strnpcinfo( 4 ), 0, 0, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; To monster strnpcinfo( 4 ), -1, -1, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; 1 karazu reacted to this Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 28, 2014 I tried to change it but still not working. It only get the item but not summoning thanatos Quote Share this post Link to post Share on other sites
0 Garr 117 Posted December 28, 2014 You do realize that it summons MVP on random cell on map? 1 Patskie reacted to this Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 28, 2014 Oh does it? So how can i make to summon only on a certain cells? Quote Share this post Link to post Share on other sites
0 Garr 117 Posted December 28, 2014 Change that monster strnpcinfo( 4 ), -1, -1, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; to getmapxy .@m$, .@x, .@y,1;monster strnpcinfo( 4 ), .@x, .@y, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; Then Thanatos will appear on NPC's cell. Feel free to edit .@x and .@y to the cell you want, or you can edit them with +- so you can duplicate it freely Like this: getmapxy .@m$, .@x, .@y,1;monster strnpcinfo( 4 ), .@x+1, .@y-1, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; Quote Share this post Link to post Share on other sites
0 dave23 0 Posted December 28, 2014 It's not summoning the mob Quote Share this post Link to post Share on other sites
Hi, I'm new here. May I request a npc that summon only thanatos but will require an item and it only appears or be usable every 3 hours. THanks!
Share this post
Link to post
Share on other sites