Jump to content

Question

Posted (edited)

So i've made the script on THIS POST that have been helped by @Emistry and @Mephisto

and i tried to modify them also.. and then i start trying to make a log on SQL .. but they didnt work /an

So this is the script i have modified ( well.. i cut to the point on the errors )

 

.@count_20450 = countitem( 20450 );
	delitem 20450, .@count_20450;
	getitem 32502, ( .@count_20450 * 10 );

	.@count_32171 = countitem( 32171 );
	delitem 32171, .@count_32171;
	getitem 32502, ( .@count_32171 * 7 );

	mes "Exchanged "+.@count_20450+"x "+getitemname( 20450 )+" to "+( .@count_20450 * 10 )+"x "+getitemname( 32502 );
	mes "Exchanged "+.@count_32171+"x "+getitemname( 32171 )+" to "+( .@count_32171 * 7 )+"x "+getitemname( 32502 );
	
	close;
	
OnInit:
	query_sql "CREATE TABLE IF NOT EXISTS `returned` (`code` TINYTEXT NOT NULL, `item_id` INT NOT NULL, `item_amount` INT NOT NULL, INDEX `code` (`code`(32)) ) ENGINE=MyISAM";

	
}

 

Oh, and also.. the NPC need to make them to type " YES " before the script runs.. how do i put them ?

Any helps ? XD

Edited by skyroofficial
another request

6 answers to this question

Recommended Posts

  • 0
Posted
39 minutes ago, Ninja said:

I think all activities about items can be seen in itemlog sql table. You don't need to do something like this. Have checked it?

yes but you know.. there are alot.. lots of the list on the logs..:ani_swt3:

so thats why i tried to make a separate logs just to monitor those specified items in that specified npc that i made :meow:

anyways , thanks for the reply tho /no1

  • 0
Posted
9 hours ago, skyroofficial said:

yes but you know.. there are alot.. lots of the list on the logs..:ani_swt3:

so thats why i tried to make a separate logs just to monitor those specified items in that specified npc that i made :meow:

anyways , thanks for the reply tho /no1

You only need to learn how to use SQL and in my opinion it is fairly easy. :)

  • 0
Posted
10 hours ago, Ninja said:

You only need to learn how to use SQL and in my opinion it is fairly easy. :)

yep . already solved it few hours ago /no1

 

and thus.. theres this one left 

On 5/22/2017 at 7:23 PM, skyroofficial said:

Oh, and also.. the NPC need to make them to type " YES " before the script runs.. how do i put them ?

 

 

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