What's new

Ksi??ka daj?ca mlvl :)

Status
Not open for further replies.

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Witam chcia?bym wam przedstawi? bardzo ?atwy i my?l? ?e przydatny skrypt:
Mianowicie chodzi mi o Ksi??k? daj?ca mlvl :)



Wchodzimy w data/items i otwieramy items.xml
Wyszukujemy tam items o takim id :8983 powinno by? do niego przypisane to:

<item id="8983" article="a" name="heavily bound book">
<attribute key="description" value="It contains the scribings of many knowledgeable Tibians." />
<attribute key="weight" value="7800" />
</item>

Podmieniamy na to :
<item id="8983" article="a" name="heavily bound book">
<attribute key="weight" value="7800" />
<attribute key="defense" value="30" />
<attribute key="speed" value="25" />
<attribute key="magiclevelpoints" value="5" />
<attribute key="weaponType" value="shield" />
</item>

Teraz druga cz??? wchodzimy w Data/movements otwieramy movements.xml i przy shield dodajemy to:

<movevent type="DeEquip" itemid="8983" slot="shield" event="function" value="onDeEquipItem"/>
<movevent type="Equip" itemid="8983" slot="shield" level="100" event="function" value="onEquipItem">
<vocation id="5" showInDescription="0"/>
<vocation id="6" showInDescription="0"/>
</movevent>

W rezultacie wychodzi nam takie co? :

17:47 You see a heavily bound book (Def:30, magic level +5, speed +25).
It can only be wielded properly by master sorcerers and elder druids of level 100 or higher.
It weighs 78.00 oz.

I to by by?o na tyle :) mam nadzieje ?e komu? si? przyda :) :)

Pozdrawiam
 

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Odp: Ksi??ka daj?ca mlvl :)

~~Refresh~~

Oceni kto??
 

Placek

Blue Waffle
Joined
Sep 30, 2008
Messages
6,793
Reaction score
672
Age
9
Odp: Ksi??ka daj?ca mlvl :)

Co tu oceniac.
Kazdy kto chce dodac jakies statystyki do itemu i potrafi samodzielnie myslec, zobaczy w items.xml jak wyglada np spellbook of mind control, skopiuje z niego co potrzebuje i wklei do itemu w ktorym chce dodac statystyki...
Jak mu nie bedzie dzialac, poszpera w necie 10 sekund i dowie sie, ze musi jeszcze skopiowac linijke z movements.


Przy okazji, nie zmieniaj tak kolorow i pisz normalna czcionka a nie rozmiarem milion bo sie tego nie da normalnie czytac, ani to ladne ani czytelne... Zwykla glupota i "pokemonizm".
 

Arkam

Forum friend
Joined
Dec 20, 2008
Messages
1,980
Reaction score
180
Odp: Ksi??ka daj?ca mlvl :)

yy to jest skrypt? xddd
 

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Odp: Ksi??ka daj?ca mlvl :)

to po co taki dzia? w og?le skoro wszyscy sobie sami to zrobi?? w tym dziale widzia?em slingshota kt?rego robi sie 10-15sekund a mimo to dodaj? takie co?.
 

Placek

Blue Waffle
Joined
Sep 30, 2008
Messages
6,793
Reaction score
672
Age
9
Odp: Ksi??ka daj?ca mlvl :)

Zeby tu wrzucac skrypty, a nie skopiowane 3 linijkie z items.xml...
 

Fardos

Senior User
Joined
Mar 21, 2009
Messages
868
Reaction score
34
Odp: Ksi??ka daj?ca mlvl :)

uzupe?ni? odpowied? experta o przyk?ad z http://tibia.net.pl/threads/530721-Star-Wand-Dzia%C5%82ajacy-w-100

i na koniec wejdz wejdz nazwa pliku z ots-em/data/weapons/scripts/ stworz plik o nazwie starshoter.lua i wklekj do niego to

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 0)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0.2, -25, -0.2, -3)
local manaNeededPerTarget = 20
local hitExtraTargets = 3
local hitExtraTargetsInRange = 2
function getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers)
local creaturesList = {}
for x = -radiusx, radiusx do
for y = -radiusy, radiusy do
if not (x == 0 and y == 0) then
if getTilePzInfo({x = position.x+x, y = position.y+y, z = position.z}) ~= TRUE then
creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = STACKPOS_TOP_CREATURE})
if (creature.type == 1 and showPlayers == 1) or (creature.type == 2 and showMonsters == 1) then
table.insert(creaturesList, creature.uid)
end
end
end
end
end
return creaturesList
end
function onUseWeapon(cid, var)
local ret = doCombat(cid, combat, var)
if(ret == LUA_ERROR) then
return LUA_ERROR
end
doCreatureAddMana(cid, -manaNeededPerTarget)
local target = variantToNumber(var)
local hitplayers = 0
if(target ~= 0) then
if(isPlayer(target) == TRUE) then
hitplayers = 1
end
local nowHit = 0
local randomId = 0
local otherTargets = getCreaturesInRange(getCreaturePosition(target), hitExtraTargetsInRange, hitExtraTargetsInRange, 1, hitplayers)
if(#otherTargets > 0) then
for i = 1, hitExtraTargets do
if(getCreatureMana(cid) > manaNeededPerTarget) then
randomId = math.random(1, #otherTargets)
nowHit = otherTargets[randomId]
if(isCreature(nowHit) == TRUE) then
table.remove(otherTargets, randomId)
ret = doCombat(cid, combat, numberToVariant(nowHit))
if(ret ~= LUA_ERROR) then
doCreatureAddMana(cid, -manaNeededPerTarget)
end
end
if(#otherTargets == 0) then
break
end
else
break
end
end
end
end
return TRUE
end

To jest skrypt a nie edycja 2 linijek w items.xml
 

tytan53

Advanced User
Joined
Dec 13, 2008
Messages
195
Reaction score
11
Odp: Ksi??ka daj?ca mlvl :)

Nie chc? tu nikogo cisn?? ale s? ludzie kt?rzy nawet nie potrafi? doda? tych linijek w items.xml i takie tematy dla nich s? :)
 

darchior

Advanced User
Joined
Jul 1, 2011
Messages
315
Reaction score
23
Age
26
Odp: Ksi??ka daj?ca mlvl :)

To zr?b poradnik a nie za?miecasz forum.
 

triedge

Advanced User
Joined
Sep 8, 2009
Messages
341
Reaction score
21
Age
31
Odp: Ksi??ka daj?ca mlvl :)

1 post odstrasza, jest baardzo oczojebny ;D
Kiki ma racje, to jest skopiowane i wrzucone, po co tak robisz, to ju? 3 temat ze skopiowanymi linijkami, brawo dla autora ;D
 
Status
Not open for further replies.
Top