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

Runa dajaca promocje - blokada

Status
Not open for further replies.

qban

RazorsEdge
Joined
Feb 19, 2010
Messages
145
Reaction score
15
Location
Sanok, Poland
Witam, postanowiłem u siebie na OTSie zrobić runę, która dawałaby promocję...
Znalazłem na taką skrypt, ale jest jeden problem... mianowicie nie ma blokady i gdy ktoś ma już promocję, to po użyciu runy "wywala" mu profesję.
Próbowałem bawić się w dodawanie linijki:
ifgetPlayerVocation(cid) <= 4 then
ale nic to nie dało (być może dodałem ją w złe miejsce).
I właśnie dlatego zwracam się do Was z ogromną prośbą o wciśnięcie takiej "blokady" do tego skryptu:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2275 then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,2275)
doPlayerSetVocation(cid, getPlayerVocation(cid)+4)
doSendMagicEffect(playerpos, 12)
doPlayerSendTextMessage(cid,22,"Otrzymales Promocje")
end
end
Z góry dzięki, pozdrawiam: Qban
 
Lua:
function onUse(cid, item, frompos, item2, topos)
	if(getPlayerPromotionLevel(cid) < 1) then
		doRemoveItem(item.uid)
		doPlayerSetPromotionLevel(cid, 1)
		doSendMagicEffect(getCreaturePosition(cid), 12)
		doPlayerSendTextMessage(cid, 22, "Otrzymales Promocje")
	else
		doPlayerSendTextMessage(cid, 22, "Masz juz promocje kartoflu.")
	end
end
 
Status
Not open for further replies.
Back
Top