• 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!

Quest (na nowym tfs)

Myszax

New Member
Joined
Jan 6, 2009
Messages
10
Reaction score
0
Witam!
Mam takie pytanie jak dodać do tego skryptu:
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8000 then
queststatus = getPlayerStorageValue(cid,1003)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a ' .. getItemNameById(item.uid) .. '.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,1003,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"It is empty.")
end
else
return 0
end
return 1
end
Gdy gracz nie ma cap na podniesienie itema tu piszę mu na zielono, że potrzebuje tyle i tyle cap i żeby item nie pojawiał się pod nim.
 
dziala... w actionID dajesz storageid questa czyli jakis unikalny numerek xd
zalorzmy 40001 a itemy ustawiasz w map editorze,jesli sie myle to mnie poprawcie :P
 
Łap Myszko :wub:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local queststatus = getPlayerStorageValue(cid, 1003)
    if(queststatus == 1) then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
        return true
    end
    if(item.uid == 8000) then
        if(doPlayerAddItem(cid, 2493, 1) ~= RETURNVALUE_NOERROR) then
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is too heavy or you have not enough space.")
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a " .. getItemNameById(item.uid) .. ".")
            setPlayerStorageValue(cid, 1003, 1)
        end
    end
    return true
end
 
Back
Top