engle777
New Member
- Joined
- Aug 4, 2008
- Messages
- 20
- Reaction score
- 0
hey everyone,
i've run into a problem while implementing poi into my server ... I've searched for help on 2 different forums but i've obviously been unsuccessful... <_<
soooo here i am, and here's my problem;
I need a tile/quest door that will only allow you to enter when you walk on top of the poi thrones....
I'm using this script in:
(data\movements\scripts\allthrones.lua)
this is inside movements.xml:
Here's where im confused because it's not working.
ugh!...
i'll give you rep++ for helping me :>
thx
EDIT: I got it working. The red text in the script is wrong... instead of putting -1 to check the storages you have to change it to 1. I took the red text and changed it also i put it in an entire different script and gave an unique id to the tile...didnt use position or item id...
Hope this helps someone...
i've run into a problem while implementing poi into my server ... I've searched for help on 2 different forums but i've obviously been unsuccessful... <_<
soooo here i am, and here's my problem;
I need a tile/quest door that will only allow you to enter when you walk on top of the poi thrones....
I'm using this script in:
(data\movements\scripts\allthrones.lua)
Code:
function onStepIn(cid, item, pos)
if item.uid == 10274 then
if getPlayerStorageValue(cid,10274) == -1 then
setPlayerStorageValue(cid,10274,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Verminor´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Veminor´s spirit.')
end
elseif item.uid == 10275 then
if getPlayerStorageValue(cid,10275) == -1 then
setPlayerStorageValue(cid,10275,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Infernatil´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Infernatil´s spirit.')
end
elseif item.uid == 10276 then
if getPlayerStorageValue(cid,10276) == -1 then
setPlayerStorageValue(cid,10276,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Tafariel´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Tafariel´s spirit.')
end
elseif item.uid == 10277 then
if getPlayerStorageValue(cid,10277) == -1 then
setPlayerStorageValue(cid,10277,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Apocalypse´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Apocalypse´s spirit.')
end
elseif item.uid == 10278 then
if getPlayerStorageValue(cid,10278) == -1 then
setPlayerStorageValue(cid,10278,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Pumin´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Pumin´s spirit.')
end
elseif item.uid == 10280 then
if getPlayerStorageValue(cid,10280) == -1 then
setPlayerStorageValue(cid,10280,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Ashfalor´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Ashfalor´s spirit.')
end
[COLOR="Red"]elseif item.uid == 10281 and item.itemid == 1225 and pos == {x=1583, y=1439, z=8} then
if getPlayerStorageValue(cid,10274) == -1 or getPlayerStorageValue(cid,10275) == -1 or getPlayerStorageValue(cid,10276) == -1 or getPlayerStorageValue(cid,10277) == -1 or getPlayerStorageValue(cid,10278) == -1 then
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Sorry, but you did not absorb enough energy!')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You absorbed enough energy! You may pass.')
end
end
return 1
end[/COLOR]
this is inside movements.xml:
Code:
<movevent type="StepIn" itemid="5915" event="script" value="AllThrones.lua" />
<movevent type="StepIn" itemid="5916" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10281" event="script" value="AllThrones.lua" />
Here's where im confused because it's not working.
ugh!...
i'll give you rep++ for helping me :>
thx
EDIT: I got it working. The red text in the script is wrong... instead of putting -1 to check the storages you have to change it to 1. I took the red text and changed it also i put it in an entire different script and gave an unique id to the tile...didnt use position or item id...
Hope this helps someone...
Last edited: