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

War Ots Pytanie

Veniox

New Member
Joined
Jan 24, 2012
Messages
75
Reaction score
2
Location
Poland
Witajcie mam do was pytanie co do pewnej rzeczy chce zrobic u mnie na war otsie taka opcje ze jak gracz zdobedzie 20 fragow dostaje green skulla , jak 50 red skulla itp i to trzeba zrobic w plikac c++ ? prosze o pomoc :)
 
W lua możesz napisać część odpowiedzialną za dodanie skulli, a w źródłach musisz usunąć te wszystkie duperele np. spadające eq na rsie.
 
Dziekuje wam za doradzenie , zrobilem cos takiego mam nadzieje ze dobrze wyszlo ;x

Code:
local storage = 20233
local reward = {
        item = 11197,
        count = 1
}
function onKill(cid, target, flags, damage)
	if isPlayer(target) then
		--[[if getPlayerIp(cid) ~= getPlayerIp(target) then]]
				local frags = math.max(0, getPlayerStorageValue(cid, storage))
				doCreatureSetStorage(cid, storage, frags+1)
				if(frags >= 30) then
					doCreatureSetGuildEmblem(cid, EMBLEM_WHITE)
				elseif(frags >= 80) then
					doCreatureSetGuildEmblem(cid, EMBLEM_BLUE)
				elseif(frags >= 130) then
					doCreatureSetGuildEmblem(cid, EMBLEM_GREEN)
				end
				
				if getPlayerItemCount(cid, reward.item) > 0 then
					local item = getPlayerItemById(cid, true, reward.item)
					if item.type >= 100 then
						doPlayerAddItem(cid, reward.item, reward.count)
					else
						doTransformItem(item.uid, reward.item, item.type + 1)
					end
				else
					doPlayerAddItem(cid, reward.item, reward.count)
				end
				doSendAnimatedText(getPlayerPosition(cid), "Frag!", TEXTCOLOR_RED)
		--[[else
			doPlayerSendTextMessage(cid, 18, "You didn't get frag/reward because of killing a player with same ip.")
		end]]
	end
	return true
end
 
Back
Top