saa0d 2 Report post Posted January 10, 2019 Hello, how can i make npc sell lvl 9 gem I already have a gem seller: function blacksmithdisc () Talk( 1, "Blacksmith's apprentice: Hello, tell me what you want to learn." ) Text( 1, "Trade", BuyPage) Text( 1, "Combine", OpenUnite) InitTrade() Weapon( 878 ) Weapon( 879 ) Weapon( 880 ) Weapon( 881 ) Weapon( 882 ) Weapon( 883 ) Weapon( 884 ) Weapon( 887 ) Weapon( 860 ) Weapon( 861 ) Weapon( 862 ) Weapon( 863 ) Weapon( 1012 ) Weapon( 885 ) Weapon( 5750 ) Weapon( 5751 ) Weapon( 5752 ) Weapon( 5771 ) Weapon( 5772 ) Weapon( 5773 ) Weapon( 5774 ) Weapon( 5775 ) end But how can I make it sell lvl 9 gems? Thank you Quote Share this post Link to post Share on other sites
NOX 21 Report post Posted January 11, 2019 I don't think you can make a npc seller for lv9 gems, you can make an exchanger instead function ExchangerGem() Talk( 1, "Level 9 Exchanger Gem NPC" ) Text( 1, "Refining Gem", JumpPage, 3 ) Talk( 2, "Sorry, you do not have the required Items. I cannot exchange it for you." ) Talk( 3, "Do you want to exchange 256 Ref Voucher for a Lv 9 Ref Gem ?" ) InitTrigger() TriggerCondition( 1, HasItem, 3877, 256 ) -- This one is using Ref Voucher but im sure you can trade to money if you want. "3877" is the item ID "256" is the qntd TriggerCondition( 1, HasLeaveBagGrid, 1 ) -- This checks if you have empty slots TriggerCondition( 1, KitbagLock, 0 ) -- This check if you dont have inv locked TriggerAction( 1, TakeItem, 3877, 256 ) -- This take the qntd of items TriggerAction( 1, GiveItem, 885,1,109 ) -- This gives your new gem. "885" Gem ID, "1" qntd, "109" Gem Level TriggerFailure( 1, JumpPage, 2) --If you don't have the requeriments items Text(3,"Exchange" ,MultiTrigger,GetMultiTrigger(),1) end Study this function and make the other gems, its not hard im sure you can do :) Quote Share this post Link to post Share on other sites
saa0d 2 Report post Posted January 11, 2019 1 hour ago, NOX said: I don't think you can make a npc seller for lv9 gems, you can make an exchanger instead function ExchangerGem() Talk( 1, "Level 9 Exchanger Gem NPC" ) Text( 1, "Refining Gem", JumpPage, 3 ) Talk( 2, "Sorry, you do not have the required Items. I cannot exchange it for you." ) Talk( 3, "Do you want to exchange 256 Ref Voucher for a Lv 9 Ref Gem ?" ) InitTrigger() TriggerCondition( 1, HasItem, 3877, 256 ) -- This one is using Ref Voucher but im sure you can trade to money if you want. "3877" is the item ID "256" is the qntd TriggerCondition( 1, HasLeaveBagGrid, 1 ) -- This checks if you have empty slots TriggerCondition( 1, KitbagLock, 0 ) -- This check if you dont have inv locked TriggerAction( 1, TakeItem, 3877, 256 ) -- This take the qntd of items TriggerAction( 1, GiveItem, 885,1,109 ) -- This gives your new gem. "885" Gem ID, "1" qntd, "109" Gem Level TriggerFailure( 1, JumpPage, 2) --If you don't have the requeriments items Text(3,"Exchange" ,MultiTrigger,GetMultiTrigger(),1) end Study this function and make the other gems, its not hard im sure you can do :) Thank you for the reply, but this is not what i'm looking for. What I want to do is a BuyPage that displays and sells Lvl 9 gems! Any idea how to do that? Thank you Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted January 11, 2019 (edited) @saa0d Buying Any Gem According to Level 1-9 This is what you're seeking for, but the extra step is that you need to open the item before getting it. This is the only possible way I can think of it doing this idea. You buy the item in a container, and double click it gives whatever level that itemeffect is given. You will then sell the Item in the "Buy Page" with Weapon(####) Lv1 ID Weapon(####) Lv2 ID Weapon(####) Lv3 ID Weapon(####) Lv4 ID Weapon(####) Lv5 ID Weapon(####) Lv6 ID Weapon(####) Lv7 ID Weapon(####) Lv8 ID Weapon(####) Lv9 ID Weapon() -- Separates the Slot Example: Make an Item Info Line: XXXX Lv1 Rage CustomIcon 10130005 0 0 0 0 0 0 31 0 0 0 0 0 1 1 1 1 99 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 ItemUse_CustomGemLvl 0 0 0 0,0 0 0 Double click to obtain level 1 Rage function ItemUse_CustomGemLvl( role , Item ) local Item_CanGet = GetChaFreeBagGridNum ( role ) -- Checks Inventory Slots if Item_CanGet <= 2 then -- Inventory Space Needed SystemNotice(role ,"Failed to open obtain lv9 Gem, please make sure to have inventory slots") UseItemFailed ( role ) return end GiveItem ( role , 0 , XXX , X , XXX) --Gives Gem to players inventory -- XXX - Gem ID -- X - Quantity -- XXX - Quality - 101-109 - 109 = Level 9 end Edited January 11, 2019 by GOAT Quote Share this post Link to post Share on other sites
saa0d 2 Report post Posted January 11, 2019 11 hours ago, GOAT said: @saa0d Buying Any Gem According to Level 1-9 This is what you're seeking for, but the extra step is that you need to open the item before getting it. This is the only possible way I can think of it doing this idea. You buy the item in a container, and double click it gives whatever level that itemeffect is given. You will then sell the Item in the "Buy Page" with Weapon(####) Lv1 ID Weapon(####) Lv2 ID Weapon(####) Lv3 ID Weapon(####) Lv4 ID Weapon(####) Lv5 ID Weapon(####) Lv6 ID Weapon(####) Lv7 ID Weapon(####) Lv8 ID Weapon(####) Lv9 ID Weapon() -- Separates the Slot Example: Make an Item Info Line: XXXX Lv1 Rage CustomIcon 10130005 0 0 0 0 0 0 31 0 0 0 0 0 1 1 1 1 99 0 0 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 ItemUse_CustomGemLvl 0 0 0 0,0 0 0 Double click to obtain level 1 Rage function ItemUse_CustomGemLvl( role , Item ) local Item_CanGet = GetChaFreeBagGridNum ( role ) -- Checks Inventory Slots if Item_CanGet <= 2 then -- Inventory Space Needed SystemNotice(role ,"Failed to open obtain lv9 Gem, please make sure to have inventory slots") UseItemFailed ( role ) return end GiveItem ( role , 0 , XXX , X , XXX) --Gives Gem to players inventory -- XXX - Gem ID -- X - Quantity -- XXX - Quality - 101-109 - 109 = Level 9 end Thank you for the reply, but this is still not what I want. In some old server that I played, i guess avacado, NPC was selling lvl 9 gems right out of the buypage. In the BuyPage they would appear as lvl 0 gems, but when you buy them, they become lvl 9; you don't need to open something to get them, they are there right away! any idea how to implement this? thank you Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted January 11, 2019 Don't have TOP stuff installed anymore so can't help. Quote Share this post Link to post Share on other sites