Jump to content
  • 0

Can somebody edit this Script for me? Berry Trader


Question

Posted
prontera.gat,144,173,3	script	Berry Trader#1:BT	91,{

	set $@npcname_mpq$, "^4000C0[Trader]^000000";
	mes $@npcname_mpq$;
	mes "Hi, I'm the Yggdrasil Berry Trader, I can pack them into boxes for easir trading! Would you like to do some packing?";
	next;
	menu "Yes, Please!",L_Berry,"No Thanks.",L_Exit;

L_Berry:
	mes $@npcname_mpq$;
	mes "This is what I need to make you an Yggdrasil Berry Box!";
	next;
	mes "x10 Yggdrasil Berry";
	next;
	mes $@npcname_mpq$;
	mes "So, you want it, Right?";
	next;
	mes $@npcname_mpq$;
	menu "Sure!",-,"No, thanks.",Lnotenuff;

	mes $@npcname_mpq$;
	if(countitem(607) < 10) goto LNotEnough;
		delitem 607,10;
	mes "You really have 10 Berrys? Okay, let's trade!";
		getitem 14232,1;
	mes ". . .";
	mes "Thank you sweety. Dont ygg too much!";
	close;

LNotEnough:
	mes "You dont have the required items...?";
	mes "Come back when you are actually ready. Now gtfo!";
	close;

Lnotenuff:
	mes "Wtf, come back when you got the goods!";
	close;
L_Exit:
	close;
}


the script its working good, it does trade ygg berry to ygg box[10] but only 10 by 10, i want it ask how much ygg you want to packet into boxes. sry for my bad english :( thanks in advance guys!!!

6 answers to this question

Recommended Posts

Posted

Set the <ID> on this code to the id of the ygg box which contains a certain amount of berries

prontera.gat,144,173,3    script    Berry Trader#1:BT    91,{

    set $@npcname_mpq$, "^4000C0[Trader]^000000";
    mes $@npcname_mpq$;
    mes "Hi, I'm the Yggdrasil Berry Trader, I can pack them into boxes for easir trading! Would you like to do some packing?";
    next;
    menu "Yes, Please!",L_Berry,"No Thanks.",L_Exit;

L_Berry:
    mes $@npcname_mpq$;
    mes "Input the amount of yggberry you want to pack";
    next;
    input .@amount;
    if ( .@amount == 0 || countitem(607) < .@amount ) {
        mes $@npcname_mpq$;
        mes "Invalid amount";
        close;
    }

    delitem 607, .@amount;
    mes $@npcname_mpq$;
    mes "You really have " +.@amount+ " berrys? Okay, Let's trade!";
    getitem <ID>,1;
    mes ". . .";
    mes "Thank you sweety. Dont ygg too much!";
    close;

LNotEnough:
    mes "You dont have the required items...?";
    mes "Come back when you are actually ready. Now gtfo!";
    close;

Lnotenuff:
    mes "Wtf, come back when you got the goods!";
    close;
L_Exit:
    close;
}

  • Upvote 1
Posted

Set the <ID> on this code to the id of the ygg box which contains a certain amount of berries

prontera.gat,144,173,3    script    Berry Trader#1:BT    91,{

    set $@npcname_mpq$, "^4000C0[Trader]^000000";
    mes $@npcname_mpq$;
    mes "Hi, I'm the Yggdrasil Berry Trader, I can pack them into boxes for easir trading! Would you like to do some packing?";
    next;
    menu "Yes, Please!",L_Berry,"No Thanks.",L_Exit;

L_Berry:
    mes $@npcname_mpq$;
    mes "Input the amount of yggberry you want to pack";
    next;
    input .@amount;
    if ( .@amount == 0 || countitem(607) < .@amount ) {
        mes $@npcname_mpq$;
        mes "Invalid amount";
        close;
    }

    delitem 607, .@amount;
    mes $@npcname_mpq$;
    mes "You really have " +.@amount+ " berrys? Okay, Let's trade!";
    getitem <ID>,1;
    mes ". . .";
    mes "Thank you sweety. Dont ygg too much!";
    close;

LNotEnough:
    mes "You dont have the required items...?";
    mes "Come back when you are actually ready. Now gtfo!";
    close;

Lnotenuff:
    mes "Wtf, come back when you got the goods!";
    close;
L_Exit:
    close;
}

hey Patskie thanks for reply i test this script but the npc doesn't appear.

Posted

Set the <ID> on this code to the id of the ygg box which contains a certain amount of berries

Make sure before posting a script to turn off the Rich-Text Editor (Light Switch in top left) to keep tabs.

hey Patskie thanks for reply i test this script but the npc doesn't appear.

You just need to retab the header.
prontera.gat,144,173,3	script	Berry Trader#1:BT	91,{
  • Upvote 1
Posted

Set the <ID> on this code to the id of the ygg box which contains a certain amount of berries

Make sure before posting a script to turn off the Rich-Text Editor (Light Switch in top left) to keep tabs.

>hey Patskie thanks for reply i test this script but the npc doesn't appear.

You just need to retab the header.
prontera.gat,144,173,3	script	Berry Trader#1:BT	91,{

 

ok Skorm after i retab header npc its shown but now when i click it nothing happen it doesnt talk! :(

Posted

ok Skorm after i retab header npc its shown but now when i click it nothing happen it doesnt talk! :(

Did you make sure to search for:
getitem <ID>,1;
and replace <ID> with the number you use for Ygg box, because it works fine for me.

Example:

getitem 617,1;
  • Upvote 1
Posted

ok Skorm after i retab header npc its shown but now when i click it nothing happen it doesnt talk! :(

Did you make sure to search for:
getitem <ID>,1;
and replace <ID> with the number you use for Ygg box, because it works fine for me.

Example:

getitem 617,1;

WOWOWO!! ty very much guys its working now, my problem was i replace the id like this <14232> but after i remove <> its working good ^_^

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