Register for your free account! | Forgot your password?

Go Back   elitepvpers › Popular Games › Silkroad Online › SRO Private Server
You last visited: Today at 17:58

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

Advertisement



i need to send item for all players

Discussion on i need to send item for all players within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2019
Posts: 6
Received Thanks: 0
i need to send item for all players

i want to make a query to send item or make any update on _Char with 1 query to all chars in game but i don't need this one
Quote:
DECLARE @CharName VARCHAR(64),
@ItemCodeName VARCHAR(64) = 'ITEM_VICTOR_LOTTERY_ITEM'
DECLARE item_cur CURSOR FOR
SELECT DISTINCT CharName16 FROM _Char where CurLevel = 130 ORDER BY CharName16

OPEN item_cur
FETCH NEXT FROM item_cur INTO @CharName
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC _ADD_ITEM_EXTERN @CharName, @ItemCodeName, 1, 0
FETCH NEXT FROM item_cur INTO @CharName
END

PRINT @CharName
CLOSE item_cur

DEALLOCATE item_cur
Sclupter is offline  
Old   #2
Trade Restricted

 
elite*gold: LOCKED
Join Date: Feb 2020
Posts: 586
Received Thanks: 174
Don't forget to change [Mention] to @
Code:
USE SRO_VT_SHARD
GO
DECLARE  [MENTION=3898309]charname[/MENTION] VARCHAR(64),
  [MENTION=1134588]item[/MENTION]CodeName VARCHAR(64) = 'ITEM_CH_SWORD_01_A'	--Item's codename

DECLARE item_cur CURSOR FOR
SELECT DISTINCT CharName16 FROM _Char ORDER BY CharName16

	OPEN item_cur
		FETCH NEXT FROM item_cur INTO  [MENTION=3898309]charname[/MENTION]
			WHILE @@FETCH_STATUS = 0
				BEGIN
					EXEC _ADD_ITEM_EXTERN  [MENTION=3898309]charname[/MENTION],  [MENTION=1134588]item[/MENTION]CodeName, 1, 0  --params: CharName, ItemCodeName, Data(quantity or durability), OptLevel
					FETCH NEXT FROM item_cur INTO  [MENTION=3898309]charname[/MENTION]
				END
		
		PRINT  [MENTION=3898309]charname[/MENTION]
	CLOSE item_cur

DEALLOCATE item_cur
JoleChow* is offline  
Old   #3
 
elite*gold: 0
Join Date: Dec 2019
Posts: 6
Received Thanks: 0
Quote:
Originally Posted by JoleChow* View Post
Don't forget to change [Mention] to @
Code:
USE SRO_VT_SHARD
GO
DECLARE  [MENTION=3898309]charname[/MENTION] VARCHAR(64),
  [MENTION=1134588]item[/MENTION]CodeName VARCHAR(64) = 'ITEM_CH_SWORD_01_A'	--Item's codename

DECLARE item_cur CURSOR FOR
SELECT DISTINCT CharName16 FROM _Char ORDER BY CharName16

	OPEN item_cur
		FETCH NEXT FROM item_cur INTO  [MENTION=3898309]charname[/MENTION]
			WHILE @@FETCH_STATUS = 0
				BEGIN
					EXEC _ADD_ITEM_EXTERN  [MENTION=3898309]charname[/MENTION],  [MENTION=1134588]item[/MENTION]CodeName, 1, 0  --params: CharName, ItemCodeName, Data(quantity or durability), OptLevel
					FETCH NEXT FROM item_cur INTO  [MENTION=3898309]charname[/MENTION]
				END
		
		PRINT  [MENTION=3898309]charname[/MENTION]
	CLOSE item_cur

DEALLOCATE item_cur
i literally said i don't need this one ...
Sclupter is offline  
Old   #4
dotCom
 
Devsome's Avatar
 
elite*gold: 10077
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 17,397
Received Thanks: 4,966
Quote:
Originally Posted by Sclupter View Post
i literally said i don't need this one ...
But this works and it does what you wanted, so tell us why you do not want this one?
Devsome is offline  
Old   #5
Trade Restricted

 
elite*gold: LOCKED
Join Date: Feb 2020
Posts: 586
Received Thanks: 174
Quote:
Originally Posted by Sclupter View Post
i literally said i don't need this one ...
it does the job but if you have problem with that so you can easily build your own query
JoleChow* is offline  
Old   #6
 
elite*gold: 0
Join Date: Jul 2020
Posts: 166
Received Thanks: 15
You can do it by Locate Players at table and put it CharName , Done and give it name like Gift_Players

Like this

CharName Done
Player1 0
Player2 0
Player3 0
Player4 0

Declare @ Varchar(30) = (Select Top 1 CharName from Gift_Player where Done = 0 )

EXEC _ADD_ITEM_EXTERN @ , @CodeName, 1, 0

UPDATE Gift_Player set Done = 1 where CharName = @

GO 4 -- The Players Count at table
kotsh23 is offline  
Old   #7
 
Skedaddle!'s Avatar
 
elite*gold: 0
Join Date: May 2020
Posts: 46
Received Thanks: 22
Quote:
Originally Posted by kotsh23 View Post
You can do it by Locate Players at table and put it CharName , Done and give it name like Gift_Players

Like this

CharName Done
Player1 0
Player2 0
Player3 0
Player4 0

Declare @ Varchar(30) = (Select Top 1 CharName from Gift_Player where Done = 0 )

EXEC _ADD_ITEM_EXTERN @ , @CodeName, 1, 0

UPDATE Gift_Player set Done = 1 where CharName = @

GO 4 -- The Players Count at table
Completely wrong thinking. But a while loop to create a temporary table and do the job?

Here you go!

Quote:
DECLARE @_Char TABLE(CharName16 VARCHAR(64))
INSERT @_Char SELECT CharName16 FROM SRO_VT_SHARD.._Char

WHILE EXISTS(SELECT * FROM @_Char)
BEGIN
DECLARE @CharName16 VARCHAR(64) = (SELECT TOP 1 CharName16 FROM @_Char)
EXEC SRO_VT_SHARD.._ADD_ITEM_EXTERN @CharName16, 'ITEM_ETC_ARENA_COIN', 1, 1
DELETE FROM @_Char WHERE CharName16 = @CharName16
END
Skedaddle! is offline  
Reply


Similar Threads Similar Threads
Send item to multiple players
12/23/2018 - Shaiya PServer Development - 0 Replies
I created this: declare slot tinyint, Empty smallint declare UserUid table (useruid int) insert into UserUid (useruid) select UserUID from PS_UserData.dbo.Users_master SET slot = 0
Send an item to all players!
08/25/2014 - Dekaron Private Server - 4 Replies
Send an item through the mail to all players on your server. Run this first to create the Stored Procedure: USE GO /****** Object: StoredProcedure . Script Date: 12/17/2012 12:04:24 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON
How to send item just for Online Players
05/11/2014 - Rohan - 3 Replies
Hi Guys ! Many times i asked to people in elitepvpers but no one respond me :( i was search it but i cant find it >,< if you know how to send item just for online players please share it :) thx before :D
Storm hack with .send | .send lesson Part 1
08/21/2010 - Kal Online - 30 Replies
This is lesson 1 of what useful things .send can do =P later i'll post some more nice things I know that kocp dont allow kalhackit... but u can have some fun with it on servers without kocp or if you smart enough you can do it on servers without kalhackit or even on int if you even smarter :P First of all you need KalHackIt that works on private server with sniffing (Download attached... thx to syntex for the snif.ini add)
[osds] problem send item & send weapon
11/12/2009 - Dekaron Private Server - 3 Replies
Hello i have 2 problems with osds control panel when i try to send weapon i have no more weapon available i cant choice i have nothing but i can send armor succesfully and my second problem is send item when i try to send item the browser say Login Error, Please login again.anyone can be fix that please? i post screenshots http://panzer.power-heberg.com/itembug.JPG http://panzer.power-heberg.com/noweapon.JPG



All times are GMT +1. The time now is 18:00.


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.