Jump to content
  • 0

Question

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
OnSellItem:
	set .@TotalEarn,0;	
		for(set .@j,0; .@j < getarraysize( .bitem ); set .@j,.@j+1)
			if( @sold_nameid[.@i] == .bitem[.@j] ) {
				set .@TotalEarn,.@TotalEarn + ( .bprice[.@j] * @sold_quantity[.@i] );
					set Zeny,Zeny + .@TotalEarn;
					for(set .@i,0; .@i < getarraysize( @sold_nameid ); set .@i,.@i+1)
						delitem @sold_nameid[.@i],@sold_quantity[.@i];
						close;
				} else {
						mes "Sorry I dont buy that kind of item";
						close;
					}

setarray .bitem[0],501,502; //== Item
setarray .bprice[0],1000,2000; //== Item Price [Sell]

A Simple One. :))

Edited by crazyarashi
  • 0
Posted
2 hours ago, crazyarashi said:

OnSellItem:
	set .@TotalEarn,0;	
		for(set .@j,0; .@j < getarraysize( .bitem ); set .@j,.@j+1)
			if( @sold_nameid[.@i] == .bitem[.@j] ) {
				set .@TotalEarn,.@TotalEarn + ( .bprice[.@j] * @sold_quantity[.@i] );
					set Zeny,Zeny + .@TotalEarn;
					for(set .@i,0; .@i < getarraysize( @sold_nameid ); set .@i,.@i+1)
						delitem @sold_nameid[.@i],@sold_quantity[.@i];
						close;
				} else {
						mes "Sorry I dont buy that kind of item";
						close;
					}

setarray .bitem[0],501,502; //== Item
setarray .bprice[0],1000,2000; //== Item Price [Sell]

A Simple One. :))

thanks u ill try this

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