What's new

Skrypty & Kody Player Target

Status
Not open for further replies.

beliar34

User
Joined
Oct 8, 2014
Messages
23
Reaction score
0
Witam pan?w, mam pro?b? ot?? bardzo dawno temu przesta?em skryptowa? LUE pod TFs'a no i zapomnialo sie to i owo :(
Potrzebuje skrypt kt?ry dzia?a nast?puj?co, jezeli nie zaznacze danego gracza nie udeze go tzn
Expie sobie na expie bije moby przybiega ktos wbiega w obszar moich spelli i nie dostaje dmg do momentu az go zaznacze ale jezeli go zaznacze to udeze jako GRACZA TYLKO JEGO i oczywiscie moby normalnie bije
Dziekuje za uwage :D

Kiedys zrobi?em taki skrypt :
Code:
[LUA]function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(attacker) == false then
return true
end

if isPlayer(cid) == false then
return true
end

if isInParty(cid) == false then
return true
end

if getPlayerParty(cid) == getPlayerParty(attacker) then
if combat ~= COMBAT_HEALING then
return doPlayerSendCancel(cid, 'You cannot attack teammate.') and false
end
end

return true
end [/LUA]
Napewno komus to pomoze, niestety nie potrafie go zedytowac :(
Dziekuje za uwage :D
 

Ciamciaj Bigos

ก้้้้้้&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: Player Target

zrobic zwykle ue, usunac linijke odpowiedzialna za dmg i dac ifa jesli ma targeta to zada dmg, teraz nie mam jak tego zrobic, sam pokombinuj
 

beliar34

User
Joined
Oct 8, 2014
Messages
23
Reaction score
0
Odp: Player Target

[LUA]function onGetFormulaValues(cid, level, skill, attack, factor)
if isMonster(factor) == true then
return true
elseif isPlayer(factor) == true then
return false
elseif isPlayer(factor) == true and isPlayer(target)
return true
end
end
end[/LUA]

Zastanawiam sie czy to by nie zadzia?a?o hmmm, i naprawde w creaturkach sie nie da ? :)
 

keno kerania

Active User
Joined
Mar 2, 2015
Messages
95
Reaction score
3
Odp: Player Target

[LUA]function onGetFormulaValues(cid, level, skill, attack, factor)
if isMonster(factor) == true then
return true
elseif isPlayer(factor) == true then
return false
elseif isPlayer(factor) == true and isPlayer(target)
return true
end
end
end[/LUA]

Zastanawiam sie czy to by nie zadzia?a?o hmmm, i naprawde w creaturkach sie nie da ? :)
Tak trudno sprawdzi??
 

beliar34

User
Joined
Oct 8, 2014
Messages
23
Reaction score
0
Odp: Player Target

[LUA]function onStatsChange(cid, attacker, type, combat, value)
if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getCreatureName(getCreatureTarget(attacker)) ~= getCreatureName(cid)) then
if combat ~= COMBAT_HEALING then
return false
end
end
return true
end
function onCombat(cid, target)
if(target and isPlayer(target) and getCreatureName(getCreatureTarget(cid)) ~= getCreatureName(target)) then
return false
end
return true
end[/LUA]


A co myslisz nad tak? creaturk? ? hmm juz sprawdzam u siebie

@up Nie tamten nie dziala dopisany do spella, btw prosze nie wypowiadac sie zbednie to tylko nabijanie post?w ! MODERATOR USUN DRANIA XD

---------- Tre?? dodana o 17:12 ----------

Skrypt niby dziala bo bic nie mozna postaci ale jest problem nie moge zaznaczyc zadnego gracza xd
Monstery normalnie bije, nie wiem co poszlo nie tak

---------- Tre?? dodana o 18:24 ----------

Co jest panowie wymiekacie przy tak prostym skrypcie?
 
Status
Not open for further replies.
Top