New Idea

09/03/2015 22:17 silkroad4all#1
Hello Guys , I Was Thinking Of A New Idea , When You Buy Item For Arena Coin And When You Sell It You Sell It For Gold!! I Want The Npc Buy It Back For Arena Also Not Gold !!
09/11/2015 04:41 omar2002#2
ithink it will be changed to all items . because u sell all kinds of items by gold . even u bought it for coins , silks , gold , etc
09/11/2015 15:04 Sonic `#3
Quote:
Originally Posted by omar2002 View Post
ithink it will be changed to all items . because u sell all kinds of items by gold . even u bought it for coins , silks , gold , etc
You buy it for a.c, ofc you can sell it for a.c aswell, but i've no idea how to do it.
09/11/2015 18:06 Vxo#4
Hint : _ADD_ITEM_EXTERN,_ADD_ITEM_EXTERN_CHEST
Just use ur brain.
09/12/2015 09:25 blapanda#5
Quote:
Originally Posted by Vxo View Post
Hint : _ADD_ITEM_EXTERN,_ADD_ITEM_EXTERN_CHEST
Just use ur brain.
Uhm what? You are suggesting people to create an ID triggered purchases/sellings procedure, adding the respective item's cost to the inventory/chest, while you can simply adjust some stuff at the table dbo._RefPricePolicyOfItem*
09/12/2015 09:45 AceSpace#6
Quote:
Originally Posted by blapanda View Post
Uhm what? You are suggesting people to create an ID triggered purchases/sellings procedure, adding the respective item's cost to the inventory/chest, while you can simply adjust some stuff at the table dbo._RefScrapOfPackageItem?
I think it's not possible to do it via tables, Selling an item to NPC is controlled via SellPrice in _RefObjCommon and there is no way to change the "paymentdevice" of "SellPrice" of each item.
09/12/2015 11:07 blapanda#7
The SellPrice is just the value it should be traded off on a merchant, the type in what kind of currency you are exchanging it for will be defined inside the _RefPricePolicyOfItem* (haven't noticed that my tablet auto-corrected it as ScrapOfPackageItem).
09/13/2015 20:37 Royalblade*#8
Never tried it tbh. If it doesn't work via tables, you can just do it procedural.

Check STRG_ITEM_MOVE... Or the ones for buying/selling shit to/from NPC... Don't remember the name.

Inside the selling IF statement check for RefitemID. Then just run the proc to find the first free slot. If exists... add to inventory. Else, return an ERROR integer which won't let the char sell the item to the NPC. For the error, change the clientsided (textuisys) msg to something more descriptive for your case.

Done.