PDA

View Full Version : [562] Making items untradeable



davidpaceway
May 22nd, 2011, 19:25
Only posting cause I saw nothing else on it. Its really simple :p

Okay to start open Trade.java
Under


public class Trade {

Put

static final int[] UNTRADEABLE = {};//your items in that blank
public enum State {

Under (the second one)


Item item = player1.getInventory().getContainer().get(slot);
if(item != null) {


Put

for (int i : UNTRADEABLE) {
if(item.getId() == i) {
player.sm("You can't trade this item.");
return;
}
}

Under (the second one..)


Item item = player2.getInventory().getContainer().get(slot);
if(item != null) {

Put

for(int i : UNTRADEABLE) {
if(item.getId() == i) {
player.sm("You can't trade this item!");
return;
}
}


Credits..
50% me
50% to Wisdom

Intensive Tony
May 22nd, 2011, 20:49
nice job.

youtube2
May 22nd, 2011, 20:54
Nice job

davidpaceway
May 23rd, 2011, 01:11
nice job ?

Why the ?
:S

Vesta Main
May 23rd, 2011, 01:12
nice job, alot of people been asking this lol

OwnsterChief
May 23rd, 2011, 01:26
Why the ?
:S

LOL I JUST NOTICED THIS IS IN NOSZSCAPE LOL I FEEL DUM, Thanks Demon.

davidpaceway
May 23rd, 2011, 02:24
Its in nozscape rofl?

Intensive Tony
May 23rd, 2011, 06:13
Why the ?
:S

now better ?
was mistype

gtfo my waffle
July 10th, 2011, 04:30
nice job. wat if u dont want certian people or people with admin trading certian items tho. EX:admins i dont want them to trade cash... soz for the bother tho :S

davidpaceway
July 12th, 2011, 02:15
nice job. wat if u dont want certian people or people with admin trading certian items tho. EX:admins i dont want them to trade cash... soz for the bother tho :S
Just do this.

for (int i : admin) {
if(player.rights == 2 && item.getId() == i) {
player.sm("Admin can't trade this item");
return;
}
}

Niator
July 22nd, 2011, 17:14
Wow. Din't know this was so easy lmao.