Jedzkie 58 Posted November 17, 2013 hi! as the title says, how can i update my account_data through query_sql? thanks! Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted November 17, 2013 CREATE TABLE IF NOT EXISTS `account_data` (`account_id` int(11) unsigned NOT NULL default '0',`bank_vault` int(11) unsigned NOT NULL default '0',`base_exp` TINYINT( 4 ) UNSIGNED NOT NULL default '100',`base_drop` TINYINT( 4 ) UNSIGNED NOT NULL default '100',`base_death` TINYINT( 4 ) UNSIGNED NOT NULL default '100',PRIMARY KEY (`account_id`)) ENGINE=MyISAM; For example you want to add 1 zeny from your vault everytime you click this npc : prontera,150,150,0 script Sample 123,{ query_sql "UPDATE `account_data` SET `bank_vault` = `bank_vault` + 1 WHERE `account_id` = '" +getcharid(3)+ "'"; end;} Quote Share this post Link to post Share on other sites
0 Jedzkie 58 Posted November 17, 2013 thanks for your reply, but how can i make it in base_Exp, and base_drop and death>? Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted November 17, 2013 What you want to be done specifically? Quote Share this post Link to post Share on other sites
0 Jedzkie 58 Posted November 17, 2013 For example if i talk to the npc it will give me 7 days vip service. I try a your post but i have a problem, it does not add another column for other accounts, one column only and if other account talked to the npc, it overwrite the first account. Quote Share this post Link to post Share on other sites
0 Patskie 88 Posted November 19, 2013 If you want to make a vip service then you might need to create another table for that to store their names and other basic info Quote Share this post Link to post Share on other sites
0 ossi0110 200 Posted November 19, 2013 For example if i talk to the npc it will give me 7 days vip service. I try a your post but i have a problem, it does not add another column for other accounts, one column only and if other account talked to the npc, it overwrite the first account. you can update the VIP System with set ModExp,150; it changes the value in sql to 150 what you means you got 50% more exp ( 100% is basic + 50% = 150) so you dont need a query_sql for it Quote Share this post Link to post Share on other sites
0 Jedzkie 58 Posted November 19, 2013 For example if i talk to the npc it will give me 7 days vip service. I try a your post but i have a problem, it does not add another column for other accounts, one column only and if other account talked to the npc, it overwrite the first account. you can update the VIP System with set ModExp,150; it changes the value in sql to 150 what you means you got 50% more exp ( 100% is basic + 50% = 150) so you dont need a query_sql for it can you make a sample script for that? thanks! Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted November 19, 2013 Main problem with this, is that you need to set the expiration time somewhere else since you can't track that with current `account_data` table... Quote Share this post Link to post Share on other sites
0 ossi0110 200 Posted November 19, 2013 (edited) For example if i talk to the npc it will give me 7 days vip service. I try a your post but i have a problem, it does not add another column for other accounts, one column only and if other account talked to the npc, it overwrite the first account. you can update the VIP System with set ModExp,150; it changes the value in sql to 150 what you means you got 50% more exp ( 100% is basic + 50% = 150) so you dont need a query_sql for it can you make a sample script for that? thanks! you can try this one , its binded over a Function to a item . I use Vip Tickets for it just add this into your item what should give the VIP Status after using the Item you can check your remaining time with @vip { Id: YOUR ITEM ID HERE AegisName: "VIP Ticket 3D" Name: "VIP Ticket 3D" Type: 0 Weight: 10 Job: 0x7FFFFFFF Script: <" if(#vip_status >0) { dispbottom "You allready got a Premium Service Running , Use another one after the Time Runs out.!"; getitem YOUR ITEM ID HERE,1; end; } callfunc "getVIP", 3 * 24 * 3600; //VIP Status for 3 Day , change the 3 into 7 for 7 Days. ">}, Code will be readded , changing some stuff Edited November 19, 2013 by ossi0110 Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted November 19, 2013 ossi0110, what if the vip timer runs out while you're logged in? Quote Share this post Link to post Share on other sites
0 karazu 33 Posted November 21, 2013 (edited) CREATE TABLE IF NOT EXISTS `account_data` (`account_id` int(11) unsigned NOT NULL default '0',`bank_vault` int(11) unsigned NOT NULL default '0',`base_exp` TINYINT( 4 ) UNSIGNED NOT NULL default '100',`base_drop` TINYINT( 4 ) UNSIGNED NOT NULL default '100',`base_death` TINYINT( 4 ) UNSIGNED NOT NULL default '100',PRIMARY KEY (`account_id`)) ENGINE=MyISAM; For example you want to add 1 zeny from your vault everytime you click this npc : would this affect the account saved in my server? and can i add this even if my server is running? Edited November 21, 2013 by karazu Quote Share this post Link to post Share on other sites
0 karazu 33 Posted November 24, 2013 done, thank you! Quote Share this post Link to post Share on other sites
hi! as the title says, how can i update my account_data through query_sql? thanks!
Share this post
Link to post
Share on other sites