Witam, mam problem ze svargrond arena, najpierw opisze problem a nastepnie pokaze scrypt co i gdzie sie znajduje.
To zaczynam.
Drzwi svarareny dzialaja, place 2k i wchodze, dochodze do trzech teleportow,
i tu pierwszy problem, gdy chce wejsc w teleport pisze First Kill Monster!
![](/proxy.php?image=http%3A%2F%2Fimg153.imageshack.us%2Fimg153%2F461%2Feu0002.jpg&hash=f860f1ece62021bc094327a1f35bde2f)
Ale co najdziwniejsze da sie wejsc GODem,
gdy wchodze to logiczne aby wejsc w teleport dalej trzeba zabic potwora, zabijam
i pisze First Kill Monster!
![](/proxy.php?image=http%3A%2F%2Fimg191.imageshack.us%2Fimg191%2F5928%2Feu0004.th.jpg&hash=154c36d00e9aa839ed264e0b89c602cb)
Dalej robie Godem tp do roomu z nagrodami,
drzwi od pokoi wydaja sie jakby dzialaly poniewaz gdy próbuje otworzyc pisze
You can not enter room
Skrzynki questowe niedzialaja, nieda sie ich otworzyc, ale da sie przesowac i nie daja itemu.
Sprawdzilem w map edytorze maja dodane actionID
![](/proxy.php?image=http%3A%2F%2Fimg696.imageshack.us%2Fimg696%2F2257%2Farenw.th.jpg&hash=10b1737116e07b9dd51d4b5c0f02d6fc)
teraz czas na Actions.xml
i pliki lua:
arenadoors.lua (To działa)
arenareward.lua
Orientuje sie ktos czemu teleporty oraz skrzynki nie dzialaja?
To zaczynam.
Drzwi svarareny dzialaja, place 2k i wchodze, dochodze do trzech teleportow,
i tu pierwszy problem, gdy chce wejsc w teleport pisze First Kill Monster!
![](/proxy.php?image=http%3A%2F%2Fimg153.imageshack.us%2Fimg153%2F461%2Feu0002.jpg&hash=f860f1ece62021bc094327a1f35bde2f)
Ale co najdziwniejsze da sie wejsc GODem,
gdy wchodze to logiczne aby wejsc w teleport dalej trzeba zabic potwora, zabijam
i pisze First Kill Monster!
![](/proxy.php?image=http%3A%2F%2Fimg191.imageshack.us%2Fimg191%2F5928%2Feu0004.th.jpg&hash=154c36d00e9aa839ed264e0b89c602cb)
Dalej robie Godem tp do roomu z nagrodami,
drzwi od pokoi wydaja sie jakby dzialaly poniewaz gdy próbuje otworzyc pisze
You can not enter room
Skrzynki questowe niedzialaja, nieda sie ich otworzyc, ale da sie przesowac i nie daja itemu.
Sprawdzilem w map edytorze maja dodane actionID
![](/proxy.php?image=http%3A%2F%2Fimg696.imageshack.us%2Fimg696%2F2257%2Farenw.th.jpg&hash=10b1737116e07b9dd51d4b5c0f02d6fc)
teraz czas na Actions.xml
Code:
- <!-- Arena Svargrond -->
<action actionid="42366" script="arena/arenadoors.lua" />
<action actionid="42376" script="arena/arenadoors.lua" />
<action actionid="42386" script="arena/arenadoors.lua" />
<action actionid="42357" script="arena/arenadoors.lua" />
<action actionid="42361" script="arena/arenareward.lua" />
<action actionid="42362" script="arena/arenareward.lua" />
<action actionid="42363" script="arena/arenareward.lua" />
<action actionid="42364" script="arena/arenareward.lua" />
<action actionid="42365" script="arena/arenareward.lua" />
<action actionid="42371" script="arena/arenareward.lua" />
<action actionid="42372" script="arena/arenareward.lua" />
<action actionid="42373" script="arena/arenareward.lua" />
<action actionid="42374" script="arena/arenareward.lua" />
<action actionid="42375" script="arena/arenareward.lua" />
<action actionid="42381" script="arena/arenareward.lua" />
<action actionid="42382" script="arena/arenareward.lua" />
<action actionid="42383" script="arena/arenareward.lua" />
<action actionid="42384" script="arena/arenareward.lua" />
<action actionid="42385" script="arena/arenareward.lua" />
i pliki lua:
arenadoors.lua (To działa)
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if item.actionid ~= 42357 then
if (item.actionid == 42366 and getPlayerStorageValue(cid,42355) >= 1) or (item.actionid == 42376 and getPlayerStorageValue(cid,42355) >= 2) or (item.actionid == 42386 and getPlayerStorageValue(cid,42355) == 3) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not enter room.")
return TRUE
end
elseif (item.actionid == 42357 and getPlayerStorageValue(cid,42351) == 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must pay first.")
return TRUE
end
return FALSE
end
arenareward.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid >= 42361 and item.actionid <= 42365 and getPlayerStorageValue(cid, 42361) ~= 1 then
local reward = 0
if item.actionid == 42361 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 2114, 1)
elseif item.actionid == 42362 then
reward = doCreateItemEx(7406,1)
elseif item.actionid == 42363 then
reward = doCreateItemEx(7380,1)
elseif item.actionid == 42364 then
reward = doCreateItemEx(7392,1)
elseif item.actionid == 42365 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 7364, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42361, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42371 and item.actionid <= 42375 and getPlayerStorageValue(cid, 42371) ~= 1 then
local reward = 0
if item.actionid == 42371 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 7183, 1)
elseif item.actionid == 42372 then
reward = doCreateItemEx(7384,1)
elseif item.actionid == 42373 then
reward = doCreateItemEx(7389,1)
elseif item.actionid == 42374 then
reward = doCreateItemEx(7415,1)
elseif item.actionid == 42375 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 7365, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2547, 100)
doAddContainerItem(reward, 2311, 50)
doAddContainerItem(reward, 2304, 50)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42371, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
elseif item.actionid >= 42381 and item.actionid <= 42385 and getPlayerStorageValue(cid, 42381) ~= 1 then
local reward = 0
if item.actionid == 42381 then
reward = doCreateItemEx(1990,1)
doAddContainerItem(reward, 7372, 1)
doAddContainerItem(reward, 6569, 10)
doAddContainerItem(reward, 6574, 1)
doAddContainerItem(reward, 6568, 1)
elseif item.actionid == 42382 then
reward = doCreateItemEx(7429,1)
elseif item.actionid == 42383 then
reward = doCreateItemEx(7434,1)
elseif item.actionid == 42384 then
reward = doCreateItemEx(7390,1)
elseif item.actionid == 42385 then
reward = doCreateItemEx(7342,1)
doAddContainerItem(reward, 2273, 50)
doAddContainerItem(reward, 2268, 50)
doAddContainerItem(reward, 7443, 1)
doAddContainerItem(reward, 7440, 1)
doAddContainerItem(reward, 6529, 100)
end
if doPlayerAddItemEx(cid, reward, 0) == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You found ' .. getItemName(getThing(reward).uid) .. '.')
setPlayerStorageValue(cid, 42381, 1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You do not have enought capacity or place in backpack.')
end
end
return TRUE
end
Orientuje sie ktos czemu teleporty oraz skrzynki nie dzialaja?