[Help] Making Normal Items drop in Quest
I was trying to make equippable weapons that dropped during Quest. It doesn't seem possible though.
So I figured I could make an SQL trigger for the LGKiez DB that does the following:
When a specific quest item is in a players inventory, let's say itemid 1234, that item is replaced by an equipable weapon with itemid 9999
Can someone please help me with this? I have no idea how to create an SQL trigger.
Re: [Help] Creating an SQL Trigger
I'm not sure about SQL trigger, but I'm almost sure you can just edit droptable.xml for your quest drops with no SQL needed.
Re: [Help] Creating an SQL Trigger
yes but the item id's in there are different from zitem and shop
Re: [Help] Creating an SQL Trigger
Quote:
Originally Posted by
RepublicOfAstra
I'm not sure about SQL trigger, but I'm almost sure you can just edit droptable.xml for your quest drops with no SQL needed.
If you change the itemid of a drop in droptable.xml to the itemid of a nonquest item, it will not drop.
Also, I tried adding a normal item to zquestitem.xml, it showed up as a quest bible ingame.
I think that maybe I can add a new itemtype for quest items, and give that itemtype the attributes of a weapon.. But I don't know where quest item types are defined..
Re: [Help] Creating an SQL Trigger
I know there's a way to do it, since some quests drop low-level element equips.
Re: [Help] Creating an SQL Trigger
Quote:
Originally Posted by
RepublicOfAstra
I know there's a way to do it, since some quests drop low-level element equips.
Well if you figure it out please let me know.. cause I've been obsessing over it for a couple hours now with no success.
Re: [Help] Creating an SQL Trigger
Regarding the SQL method of changing quest items to normal items, apparently I didn't need to make a trigger afterall. It's obvious I am a noob with SQL. Anyway, I figured out how to make a query that will suit my needs.
Code:
UPDATE Items
SET ItemID=('25')
WHERE ItemID=('200001')
Simple enough. =]
The only problem is, how do I make this query execute automatically on a schedule? As in every 5 minutes or so.
I was thinking maybe I could add it to one of the stored procedures, suchas dbo.spUpdateCharInfoData. Problem is, I don't know the proper syntax to add the above Query to one of the Stored Procedures.
If I could do that (add the query to a stored procedure that exucutes at the end of every match or so), then I could just replace the name of the quest item being replaced with the name of the item I'm replacing it with, and it would seem as if a player was simply picking up the final item during the quest.
If it has to be scheduled to execute every minute or 5 minutes or so, I could change the quest item being replaced into one of those little gifts, and change the description to something like, "This gift is wrapped really well.. it's gonna take you like 5 minutes to open it.. :P".
Re: [Help] Making Normal Items drop in Quest
Eh, I'm still trying to find a way. I KNOW it's possible, since Goblin King's old drop was elements and and NAGunz, the bosses drop hats and swords and rockets.
Re: [Help] Making Normal Items drop in Quest
The items that Na Gunz give are premium items with and RentPeriode, maybe when you use an Itemid thats for premium with an RentPeriode it will work i think,
The Runnable and the matchserver can read it from the xml's
Re: [Help] Making Normal Items drop in Quest
... Doesn't anybody know how to schedule a query to execute every 5 minutes or so?
Re: [Help] Making Normal Items drop in Quest
You can let an other procedure execute the new one. Then it only runs if its needed
Re: [Help] Making Normal Items drop in Quest
Quote:
Originally Posted by
Rotana
You can let an other procedure execute the new one. Then it only runs if its needed
Ok... how might I do that?
Re: [Help] Making Normal Items drop in Quest
Put this in before the end
Quote:
EXEC [dbo].[NAME OF PROCEDURE HERE]
When you put it in the procedure of SelectCharItem it will be runned everytime if an user goes to equipment.
Re: [Help] Making Normal Items drop in Quest
Quote:
Originally Posted by
Rotana
Put this in before the end
When you put it in the procedure of SelectCharItem it will be runned everytime if an user goes to equipment.
Thanks. I'll try that.
Re: [Help] Making Normal Items drop in Quest
Quote:
Originally Posted by
gReGiTh
Thanks. I'll try that.
Err, how to I save the following as a stored procedure?
UPDATE Items
SET ItemID=('25')
WHERE ItemID=('200001')