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

[Skrypt]Gracz dostaje 4cc przy awansie na 60 lvl

Nowera

New Member
Joined
Jan 26, 2010
Messages
12
Reaction score
0
Potrzebuje skryptu takiego jak w tytule.
Jesli trzeba to zaplace.
 
Code:
function onAdvance(cid, type, oldlevel, newlevel)
if(oldlevel ~= newlevel and type == 8) then
if(newlevel == 60) and getPlayerStorageValue(cid, 12345) == FALSE then
doPlayerAddItem(cid, 2160, 4)
setPlayerStorageValue(cid, 12345)
		end
		end
		end
 
Code:
function onAdvance(cid, type, oldlevel, newlevel)
if(oldlevel ~= newlevel and type == 8) then
if(newlevel == 60) and getPlayerStorageValue(cid, 12345) == FALSE then
doPlayerAddItem(cid, 2160, 4)
setPlayerStorageValue(cid, 12345)
		end
		end
		end

fuuj

Lua:
function onAdvance(cid, type, oldlevel, newlevel)
	if (oldlevel ~= newlevel and type == SKILL__LEVEL) then
		if (newlevel >= 60 and getPlayerStorageValue(cid, 12345) == -1) then
			doPlayerAddItem(cid, 2160, 4)
			setPlayerStorageValue(cid, 12345, 1)
		end
	end
	return true
end
 
hmm, safety reasons:D
koles wbija 60lvl, pada, nie mial aola/blessow :(
i mniej roboty jesli capa/miejsca nie ma(jak zrobic zeby sie dodalo jak miejsce sie zrobi?, normalnie dropnie na glebe)
tak mi sie zdaje
 
gdzie to w ogole dodac i z czym? xd

data/creaturescripts/scripts/4cc.lua:
Code:
 function onAdvance(cid, type, oldlevel, newlevel)
    if (oldlevel ~= newlevel and type == SKILL__LEVEL) then
        if (newlevel >= 60 and getPlayerStorageValue(cid, 12345) == -1) then
          doPlayerAddItem(cid, 2160, 4)
          setPlayerStorageValue(cid, 12345, 1)
        end
    end
    return true
end
data/creaturescripts/creaturescripts.xml:
Code:
<event type="advance" name="4cc" event="script" value="4cc.lua"/>

data/creaturescripts/scripts/login.lua:
Code:
registerCreatureEvent(cid, "4cc")

rep++
 
Back
Top