Jump to content
  • 0

Item npc


lionheartallstar

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   0
  • Joined:  11/01/14
  • Last Seen:  

Hi guys, basically I'm new and was thinking of implementing Wings in my server.

 

I need a simple NPC that requires +10 equipment (Hat,Armor,Garment,Shoe) and 500m for a Wing.

 

Help anybody?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

mark as answered, and repute +1 if you would like to.rep_up.png

thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  


//=================================

//======== rAthena Script =========

//== +10 item and zeny trader =====

//== Compatible with: rAthena SVN =

//== Version: -99 =================

//== Maed by: Winz ================

//=================================

//== uhh, pardon with the words ===

//== lols =========================

//=================================

prontera,157,158,3    script    WINGS!!    905,{

getinventorylist;

for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){

    if(@inventorylist_refine[.@i] == 10){

        set .@datitem, .@i;

        break;

    }

}

if (!.@datitem) {

    mes "You don't have any +10 item with you";

    close;

}

if (Zeny < 500*1000*1000) {

    mes "You don't have at least ^FF0000500,000,000 Z^000000 with you";

    close;

}

mes "So.. umm..";

mes "Wanna trade your ^0000FF+10 "+getitemname(@inventorylist_id[.@i]);

mes "^000000and ^FF0000500,000,000 Z^000000 for a wing?";

mes "You w!ll be abLe.. to.. to fly! yeah, fly! believe me!";

switch(select("Yes:No")) {

    case 1:

        next;

        mes "I believe I can fly~~";

        delitem @inventorylist_id[.@i],1;

        set Zeny, Zeny - 500000000;

        next;

        mes "I believe I can tuch da skai!";

        mes "^0000FF*throwing a pair of wings";

        mes "Looks wearable!^000000";

        getitem 512, 1;

        close;

    case 2:

        next;

        mes "R.r..really?";

        mes "So you don't want to high up fly?";

        mes "Ok then..";

        close;

}

}

Edited by Winz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  07/13/14
  • Last Seen:  

Winz i kindly like this script but, can you make the NPC to not accept +10 weapon?? just armor shield muff shoes how bout that?

Edited by kaixler44
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

//=================================
//======== rAthena Script =========
//== +10 item (not weapon) and zeny trader =====
//== Compatible with: rAthena SVN =
//== Version: -99 =================
//== Maed by: Winz ================
//=================================
//== uhh, pardon with the words ===
//== lols =========================
//=================================

prontera,157,158,3	script	WINGZZ!!	909,{
getinventorylist;

for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){
	if(@inventorylist_refine[.@i] == 10 && getiteminfo(@inventorylist_id[.@i],5) != 32 && getiteminfo(@inventorylist_id[.@i],5) != 2 ) {
		set .@datitem, .@i;
		break;
	}
}

if (!.@datitem) {
	mes "You don't have any +10 item with you.";
	mes "Weapons and shields will not be counted as one of them.";
	close;
}

if (Zeny < 500*1000*1000) {
	mes "You don't have at least ^FF0000500,000,000 Z^000000 with you";
	close;
}
mes "So.. umm..";
mes "Wanna trade your ^0000FF+10 "+getitemname(@inventorylist_id[.@i]);
mes "^000000and ^FF0000500,000,000 Z^000000 for a wing?";
mes "You w!ll be abLe.. to.. to fly! yeah, fly! believe me!";
switch(select("Yes:No")) {
	case 1:
		next;
		mes "I believe I can fly~~";
		delitem @inventorylist_id[.@i],1;
		set Zeny, Zeny - 500000000;
		next;
		mes "I believe I can tuch da skai!";
		mes "^0000FF*throwing a pair of wings";
		mes "Looks wearable!^000000";
		getitem 512, 1;
		close;
	case 2:
		next;
		mes "R.r..really?";
		mes "So you don't want to high up fly?";
		mes "Ok then..";
		close;
}	
}

This will reject any 1-handed weapon, 2-handed weapon, and shield (since 2 handed weapon will take up the number 32 (shield) and 2 (1 handed weapon))

if you wanna receive shields, then search and remove the following:

getiteminfo(@inventorylist_id[.@i],5) != 32 &&

i'm kind of afraid it will be bugged. since heard that NPC temporary variables may be changed when is paused using next, select, menu. but, i found it to be negative.

i tried to use player temporary variable, and it's bugged. after the item was removed (deleted), the next time that char talks with the NPC, NPC will think that he still have the item (even though the trading process will be denied (money not deducted again))

 

if you don't get this paragraph ^^^^, that's fine, don't mind.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  07/13/14
  • Last Seen:  

dude I've tried the script and it works well nice job on that. i don't want to put 1 handed or 2 handed sword its because is really easy to make +10 weapon.

thank you very much

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

something like this ?

http://upaste.me/r/5bce99

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...