[RELEASE] Upgrade System

04/20/2015 02:33 raptter#16
won't explain to get some money lol !!
btw i made it work
and ty for the best on i have ever seen #karemsa
the one and the only one <3
08/05/2015 07:48 thebigbody#17
great it's working fine but i tried to make one for weapon , 1 for set , 1 for acc , 1 for shield the weapon and the shield is working so good :D but the set and the acc upgrade only 1 item not the whole set or acc i think it's from selecting the refitemid idk what's wrong really :(
PS : i added new procedures for each sort of item with the different slots
weapon = 6 , shield = 7 , set between 0 and 5 , acc between 9 and 12
08/05/2015 09:19 Syloxx#18
Quote:
Originally Posted by thebigbody View Post
great it's working fine but i tried to make one for weapon , 1 for set , 1 for acc , 1 for shield the weapon and the shield is working so good :D but the set and the acc upgrade only 1 item not the whole set or acc i think it's from selecting the refitemid idk what's wrong really :(
PS : i added new procedures for each sort of item with the different slots
weapon = 6 , shield = 7 , set between 0 and 5 , acc between 9 and 12
a variable can only hold 1 value (ItemID in this case) so you have to do a while loop
08/05/2015 16:55 thebigbody#19
Quote:
Originally Posted by Syloxx View Post
a variable can only hold 1 value (ItemID in this case) so you have to do a while loop
you have tut for that or even hints cuz i really dunno how to do it :D
and what if i made one for every slot that may cause lag ?
08/05/2015 17:30 Syloxx#20
Code:
DECLARE @Slot tinyint = 0 /*_# choose your start slot*/

WHILE @Slot BETWEEN 0 AND 10000
BEGIN
    /*_# INSERT QUERY HERE*/

    SET @Slot += 1
END
thats my hint for you
08/05/2015 19:21 thebigbody#21
well thx for the hint but i think iam kinda nooby to figure it out too :D
so i made my own way like i told u before 1 proc to each slot of item
but ofc 1 scroll to execute the 6 proc for set and other one for the 4 proc for acc
anyway it's working 100% thank you very much :)
05/30/2018 15:39 memoxl#22
well i know this is an old threat but, i got a question if the query ran with a scroll, is there a way to prevent the scroll from being started if the required item not in slot 13 for example ?
05/30/2018 15:57 blapanda#23
Quote:
Originally Posted by memoxl View Post
well i know this is an old threat but, i got a question if the query ran with a scroll, is there a way to prevent the scroll from being started if the required item not in slot 13 for example ?
No, that needs the same mechanic of the growth-pet revive, grab pet time extension or gear gender change. The option you are using (teleport and update table information) is a usual "if you have not the possibility editing the source code"-approach and cannot be checked natively.

The only thing you can do is making an additional if statement while teleporting "if in slot 13 item not weapon (but using a scroll to do things with a weapon) then add back scroll while teleporting/refreshing character data".
05/30/2018 16:04 memoxl#24
Quote:
Originally Posted by blapanda View Post
No, that needs the same mechanic of the growth-pet revive, grab pet time extension or gear gender change. The option you are using (teleport and update table information) is a usual "if you have not the possibility editing the source code"-approach and cannot be checked natively.

The only thing you can do is making an additional if statement while teleporting "if in slot 13 item not weapon (but using a scroll to do things with a weapon) then add back scroll while teleporting/refreshing character data".
Thank you so much for your reply, and yea that was the idea i was thinking about if there is no way to prevent the scroll from starting then no way but puting the scroll back to the character
05/30/2018 18:50 Syloxx#25
Quote:
Originally Posted by memoxl View Post
well i know this is an old threat but, i got a question if the query ran with a scroll, is there a way to prevent the scroll from being started if the required item not in slot 13 for example ?
Hey,
there is actually a way 2 do that (never realized it... just an idea)

You set the item type "Gender Switch" or "COS Item" to the new item (via TypeID) and then you need a packet filter.

The Client sends the Item Slot to the Server and well... you basically block that packet on your packet filter, call an execute with the slot as arg to the SQL Server and force teleport with an clientless bot (/totown)

just a concept... didnt developed it yet

or another idea (also filter based) ... my query returns values... you can just execute the query from the filter instead of the Log_DB and well... if Return Value != 0 block package from usage and send a message to the client

the 1st idea allows you to basically use any slot with a nice GUI (just like a scroll you use to swap the gender of items)
the 2nd is easier to develop but forces you to use a static slot and you also dont need a clientless bot here.

Incase you would use the 2nd feature... it could be developed with a config in mind so you could basically use that for ANY scroll not just that one

if you are interested i could develop a kind of sub filter that includes that feature but we would have to talk about the price.
If otherwise is another developer reads that and got some spare time feel free to develop that idea... unfortionally i am currently pretty busy and i haven't any spare time i could offer for free :S

Incase an other developer wanna do that:
please dont forget to delete the item and that in a correct way (dont just set ItemID = 0 in _Inventory srsly you just fill the _Items table with trash... Silkroad is actually smart enough to recicle unused entries in the _Items table... thats why there is an Serial... because ID64 will be reused)

Quote:
Originally Posted by blapanda View Post
No, that needs the same mechanic of the growth-pet revive, grab pet time extension or gear gender change. The option you are using (teleport and update table information) is a usual "if you have not the possibility editing the source code"-approach and cannot be checked natively.

The only thing you can do is making an additional if statement while teleporting "if in slot 13 item not weapon (but using a scroll to do things with a weapon) then add back scroll while teleporting/refreshing character data".
My Query already readds the scroll incase there isnt an action...
09/25/2018 02:32 where_love2003#26
what about it ?
Quote:
EXEC TM_SHARD.._ADD_ITEM_EXTERN @CharName, @Scroll, 1, 0;
if weapon not plus 7 will not back again scroll :(