Jump to content
  • 0

R> ygg = tcg newbie here


gyroguevarra

Question


  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   1
  • Joined:  09/17/13
  • Last Seen:  

you have 500ygg then in npc you got 5tcg (500ygg to 5tcg) thank you 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   2
  • Joined:  04/21/12
  • Last Seen:  

sorry posted something I was working on and realized there was an error will try to fix it asap.

Well I can't seem to find the break atm but this should atleast give you an idea of how to approach the issue...

prontera,147,172,5	script	Exchanger	47,{
set .@npcname$, "^0000FF[ Braggi ]^000000";
set .@item,607; //itemid to exchange for reward
set .@reward,7227; //itemid for reward item
set .@price, 100; //#of cost items to exchange per #rewards
set .@numReward, 1; //#of reward items costtoreward will get you. 
//Checking #of items
set .@count, countitem( .@item );
//End Prep
mes .@npcname$;
mes "Hello! I Will Exchange";
mes ""+getitemname( .@item )+" into "+getitemname( .@reward )+"";
mes "You currently have "+.@count+""; 
if(.@count >= .@price ) {
	mes "How many "+getitemname( .@reward )+" will you trade for?";
	input .@amount;
   if (.@count < (.@amount * .@price)){
		mes .@npcname$;
		mes "I'm sorry but you do not have enough";
		mes ""+getitemname( .@item )+" to convert into "+(.@numReward * .@amount)+" "+getitemname( .@reward )+".";
		end;
		} else {
	delitem .@item,( .@amount * .@price );
	getitem .@reward,( .@amount * .@numReward);
	mes "Have a nice day!";
}
}
close;
}

Fixed...

Currently takes in the #of TCG cards you want good luck!

Edited by Echo
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   2
  • Joined:  04/21/12
  • Last Seen:  

Okat thankyou

Sorry I used the wrong item ID for the TCG slot you will need to change the .@reward variable to the correct itemID! (in my test server it is showing up as Bossnia Entrance Ticket) Could just be a mistake on my side lol....

Edited by Echo
Link to comment
Share on other sites


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


if( countitem( 607 ) >= 500 ){

delitem 607,500;

getitem 7227,1;

}

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