Jump to content

Question

7 answers to this question

Recommended Posts

Posted (edited)


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

//======== 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
Posted

//=================================
//======== 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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...