Legalcjooo
New Member
- Joined
- Jan 14, 2019
- Messages
- 15
- Reaction score
- 1
Hello, I'm looking for a script that will take 2 items from the inventory and give one. Items must be two with itemid 2311 and 2299, if the user does not have at least one item, a failure message will be displayed
I tried to make such a simple script, but I do not know why It do not want to work in the right way (sending messages about incorrect items in equipment when i have items with itemid 2311 and 2399). Engine- 7.6(armia6.6.6)
I tried to make such a simple script, but I do not know why It do not want to work in the right way (sending messages about incorrect items in equipment when i have items with itemid 2311 and 2399). Engine- 7.6(armia6.6.6)
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2299 and item2.itemid == 2314 then
doPlayerRemoveItem(cid, 2299,1)
doPlayerRemoveItem(cid, 2314,1)
doPlayerAddItem(cid, 2284,1)
doPlayerSendTextMessage(cid,22,"Runes connected!")
else
doPlayerSendTextMessage(cid,22,"You must have correct runes in the inventory!")
end
return 1
end