Jump to content

Patskie

Community Contributors
  • Content Count

    366
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by Patskie


  1. prontera,150,150,0	script	Sample	100,{	if ( !countitem( 7539 ) ) {		mes "You need 1 " +getitemname( 7539 )+ " in order to talk to me";		close;	}	if ( select( "Here have my " +getitemname( 7539 )+ ":Nevermind" ) - 1 ) close;	.@r = rand(501, 700);	if ( getitemname( .@r ) != "null" ) {		delitem 7539, 1;		getitem .@r, 1;	}	close;}

  2. Players will only be attached to the npc whenever they talk to it or when the script execute certain labels or by using addrid or attachrid. In your case you put this line on OnInit label :

     

    .@player_name$ = "[^FF0000"+strcharinfo(0)+"^000000]";

     

    Which means that when the script was loaded by the server it will assign the name of a player on the variable .@player_name$ ( in which case by default and by loaded i believe no player is currently talking to that npc )

     

    Regarding the wrong case error. Maybe it was included in your other scripts. I am certain that the error does not belong to the script you are talking about in this topic.

     

    I just modified your script. Kindly test this one and tell me if it works :

     

    prontera,155,150,3	script	TEST_NPC1	99,{	.@player_name$ = "[^FF0000"+strcharinfo(0)+"^000000]";	// No requirements	for( .@i = 0; .@i < getarraysize(.qitem); .@i++ ) {		if ( countitem( .qitem[.@i] ) < .qamt ) {			// Dialogue if player does NOT have the required items already			mes .npc_name$;			mes "dialogue hereeeee.";			mes "More hereeeee";			next;						mes .@player_name$;			mes "PC dialogue here";			next;						if(select("Yes, please.:No, thank you.") == 2)			{				mes .npc_name$;				mes "leaving message here";				close;			}			mes .npc_name$;			mes "more dialogue";			next;			mes .npc_name$;			mes "Come back with:";						// List items			for(.@i = 0; .@i < getarraysize(.qitem); .@i++)				mes "^FF0000"+ .qamt +"x - "+ getitemname(.qitem[.@i]) +"^000000";							mes "...and I will give you the item.";			close;		}	}	// Has requirements	mes .npc_name$;	mes "congrats dialogue for gather items.";	for( .@i = 0; .@i < getarraysize(.qitem); .@i++ )		delitem .qitem[.@i],.qamt;	getitem .pitem,.pamt;	close;OnInit:	// Configuration		// General		.npc_name$ = "[^008800NPC_NAME^000000]"; // NPC's dialogue name		// Items		.pitem = 901; // Prize item for completing the quest		.pamt = 1; // Prize item amount		setarray .qitem[0], 501, 502, 503;		.qamt = 1; // Quest item amount		end;}

  3. Line 3069

     

    if(sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) {		sd->right_weapon.addrace[RC_BOSS] += 100;		sd->left_weapon.addrace[RC_BOSS] += 100;		sd->right_weapon.addele[ELE_HOLY] += 100;		sd->left_weapon.addele[ELE_HOLY] += 100;}

     

    Line 4821

     

    if(sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR)	 flee2 += 10;

     


  4. I have tried this and works fine on my test server. You can check it : 

     

    src/map/status.c : 

     

    Add ( Line 4212 ) : 

    if(sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_WIZARD || sc->data[SC_SOULLINK]->val2 == SL_SAGE))		vit += ((TBL_PC*)bl)->status.int_ / 5;

     

    Add ( Line 5564 ) :

    if(sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_WIZARD || sc->data[SC_SOULLINK]->val2 == SL_SAGE))		maxhp += ((TBL_PC*)bl)->status.base_level * 200;

  5. Try : 

    itemid,itemname,.........{ callfunc("Freebies",2357,2524,2115,2421); },{},{}

     

    /* callfunc( "Freebies",itemid{,itemid} ); */function	script	Freebies	{	for ( .@i = 0; .@i < getargcount(); .@i++ )		 getitem getarg(.@i), 1;	return;}

  6. The most common way : 

     

    prontera,150,150,0	script	Sample	123,{	if ( #vip < gettimetick(2) ) {		mes "You are not a vip anymore";		close;	}	specialeffect2 EF_HEAL2; percentheal 100,100;	specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10;	specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10;	switch ( BaseJob ) {		case Job_Alchemist: .@spirit = 445; break;		case Job_Monk: .@spirit = 447; break;		case Job_Star_Gladiator: .@spirit = 448; break;		case Job_Sage: .@spirit = 449; break;		case Job_Crusader: .@spirit = 450; break;		case Job_SuperNovice: .@spirit = 451; break;		case Job_Knight: .@spirit = 452; break;		case Job_Wizard: .@spirit = 453; break;		case Job_Priest: .@spirit = 454; break;		case Job_Bard: case Job_Dancer: .@spirit = 455; break;		case Job_Rogue: .@spirit = 456; break;		case Job_Assassin: .@spirit = 457; break;		case Job_Blacksmith: .@spirit = 458; break;		case Job_Hunter: .@spirit = 460; break;		case Job_Soul_Linker: .@spirit = 461; break;		default: if ( Upper == 1 && BaseLevel < 70 )					.@spirit = 494;	}	if ( .@spirit ) {		sc_start4 SC_SOULLINK, 360000, 5, .@spirit,0,0;		skilleffect .@spirit, 5;	}	close;}

    Set players account into vip by using : 

    #vip = gettimetick(2) + <duration in seconds>;

  7. prontera,150,150,0	script	Sample	123,{	// requirements	setarray .id[0],2729,2375;	.size = getarraysize(.id);	.prize = 7227;		mes "Hi, you have requirements?";	next;	if (select("Yes:No")-1) close;	for ( .@i = 0; .@i < .size; .@i++ ) {		if (!countitem(.id[.@i])) {			mes "I need the following : ";			for ( .@i = 0; .@i < .size; .@i++ )				mes "1x " +getitemname(.id[.@i]);			close;		}	}	for ( .@i = 0; .@i < .size; .@i++ )		delitem .id[.@i], 1;	getitem .prize, 1;	mes "Nice!";	close;}

  8. *statusup2 <stat>,<amount>;This command will bump a specified stat of the invoking character up bythe specified amount permanently. Amount can be negative. See 'statusup'.// This will decrease a character's Vit forever.	statusup bVit,-1;---------------------------------------*bonus <bonus type>,<val1>;*bonus2 <bonus type>,<val1>,<val2>;*bonus3 <bonus type>,<val1>,<val2>,<val3>;*bonus4 <bonus type>,<val1>,<val2>,<val3>,<val4>;*bonus5 <bonus type>,<val1>,<val2>,<val3>,<val4>,<val5>;These commands are meant to be used in item scripts. They will probablywork outside item scripts, but the bonus will not persist for long. They,as expected, refer only to an invoking character.You can find the full list of possible bonuses and which command to usefor each kind in 'doc/item_bonus.txt'.

     

    try :P it's permanent though?


  9. Try : 

    prontera,150,150,0	script	Sample	123,{	// diablo parts id here	setarray .id[0],2729,2375;	// put valkyrie parts id here	setarray .vid[0],2357,2115;	mes "Bring me 2 diablo set for 1 valkyrie set";	next;	if (select("I have those requirements:Ok")-1) close;	for ( .@i = 0; .@i < getarraysize(.id); .@i++ ) {		if ( countitem(.id[.@i]) < 2 ) {			mes "You need the following : ";			for ( .@x = 0; .@x < getarraysize(.id); .@x++ )				mes "2x " +getitemname(.id[.@x]);			close;		}	}		for ( .@i = 0; .@i < getarraysize(.id); .@i++ )		 delitem .id[.@i], 2;	for ( .@i = 0; .@i < getarraysize(.vid); .@i++ )		 getitem .vid[.@i], 1;	mes "Done!";	close;}
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.