ond
Veteran OT User
Hello, I wonder if someone got time to help me with an issue. I'm creating paradox quest and I have a problem with some scripting.
NOTE: The letters tells you which rewards you WON'T get. So, if you want 10k and 32 talons, walk over the two switch tiles E and W. This will remove Phoenix Egg and Wand of Cosmic Energy.
K = 10k gp
W = Wand of Cosmic Energy
T = 32 Talons
E = Phoenix Egg
WARNING: Walk over the items you don't want get!, so be careful. The light green words show what reward each chest gives.
Therefore, if you walk straight up the 2nd left, your rewards will be 100 Platinum Coins and 32 Talons (W and E removed).
Here is a link to how paradox quest works:
Tibia Wikia - Paradox Quest
Here is my scripts so far:
Actions::Chests
and
Movements::Tiles
NOTE: The letters tells you which rewards you WON'T get. So, if you want 10k and 32 talons, walk over the two switch tiles E and W. This will remove Phoenix Egg and Wand of Cosmic Energy.
K = 10k gp
W = Wand of Cosmic Energy
T = 32 Talons
E = Phoenix Egg
WARNING: Walk over the items you don't want get!, so be careful. The light green words show what reward each chest gives.
Therefore, if you walk straight up the 2nd left, your rewards will be 100 Platinum Coins and 32 Talons (W and E removed).
Here is a link to how paradox quest works:
Tibia Wikia - Paradox Quest
Here is my scripts so far:
Actions::Chests
Lua:
function onUse(cid, item, item2, toPos, fromPos)
cash = getPlayerStorageValue(cid, 19795),
egg = getPlayerStorageValue(cid, 19796),
wand = getPlayerStorageValue(cid, 19797),
talon = getPlayerStorageValue(cid, 19798)
-- Remember, everything should reversed.
-- Walking on tile "cash" and "wand" should result in egg & talon as reward
-- And so on...
if item.uid == 2056 then
if wand == -1 or wand == 0 then
setPlayerStorageValue(cid, wand, 1)
doPlayerAddItem(cid, 2189, 1)
doPlayerSendTextMessage(cid,22,"You have found a wand of cosmic energy.")
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2057 then
if talon == -1 or talon == 0 then
setPlayerStorageValue(cid, talon, 1)
doPlayerAddItem(cid, 2151, 32)
doPlayerSendTextMessage(cid,22,"You have found 32 talons.")
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2058 then
if cash == -1 or cash == 0 then
setPlayerStorageValue(cid, cash, 1)
doPlayerAddItem(cid, 2152, 1000)
doPlayerSendTextMessage(cid,22,"You have found 100 platinum coins.")
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
elseif item.uid == 2059 then
if egg == -1 or egg == 0 then
setPlayerStorageValue(cid, egg, 1)
doPlayerAddItem(cid, 2328, 1)
doPlayerSendTextMessage(cid,22,"You have found a pheonix egg.")
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
and
Movements::Tiles
Lua:
function onStepIn(cid, item, pos)
local phoenixegg = {x=32477, y=31900, z=1, stackpos=1}
local gold = {x=32478, y=31900, z=1, stackpos=1}
local talons = {x=32479, y=31900, z=1, stackpos=1}
local wand = {x=32480, y=31900, z=1, stackpos=1}
if item.actionid == 131 then --Phoenix Egg
setPlayerStorageValue(cid,19795,1)
doSendMagicEffect(phoenixegg,5)
elseif item.actionid == 132 then --10k
setPlayerStorageValue(cid,19796,1)
doSendMagicEffect(gold,5)
elseif item.actionid == 133 then --32 Talons
setPlayerStorageValue(cid,19797,1)
doSendMagicEffect(talons, 5)
elseif item.actionid == 134 then --Wand Of Cosmic
setPlayerStorageValue(cid,19798,1)
doSendMagicEffect(wand, 5)
end
return TRUE
end
Last edited: