Questy

Status
Zamknięty.
Odp: Questy

wklej to do
data/action/scripts/dhq/dhqchest


function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 50018 then
queststatus = getPlayerStorageValue(cid,50018)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have a demon helmet.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,50018,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 50017 then
queststatus = getPlayerStorageValue(cid,50017)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found steel boots.")
doPlayerAddItem(cid,2645,1)
setPlayerStorageValue(cid,50017,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 50016 then
queststatus = getPlayerStorageValue(cid,50016)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon shield.")
doPlayerAddItem(cid,2520,1)
setPlayerStorageValue(cid,50016,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end

:rotfl::rotfl::rotfl: powinno dzia?a?
 
Odp: Questy

Lipa dalej
[05/12/2009 21:44:19] [warning - event::loadscript] cannot load script (data/actions/scripts/annihilator.lua)
[05/12/2009 21:44:19] cannot open data/actions/scripts/annihilator.lua: No such file or directory
;/;/;/ help
 
Odp: Questy

Kod:
data/actions/scripts/annihilator.lua:

Pisze tu wyraznie chyba? :D:D:D:D

A ty masz problem z DHQ..

Pozdro.. Echem..! ; ))
 
Odp: Questy

No w?a?nie piszesz ze DHQ masz zwalone a tak naprawde chodzi o anni! pozdro pomy?l na drugi raz

annihilator.lua
local playerPosition =
{
{x = 33222, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 33223, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 33224, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE},
{x = 33225, y = 31671, z = 13, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
{x = 33219, y = 31659, z = 13},
{x = 33220, y = 31659, z = 13},
{x = 33221, y = 31659, z = 13},
{x = 33222, y = 31659, z = 13}
}

-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = FALSE

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
for i = 1, 4 do
failed = TRUE
player = getThingfromPos(playerPosition)
if player.itemid > 0 then
if isPlayer(player.uid) == TRUE then
if getPlayerStorageValue(player.uid, 30015) == -1 then
if getPlayerLevel(player.uid) >= 100 then
failed = FALSE
end
end
end
end
if failed == TRUE then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
end
for i = 1, 4 do
doSendMagicEffect(playerPosition, CONST_ME_POFF)
doTeleportThing(player.uid, newPosition, FALSE)
doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return TRUE
end


annichest.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 2000 then
queststatus = getPlayerStorageValue(cid,2000)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon armor.")
doPlayerAddItem(cid,2494,1)
setPlayerStorageValue(cid,2000,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 2001 then
queststatus = getPlayerStorageValue(cid,2001)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a magic sword.")
doPlayerAddItem(cid,2400,1)
setPlayerStorageValue(cid,2001,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 2002 then
queststatus = getPlayerStorageValue(cid,2002)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a stonecutter axe.")
doPlayerAddItem(cid,2431,1)
setPlayerStorageValue(cid,2002,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 2003 then
queststatus = getPlayerStorageValue(cid,2003)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a present.")
doPlayerAddItem(cid,1990,1)
setPlayerStorageValue(cid,2003,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end
 
Ostatnia edycja:
Odp: Questy

Lipa ';/;/;/;/ a jak nacisne na skrzynki na to nagrody nie dostaje ;/

[06/12/2009 07:41:03] Lua Script Error: [Action Interface]
[06/12/2009 07:41:03] data/actions/scripts/annihilator.lua:onUse

[06/12/2009 07:41:03] luaGetThingFromPos(). Tile not found

[06/12/2009 07:41:04] Lua Script Error: [Action Interface]
[06/12/2009 07:41:04] data/actions/scripts/annihilator.lua:onUse

[06/12/2009 07:41:04] luaGetThingFromPos(). Tile not found

[06/12/2009 07:41:04] Lua Script Error: [Action Interface]
[06/12/2009 07:41:04] data/actions/scripts/annihilator.lua:onUse

[06/12/2009 07:41:04] luaGetThingFromPos(). Tile not found

[06/12/2009 07:41:04] Lua Script Error: [Action Interface]
[06/12/2009 07:41:04] data/actions/scripts/annihilator.lua:onUse

[06/12/2009 07:41:04] luaGetThingFromPos(). Tile not found

[06/12/2009 07:41:04] Lua Script Error: [Action Interface]
[06/12/2009 07:41:04] data/actions/scripts/annihilator.lua:onUse

[06/12/2009 07:41:04] luaGetThingFromPos(). Tile not found
[06/12/2009 07:41:14] Mentoria Team has logged out.
 
Odp: Questy

Bravo.. A u?ywasz takiego czego? jak RME..?

Tutaj masz data/actions/scripts/annihilator.lua

PHP:
        -- CONFIG --

        local room = {     -- room with demons
        fromX = 870,
        fromY = 1035,
        fromZ = 7,
        --------------
        toX = 875,
        toY = 1039,
        toZ = 7
        }

        local monster_pos = {
        [1] = {pos = {870, 1035, 7}, monster = "Demon"},
        [2] = {pos = {872, 1035, 7}, monster = "Demon"},
        [3] = {pos = {871, 1039, 7}, monster = "Demon"},
        [4] = {pos = {873, 1039, 7}, monster = "Demon"},
        [5] = {pos = {874, 1037, 7}, monster = "Demon"},
        [6] = {pos = {875, 1037, 7}, monster = "Demon"}
        }

        local players_pos = {
        {x = 895, y =1037, z = 7, stackpos = 253},
        {x = 895, y =1038, z = 7, stackpos = 253},
        {x = 895, y =1039, z = 7, stackpos = 253},
        {x = 895, y =1040, z = 7, stackpos = 253}
        }

        local new_player_pos = {
        {x = 873, y = 1037, z = 7},
        {x = 872, y = 1037, z = 7},
        {x = 871, y = 1037, z = 7},
        {x = 870, y = 1037, z = 7}
        }

        local playersOnly = "no"
        local questLevel = 101

        ------------------------------------------------------
        --- CONFIG END ---------------------------------------
        ------------------------------------------------------

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local all_ready, monsters, player, level = 0, 0, {}, 0
        if item.itemid == 1945 then
                for i = 1, #players_pos do
                        table.insert(player, 0)
                end
                for i = 1, #players_pos do
                        player[i] = getThingfromPos(players_pos[i])
                        if player[i].itemid > 0 then
                                if string.lower(playersOnly) == "yes" then
                                        if isPlayer(player[i].uid) == TRUE then
                                                all_ready = all_ready+1
                                        else
                                                monsters = monsters+1
                                        end
                                else
                                        all_ready = all_ready+1
                                end
                        end
                end
                if all_ready == #players_pos then
                        for i = 1, #players_pos do
                                player[i] = getThingfromPos(players_pos[i])
                                if isPlayer(player[i].uid) == TRUE then
                                        if getPlayerLevel(player[i].uid) >= questLevel then
                                                level = level+1
                                        end
                                else
                                        level = level+1
                                end
                        end
                        if level == #players_pos then
                                if string.lower(playersOnly) == "yes" and monsters == 0 or string.lower(playersOnly) == "no" then
                                        for _, area in pairs(monster_pos) do
                                                        doSummonCreature(area.monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]})
                                        end
                                        for i = 1, #players_pos do
                                                doSendMagicEffect(players_pos[i], CONST_ME_POFF)
                                                doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
                                                doSendMagicEffect(new_player_pos[i], CONST_ME_ENERGYAREA)
                                                doTransformItem(item.uid,1946)
                                        end
                                else
                                        doPlayerSendTextMessage(cid,19,"Only players can do this quest.")
                                end
                        else
                                doPlayerSendTextMessage(cid,19,"All Players have to be level "..questLevel.." to do this quest.")
                        end
                else
                        doPlayerSendTextMessage(cid,19,"You need "..table.getn(players_pos).." players to do this quest.")
                end
        elseif item.itemid == 1946 then
                local player_room = 0
                for x = room.fromX, room.toX do
                        for y = room.fromY, room.toY do
                                for z = room.fromZ, room.toZ do
                                        local pos = {x=x, y=y, z=z,stackpos = 253}
                                        local thing = getThingfromPos(pos)
                                        if thing.itemid > 0 then
                                                if isPlayer(thing.uid) == TRUE then
                                                        player_room = player_room+1
                                                end
                                        end
                                end
                        end
                end
                if player_room >= 1 then
                        doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.")          
                elseif player_room == 0 then
                        for x = room.fromX, room.toX do
                                for y = room.fromY, room.toY do
                                        for z = room.fromZ, room.toZ do
                                                local pos = {x=x, y=y, z=z,stackpos = 253}
                                                local thing = getThingfromPos(pos)
                                                if thing.itemid > 0 then
                                                        doRemoveCreature(thing.uid)
                                                end
                                        end
                                end
                        end
                        doTransformItem(item.uid,1945)
                end
        end
        return TRUE
end

- data/actions/actions.xml
PHP:
        <action uniqueid="3030" event="script" value="Annihilator.lua"/

I jak masz skrzynki na ANI Klikasz prawym myszki i ustawiasz uniqueid!

Pozdro. ; ))
 
Status
Zamknięty.
Back
Do góry