What's new

Skrypty & Kody [8.54] pvp

xxnarutoxx

User
Joined
Apr 20, 2013
Messages
19
Reaction score
0
Witam

Mam nastepuj?cy problem.Ot?? znalaz?em pewien skrypt kt?ry ma ma na celu aby czary ranily graczy jedynie kiedy mamy ich zaznaczonych.Problem jest taki ze niestety mi to nie dziala .Moze ktos wie co jest tego przyczyna (z tego co wiem ten skrypt dziala,ale nie u mnie)
PHP:
function onStatsChange(cid, attacker, type, combat, value)
	if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS in type == STATSCHANGE_MANALOSS) and getCreatureName(getCreatureTarget(attacker)) = getCreatureName(cid)) then
		if combat = COMBAT_HEALING then
			return false
		end 
	end
return true
end
--By Erexo (hail OTLand)
function onCombat(cid. target) 
    if(target and isPlayer(target) and getCreatureName(getCreatureTarget(cid)) ~= getCreatureName(target)) then 
        return false 
    end 
return true 
end

Zadeklarowalem to w login.lua,wywala taki blad podczas proby zazneczenia

[Error - CreatureScript Interface]
[19/04/2013 16:58:32] data/creaturescripts/scripts/AntiAOE.lua:eek:nCombat
[19/04/2013 16:58:32] Description:
[19/04/2013 16:58:32] (luaGetCreatureName) Creature not found
 

TenTypSwir

NNSTORY.EU Developer
Joined
Jun 8, 2010
Messages
1,657
Reaction score
117
Odp: [8.54] pvp

Code:
<event type="combat" name="pvp" event="script" value="pvp.lua"/>

Code:
function onCombat(cid, target)
if isPlayer(target) and getPlayerSecureMode(cid) == 0 then return false end 
return true
end

Code:
registerCreatureEvent(cid, "pvp")

^^
 
Top