What's new

-Skrypt Automatyczny atak spelli

Status
Not open for further replies.

Mikaschi

Active User
Joined
Mar 26, 2009
Messages
116
Reaction score
1
Witam.
Silnik TFS 0.3.6 tibia: 8.54
Poszukuj? skryptu kt?ry:
- automatycznie by u?ywa? kilku r??nych spelli
- w odst?pie czasowym,
- najlepiej bez ?adnej komendy ?eby dzia?a?
- po prostu zaznaczam ppm mooba i atakuje go spell'ami

Prosz? o pomoc, mo?e kto? co? podobnego widzia? to niech te? si? podzieli tym ze mn? b?d? wdzi?czny.
Pozdrawiam i czekam ;)

Sorrki za pisownie jak co?.
 

Ciamciaj Bigos

ก้้้้้้&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: Automatyczny atak spelli

ty, a moze jakies fajnego wanda bys chcial?
items.xml
[xml] <item id="8910" article="an" name="underworld rod">
<attribute key="weight" value="2900" />
<attribute key="weaponType" value="wand" />
<attribute key="shootType" value="death" />
<attribute key="range" value="3" />
</item>[/xml]

ewentualnie niech bedzie juz ten atak bez zbednego itemu
creaturescripts.xml
[xml]<event type="attack" name="czary" event="script" value="czary.lua"/>[/xml]
scripts>czary.lua
[lua]function onAttack(cid, target)
if isSightClear(getCreaturePosition(cid), getCreaturePosition(target), false) then
if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) < 5 then
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(target), 18)
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -50, -200, CONST_ME_NONE)
end
end
return true end[/lua]
creaturescripts>login.lua
[lua]registerCreatureEvent(cid, "czary")[/lua]
 

Mikaschi

Active User
Joined
Mar 26, 2009
Messages
116
Reaction score
1
Odp: Automatyczny atak spelli

a da si? przerobi? skrypt by u?ywa? takich spelli ?
i czy da si? ustawi? odst?p czasowy albo prawdopodobi??stwo u?ycia spella ?
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 29)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 6, 12)

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

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
i
PHP:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 76)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -2.0, -100, -2.5, -100)



arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}









local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
local function onCastSpell1(parameters)
doCombat(parameters.cid, parameters.combat1, parameters.var)
end



function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1}
addEvent(onCastSpell1, 0, parameters)

end
 

Ciamciaj Bigos

&#3585;&#3657;&#3657;&#3657;&#3657;&#3657;&#3657;&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: Automatyczny atak spelli

[lua]local timeToUse = 1.1 -- ustawiasz czas
local lastTime = 0 -- nie ruszac
function onAttack(cid, target)
local osTime = os.time()
if(lastTime <= osTime) then
if isSightClear(getCreaturePosition(cid), getCreaturePosition(target), false) then
if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) < 5 then
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(target), 76)
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -50, -200, CONST_ME_NONE)
lastTime = osTime + timeToUse
end
end
end
return true end[/lua]

zeby sie nie pieprzyc mozesz dodac funkcje doPlayerCastSpell
http://tibia.net.pl/threads/403826-doPlayerCastSpell(cid-spell)
 

Mikaschi

Active User
Joined
Mar 26, 2009
Messages
116
Reaction score
1
Odp: Automatyczny atak spelli

zaraz sprawdz? jeszcze przerobie ?eby dla niekt?rych vocations by? tylko ten atak, i jeszcze moje jedno pytanie czy dmg jest zale?ne od sklla ?
 
Status
Not open for further replies.
Top