Quest Cc problem z skryptem

Cgf

Advanced User
Zarejestrowany
Dołączył
Sierpień 17, 2009
Posty
334
Liczba reakcji
8
Witam mam quest lvlowy na cc skrypt:

Kod:
function onUse(cid, item, fromPosition, itemEx, toPosition)  
if item.uid == 1050 then 
   level = 50  
   ilosc = 5 
   storage = 5436 
elseif item.uid == 1100 then 
   level = 100 
   ilosc = 10 
   storage = 5437 
elseif item.uid == 1200 then 
   level = 200 
   ilosc = 20 
   storage = 5438 
elseif item.uid == 1350 then 
   level = 300 
   ilosc = 30 
   storage = 5439 
end 
local nagroda = 2160  
if item.uid == 1050 or item.uid ==1100 then  
    if getPlayerStorageValue(cid, storage) == -1 then  
        if getPlayerLevel(cid) >= level then  
            doPlayerAddItem(cid, nagroda, ilosc)  
            setPlayerStorageValue(cid, storage, 0)  
            doPlayerSendTextMessage(cid, 22, "Znalazles "..ilosc.." cc.")  
        else  
            doPlayerSendTextMessage(cid, 22, "Wymagany poziom to "..level..", brakuje Ci jeszcze "..level-getPlayerLevel(cid).." by moc wziac nagrode.")  
        end  
    else  
        doPlayerSendTextMessage(cid, 22, "Pusto.")  
    end  
end  
return TRUE
end
Ostatnie 2 skrzynki nie dzia?aj? 200 lvl i 300 czego to jest powodem?
 
Odp: Quest Cc problem z skryptem

@@@@@@@@ REFRESH Prosz? o pomoc!!!
 
Odp: Quest Cc problem z skryptem

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)  
if item.uid == 1050 then 
   level = 50  
   ilosc = 5 
   storage = 5436 
elseif item.uid == 1100 then 
   level = 100 
   ilosc = 10 
   storage = 5437 
elseif item.uid == 1200 then 
   level = 200 
   ilosc = 20 
   storage = 5438 
elseif item.uid == 1350 then 
   level = 300 
   ilosc = 30 
   storage = 5439 
end 
local nagroda = 2160  
if item.uid == 1050 or item.uid == 1100 or item.uid == 1200 or item.uid == 1350 then
    if getPlayerStorageValue(cid, storage) == -1 then  
        if getPlayerLevel(cid) >= level then  
            doPlayerAddItem(cid, nagroda, ilosc)  
            setPlayerStorageValue(cid, storage, 0)  
            doPlayerSendTextMessage(cid, 22, "Znalazles "..ilosc.." cc.")  
        else  
            doPlayerSendTextMessage(cid, 22, "Wymagany poziom to "..level..", brakuje Ci jeszcze "..level-getPlayerLevel(cid).." by moc wziac nagrode.")  
        end  
    else  
        doPlayerSendTextMessage(cid, 22, "Pusto.")  
    end  
end  
return TRUE
end
Sprawdz czy
Kod:
elseif item.uid == 1350 then
Masz dobre UID, bo wszedzie masz rownowartosc z lvlem czyli 1000+lvl
1050=50lvl itd az to 300 ; d
 
Odp: Quest Cc problem z skryptem

Nie dzia?a po prostu nabi?e? posta ^^ Prosz? o pomoc!
 
Back
Do góry