Ryxan
Spanish Crew
As the topic says.
Level Required: 45
Required Equipment
- 1 Power Ring
__________________
Well, First of all:
It is based in actions, data/actions/..
Create a new file called: powerring.lua and add this inside.
Power Ring
In Actions.xml
==> Power Ring
==> Wall
==> UNIQUEID ("8889")
Bright Sword QuestCREDITS BY CYKOTITAN!
Level Required: 45
Required Equipment
- 1 Power Ring
__________________
Well, First of all:
It is based in actions, data/actions/..
Create a new file called: powerring.lua and add this inside.
Power Ring
Code:
local t = {
interval = 2,
itemID = 2166,
itempos = {x=32594, y=32214, z=9},
wallpos = {x=32604, y=32216, z=9},
wallnewID = 1103 -- why do you use a new id ? the quest won't be resettable
}
local event = 0
function onUse(cid, item, fromPosition, itemEx, toPosition)
local getitem, wallchk = getTileItemById(t.itempos, 2166).uid, getTileItemById(t.wallpos, 1025).uid
if item.itemid == 1945 then
if getitem > 0 and wallchk > 0 then
doSendMagicEffect(t.itempos, CONST_ME_TELEPORT)
doSendMagicEffect(t.wallpos, CONST_ME_TELEPORT)
doRemoveItem(getitem)
doRemoveItem(wallchk)
doTransformItem(item.uid, 1946)
event = addEvent(doCreateItem, t.interval * 60 * 1000, t.wallnewID, 1, t.wallpos)
else
doPlayerSendCancel(cid, "There is something missing.")
end
elseif item.itemid == 1946 then
stopEvent(event)
doCreateItem(t.wallnewID, 1, t.wallpos)
doTransformItem(item.uid, 1945)
end
return TRUE
end
PHP:
<action uniqueid="8889" script="powerring.lua" />
==> Power Ring
==> Wall
==> UNIQUEID ("8889")
Last edited: