• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MySQL Adding Offer to Shop [Gesior ACC]

If im buying Shop items like Windborn Colossus Armor then it doesnt appear at my char? Do i something wrong? Thinks like Name change are working.
 
Many players often forget to add this to Global.lua

Code:
InitHistory = 0
InitShopComunication = 0

Red
 
How do i put in as example a picture of the Shield of Honour ?
 
PHP:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`) VALUES (1, 5, 2506, 1, 0, 0, 'item', 'Buy a dragon scale helmet!', Dragon Scale Helmet');


PHP:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Scale Helmet')' at line 2

Help guys
 
pepole get unlimted amount of item the bought i have 1 in count1 and 0 in count2 :/
 
Yeah i get this error
[Error - GlobalEvent Interface]
[11/06/2014 19:49:37] data/globalevents/scripts/shop.lua:eek:nThink
[11/06/2014 19:49:37] Description:
[11/06/2014 19:49:37] data/globalevents/scripts/shop.lua:56: attempt to call field 'executeQuery' (a nil value)
[11/06/2014 19:49:37] stack traceback:
[11/06/2014 19:49:37] data/globalevents/scripts/shop.lua:56: in function <data/globalevents/scripts/shop.lua:7>
[11/06/2014 19:49:38] [Error - GlobalEvents::think] Couldn't execute event: shop

This is line 56:
db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
that might be an error with the shop.lua on globalevents, it doesn't count as processed so keeps adding the item
 
Yeah i get this error
[Error - GlobalEvent Interface]
[11/06/2014 19:49:37] data/globalevents/scripts/shop.lua:eek:nThink
[11/06/2014 19:49:37] Description:
[11/06/2014 19:49:37] data/globalevents/scripts/shop.lua:56: attempt to call field 'executeQuery' (a nil value)
[11/06/2014 19:49:37] stack traceback:
[11/06/2014 19:49:37] data/globalevents/scripts/shop.lua:56: in function <data/globalevents/scripts/shop.lua:7>
[11/06/2014 19:49:38] [Error - GlobalEvents::think] Couldn't execute event: shop

This is line 56:
db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
which tfs are you yousing
 
This is a noob (my first) tutorial explaining how to add a shop offer to your Gesior ACC database. Most experienced players already know this, but this is how you add offer types to your shop, to trade for points. That is ALL this tutorial explains, please find another that answers how to set up shopsystem.php ect. This is ONLY for the phpmyadmin part for adding new shop offers!!!

Start by entering your database:
http://localhost/phpmyadmin

If you have z_shop_offer in your database, use the SQL button, paste this information, and then click "Go". (You will want to continue this until all of your items are made, Making sure that the `id` is ONE higher every time you submit it! Afterward, you should see a new table.

Code:
INSERT INTO `z_shop_offer` (`id`, `points`, `itemid1`, `count1`, `itemid2`, `count2`, `offer_type`, `offer_description`, `offer_name`) VALUES
(1, 5, 2517, 1, 0, 0, 'item', 'Buy a shield of honour!', 'Shield of Honour');

`id` = Unique ID of the item. These go up in intervals of 1, each item has to be different. (ex. 1, 2, 3, 4, 5)
`points`
= How many points it will cost
`itemid1` = The ID of the item
`count1` = How many of the item (ID above) do you wish to receive
`itemid2` = Set to 0, you wont use this unless you are selling backpacks of items
`count2` = Same as above
`offer_type` = The type of offer you're giving away. This one is obviously, one item, so keep it as `item`.
`offer_description` = The description on the website. What you want to advertise about the item.
`offer_name` = Name of the item on the website

Edit the tables as needed, and it should appear in your shop, as seen below:


(obviously that was made for my server specifically) :blink:

All I ask is that if I helped you, you let me know by repping. I won't beg, ONLY if you think I deserve it ;)

Red

Haha I know it is an old thread, but damn I love it. Remind me of the days when I was adding items to my shop, took me forever to add like 10 items with this query haha.
 
is there a way to add like a specific mount to this shop without creating a mount/addon doll? im guessing would have to change
offer_type?

thanks
 
is there a way to add like a specific mount to this shop without creating a mount/addon doll? im guessing would have to change
offer_type?

thanks

Yes, you'd also have to edit your shop globalevent to support mounts.
Red
 
can you try to explain plz?

Not sure exactly what you mean. You have to add an exception to the code that allows it to know the shop query is looking to give a mount instead of an item.

Red
 
Back
Top