|
You last visited: Today at 00:34
Advertisement
Help for make a script for never 30 day's item
Discussion on Help for make a script for never 30 day's item within the Shaiya Private Server forum part of the Shaiya category.
10/25/2015, 01:44
|
#1
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Help for make a script for never 30 day's item
Hi all, i have a problem, with my script for never 30 day's item
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Read_Char_ApplySkills_R] Script Date: 02/25/2015 23:26:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Read_Char_ApplySkills_R]
@CharID int
AS
SET NOCOUNT ON
---Ress 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=286 and skilllevel=3)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 286,3,2592000)
end
---Resistência Eterna 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=225 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=225
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=225)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 225,1,2592000)
end
---Amuleto Fênix Vermelha 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 233,1,2592000)
end
---Previne Queda de Itens 30 Dias
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=227 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=227
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=227)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 227,1,2592000)
end
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID=@CharID
SET NOCOUNT OFF
when i make a new char i not get buff D: anyone have a solution??
|
|
|
10/25/2015, 22:23
|
#2
|
elite*gold: 0
Join Date: Jul 2009
Posts: 352
Received Thanks: 83
|
you have to relog with this one make the toon relog and ull have them if you want these on toon cration you have to move this type of sql edit to you toon cration proc insted of your skills aply proc
|
|
|
10/25/2015, 23:51
|
#3
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Quote:
Originally Posted by Big_
you have to relog with this one make the toon relog and ull have them if you want these on toon cration you have to move this type of sql edit to you toon cration proc insted of your skills aply proc
|
i have try this, but not working, this proc it is usp_crate_char_r, if you know other details for working this pls write, because not working all method that i have try
|
|
|
10/25/2015, 23:56
|
#4
|
elite*gold: 0
Join Date: Jul 2009
Posts: 352
Received Thanks: 83
|
SET @CharID = IDENT_CURRENT('Chars')
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES (@CharID,286,3,2592000)
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES (@CharID,227,1,2592000)
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES (@CharID,233,1,2592000)
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES (@CharID,225,1,2592000)
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES (@CharID,236,1,2592000)
INSERT INTO dbo.CharApplySkills (CharID,SkillID,SkillLevel,LeftResetTime) VALUES (@CharID,235,1,2592000)
END
RETURN @CharID
SET NOCOUNT OFF
here add this at the bottem of the usp_crate_char_r
|
|
|
10/26/2015, 00:41
|
#5
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Not working.... i not unserstand because >_< i not get buffs
|
|
|
10/26/2015, 11:56
|
#6
|
elite*gold: 0
Join Date: May 2012
Posts: 394
Received Thanks: 391
|
Read_Char_ApplySkills_R
Code:
--start auto-buff
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 233,1,2592000)
end
This is roughly how it should look. Others may have it working differently/cleaner/better, but I'm no sql expert, so it's probably poorly optimized, but it works fine for me. There was a trigger released here that will make the buffs auto cast each time a character logs out as well, which might be helpful to you.
A hint thought. Learn what you are doing yourself, before just copy/pasting things from other people. That way you actually improve your knowledge and learn how to do this, and more advanced things yourself. It's how the best devs here actually learnt what the can do.
|
|
|
10/26/2015, 12:37
|
#7
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Quote:
Originally Posted by Truth1010
Read_Char_ApplySkills_R
Code:
--start auto-buff
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 233,1,2592000)
end
This is roughly how it should look. Others may have it working differently/cleaner/better, but I'm no sql expert, so it's probably poorly optimized, but it works fine for me. There was a trigger released here that will make the buffs auto cast each time a character logs out as well, which might be helpful to you.
A hint thought. Learn what you are doing yourself, before just copy/pasting things from other people. That way you actually improve your knowledge and learn how to do this, and more advanced things yourself. It's how the best devs here actually learnt what the can do.
|
i'm not expert, but i have try with triger or edit all code, all proc for pg, when you make or join, but now working, i not understand because, if other know how remove eternal endurace so i can edit only a file with 3 buff's, i use ep 5.4, i not know because this not working.
|
|
|
10/26/2015, 14:49
|
#8
|
elite*gold: 0
Join Date: May 2013
Posts: 518
Received Thanks: 805
|
Quote:
Originally Posted by AxelMac
i'm not expert, but i have try with triger or edit all code, all proc for pg, when you make or join, but now working, i not understand because, if other know how remove eternal endurace so i can edit only a file with 3 buff's, i use ep 5.4, i not know because this not working.
|
Full Working Script By Player1Up.
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Read_Char_ApplySkills_R] by player1up
psudo code ( what the code does in laymans terms ):
1. Applies skills during toon login when the skills for the toon are read by the login procedure.
2. Checks to see if the skill is already applied.
b. if skill is applied, reset the timer to full term.
c. if skill is not applied, add it.
3. Returns the applied skills ( including ones we just added ) to the client
Comments at the begining of the section describe what is being added. If your skill table is different than mine,
you will need to adjust the skillid's to match what is in YOUR database table.
If you don't want the skill added, add -- in front of each line of the section, or add /* at the begining of the
section and */ at the end
In a SQL query window, items that will not be executed have green as the font color. These comments will not be added to
your database stored procedure as comments unless you include them below the line that starts with Alter Proc
Happy gaming!
--player1up
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Read_Char_ApplySkills_R]
@CharID int
AS
SET NOCOUNT ON
---add conti
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=286 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 286,1,2592000)
end
---end conti
---add eternal endurance
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=224 and skilllevel=1)
begin
update charapplyskills set LeftResettime=604800 where CharID=@charID and skillid=224
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=224)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 224,1,604800)
end
---end eternal endurance
---add PID
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=226 and skilllevel=1)
begin
update charapplyskills set LeftResettime=604800 where CharID=@charID and skillid=226
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=226)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 226,1,604800)
end
---end PID
---add PEID
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=236 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=236
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=236)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 236,1,2592000)
end
---end PEID
---add large gold drop
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=235 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=235
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=235)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 235,1,2592000)
end
---end large gold drop
---add red phoenix charm
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 233,1,2592000)
end
---end red phoenix charm
---add double warehouse
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=234 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=234
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=234)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 234,1,2592000)
end
---end double warehouse
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID=@CharID
SET NOCOUNT OFF
|
|
|
10/26/2015, 18:17
|
#9
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Quote:
Originally Posted by Twilight360
Full Working Script By Player1Up.
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Read_Char_ApplySkills_R] by player1up
psudo code ( what the code does in laymans terms ):
1. Applies skills during toon login when the skills for the toon are read by the login procedure.
2. Checks to see if the skill is already applied.
b. if skill is applied, reset the timer to full term.
c. if skill is not applied, add it.
3. Returns the applied skills ( including ones we just added ) to the client
Comments at the begining of the section describe what is being added. If your skill table is different than mine,
you will need to adjust the skillid's to match what is in YOUR database table.
If you don't want the skill added, add -- in front of each line of the section, or add /* at the begining of the
section and */ at the end
In a SQL query window, items that will not be executed have green as the font color. These comments will not be added to
your database stored procedure as comments unless you include them below the line that starts with Alter Proc
Happy gaming!
--player1up
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Read_Char_ApplySkills_R]
@CharID int
AS
SET NOCOUNT ON
---add conti
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=286 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=286
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=286)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 286,1,2592000)
end
---end conti
---add eternal endurance
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=224 and skilllevel=1)
begin
update charapplyskills set LeftResettime=604800 where CharID=@charID and skillid=224
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=224)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 224,1,604800)
end
---end eternal endurance
---add PID
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=226 and skilllevel=1)
begin
update charapplyskills set LeftResettime=604800 where CharID=@charID and skillid=226
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=226)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 226,1,604800)
end
---end PID
---add PEID
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=236 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=236
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=236)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 236,1,2592000)
end
---end PEID
---add large gold drop
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=235 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=235
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=235)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 235,1,2592000)
end
---end large gold drop
---add red phoenix charm
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=233
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=233)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 233,1,2592000)
end
---end red phoenix charm
---add double warehouse
if exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=234 and skilllevel=1)
begin
update charapplyskills set LeftResettime=2592000 where CharID=@charID and skillid=234
end
if not exists ( select skillID from charapplyskills with (nolock) where charID=@CHARID and skillid=234)
begin
insert into CharApplySkills (CharID, SkillID, SkillLevel,LeftResetTime)
Values (@CharID, 234,1,2592000)
end
---end double warehouse
SELECT SkillID,SkillLevel,LeftResetTime FROM CharApplySkills WHERE CharID=@CharID
SET NOCOUNT OFF
|
This is the same as I entered it, is not working......
|
|
|
10/26/2015, 18:44
|
#10
|
elite*gold: 0
Join Date: May 2013
Posts: 518
Received Thanks: 805
|
Quote:
Originally Posted by AxelMac
This is the same as I entered it, is not working......
|
What SQL Version are you using?
2005? 2008? 2012?
|
|
|
10/26/2015, 20:44
|
#11
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
I use sql 2012 now, after i use 2008
|
|
|
10/26/2015, 20:53
|
#12
|
elite*gold: 0
Join Date: Jul 2009
Posts: 352
Received Thanks: 83
|
i use sql 2008 and the one i posted to you works 100% i think you need to check you skills and make shure this is the right ids for your 30 day items because the one i posted indeed dose work and flawlessly never herd any 1 not gettn there buffs
|
|
|
10/26/2015, 23:13
|
#13
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Quote:
Originally Posted by Big_
i use sql 2008 and the one i posted to you works 100% i think you need to check you skills and make shure this is the right ids for your 30 day items because the one i posted indeed dose work and flawlessly never herd any 1 not gettn there buffs
|
where you could be the problem? so I saw or I'll fix if I can
|
|
|
10/27/2015, 03:53
|
#14
|
elite*gold: 0
Join Date: Jul 2009
Posts: 352
Received Thanks: 83
|
Check you skill ids of these items and change for the correct ones if they are different
|
|
|
10/27/2015, 11:32
|
#15
|
elite*gold: 0
Join Date: Aug 2012
Posts: 454
Received Thanks: 111
|
Quote:
Originally Posted by Big_
Check you skill ids of these items and change for the correct ones if they are different
|
it's are not different.... all id's are right, not is here the problem :\
|
|
|
|
|
Similar Threads
|
Can you make a item to make it 2x Compose
12/04/2011 - EO PServer Hosting - 2 Replies
Is it possible to make a item that makes your pet 2x compose for say 2 hours and it to only giv the player with the item "who uses it " to have 2x compose ?
Any one know anything like this please respond :) could do with all the help i can get thanks :D
|
AHK Help How To make a script
04/27/2011 - General Coding - 0 Replies
hi guys..
i need your help for AHK(AutoHotKey) Script...sorry for a noob question i'm just starting.. and i want to learn it faster/ASAP...
...I'm currently figuring it out how to spam leftarrow or rightarrow then rest for a minute or a seconds then back it again for spamming..
btw.. if someone who kindly enough to make this script. it would be a big help to me :handsdown: <~ Sorry if i'm breaking a rules :D
oh and 1 morething.. why i choose AutoHotKey..hmmm i think it's more...
|
Make ur item +2 FROM 3x+1 !!
07/08/2009 - CO2 Guides & Templates - 15 Replies
ok, it is my first post hope u like it :)
here we go:
1.get a +1 item from the same type of the required equipment
2.Get other 2x +1 items(of the same type)/stones
3.go to the wuxing oven and put the stuff from step 2 in the item from step 1
4.its simple now u got a +2 item which add to the progress (+40),, just put it in ur main required equipment:p
|
Did any one can make Some thing to tell ppl here how make new item in Bin 5065
05/30/2009 - CO2 Private Server - 5 Replies
Did any one can make Some thing to tell ppl here how make new item in Bin 5065
pl pl pl p pl plz
|
All times are GMT +2. The time now is 00:34.
|
|