Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rohan
You last visited: Today at 09:40

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

 

How to send items to all accounts.Rohan

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 31
Received Thanks: 0
How to send items to all accounts.Rohan

Hi how can i send items directly to there event or item mall inventory? please need some help .



exstrike1234 is offline  
Old   #2
 
elite*gold: 0
Join Date: Nov 2008
Posts: 196
Received Thanks: 20
You have to create SQL statement which loops adding value to Rohangame .dbo. TEventItem for every user


Marvetick is offline  
Old   #3

 
elite*gold: 33
The Black Market: 100/0/2
Join Date: Jan 2011
Posts: 2,693
Received Thanks: 454
Quote:
Originally Posted by exstrike1234 View Post
Hi how can i send items directly to there event or item mall inventory? please need some help .
GO
DECLARE @a Integer = 100
DECLARE @i Integer
SELECT @i = COUNT(id) FROM dbo.TCharacter
SET @i = @i + 100
WHILE (@a < @i)
BEGIN
INSERT INTO dbo.TEventItem (type, attr, stack, rank, equip_level, equip_dexterity, equip_intelligence, equip_strength, char_id) VALUES (0, 0, 0, 0, 0, 0, 0, 0, @a)
SET @a = @a + 1
END

Just change the 100 to your the first Char ID on your DB from dbo.TCharacter. It will count every Char on the Server and send it to Event Inventar.
Dr.Dr.SheldonLeeCooper is offline  
Thanks
1 User
Old   #4
 
elite*gold: 0
Join Date: May 2009
Posts: 639
Received Thanks: 198
That's what Dr.Dr.SheldonLeeCooper Said is right. I did a little differently. Why? Simple no one will have access to the server. Only I.
I made a simple program in Java that logs on the server and gives you the options for those who send or even send to all.
An easy way is also using php, makes an Administrator page with the script does a FOREACH only for the ID_CHAR and within that FOR Insert SQL.

Each has a way I prefer more security


oziel235 is offline  
Old   #5
 
elite*gold: 0
Join Date: Feb 2011
Posts: 333
Received Thanks: 107
It's a bit more elegant this way

Code:
INSERT INTO [RohanGame].[dbo].[TEventItem] SELECT
           1 -- [type]
           ,0x00 -- attr
           ,1 -- stack
           ,1 -- rank
           ,1 -- equip level
           ,1 -- str
           ,1 -- dex
           ,1 -- int
           ,id -- char id
           , GETDATE() -- date
            FROM RohanGame.dbo.TCharacter
zzerachiel is offline  
Thanks
1 User
Old   #6
 
elite*gold: 0
Join Date: May 2009
Posts: 639
Received Thanks: 198
Talking

Quote:
Originally Posted by zzerachiel View Post
It's a bit more elegant this way
The only difference is that zzerachiel your code does not loop. Inserts one record at a time.
And as the question was to send items to all the accounts. Better place with Loop.
Code:
 

GO
 DECLARE @a Integer = 100
 DECLARE @i Integer
 SELECT @i = COUNT(id) FROM dbo.TCharacter
 SET @i = @i + 100

 WHILE (@a < @i)
 BEGIN
  INSERT INTO dbo.TEventItem (type, attr, stack, rank, equip_level, equip_dexterity, equip_intelligence, equip_strength, char_id) 
  VALUES (0, 0, 0, 0, 0, 0, 0, 0, @a)
  SET @a = @a + 1
END
oziel235 is offline  
Old   #7
 
elite*gold: 0
Join Date: Feb 2011
Posts: 333
Received Thanks: 107
Since when looping a few thousand times is better than adding all of them at once?

Not to mention that with my code you don't need to know the starting character id, nor the end.

What would your code do if there are gaps in the character_id?

I mean, it's nice that you managed to get a one line statement and turn it into 10 lines, while loosing performance.
zzerachiel is offline  
Old   #8
 
elite*gold: 0
Join Date: May 2009
Posts: 639
Received Thanks: 198
Quote:
Originally Posted by zzerachiel View Post
Since when looping a few thousand times is better than adding all of them at once?

Not to mention that with my code you don't need to know the starting character id, nor the end.

What would your code do if there are gaps in the character_id?

I mean, it's nice that you managed to get a one line statement and turn it into 10 lines, while loosing performance.
You're right with the Loop loses a bit of performance.
But I replied the post with the Loop because unfortunately I couldn't run your code. may be I missed something. But it's not working for me
oziel235 is offline  
Old   #9
 
elite*gold: 0
Join Date: Feb 2011
Posts: 333
Received Thanks: 107
You must register and activate your account in order to view images.

Works.

All i said is that my code is a bit more elegant.
zzerachiel is offline  
Thanks
1 User
Old   #10
 
elite*gold: 0
Join Date: May 2009
Posts: 639
Received Thanks: 198
Perfect!
But it's not working for me! -_-
oziel235 is offline  
Old   #11
 
elite*gold: 0
Join Date: Feb 2011
Posts: 333
Received Thanks: 107
If you edited TEventItem structure, it won't work
zzerachiel is offline  
Old   #12
 
elite*gold: 0
Join Date: May 2009
Posts: 639
Received Thanks: 198
Something in my SQL Server was blocking I have a paid version ... installed some additional patch's dai stopped working the sql scripts. but now it's working is bug.
oziel235 is offline  
Old   #13
 
elite*gold: 0
Join Date: Jul 2013
Posts: 79
Received Thanks: 51
Quote:
Originally Posted by zzerachiel View Post
You must register and activate your account in order to view images.

Works.

All i said is that my code is a bit more elegant.
omg!! what hell is that of pict .. seem i need re-school to understand it
moviper is offline  
Old   #14
 
elite*gold: 0
Join Date: May 2009
Posts: 639
Received Thanks: 198
Quote:
Originally Posted by moviper View Post
omg!! what hell is that of pict .. seem i need re-school to understand it
is a SQL script to insert items in EventInventory.
oziel235 is offline  
Old   #15
 
elite*gold: 0
Join Date: Mar 2013
Posts: 30
Received Thanks: 5
Quote:
Originally Posted by zzerachiel View Post
It's a bit more elegant this way

Code:
INSERT INTO [RohanGame].[dbo].[TEventItem] SELECT
           1 -- [type]
           ,0x00 -- attr
           ,1 -- stack
           ,1 -- rank
           ,1 -- equip level
           ,1 -- str
           ,1 -- dex
           ,1 -- int
           ,id -- char id
           , GETDATE() -- date
            FROM RohanGame.dbo.TCharacter
How to send it if certain players?


dedeernet is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
any one can send me English Vm Ware rohan
any one can send me English Vm Ware rohan up!
0 Replies - Rohan
anyone please send me a link for xor rohan bot
hi there i need a link for bot in xor rohan, please if anyone know about bots that properly works for windows xp kindly just post a link here or you...
6 Replies - Rohan
Selling Xor Rohan accounts, characters, money and items
Right now I have A LOT of Xor Rohan accounts. So if you are interesting having a Pro account or simply buy crones or even items you can pm me. ...
17 Replies - Rohan
how to send items that can not be transferred?
how to send items that can not be transferred.For example how to pass for level 50 pet to another account
3 Replies - Shaiya



All times are GMT +2. The time now is 09:40.


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

Support | Contact Us | FAQ | Advertising | Privacy Policy
Copyright ©2017 elitepvpers All Rights Reserved.