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

exhausted - jak dodac

Status
Not open for further replies.

dima0909

Banned User
Joined
Oct 18, 2012
Messages
271
Reaction score
0
mam skrypt na to by po uzyciu itemka o ID x dodawało się y expa...
jak dodać exhausted? by nie można było używać tego itemka co 2 sekundy ?

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= 1 then
doPlayerAddExp(cid, 150000)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doCreatureSay(cid, "1000000 Expa Dla Ciebie!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid,1)
return TRUE
else
end
end
 
Last edited:
jak zwraca prawdę to już chyba nadaje te 1kms

ogólnie te funkcje chyba też się zmieniały, podawaj wersję silnika(NIE PROTOKÓŁ!)
 
exhausted* nie exhoused nawet napisać poprawnie nie potrafisz jednego z podstawowych słówek którego uczą w gimbazjum. Weź może idź do szkoły wykup jakieś dodatkowe lekcje i proszę Cię zakończ swoją karierę z open tibią.
 
Last edited:
hahahhaa pojebało mnie bo mu pomogę lol

do lib'a jako exhaustion.lua albo jak ty to wolisz exhoused.lua

Lua:
exhaustion = 
{ 
    check = function (cid, storage) 
        if(getPlayerStorageValue(cid, storage) >= os.time(t)) then 
            return TRUE 
        end 
        return FALSE 
    end, 
    get = function (cid, storage) 
        local exhaust = getPlayerStorageValue(cid, storage) 
        if(exhaust > 0) then 
            local left = exhaust - os.time(t) 
            if(left >= 0) then 
                return left 
            end 
        end 
        return FALSE 
    end, 
    set = function (cid, storage, time) 
        setPlayerStorageValue(cid, storage, os.time(t) + time) 
    end, 
    make = function (cid, storage, time) 
        local exhaust = exhaustion.get(cid, storage) 
        if(not exhaust) then 
            exhaustion.set(cid, storage, time) 
            return TRUE 
        end 
        return FALSE 
    end 
}


a do skryptu lua
dodajesz

Lua:
local exhaustionInSeconds = 4
       local storage = 34235
	if(exhaustion.check(cid, storage) == true) then
	doPlayerSendCancel(cid, "Exhaustion!")
    return 0
	end
	exhaustion.set(cid, storage, exhaustionInSeconds)


To teraz

1. czy skuma jak wykorzystać to czy nie?
2. czemu mu pomogłem lol?
3. dlaczego go flejmujemy
 
a do skryptu lua
dodajesz

Lua:
local exhaustionInSeconds = 4
       local storage = 34235
	if(exhaustion.check(cid, storage) == true) then
	doPlayerSendCancel(cid, "Exhaustion!")
    return 0
	end
	exhaustion.set(cid, storage, exhaustionInSeconds)

działa, dzięki.
 
Status
Not open for further replies.

Similar threads

Back
Top