Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 14:07

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] query in sql

Discussion on [Help] query in sql within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
Svinseladden's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 675
Received Thanks: 240
[Help] query in sql

there is some easy query's already in this forum. but i hope some will share there other too. or i have one i realy want and can't make for mye self.

when you get a username that has payed for points (AP) (DP) and so on

is there a query to add to already points. so i don't just change it to 70 000 if he already have 20 000 and pays for 70 000.

i want something to add 70 000 to 20 000 so i get 90 000 and not just change it to 70 000 and all the points he/she hade is gone.

i don't know the query for add to already unknown point

i already have alot of query's and i found out how to change some of them to how i want it:-)

(i can share what i found out. if anyone have a better working stuff please share)

like:

UPDATE dbo.MobItems
SET Grade = 'x'
WHERE Grade = 'x'

i use this when i start and have alot of grades past 998 to just change it to a normal working grade

this can be changed in any way possible like:

UPDATE dbo.x where x is what dbo you want to work in
SET x = 'x' here you can put in anything you want to set in that dbo
WHERE x = 'x' here you can put in anything you already now in that dbo.

it's easy. or was for me:-)

and if you want to know what items you have in what grade? just use

select * from ps_gamedefs.dbo.items
where grade= 'x' where x is the grade you want to check

here to you can search in any way you would ever need to check where what is. like what mob have what grade?

select * from ps_gamedefs.dbo.MobItems
where grade= 'x' what grade your looking for.

and finaly i use this ti add item to a grade i already have

UPDATE ps_gamedefs.dbo.items
SET Grade= '0'
WHERE ItemID= '0'
OR ItemID= '0'
OR ItemID= '0'
OR ItemID= '0'
OR ItemID= '0'
OR ItemID= '0'

lets say 968 have armor for lvl 70 and i have forgot the gloves that has the id 23456 (not the right number)

this would look like:


UPDATE ps_gamedefs.dbo.items
SET Grade= '968'
WHERE ItemID= '23456'
and run the query and your done.

let's say you all the mobs that have grade 450 drop too litle and you want to raise the droprate you can use this too

UPDATE dbo.MobItems
SET DropRate = 'x' what you want to change it too
WHERE Grade = 'x' what grade you want to change the droprate on.

PS: remeber this does this with all the mobs that have that grade..

hope this helps
Svinseladden is offline  
Old 05/31/2011, 17:51   #2
 
elite*gold: 0
Join Date: Aug 2009
Posts: 13
Received Thanks: 4
This should do :

Code:
USE PS_UserData;
UPDATE Users_Master
SET Point = (Point + 3000)
WHERE UserID = 'UserID'
darkmanx1986 is offline  
Old 05/31/2011, 17:59   #3
 
Svinseladden's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 675
Received Thanks: 240
Quote:
Originally Posted by darkmanx1986 View Post
This should do :

Code:
USE PS_UserData;
UPDATE Users_Master
SET Point = (Point + 3000)
WHERE UserID = 'UserID'
ty so much:-)
Svinseladden is offline  
Old 05/31/2011, 19:57   #4
 
abrasive's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 262
Received Thanks: 812
Be careful with that, if there is a deleted toon with that same name on another account, the other account will also receive the points.

I'd recommend going by UserUID when doing that
abrasive is offline  
Thanks
1 User
Old 05/31/2011, 20:44   #5
 
castor4878's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,367
deleted or not - checking duplicate name upon creation is optional.
but explain this to someone who has just learned the addition can be a bit complicated.
castor4878 is offline  
Old 06/01/2011, 10:17   #6
 
Svinseladden's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 675
Received Thanks: 240
i was sure this did go after userId and not char id?
Svinseladden is offline  
Old 06/06/2011, 09:48   #7
 
elite*gold: 0
Join Date: Nov 2009
Posts: 77
Received Thanks: 20
heres a creat procedure to make for your database to give out points buy simply eecuteing the quary after you creat it all you input is the userid (accountname) and points to give...


USE [PS_GMTool]
GO
/****** Object: StoredProcedure [dbo].[IPBan] Script Date: 06/06/2011 00:39:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*================================================= =
@author [DEV]xXDASHXx
================================================== */
create Proc [dbo].[DonationPointHandout]
@UserID VARCHAR(100),
@Point INT

AS

UPDATE PS_UserData.dbo.Users_Master SET Point=ISNULL(Point,0)+@Point
WHERE UserID=@UserID


SET NOCOUNT OFF
ac1dtab is offline  
Reply


Similar Threads Similar Threads
Wo ist die Query?
09/24/2010 - Metin2 Private Server - 4 Replies
Hi Com, Da ich mich nicht damit auskenne dachte ich, ich frage euch mal, man muss ja bei neuen Rüssis, Waffen, Reittieren die Query benutzen, aber wo ist die und wie benutz man die? MfG
[Suche]Query für "Alteklinge, Reichsklinge" &' Stichdolche NUR QUERY!
08/18/2010 - Metin2 Private Server - 1 Replies
Ich weiß ich werd nervig aber ich suche die Query's für Alteklinge, Reichsklinge &' Strichdolche Why? Naya, weil ich in der DB i-wie nur Drachenmaulglocke hab ... not more -.- Auf jeden Fall Icon's etc. etc. etc. hab ich ich brauche nur die Query's
query
05/05/2010 - Metin2 Private Server - 0 Replies
So es gab mal ein ttut wie man query fur navicat usen kan nur ich finde in nicht mehr hat jemand den link?
A Query
03/02/2010 - 12Sky2 - 6 Replies
Hi, First off, i'm an addict for 12sky 2. I play both 12sky 2 PH and 12sky 2 aeria. All the hax i find here for aeria server has been very helpful. Apparently, things are quite the opposite for 12sky2 ph server since we have Xtrap. So hacking is quite impossible for PH. Lately there has been major issues in PH server like some people using cheats/hacks. Fact is, there are already people banned in PH server for using hax. Anyway, been trying to find a way to hack 12sky 2 ph server but...



All times are GMT +1. The time now is 14:07.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.