xardas33
New Member
- Joined
- Jan 28, 2010
- Messages
- 83
- Reaction score
- 0
Hello guys. I want to make script to get Golden Key like in this film:
watch from 0:57 to 1:10
But I want to do that in my own version:
You put six same items (with same id) on graves, and put other item in central grave, later using on central grave vial of blood, items are removed and you gain golden key.
Now i created this script:
GoldenKey.lua
Actions.xml
Graves have normally id 8059, and i writed extra uniqueid 60007 for central grave. And this script doesn't work.
what i should edit? Someone can help?
But I want to do that in my own version:
You put six same items (with same id) on graves, and put other item in central grave, later using on central grave vial of blood, items are removed and you gain golden key.
Now i created this script:
GoldenKey.lua
Code:
function onUse(cid, item, frompos, item2, topos)
skullpos1 = {x=31978, y=32142, z=10, stackpos=1}
skullpos2 = {x=31979, y=32142, z=10, stackpos=1}
skullpos3 = {x=31980, y=32142, z=10, stackpos=1}
skullmpos4 = {x=31981, y=32142, z=10, stackpos=1}
skullpos5 = {x=31982, y=32142, z=10, stackpos=1}
skullpos6 = {x=31983, y=32142, z=10, stackpos=1}
skullpos7 = {x=31984, y=32142, z=10, stackpos=1}
bloodpos = {x=31981, y=32142, z=10}
getskull1 = getThingfromPos(skullpos1)
getskull2 = getThingfromPos(skullpos2)
getskull3 = getThingfromPos(skullpos3)
getskullm4 = getThingfromPos(skullmpos4)
getskull5 = getThingfromPos(skullpos5)
getskull6 = getThingfromPos(skullpos6)
getskull7 = getThingfromPos(skullpos7)
getblood = getThingfromPos(bloodpos)
if item.itemid == 8059 and getskull1.itemid == 2320 and getskull2.itemid == 2320 and getskull3.itemid == 2320 and getskull5.itemid == 2320 and getskull6.itemid == 2320 and getskull7.itemid == 2320 and getPlayerStorageValue(cid,50021) == 8 then
if item.itemid == 8059 and item.uid == 60007 and getskullm4.itemid == 5669 and getblood.itemid == 2016 then
doRemoveItem(getskull1.uid,1)
doSendMagicEffect(skullpos1,13)
doRemoveItem(getskull2.uid,1)
doSendMagicEffect(skullpos2,13)
doRemoveItem(getskull3.uid,1)
doSendMagicEffect(skullpos3,13)
doRemoveItem(getskullm4.uid,1)
doSendMagicEffect(skullmpos4,36)
doRemoveItem(getskull5.uid,1)
doSendMagicEffect(skullpos5,13)
doRemoveItem(getskull6.uid,1)
doSendMagicEffect(skullpos6,13)
doRemoveItem(getskull7.uid,1)
doSendMagicEffect(skullpos7,13)
local item = doPlayerAddItem(cid,2091,1)
doItemSetAttribute(item,"aid",4602)
setPlayerStorageValue(cid,55021,9)
doPlayerSendTextMessage(cid,25,"You have found a golden key.")
end
end
return 1
end
Actions.xml
Code:
<action uniqueid="60007" event="script" value="quests/GoldenKey.lua"/>
what i should edit? Someone can help?
Last edited: