What's new

-Tibia 8.60 Transform Full [HiT]

Status
Not open for further replies.

sprytnaaaaa

Advanced User
Joined
Apr 20, 2011
Messages
342
Reaction score
4
HiT​
Witam wszystkich przedstawiam wam skrypt na transform w?asnej edycji
co posiada:
Zmienia Voc
Zmienia Outfit
Dodaje hp/mp
po wylogowaniu
wraca Voc
Wraca Outfit
Odejmuje hp/mp
a wi?c zaczynajmy :]

Do Spells.xml dodajemy
[LUA]<instant name="Transform" words="transform" lvl="1" mana="0" aggressive="0" selftarget="1" exhaustion="1000" exhaustionType="2" event="script" value="xxx/Transform.lua"/>[/LUA]

W folderze spell tworzymy plik o nazwie Transform.lua i wklejamy
[LUA] local tabela = {
------------Bardock--------------------
[7] = {outfit = {lookType=218}, level = 30, effectTrans = 226, hp = 500, ki = 500},
[8] = {outfit = {lookType=248}, level = 50, effectTrans = 224, hp = 1500, ki = 1500},
[9] = {outfit = {lookType=231}, level = 100, effectTrans = 227, hp = 3000, ki = 3000},
[10] = {outfit = {lookType=284}, level = 150, effectTrans = 225, hp = 4500, ki = 4500},
[11] = {outfit = {lookType=78}, level = 200, effectTrans = 223, hp = 6000, ki = 6000},
------------Son Goku-------------------
[13] = {outfit = {lookType=174}, level = 30, effectTrans = 226, hp = 500, ki = 500},
[14] = {outfit = {lookType=25}, level = 50, effectTrans = 224, hp = 1500, ki = 1500},
[15] = {outfit = {lookType=29}, level = 100, effectTrans = 227, hp = 3000, ki = 3000},
[16] = {outfit = {lookType=33}, level = 150, effectTrans = 225, hp = 4500, ki = 4500},
[17] = {outfit = {lookType=119}, level = 200, effectTrans = 223, hp = 6000, ki = 6000},



}

function onCastSpell(cid, var)
local arr = tabela[getPlayerVocation(cid)]

if(arr ~= NULL) then
if getPlayerLevel(cid) >= arr.level then
doPlayerSetVocation(cid, getPlayerVocation(cid)+1)
doSetCreatureOutfit(cid, arr.outfit, -1)
doSendMagicEffect(getPlayerPosition(cid), arr.effectTrans)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+arr.hp)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)+arr.ki)


else
doPlayerSendCancel(cid, "You need " .. arr.level .. " level to transform.")
end
else
doPlayerSendCancel(cid, "Nie masz Reborn.")
end
return true
end[/LUA]

W creaturescript robimy plik Logout.lua i Wklejamy
[LUA] function onLogout(cid)
local bardock = {lookType = 222, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
local songoku = {lookType = 24, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}





---------------------------------------------------------------------------------------------------------------------------------------------------------------------------



----------------------Bardock--------------
if (getPlayerVocation(cid) == 8) then
doSetCreatureOutfit(cid, bardock, -1)
end
if (getPlayerVocation(cid) == 9) then
doSetCreatureOutfit(cid, bardock, -1)
end
if (getPlayerVocation(cid) == 10) then
doSetCreatureOutfit(cid, bardock, -1)
end
if (getPlayerVocation(cid) == 11) then
doSetCreatureOutfit(cid, bardock, -1)
end
if (getPlayerVocation(cid) == 12) then
doSetCreatureOutfit(cid, bardock, -1)
end
------------------------End Bardock----------------------
------------------------Son Goku-----------------------------
if (getPlayerVocation(cid) == 14) then
doSetCreatureOutfit(cid, songoku, -1)
end
if (getPlayerVocation(cid) == 15) then
doSetCreatureOutfit(cid, songoku, -1)
end
if (getPlayerVocation(cid) == 16) then
doSetCreatureOutfit(cid, songoku, -1)
end
if (getPlayerVocation(cid) == 17) then
doSetCreatureOutfit(cid, songoku, -1)
end
if (getPlayerVocation(cid) == 18) then
doSetCreatureOutfit(cid, songoku, -1)
end
------------------------End Son Goku-----------------------------

------------------------End Vegeta--------------------------------------------------------
------------------------vocations------------------------------------------------------------
----------------------Bardock--------------------------------------------------------------
------------Bardock------------

if (getPlayerVocation(cid) == 8) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-500)
doPlayerSetVocation(cid,7)
elseif (getPlayerVocation(cid) == 9) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-2000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-2000)
doPlayerSetVocation(cid,7)
elseif (getPlayerVocation(cid) == 10) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-5000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-5500)
doPlayerSetVocation(cid,7)
elseif (getPlayerVocation(cid) == 11) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-9500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-9500)
doPlayerSetVocation(cid,7)
elseif (getPlayerVocation(cid) == 12) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-15500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-15500)
doPlayerSetVocation(cid,7)
end

------------------------End Bardock----------------------
------------------------Son Goku-----------------------------
if (getPlayerVocation(cid) == 14) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-500)
doPlayerSetVocation(cid,13)
elseif (getPlayerVocation(cid) == 15) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-2000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-2000)
doPlayerSetVocation(cid,13)
elseif (getPlayerVocation(cid) == 16) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-5000)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-5500)
doPlayerSetVocation(cid,13)
elseif (getPlayerVocation(cid) == 17) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-9500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-9500)
doPlayerSetVocation(cid,13)
elseif (getPlayerVocation(cid) == 18) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-15500)
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-15500)
doPlayerSetVocation(cid,13)
end


return true
end
[/LUA]
Otwieramy creaturescript.xml i dodajemy
[LUA]<event type="logout" name="PlayerLogout" event="script" value="logout.lua"/>[/LUA]


Do login.lua wklejamy to:

[LUA]registerCreatureEvent(cid, "onLogout")
registerCreatureEvent(cid, "transform")[/LUA]

W Vocations.xml zamieniamy na
[XML]------Bardock------

<vocation id="7" name="First Bardock" description="a first bardock" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" >
<formula meleeDamage="6.5" distDamage="1.0" wandDamage="1.0" magDamage="8.4" magHealingDamage="9.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="8" name="Bardock" description="a bardock" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" >
<formula meleeDamage="11.5" distDamage="1.0" wandDamage="1.0" magDamage="12.4" magHealingDamage="19.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="9" name="Bardock Ssj" description="a ultra bardock" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" >
<formula meleeDamage="20.5" distDamage="1.0" wandDamage="1.0" magDamage="22.4" magHealingDamage="25.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="10" name="Bardock Ssj II" description="a super bardock" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" >
<formula meleeDamage="28.5" distDamage="1.0" wandDamage="1.0" magDamage="28.4" magHealingDamage="33.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="11" name="Ultra Bardock" description="a ultra bardock" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" effect="29" interval="2000">
<formula meleeDamage="34.5" distDamage="1.0" wandDamage="1.0" magDamage="34.4" magHealingDamage="38.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
<transform effect="5"/>
</vocation>
<vocation id="12" name="Hiper Bardock" description="a hiper bardock" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" >
<formula meleeDamage="40.5" distDamage="1.0" wandDamage="1.0" magDamage="40.4" magHealingDamage="50.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>


----Son Goku----
<vocation id="13" name="First Son Goku" description="a son goku" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="13" >
<formula meleeDamage="6.5" distDamage="1.0" wandDamage="1.0" magDamage="8.4" magHealingDamage="13.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="14" name="Son Goku" description="a son goku" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="13" >
<formula meleeDamage="11.5" distDamage="1.0" wandDamage="1.0" magDamage="12.4" magHealingDamage="24.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="15" name="Son Goku Ssj" description="a son goku ssj" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="13" >
<formula meleeDamage="20.5" distDamage="1.0" wandDamage="1.0" magDamage="22.4" magHealingDamage="30.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="16" name="Son Goku Ssj II" description="a son goku ssj II" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="13" effect="29" interval="2000">
<formula meleeDamage="28.5" distDamage="1.0" wandDamage="1.0" magDamage="28.4" magHealingDamage="37.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
<transform effect="5"/>
</vocation>
<vocation id="17" name="Son Goku Ssj III" description="a son goku ssj III" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="13" >
<formula meleeDamage="34.5" distDamage="1.0" wandDamage="1.0" magDamage="34.4" magHealingDamage="45.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>
<vocation id="18" name="Golden Ozaru" description="a ozaru son goku" needpremium="0" gaincap="35" gainhp="175" gainmana="175" gainhpticks="1.5" gainhpamount="15" gainmanaticks="3" gainmanaamount="6" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="13" >
<formula meleeDamage="40.5" distDamage="1.0" wandDamage="1.0" magDamage="40.4" magHealingDamage="60.0" defense="1.0" magDefense="1.0" armor="1.0"/>
<skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
</vocation>[/XML]



Obja?nienie:
[7] = id pierwszej profesji
{outfit = brak
{lookType=218}, =Wygl?d transa
level = 30, =lvl
effectTrans = 226, = efekt przy transformacji
hp = 500, ile ?ycia dodaje
ki = 500}, ile manny dodaje


if (getPlayerVocation(cid) == 8) then ---- id 1 transa
doSetCreatureOutfit(cid, bardock, -1) ---- id wygl?du po transformacji



if (getPlayerVocation(cid) == 8) then ----id drugiego vocations
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-500) ---- ile hp odejmuje po wylogowaniu
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-500) ---- ile manny odejmuje po wylogowaniu
doPlayerSetVocation(cid,7) --- id 1 vocations po wylogowaniu


Dzi?kuje za uwag? skrypt dzia?a w 100% bo sam go u?ywam licz? na komentarze pomog?em daj rep​
Je?li z?y dzia? prosz? o przekierowanie komentujcie zabraniam udost?pniania na inne fora
 

Ciamciaj Bigos

&#3585;&#3657;&#3657;&#3657;&#3657;&#3657;&#3657;&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: Transform Full [HiT]

pewnie, ze bedzie dzialal, ale napieprzyles tyle ifow ile jest fanow rapu
 

sprytnaaaaa

Advanced User
Joined
Apr 20, 2011
Messages
342
Reaction score
4
Odp: Transform Full [HiT]

a komu te ify przeszkadzaj? :D nie ma tu lepszego transa chyba ka?dy ma jakie? problemy z tym hp/mp wiec da?em gotowca dla tych kt?rzy sb z tym nie radz? :]
 

Restles

Senior User
Joined
Aug 31, 2012
Messages
616
Reaction score
51
Odp: Transform Full [HiT]

a komu te ify przeszkadzaj? :D nie ma tu lepszego transa chyba ka?dy ma jakie? problemy z tym hp/mp wiec da?em gotowca dla tych kt?rzy sb z tym nie radz? :]
fuck logic.
[LUA]
local transform = {
-- voc/hp/mana
[1] = {185, 35},
[2] = {250, 100}
}

function onLogout(cid)
local Player = transform[getPlayerVocation(cid)]
if (Player == nil) then
return true
end

setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)-Player[1])
doCreatureAddHealth(cid, -Player[1])
setCreatureMaxMana(cid, getCreatureMaxMana(cid)-Player[2])
doCreatureAddMana(cid, -Player[2])
return true
end[/LUA]
 

Dantez

Moim sekretem jest ciasto
Joined
May 22, 2008
Messages
1,206
Reaction score
201
Odp: Transform Full [HiT]

a komu te ify przeszkadzaj? :D nie ma tu lepszego transa chyba ka?dy ma jakie? problemy z tym hp/mp wiec da?em gotowca dla tych kt?rzy sb z tym nie radz? :]
Lepiej sobie dojeba? roboty. Swoj? drog? przeszkadzaj? mi r?wnie? zamawiaj?cy z kt?rymi urywa si? kontakt.

[LUA]registerCreatureEvent(cid, "onLogout")
registerCreatureEvent(cid, "transform")[/LUA]
?adne z tych event?w nie istnieje.
 
Last edited:

Painkiller94

Active User
Joined
Jun 9, 2014
Messages
123
Reaction score
5
Odp: Transform Full [HiT]

Drogi Panie Januszu skrypt?w
W pierwszym skrypcie umia?e? u?y? tablicy a w 2 ju? nie ? Hmm... Nawet nie doda?e? jakiego? najprostszego poradnika jak tego u?y?, a kto? kto nie wie jak to ustawi? b?dzie si? pieprzy? i kopiowa? krzywego gotowca milion razy, a i tak g?wno zrobi. Nie pyk?o ci. Tyle
 

Oskar

Moderator
Staff member
Joined
Jan 24, 2009
Messages
2,254
Reaction score
329
Odp: Transform Full [HiT]

Ja si? nigdy nie nadziwi?. Ki diabe? wszyscy u?ywaj? setCreatureMaxHealth i pisz? dodatkowo kolejny kod, kt?ry odejmuje t? warto??, kt?r? dodawali?my w jeszcze innym kodzie? Gdzie ta logika i umiej?tno?? samodzielnego my?lenia, kt?ra przebija?a si? kiedy? na tym forum?
Ludzie - od zmian w statystykach graczy s?u?? conditiony.
 

Painkiller94

Active User
Joined
Jun 9, 2014
Messages
123
Reaction score
5
Odp: Transform Full [HiT]

On sam tego nie pisa?. To raz. A dwa - niekt?re transy powinny dzia?a? tak, ?e nie da si? ich cofn??, dlatego i hp powinno zosta?.
 
Status
Not open for further replies.
Top