Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Development
You last visited: Today at 22:32

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

Advertisement



[Tiny Release] Mass Update Mob Items

Discussion on [Tiny Release] Mass Update Mob Items within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1

 
nephren's Avatar
 
elite*gold: 92
Join Date: Aug 2009
Posts: 739
Received Thanks: 975
[Tiny Release] Mass Update Mob Items

Hello epvpers,

i was bored and created a bit of "Mass Update Drops"

it's a simply SQL Update for MobItems. One More Tab 'mapID'
if you wanna update Map 1 all in one, you don't have to type everymobID.
Simple use:

Update *** WHERE mapID = 1 AND ItemOrder = X

but be careful too: BackUP your current MobItems!
And if you wanna use this simple SQL Script just Rename your current
MobItems and use SELECT FROM renamed_mobDrops your Grades.

Notice 2: i don't take relics in it also i don't take CT/Haru/FM/MobGuards in it.
Some bosses like CloronTroll is map-stored too. So remind that if you wanna make Boss-Drops.

Thanks to Su1ph3r for the idea yesterday =)

Edit: 90% should be correct, maybe there are some mistakes in it please tell me if you find one =)
it's without EP5 Mobs because i don't have the ids here and can't download it at this moment.

EP 5 Mobs are in it but the Map-Row is "NULL"ed



Attached Files
File Type: zip mobitems.zip (146.7 KB, 686 views)
nephren is offline  
Thanks
11 Users
Old 11/17/2012, 03:58   #2
 
bulgaria's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 69
Received Thanks: 152
Here is a script created by me 1 year ago.

PHP Code:
SELECT     c.Map1,c.MobIDc.MobName,  b.Grade,b.DropRate,b.ItemOrder 
FROM         PS_GameDefs
.dbo.Mobs AS c inner join PS_GameDefs.dbo.MobItems as b ON c.MobID=b.MobID 
WHERE     
(c.Map1=76 or c.Map2=76 or c.Map3=76) and b.Grade<>
ORDER BY b
.Grade,b.DropRate DESC 
bulgaria is offline  
Thanks
7 Users
Old 04/26/2013, 03:18   #3
 
elite*gold: 0
Join Date: Mar 2013
Posts: 2
Received Thanks: 0
Oh, well, i have no idea about how to use this. I don't know if it's even for Shaiya ep 5. Thanks anyway.
T.
LeCanut is offline  
Old 04/26/2013, 08:53   #4
 
elite*gold: 0
Join Date: Apr 2013
Posts: 26
Received Thanks: 50
Not sure this is a really brilliant idea for drop updating. I mean, you made that query quite big and useless, creating a new table, without removing the old one. Anyone could have done it by simply opening the MobItems table in Design View and adding a new column, simple as ****.
I myself have my own way of mass updating the drops, but your method is bad for those who update it via Shaiya Studio, as the query it generates inserts less 1 value than your new table requires.

I'm not saying it's bad, just making some constructive criticism, as usual.
n00bness is offline  
Old 04/26/2013, 18:08   #5
 
castor4878's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,367
It's (yet) an old thread and may be only used by a few, but ...

- the given SQL script "mobItems.sql" rises some remarks:

1) it contains 26181 insert statements (and 104745 lines) to more or less perform the following:

Code:
USE [PS_GameDefs]
GO

CREATE TABLE [dbo].[MobItemsNEW] (
	[RowID] [int] NOT NULL IDENTITY (1, 1),
	[MobID] [smallint] NOT NULL,
	[ItemOrder] [tinyint] NOT NULL,
	[Grade] [smallint] NOT NULL,
	[DropRate] [int] NOT NULL,
	[MapID] [smallint] NULL);
GO

DECLARE @cntMob int	-- the number of mobs to insert
DECLARE @mobID int	-- the ID of mob in loop
DECLARE @drop int	-- the ID of drop in loop

-- define the number of mobs to create
SET @cntMob  = 2908

-- let the base generates the right RowID identity value
SET IDENTITY_INSERT [dbo].[MobItemsNEW] OFF

SET @mobID = 0
WHILE (@mobID < @cntMob)
BEGIN
	-- insert 9 records matching 9 drop of current mob
	SET @drop = 1
	WHILE (@drop <= 9)
	BEGIN
		INSERT INTO [dbo].[MobItemsNEW] VALUES (@mobID, @drop, 0, 0, NULL)
		SET @drop = @drop +1
	END
	SET @mobID = @mobID + 1
END
even with comments, this version needs 36 lines.

so the remark: when you have / want to use code to generate a repetitive SQL script, use the same logic (code) in the SQL script to not have such repetitions.

2) the definition of an extra column 'mapID' to the table can indeed be helpful.
the column will not grant that all mobs are present in a single map (it's not its purpose) but will allow to do some select and update on the map criterion.
however, as indicated by n00bness, the right way to do it is to alter the current table, so something like:

Code:
ALTER TABLE [dbo].[MobItems] ADD [MapID] [smallint] DEFAULT NULL
3) as a matter of fact, and fact only, the scripts generated by shStudio (0.7.1) won't comply with the new table format.
castor4878 is offline  
Thanks
7 Users
Reply

Tags
mass, mobs, shaiya, sql, update


Similar Threads Similar Threads
[tiny release]Obelisk.ini
02/10/2019 - Shaiya PServer Guides & Releases - 10 Replies
for new aadmin's this Obelisk.ini has every boss.mob spawn know for for ep5 info: World cup mobs/boss -maps 74 mobs/bosses -goddess map bosses -all maps 6o---74 mobs/bosses no more going around looking or add just pop this in and your ready go
[tiny release]map.ini and svmaps
07/31/2013 - Shaiya PServer Guides & Releases - 8 Replies
/deleted
[Release] Tiny Anti AFK (without gui)
07/30/2011 - Rift Hacks, Bots, Cheats & Exploits - 0 Replies
Hy there, During my way up to rank 6 i thought a simple Anti AFK would be nice. So here it is. Features: # Random buttons
[Tiny-Release] Invincibility for GMs
03/29/2009 - CO2 PServer Guides & Releases - 1 Replies
First search for: public bool GetHitDie(uint Damage) Add this under it: if (MyClient.Status >= 3) //Edit the 3 to your GM Status. { CurHP -= 0; MyClient.SendPacket(General.MyPackets.Vital(UID, 0, CurHP)); return false; } You will still see the damage you are inflicted upon, but your health won't go down.



All times are GMT +1. The time now is 22:35.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.