What's new

Jak to Zrobi? Pomocy !

Status
Not open for further replies.

Rygiel

Active User
Joined
Apr 12, 2008
Messages
60
Reaction score
6
mam destroy field i chcialbym zeby on byl tak na 20 kratek bo noby zucaja fore bomby itp kolo dp i temple i chcialbym zeby ta runka zrobila to cos zeby w duzej ilosci kratek wyczyscila fieldy

prosze o jak najszybszka odpowedz !

Zgory thx pozdro rygiel ;)
 

Koperpl

User
Joined
Apr 20, 2008
Messages
39
Reaction score
2
Wejd? w data\spells\scripts odnajd? destroy field.LUA
wykasuj wszystko i wklej to

local combat = createCombatObject()

local fieldItems = {1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1500, 1501, 1502, 1503, 1504, 5061, 5062, 5063, 5064, 5065, 5066, 5067}

local arr = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1}
}

local area = createCombatArea(arr)
setCombatArea(combat, area)


function onTargetTile(cid, pos)
local posEx = {x=pos.x, y=pos.y, z=pos.z, stackpos=254}
item = getThingfromPos(posEx)

if item.itemid > 0 then
if isInArray(fieldItems, item.itemid) == 1 then
doRemoveItem(item.uid,1)
end
end

doSendMagicEffect(pos,2)
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end


I powinno by? dobrze :)

Albo dodaj tylko to
 
Status
Not open for further replies.
Top