• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Yalahari quest help and donate shop system help!

EdwardBrant

New Member
Joined
Jun 13, 2010
Messages
19
Reaction score
0
Hey there, i've got 2 issues,

1; I'm using the yalahari quest scripts by QuaS but when azerus die he doesn't turn into a tp and this error comes in console


http://www15.speedy*****malware.localhost/files/25848605/download/error.jpg

this is the script :
Code:
-- Yalahar 10th mission By QuaS~~ 

-- Config #1 --  
local BlindField = {x=579, y=557, z=10, stackpos=1} 
-- end --  

function mapArea(fromPos, toPos, stack) 
        -- Area iterator by Colandus. 
        local pos = {x=fromPos.x, y=fromPos.y-1, z=fromPos.z} 
        return function() 
                if (pos.y < toPos.y) then 
                        pos.y = pos.y+1 
                elseif (pos.x <= toPos.x) then 
                        pos.y = fromPos.y 
                        pos.x = pos.x+1 
                else 
                        pos.x = fromPos.x 
                        pos.y = fromPos.y 
                        pos.z = pos.z+1 
                end 
                if (pos.x <= toPos.x and pos.y <= toPos.y or pos.z < toPos.z) then 
                        if (stack == nil) then 
                                return pos 
                        else 
                                pos.stackpos = stack 
                                --return pos, getTileThingByPos(pos) 
                                return pos, getTilefromPos(pos) 
                        end 
                end 
        end 
end 


function getMonstersfromArea(fromPos, toPos) 
        local monsters = {}     
        for _, thing in mapArea(fromPos, toPos, 253) do 
                if isMonster(thing.uid) == TRUE then 
                        table.insert(monsters, thing.uid) 
            end 

        end 
          local bfm = getThingfromPos(BlindField) 
            if isMonster(bfm.uid) == TRUE then 
            table.insert(monsters, bfm.uid) 
            end 
        return monsters 
end 


function onUse(cid, item, fromPosition, itemEx, toPosition) 

-- CONFIG #2!!!! -- 


-- Map checking -- 

local topLeft = {x=574, y=560, z=10} 
local buttomRight = {x=589, y=576, z=10} 

-- Immortality of Azerus 
local monsters = getMonstersfromArea(topLeft, buttomRight) 
local monsters1 = getMonstersfromArea(topLeft, buttomRight) 

-- Position Of TP -- 
local tp = {x=581, y=575, z=10} 

-- Position of Gllobus 
local glo = {x=581, y=566, z=10} 

-- END OF CONFIG! -- 



function FirstWave() 
    doSummonCreature("Rift Worm", {x= glo.x - 4,y=glo.y,z=glo.z}) 

    doSummonCreature("Rift Worm", {x= glo.x + 4,y=glo.y,z=glo.z}) 

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 4,z=glo.z}) 

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y - 4,z=glo.z}) 

    doSummonCreature("Rift Worm", {x=glo.x,y=glo.y + 5,z=glo.z}) 

    doSummonCreature("Azerus", {x=glo.x,y=glo.y - 5,z=glo.z}) 
end 

function SecondWave() 
local monsters1 = getMonstersfromArea(topLeft, buttomRight) 

    for _, monster in pairs(monsters1) do 
    if getCreatureName(monster) == "Azerus" then 
    doRemoveCreature(monster) 
    end 
    end 
    doSummonCreature("Azerus1", {x=glo.x,y=glo.y - 5,z=glo.z}) 

    doSummonCreature("Rift Brood", {x= glo.x - 4,y=glo.y,z=glo.z}) 

    doSummonCreature("Rift Brood", {x= glo.x + 4,y=glo.y,z=glo.z}) 

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 4,z=glo.z}) 

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y - 4,z=glo.z}) 

    doSummonCreature("Rift Brood", {x=glo.x,y=glo.y + 5,z=glo.z}) 
end 
function ThirdWave() 
local monsters1 = getMonstersfromArea(topLeft, buttomRight) 

    for _, monster in pairs(monsters1) do 
    if getCreatureName(monster) == "Azerus" then 
    doRemoveCreature(monster) 
    end 
    end 
    doSummonCreature("Azerus2", {x= glo.x - 5,y=glo.y,z=glo.z}) 

    doSummonCreature("Rift Scythe", {x= glo.x - 4,y=glo.y,z=glo.z}) 

    doSummonCreature("Rift Scythe", {x= glo.x + 4,y=glo.y,z=glo.z}) 
end 

function ThirdWave1() --  with 2s delay 

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 4,z=glo.z}) 

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y - 4,z=glo.z}) 

    doSummonCreature("Rift Scythe", {x=glo.x,y=glo.y + 5,z=glo.z}) 
end 

function FourthWave() 
local monsters1 = getMonstersfromArea(topLeft, buttomRight) 

    for _, monster in pairs(monsters1) do 
    if getCreatureName(monster) == "Azerus" then 
    doRemoveCreature(monster) 
    end 
    end 
    doSummonCreature("Azerus3", {x= glo.x - 5,y=glo.y,z=glo.z}) 

    doSummonCreature("War Golem", {x= glo.x - 4,y=glo.y,z=glo.z}) 

    doSummonCreature("War Golem", {x= glo.x + 4,y=glo.y,z=glo.z}) 

    doSummonCreature("War Golem", {x=glo.x,y=glo.y - 4,z=glo.z}) 

    doSummonCreature("War Golem", {x=glo.x,y=glo.y + 4,z=glo.z}) 

end 

function Glllobe() 
item1 = getTileItemById(glo,9767) 
doItemSetAttribute(item1.uid, 58261) 
end 



if item.actionid == 58261 then 
doItemSetAttribute(item.uid, 58263) 
local monsters = getMonstersfromArea(topLeft, buttomRight) 
local monsters1 = getMonstersfromArea(topLeft, buttomRight) 

if getTileItemById(tp,1387).itemid == 1387 then 
doRemoveItem(getTileItemById(tp,1387).uid) 
end 

addEvent(FirstWave, 0) 
addEvent(SecondWave, 10000) 
addEvent(ThirdWave, 20000) 
addEvent(ThirdWave1, 24000) 
addEvent(FourthWave, 38000) 
addEvent(Glllobe, 900000) 


elseif item.actionid == 58263 then 
doCreatureSay(cid, "You have to wait some time before this globe will charge.", TALKTYPE_ORANGE_1) 
end 


return TRUE 
end

2nd problem; When people have donated and is about to redeem their item onto their character it just says Not realized yet and i get this error :

http://www10.speedy*****malware.localhost/files/25848593/download/error%20shop.jpg

this is the script:

Code:
-- ### CONFIG ###
-- message send to player by script "type" (types you can check in "global.lua")
SHOP_MSG_TYPE = 19
-- time (in seconds) between connections to SQL database by shop script
SQL_interval = 30
-- ### END OF CONFIG ###
function onThink(interval, lastExecution)
    local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';")
    if(result_plr:getID() ~= -1) then
        while(true) do
            id = tonumber(result_plr:getDataInt("id"))
            action = tostring(result_plr:getDataString("action"))
            delete = tonumber(result_plr:getDataInt("delete_it"))
            cid = getCreatureByName(tostring(result_plr:getDataString("name")))
            if isPlayer(cid) == TRUE then
                local itemtogive_id = tonumber(result_plr:getDataInt("param1"))
                local itemtogive_count = tonumber(result_plr:getDataInt("param2"))
                local container_id = tonumber(result_plr:getDataInt("param3"))
                local container_count = tonumber(result_plr:getDataInt("param4"))
                local add_item_type = tostring(result_plr:getDataString("param5"))
                local add_item_name = tostring(result_plr:getDataString("param6"))
                local received_item = 0
                local full_weight = 0
                if add_item_type == 'container' then
                    container_weight = getItemWeightById(container_id, 1)
                    if isItemRune(itemtogive_id) == TRUE then
                        items_weight = container_count * getItemWeightById(itemtogive_id, 1)
                    else
                        items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count)
                    end
                    full_weight = items_weight + container_weight
                else
                    full_weight = getItemWeightById(itemtogive_id, itemtogive_count)
                    if isItemRune(itemtogive_id) == TRUE then
                        full_weight = getItemWeightById(itemtogive_id, 1)
                    else
                        full_weight = getItemWeightById(itemtogive_id, itemtogive_count)
                    end
                end
                local free_cap = getPlayerFreeCap(cid)
                if full_weight <= free_cap then
                    if add_item_type == 'container' then
                        local new_container = doCreateItemEx(container_id, 1)
                        local iter = 0
                        while iter ~= container_count do
                            doAddContainerItem(new_container, itemtogive_id, itemtogive_count)
                            iter = iter + 1
                        end
                        received_item = doPlayerAddItemEx(cid, new_container)
                    else
                        local new_item = doCreateItemEx(itemtogive_id, itemtogive_count)
                        received_item = doPlayerAddItemEx(cid, new_item)
                    end
                    if received_item == RETURNVALUE_NOERROR then
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.')
                        db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
                        db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";")
                    else
                        doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.')
                    end
                else
                    doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.')
                end
            end
            if not(result_plr:next()) then
                break
            end
        end
        result_plr:free()
    end
    return TRUE
end
__________________________________________________
ugg boots
uggs
 
Last edited:
Back
Top