Poufny
Senior User
- Joined
- Jul 31, 2009
- Messages
- 662
- Reaction score
- 46
- Age
- 31
Oto, skrypty, i ich bledy
1. Animacje nie pojawiaja sie nad [x,y,z] pozycjami. Napisy rowniez.
2.Owy czar dla palla, nie zadaje obrazen.
3. Przy kazdym zkleciu, wyskakuje blad w silniku, lecz spelle dzialaja. Nie spowoduje to crash, czy czegos?
1. Animacje nie pojawiaja sie nad [x,y,z] pozycjami. Napisy rowniez.
Code:
--[[
Talking Tp/signs/tiles for TFS 0.3+
by Maxi (Shawak)
]]--
local text = {
--X pos,Y pos, Z pos, text
[1] = {pos = {999,995,7}, text = {"Exp"}},
[2] = {pos = {997,995,7}, text = {"Depo"}},
[3] = {pos = {1001,995,7}, text = {"Sklepy"}},
[4] = {pos = {1003,995,7}, text = {"Questy"}},
[5] = {pos = {1063,1004,7}, text = {"Back"}},
[6] = {pos = {998,1004,7}, text = {"Wars RED"}},
[7] = {pos = {998,1005,7}, text = {"Wars GREEN"}},
[8] = {pos = {1002,1004,7}, text = {"Bomberman"}},
[9] = {pos = {1002,1005,7}, text = {"Bomberman"}},
[10] = {pos = {996,999,7}, text = {"-=VIP=-"}},
[11] = {pos = {1060,978,7}, text = {"Back"}},
[12] = {pos = {994,1000,7}, text = {"Free VIp"}}
}
local effects = {
--X pos,Y pos, Z pos, text
[1] = {pos = {999,995,7}, effect = {18}},
[2] = {pos = {997,995,7}, effect = {19}},
[3] = {pos = {1001,995,7}, effect = {21}},
[4] = {pos = {1003,995,7}, effect = {21}},
[5] = {pos = {1063,1004,7}, effect = {21}},
[6] = {pos = {998,1004,7}, effect = {21}},
[7] = {pos = {998,1005,7}, effect = {21}},
[8] = {pos = {1002,1004,7}, effect = {21}},
[9] = {pos = (1002,1005,7}, effect = {21}},
[10] = {pos = {996,999,7}, effect = {21}},
[11] = {pos = {1060,978,7}, effect = {21}},
[12] = {pos = {994,1000,7}, effect = {22}}
}
function onThink(interval, lastExecution)
for _, area in pairs(text) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
end
for _, area in pairs(effects) do
doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
end
return TRUE
end
2.Owy czar dla palla, nie zadaje obrazen.
Code:
-- Massive Arrow Wave by Gelio
local combat = createCombatObject()
-- Oczywi?cie te parametry mo?emy zmienia?
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 664.5, 5, 2.7, 640)
local obszar = {
poziomo = 9, -- Na ile kratek w poziomie szuka celow
pionowo = 9 -- Na ile kratek w pionie szuka celow
}
local manaPerTarget = 200 -- Ile many ma zabiera? przy kazdym strzale
function onCastSpell(cid, var)
local specs = getSpectators(getCreaturePosition(cid), obszar.poziomo, obszar.pionowo, FALSE)
for i=1, #specs do
if((getCreatureMana(cid) > manaPerTarget or isPlayer(cid) == FALSE) and isNpc(specs[i]) == FALSE and getTilePzInfo(getCreaturePosition(specs[i])) == FALSE) then
local target = specs[i]
if(target ~= cid) then
local targetPos = getCreaturePosition(target)
if(isSightClear == nil or isSightClear(getCreaturePosition(cid), targetPos, FALSE) == TRUE) then
doCombat(cid, combat, numberToVariant(target))
if(isPlayer(cid) == TRUE) then
doCreatureAddMana(cid, -manaPerTarget)
doPlayerAddSpentMana(cid, manaPerTarget)
end
end
end
else
break
end
end
if(#specs == 1) then
doPlayerSendCancel(cid,"You do not have any target.")
end
return TRUE
end
3. Przy kazdym zkleciu, wyskakuje blad w silniku, lecz spelle dzialaja. Nie spowoduje to crash, czy czegos?