• 01-04.05.2026 - DOUBLE EXP / SKILL EVENT!

Skrypty & Kody Transformacja Profesji

Status
Zamknięty.

voxbe

Advanced User
Zarejestrowany
Dołączył
Wrzesień 19, 2009
Posty
200
Liczba reakcji
5
Witam mam maly problem :P Skrypt ktory dziala bez problemu na 8.0 nie dziala mi zupelnie na tfs 036pl1 Ktos moze wie co tu zle jest?

Kod:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 86400000)
addOutfitCondition(condition, 0, 71, 0, 0, 0, 0)
setCombatCondition(combat, condition)





o1 = {lookType=380}
o2 = {lookType=365}
o3 = {lookType=368}
o4 = {lookType=375}
o5 = {lookType=376}
o6 = {lookType=369}
o7 = {lookType=379}
o8 = {lookType=370}
o9 = {lookType=378}
o10 = {lookType=381}
o11 = {lookType=371}
o12 = {lookType=367}
o13 = {lookType=367}
o14 = {lookType=377}
o15 = {lookType=374}
o16 = {lookType=366}
o17 = {lookType=382}
o18 = {lookType=364}
jan = {lookType=372}
o19 = {lookType=363}
shen = {lookType=325}
o21 = {lookType=443}
kri = {lookType=373}
ten = {lookType=385}
vid = {lookType=383}
tap = {lookType=263}
c20 = {lookType=390}
o20 = {lookType=234}






function onCastSpell(cid, var)




if getPlayerVocation(cid) == 291 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,310) 
            doSetCreatureOutfit(cid, o1, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 273 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,311) 
            doSetCreatureOutfit(cid, o2, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 252 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,312) 
            doSetCreatureOutfit(cid, o3, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 262 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,313) 
            doSetCreatureOutfit(cid, o4, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 	
end

elseif getPlayerVocation(cid) == 267 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,314) 
            doSetCreatureOutfit(cid, o5, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else

doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 	
end

elseif getPlayerVocation(cid) == 279 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,315) 
            doSetCreatureOutfit(cid, o6, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 	
end

elseif getPlayerVocation(cid) == 285 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,316) 
            doSetCreatureOutfit(cid, o7, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2)	
end

elseif getPlayerVocation(cid) == 302 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,308) 
            doSetCreatureOutfit(cid, o8, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 257 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,319) 
            doSetCreatureOutfit(cid, o9, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 213 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,320) 
            doSetCreatureOutfit(cid, o10, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 206 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,321) 
            doSetCreatureOutfit(cid, o11, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 231 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,318) 
            doSetCreatureOutfit(cid, o12, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32)
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 236 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,317) 
            doSetCreatureOutfit(cid, o13, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 241 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,325) 
            doSetCreatureOutfit(cid, o14, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 226 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,322) 
            doSetCreatureOutfit(cid, o15, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 246 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,323) 
            doSetCreatureOutfit(cid, o16, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 297 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,309) 
            doSetCreatureOutfit(cid, o17, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 219 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,324) 
            doSetCreatureOutfit(cid, o18, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 357 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,358) 
            doSetCreatureOutfit(cid, o19, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 335 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,359) 
            doSetCreatureOutfit(cid, jan, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 347 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,360) 
            doSetCreatureOutfit(cid, shen, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 370 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,371) 
            doSetCreatureOutfit(cid, o21, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 381 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,382) 
            doSetCreatureOutfit(cid, kri, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 392 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,393) 
            doSetCreatureOutfit(cid, ten, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 403 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,404) 
            doSetCreatureOutfit(cid, vid, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 414 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,415) 
            doSetCreatureOutfit(cid, o20, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 

else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 425 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,426) 
            doSetCreatureOutfit(cid, c20, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 436 then	
    if getPlayerLevel(cid) >= 400 then
      doPlayerSetVocation(cid,437) 
            doSetCreatureOutfit(cid, tap, -1)
     	setPlayerStorageValue(cid,20236,4)
		doSendMagicEffect(getPlayerPosition(cid), 32) 
else
doPlayerSendCancel(cid, "You need 400 level to transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

else
doPlayerSendCancel(cid, "You cannot transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end
end
 
Odp: Transformacja Profesji

pomi?dzy tym twoim wodbo (mniejsza, jeden chuj jaki silnik) a 8.54 jest du?o zmienionych funkcji
 
Odp: Transformacja Profesji

to co mi napisales to nic mi nie mowi. zbedny post i moze ktos tu usnac? sam tego sie domyslilem
 
Odp: Transformacja Profesji

Masz jakie? b??dy w konsoli?
 
Odp: Transformacja Profesji

Tak, ze np: transforms.lua faild to load (nie dokladnie tak, ale chodzi o to ze sie nie zaladowal) wystarczy jak mi ktos powie jak zaczac, nie trzeba calego wypisywac:p ja sobie reszte zrobie.
 
Odp: Transformacja Profesji

pomi?dzy tym twoim wodbo (mniejsza, jeden chuj jaki silnik) a 8.54 jest du?o zmienionych funkcji
Racja, racja...
Przykladowo funkcje "doSetCreatureOutfit(cid, o6, -1)" zamien na "doCreatureChangeOutfit(cid, o6)" itp.
W tych silnikach jest taka r?znica niekt?re funkcje r?zni? sie nazw? jednak maj? takie same dzialanie.

Masz tu http://tibia.net.pl/kosz/88074-wielki-spis-funkcji-lua.html zobacz czy nie masz jakis funkcji kt?rych nie ma w tym spisie.
 
Odp: Transformacja Profesji

Ok po weekendzie sprawdze teraz szkola wiec czasu nie ma :) bede wdzieczny jak inni sie wypowiedza jeszcze!:D
 
Odp: Transformacja Profesji

@fresh

nie daje cos rady ;p jakies pomysly?:P
 
Odp: Transformacja Profesji

Podaj b??dy z konsoli, czy to takie trudne? Nikt nie jest jasnowidzem i nie rozwi??e problemu je?eli go nie zna...
 
Odp: Transformacja Profesji

Nic tu nie pisze waznego, oprocz tego ze nie mozna zaladowac skryptu.

[23/04/2012 14:57:26] [Error - Spell Interface]
[23/04/2012 14:57:26] data/spells/scripts/transforms.lua
[23/04/2012 14:57:26] Description:
[23/04/2012 14:57:26] attempt to index a number value
[23/04/2012 14:57:26] [Warning - Event::loadScript] Cannot load script (data/spells/scripts/transforms.lua)


EDIT:

JUZ DZIALA DALEM RADE SAM :) Ale dziekuje :)
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry