Zoe Skandinavia
Member
- Joined
- Jul 18, 2014
- Messages
- 193
- Solutions
- 2
- Reaction score
- 15
Hi, i'm trying to create a script for my quest. This script consist in: you have to get on a throne to get a storage and with that can pass through an invisible portal.
In console doesnt appear any mistake or something and in game it doesnt work.
This is my script:
And i put this on movements.xml
Please help. Thanks!.
In console doesnt appear any mistake or something and in game it doesnt work.
This is my script:
Code:
function onStepIn (cid, item, position, lastPosition)
local thrones = {
[9632] = {storage = 96320},
[9633] = {storage = 96321},
[9634] = {storage = 96322},
[9635] = {storage = 96323}
}
local teleports = {
[9732] = {newPos = {x = 32425, y = 32312, z = 15}, storage = 96320},
[9733] = {newPos = {x = 32457, y = 32316, z = 15}, storage = 96321},
[9734] = {newPos = {x = 32476, y = 32310, z = 15}, storage = 96322},
[9735] = {newPos = {x = 32497, y = 32309, z = 15}, storage = 96323}
}
local v = thrones[item.uid]
local vv = teleports[item.uid]
if (v) then
if getPlayerStorageValue(cid, thrones[item.uid].storage) == -1 then
setPlayerStorageValue(cid, thrones[item.uid].storage, 1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
doCreatureSay(cid, "Muahaha...", TALKTYPE_ORANGE_1)
end
end
if (vv) then
if getPlayerStorageValue(cid, teleports[item.uid].storage) == 1 then
doTeleportThing(cid, teleports[item.uid].newPos)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
else
doTeleportThing(cid, lastPosition)
doCreatureSay(cid, "You don't have the throne bless.", TALKTYPE_ORANGE_1)
end
end
return true
end
And i put this on movements.xml
Code:
<movement event="StepIn" fromuid="9632" touid="9635" script="exceed quest/exceedsteps.lua"/>
<movement event="StepIn" fromuid="9732" touid="9735" script="exceed quest/exceedsteps.lua"/>
Please help. Thanks!.