[help] Shop flags and Castles owners

03/21/2010 00:21 zspider#1
can any one right script to remove shop flags and castles old owners i tried every rest DB script here and non one of them work for that can any one tell me
thank you :)
03/21/2010 01:04 Knight^Hawk#2
sure i will when i get home from my walk.


Edit: couldnt figure out how to make a easy UPDATE script lol but here it is.
03/21/2010 02:36 King_Arthur#3
Did you try this?
Quote:
Originally Posted by King_Arthur View Post
Update cq_dynanpc set datastr = 'None', owner_name = default_owner_name, ownerid = 0, price = initial_price, deposit = 0 where ownerid > 9999;
03/21/2010 02:55 Knight^Hawk#4
wouldnt u hav to do one for every ID king?
03/21/2010 03:04 King_Arthur#5
Quote:
Originally Posted by Knight^Hawk View Post
wouldnt u hav to do one for every ID king?
Nope mines all in one. It finds anything owned by a player (where ownerid > 9999)
03/21/2010 03:06 Knight^Hawk#6
did not know that u can use > or < in a query ^^
03/21/2010 03:11 King_Arthur#7
Quote:
Originally Posted by Knight^Hawk View Post
did not know that u can use > or < in a query ^^
*tip toes slightly off topic* :D Yes there are plenty of operators available in mysql: [Only registered and activated users can see links. Click Here To Register...]
03/21/2010 03:23 Knight^Hawk#8
Code:
Update cq_dynanpc set datastr = 'None', owner_name = 'None', default_owner_name = 'None', ownerid = '0' where name ='Castle'; 

or 
for every id

Update cq_dynanpc set datastr = 'None', owner_name = 'None', default_owner_name = 'None', ownerid = '0' where id < 99999999;
these might be more useful to ur needings zspider

some credits go to King_Arthur
03/21/2010 15:00 zspider#9
ok guys all this script just change the owners name of Shop flag and castles from owner name to None and don't remove it's prize how to remove it's old prize and make with normal prize
03/21/2010 17:34 King_Arthur#10
Quote:
Originally Posted by zspider View Post
ok guys all this script just change the owners name of Shop flag and castles from owner name to None and don't remove it's prize how to remove it's old prize and make with normal prize
I never thought of that! Thanks.

Updated script:
Code:
Update cq_dynanpc set datastr = 'None', owner_name = default_owner_name, ownerid = 0, price = initial_price, deposit = 0 where ownerid > 9999;