Roni123
Hardstyle Never Die < 3 !!!
- Joined
- Aug 31, 2010
- Messages
- 152
- Solutions
- 1
- Reaction score
- 18
Good Morning,
Dears,
I have problem with sell and exchange potions in 8.0 distro, cuz there all of vials have ID 2006 and next "prefix" e.g mana fluid /i 2006,7 , life fluid /i 2006,2, so when I want to exchange potions in Sandra for lottery ticket from below function, then she don't count any vials and give lottery ticket for free
and when I change line on below, then she count vials but all of them e.g empty+mana fluid+life fluid to 100 PCS,
Similar problem are in npc when I want to sell potions with below script then NPC count all types of vials e.g empty+mana fluid+life fluid
and when I change on this, then NPC writes nonsense...
Thanks in advance !
Dears,
I have problem with sell and exchange potions in 8.0 distro, cuz there all of vials have ID 2006 and next "prefix" e.g mana fluid /i 2006,7 , life fluid /i 2006,2, so when I want to exchange potions in Sandra for lottery ticket from below function, then she don't count any vials and give lottery ticket for free
Lua:
npcHandler.topic[cid] = 2
elseif npcHandler.topic[cid] == 2 then
npcHandler:say("Great! I've signed you up for our bonus system. From now on, you will have the chance to win the potion belt addon!", cid)
player:setStorageValue(1060, 1)
player:setStorageValue(1033, 1) --this for default start of Outfit and Addon Quests
npcHandler.topic[cid] = 0
elseif npcHandler.topic[cid] == 3 then
if player:removeItem(2006, 0, 100) then
npcHandler:say("Ok heretake this lottery ticket!", cid)
player:addItem(5957, 1)
npcHandler.topic[cid] = 0
else
npcHandler:say("You don't have 100 empty vials.", cid)
npcHandler.topic[cid] = 0
end
elseif npcHandler.topic[cid] == 4 then
if player:getStorageValue(1060) == 1 and player:removeItem(5958, 1) then
npcHandler:say("Congratulations! Here, from now on you can wear our lovely potion belt as accessory.", cid)
player:setStorageValue(1060, 2)
player:addOutfitAddon(138, 1)
player:addOutfitAddon(133, 1)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
else
npcHandler:say("You don't have any prize to claim!", cid)
end
npcHandler.topic[cid] = 0
end
return true
end
end
and when I change line on below, then she count vials but all of them e.g empty+mana fluid+life fluid to 100 PCS,
Lua:
if player:removeItem(2006, 100) then
Similar problem are in npc when I want to sell potions with below script then NPC count all types of vials e.g empty+mana fluid+life fluid
Lua:
shopModule:addSellableItem({'vial'}, 2006, 5, 'vial')
and when I change on this, then NPC writes nonsense...
Lua:
shopModule:addSellableItem({'vial'}, 2006, 0, 5, 'vial')
Thanks in advance !