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

Lua Kill.lua (arena svar and guild war) problem

Tuchol

falania.com
Joined
Nov 21, 2008
Messages
387
Reaction score
14
Location
Uzbekistan
i have problem in kill.lua .I want to use the svargrond arena and guild wars but only the arena works. My script:
PHP:
dofile("./GuildWar.lua")

local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('pzLocked'))

function onKill(cid, target)
	if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
		local myGuild = getPlayerGuildId(cid)
		local enemyGuild = getPlayerGuildId(target)
		if myGuild ~= 0 and enemyGuild ~= 0 then
			if enemyGuild == getGuildWarInfo(myGuild).With then
				removeFrag(cid)
				doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This Frag will not count") --Remove this if you wish
				doAddCondition(cid, PZ)
				registerDeath(myGuild, enemyGuild, cid, target)
			end
		end
        end
	return TRUE
end

function onKill(cid, target)
	local monster = getCreatureName(target)
	local room = getArenaMonsterIdByName(monster)
	if room > 0 then
		setPlayerStorageValue(cid, room, 1)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You can enter to next room!')
	end
       return TRUE
end
i using tfs 0.3.4pl2
 
LUA:
dofile("./GuildWar.lua")

local PZ = createConditionObject(CONDITION_INFIGHT)
setConditionParam(PZ, CONDITION_PARAM_TICKS, getConfigInfo('pzLocked'))

function onKill(cid, target)
    if isPlayer(cid) == TRUE and isPlayer(target) == TRUE then
        local myGuild = getPlayerGuildId(cid)
        local enemyGuild = getPlayerGuildId(target)
        if myGuild ~= 0 and enemyGuild ~= 0 then
            if enemyGuild == getGuildWarInfo(myGuild).With then
                removeFrag(cid)
                doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "This Frag will not count") --Remove this if you wish
                doAddCondition(cid, PZ)
                registerDeath(myGuild, enemyGuild, cid, target)
            end
     end
end 
	local monster = getCreatureName(target)
	local room = getArenaMonsterIdByName(monster)
	if room > 0 then
		setPlayerStorageValue(cid, room, 1)
		doPlayerSendTextMessage(cid,MESSAGE_EVENT_DEFAULT,'You can enter next arena room!')
	end
	return TRUE
end
 
Back
Top