MVP Summoner

dave23

New member
Messages
15
Points
0
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!

 
Code:
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;    }
 
Sorry, forgot a label and had a little typo.

Code:
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 ;    }
 
Hi, I gave him the item but it did not summon the thanatos
default_sad.png


 
Code:
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;} 
 
It's deleting the item but not summoning thanatos.

Can it also work in rathena?

 
Last edited by a moderator:
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.
 
There's no error in the console. Sorry for the bump.
Change

 monster strnpcinfo( 4 ), 0, 0, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; 
To

Code:
 monster strnpcinfo( 4 ), -1, -1, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon"; 
 
I tried to change it but still not working. It only get the item but not summoning thanatos
default_sad.png


 
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
default_biggrin.png


Like this:

Code:
getmapxy .@m$, .@x, .@y,1;monster strnpcinfo( 4 ), .@x+1, .@y-1, "--ja--", 1708, strnpcinfo( 1 ) + "::OnSummon";
 
Back
Top