|
You last visited: Today at 02:05
Advertisement
Auto Equip Item When Create Char
Discussion on Auto Equip Item When Create Char within the Shaiya Private Server forum part of the Shaiya category.
01/28/2013, 06:54
|
#1
|
elite*gold: 0
Join Date: Jan 2013
Posts: 35
Received Thanks: 9
|
Auto Equip Item When Create Char
Hello.. Does Anyone Know How To Store a Item In Your inventory when you create a char or have it equipted already when u create a char.. i used to know how to do this, but i forgot.. can anyone help me out please? much appreciated<3.. for example: like when u create a char u have x10 apples in your inventory etc.. thanks
|
|
|
01/28/2013, 07:15
|
#2
|
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,632
|
mh where would it maybe be an intresting question isnt it? lets take a deeper view.
Might be be maybe in the database in sql? oh gosh t is ö.Ö now we need to find where it is in the database mh..... what about ps_gamedefs? lets take a look.
OH there is a tabled called BaseItemsDefs!!! epic i will take a look into it and will post later if it is what u are searching for.
|
|
|
01/29/2013, 13:48
|
#3
|
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
|
GENIUS !!
Teddy your sarcasm wasn't really appropriate since you didn't reply to the second part of his question. BaseItemsDefs won't make your gear be immediately equipped on the player.
I tried to make my chars start with gear already on them via the Create_Char_R procedure and I might have screwed something up as I was getting the "Name already in use" error. Still, it should be possible through a trigger.
|
|
|
01/29/2013, 19:40
|
#4
|
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,632
|
Quote:
Originally Posted by nubness
GENIUS !!
Teddy your sarcasm wasn't really appropriate since you didn't reply to the second part of his question. BaseItemsDefs won't make your gear be immediately equipped on the player.
I tried to make my chars start with gear already on them via the Create_Char_R procedure and I might have screwed something up as I was getting the "Name already in use" error. Still, it should be possible through a trigger.
|
right it musst possible by using a trigger and my post didnt had a bad meaning i was just trolling and i guess all noticed that so ur flame wasnt needed at all  he actually asked for one of this solutions and i gave him 1 so he got the answer he was looking for.
|
|
|
01/29/2013, 20:22
|
#5
|
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
|
So your trolling is fine and mine is flame ? Cool !!
|
|
|
01/29/2013, 23:16
|
#6
|
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,632
|
first of all it depends on the way how u act and my trolling wasnt blaming anyone it was just joking around where ur "trolling" wasnt rly trolling since u tried to insult with it.
second this is not the thread to talk about that if u want to continue u are welcome to send me a pm and i will gladly answer u.
|
|
|
07/07/2013, 06:29
|
#7
|
elite*gold: 0
Join Date: Feb 2013
Posts: 36
Received Thanks: 1
|
I'm sorry that raise the subject, but there is the question ...
I changed the procedure [usp_Create_Char_R] but I have a problem with ItemUID, how is generated ItemUID?
|
|
|
07/07/2013, 13:07
|
#8
|
elite*gold: 0
Join Date: Feb 2011
Posts: 195
Received Thanks: 346
|
Quote:
Originally Posted by shakalaka_boom
I'm sorry that raise the subject, but there is the question ...
I changed the procedure [usp_Create_Char_R] but I have a problem with ItemUID, how is generated ItemUID?
|
need use triggers for it, i have this script but i can't give it for free
|
|
|
07/07/2013, 22:39
|
#9
|
elite*gold: 0
Join Date: Jun 2013
Posts: 1,867
Received Thanks: 401
|
So don't say it if you do not plan to release a simple script..
|
|
|
07/08/2013, 03:38
|
#10
|
elite*gold: 0
Join Date: Feb 2013
Posts: 36
Received Thanks: 1
|
Quote:
Originally Posted by anton1312
need use triggers for it, i have this script but i can't give it for free
|
"can't give it for free" Русский я так понял
You misunderstood me, I guess, I do not need to Equip Item on the character, I just need to create a set of objects to issue depending on the level of the choice (15 \ 30 \ 60)
simple addition INSERT INTO. quite work, the only problem is ItemUID, to generate every time a new one, so I do not know how it is generated .... Or could just rand () generit ItemUID, no problems?
I'm a noob in sql ..
|
|
|
07/08/2013, 14:24
|
#11
|
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,367
|
DECLARE @anItemUID uniqueidentifier
SET @anItemUID = NEWID()
itemUID is a bigint (aka int8 or 64 bits) while NEWID generates a 128-bit (CLSID like) value.
this is no implicit (nor explicit) convertion between uniqueidentifier and numeric types, so we have to convert it to string (sole possible conversion), then extract/keep 64 of the 128 bits and finally convert the hexa-string to a bigint value:
Code:
declare @UID uniqueidentifier = NEWID()
declare @str varchar(64) = convert(varchar(64), @UID)
declare @part varchar(64)
declare @itemUID bigint
set @part = SUBSTRING(@str, 15, 4) + SUBSTRING(@str, 25, 12)
set @itemUID = CONVERT(bigint,CONVERT(BINARY(8), @part, 2))
note that a 4294967295 * rand() is likely also valid, the sole purpose of the ItemUID column is to contain an unique identifier (to prevent item dupe and so on), there this is no strong proof of uniqueness of values obtained by NEWID as opposed to rand (both function can internally rely on the same pseudo random generator).
|
|
|
07/08/2013, 15:52
|
#12
|
elite*gold: 0
Join Date: Feb 2011
Posts: 195
Received Thanks: 346
|
Quote:
Originally Posted by shakalaka_boom
"can't give it for free" Русский я так понял
You misunderstood me, I guess, I do not need to Equip Item on the character, I just need to create a set of objects to issue depending on the level of the choice (15 \ 30 \ 60)
simple addition INSERT INTO. quite work, the only problem is ItemUID, to generate every time a new one, so I do not know how it is generated .... Or could just rand () generit ItemUID, no problems?
I'm a noob in sql ..
|
на самом деле там все просто, 1 триггер и все решено, его даже создавать не нужно, а просто дописать
|
|
|
07/09/2013, 02:46
|
#13
|
elite*gold: 0
Join Date: Feb 2013
Posts: 36
Received Thanks: 1
|
Thanks castor4878
Quote:
Originally Posted by anton1312
на самом деле там все просто, 1 триггер и все решено, его даже создавать не нужно, а просто дописать
|
ты про какой тригер? у меня только 1 тригер Trig_Chars_INSERT...в общем то все работает и через процедуру Create_Char_R, проблема была только в itemUID, если я правильно понял, то можно спокойно генерить itemUID, главное что бы он был уникальным.
|
|
|
07/09/2013, 13:39
|
#14
|
elite*gold: 0
Join Date: Feb 2011
Posts: 195
Received Thanks: 346
|
Quote:
Originally Posted by shakalaka_boom
Thanks castor4878
ты про какой тригер? у меня только 1 тригер Trig_Chars_INSERT...в общем то все работает и через процедуру Create_Char_R, проблема была только в itemUID, если я правильно понял, то можно спокойно генерить itemUID, главное что бы он был уникальным.
|
да, я про этот триггер, я через него сделал, ибо в create_char_r он вроде-бы charid у меня не передавал, что ли,не помню
|
|
|
01/27/2017, 09:38
|
#15
|
elite*gold: 32
Join Date: Apr 2016
Posts: 164
Received Thanks: 50
|
I need help with autoequip ..
|
|
|
All times are GMT +1. The time now is 02:05.
|
|