• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Transform System

Kamikaz

New Member
Joined
Nov 4, 2010
Messages
112
Reaction score
0
Location
Poland
Witam.

Większość osób na tym forum mnie nie lubi lecz mam problem, i mam nadzieje, że ktoś tutaj mi pomoże.

Mianowicie ostatnio napisałem skrypt na transform, używałem skryptu jakiegos piotrka, zmienia outfit i vocation ale nie na stałe ustawiłem zeby transform utrzymywał się przez 10 sec ale nie tak chciałem. Chciałbym tak, że od użycia transformacji spada mana np. 5 Many na sec i kiedy mana spadnie do zera postac wraca do pierwotnej postaci. Żeby nie było zamieszania w skrypcie czy ktoś potrafił by mi powiedzieć co tutaj trzeba dodać lub edytować, aby nie było śmietnika i skrypt działał poprawnie. A i chciałbym dodać, że przy użyciu skryptu pojawia się efekt o numerku X i zmienia outfit.

Oto skrypt:
Code:
local configuration =
{
    playerVocation = {0, 1, 2, 3},
    playerNewVocation = 1,
    playerNewLookType = 48,
    playerLevel = 50,
    manaCost = 0,
    soulCost = 0,
    timeActive = 10
}
local VOCATION_STORAGE = 10000
local outfit = {lookType = configuration.playerNewLookType, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
function onSay(cid, words, param)
    if(isInArray(configuration.playerVocation, getPlayerVocation(cid)) == TRUE) then
        if(getPlayerLevel(cid) >= configuration.playerLevel) then
                    setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
                    doPlayerSetVocation(cid, configuration.playerNewVocation)

                    doSetCreatureOutfit(cid, outfit, configuration.timeActive * 1000)
                    addEvent(transformBack, configuration.timeActive * 1000, cid)

        else
            doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
        end
    else
        doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
    end
	


end
function transformBack(cid)
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
    setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
end

Dziękuję i Pozdrawiam, Kamikaz
 
Last edited:
...napisałem skrypt ...

Code:
local configuration =
{
playerVocation = {1},
playerNewVocation = 5,
playerNewLookType = 30,
playerLevel = 5,
manaCost = 0,
soulCost = 0,
timeActive = 9000000
}
local VOCATION_STORAGE = 10000
local outfit = {lookType = configuration.playerNewLookType, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
function onSay(cid, words, param)
if(isInArray(configuration.playerVocation, getPlayerVocation(cid)) == TRUE) then
if(getPlayerLevel(cid) >= configuration.playerLevel) then
if(getPlayerMana(cid) >= configuration.manaCost) then
if(getPlayerSoul(cid) >= configuration.soulCost) then
setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
doPlayerSetVocation(cid, configuration.playerNewVocation)
doPlayerAddMana(cid, - configuration.manaCost)
doPlayerAddSoul(cid, - configuration.soulCost)
doSetCreatureOutfit(cid, outfit, configuration.timeActive * 1000)
addEvent(transformBack, configuration.timeActive * 1000, cid)
battle = addEvent(battle, 20000, cid)
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required soul points.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required mana points.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
end
else
doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
end
end
function transformBack(cid)
doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
stopEvent(battle)
end
function battle(cid)
doAddCondition(cid, CONDITION_INFIGHT)
battle = addEvent(battle, 20000, cid)
end
 
Last edited by a moderator:
Jak ty możesz ogarnąć taki temat spam jak Chu ! Troche potrwa zanim znajde ten skrypt bo mi się wszystko tam miesza :D Spory szacunek dla ciebie człowieku jak ty tak skrypty ogarniasz !
 
Jak ty możesz ogarnąć taki temat spam jak Chu ! Troche potrwa zanim znajde ten skrypt bo mi się wszystko tam miesza :D Spory szacunek dla ciebie człowieku jak ty tak skrypty ogarniasz !
Szacunek dla ciebie za to, że piszesz nie na temat.

Mianowicie ostatnio napisałem skrypt na transform, zmienia outfit i vocation ale nie na stałe ustawiłem zeby transform utrzymywał się przez 10 sec ale nie tak chciałem.
W tej linijce napisałeś, że napisałeś skrypt, którego nie chciałeś napisać. Masakra.
 
Skrypt ten napisałem aby zobaczyć czy będzie działać. Dziękuje Qanti skrypt działa. Ale powiedz mi która linijka jest odpowiedzialna za Efekt używania Transformacji ? I czy da się zrobić 1 uniwersalny skrypt który mogą używać inne profesje ? I w razie czego ile trzeba za taki skrypt zapłacić ?
 
Efekt:
Code:
doSetCreatureOutfit(cid, outfit, configuration.timeActive * 1000)

Transformacja dla określonych profesji:
Code:
playerVocation = {1,dwa,czy,cztery},
 
Last edited by a moderator:
Bo ja nie chcem żeby każda profesja zmieniała się w taki sam Outfit. Chcem aby każda inna Vocation zmieniała się w swój Vocation.
 
Bo ja nie chcem żeby każda profesja zmieniała się w taki sam Outfit. Chcem aby każda inna Vocation zmieniała się w swój Vocation.

Sam napisałeś ten skrypt i pytasz nas o takie rzeczy? Szybciej i prościej będzie zrobić 4 takie same skrypty i podmienić id początkowych profesji i profesji po transformie.
 
Właśnie tak zrobiłem. Ale jak zrobić efekt że jak używam transformacji to Pokazuje się efekt aury czy tam prądów. Zmiana vocacji i outfitu działają ale chcem dodać efekt Aury przy wpisaniu Transform.

Posiadam taki skrypt na transform.
Co by trzeba było edytować aby działał poprawnie na TFSie ??

Skrypt mam z mojego silnika WoDBO:
Code:
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)


janemba = {lookType=280}
janemba1 = {lookType=120}
janemba2 = {lookType=110}
janemba3 = {lookType=134}

janembas = {lookType=280}
janembas1 = {lookType=120}
janembas2 = {lookType=110}
janembas3 = {lookType=134}
janembas4 = {lookType=341}


ext = 1000

---Janemba---
function trans(cid)
if getPlayerVocation(cid) == 349 then	
if getPlayerMana(cid) >= 0 then	 
		doSendMagicEffect(getPlayerPosition(cid), 180)     
            addEvent(trans,ext,cid)

      end
   end
end



function trans1(cid)
if getPlayerVocation(cid) == 350 then	
if getPlayerMana(cid) >= 0 then	                  
            addEvent(trans1,ext,cid)
      end
   end
end


function trans2(cid)
if getPlayerVocation(cid) == 351 then	
if getPlayerMana(cid) >= 0 then	                  
            addEvent(trans1,ext,cid)

      end
   end
end


function trans3(cid)
if getPlayerVocation(cid) == 352 then	
if getPlayerMana(cid) >= 0 then	                   
            addEvent(trans1,ext,cid)

      end
   end
end


---End Janemba---






---Reborn Janemba---
function trans4(cid)
if getPlayerVocation(cid) == 354 then	
if getPlayerMana(cid) >= 0 then	
		doSendMagicEffect(getPlayerPosition(cid), 14)     
            addEvent(trans4,ext,cid)
      end
   end
end



function trans5(cid)
if getPlayerVocation(cid) == 355 then	
if getPlayerMana(cid) >= 0 then	
		doSendMagicEffect(getPlayerPosition(cid), 181)                   
            addEvent(trans5,ext,cid)
      end
   end
end


function trans6(cid)
if getPlayerVocation(cid) == 356 then	
if getPlayerMana(cid) >= 0 then	
		doSendMagicEffect(getPlayerPosition(cid), 14)                       
            addEvent(trans6,ext,cid)
      end
   end
end


function trans7(cid)
if getPlayerVocation(cid) == 357 then	
if getPlayerMana(cid) >= 0 then	  
		doSendMagicEffect(getPlayerPosition(cid), 14)                     
            addEvent(trans7,ext,cid)

      end
   end
end


function trans8(cid)
if getPlayerVocation(cid) == 360 then	
if getPlayerMana(cid) >= 0 then	  
		doSendMagicEffect(getPlayerPosition(cid), 14)                     
            addEvent(trans7,ext,cid)

      end
   end
end

--- Reborn Janemba End ---

function onCastSpell(cid, var)


---Janemba---

if getPlayerVocation(cid) == 348 then	
    if getPlayerLevel(cid) >= 50 then
      doPlayerSetVocation(cid,349)
         doSetCreatureOutfit(cid, janemba, -1) 
      addEvent(trans,ext,cid) 
	  	  		doSendMagicEffect(getPlayerPosition(cid), 233) 
else
doPlayerSendCancel(cid, "You need 50 level to first transform")
		doSendMagicEffect(getPlayerPosition(cid), 2) 
end

elseif getPlayerVocation(cid) == 349 then	
    if getPlayerLevel(cid) >= 100 then
      doPlayerSetVocation(cid,350) 
      addEvent(trans1,ext,cid) 
	  	  	  	  		doSendMagicEffect(getPlayerPosition(cid), 33)
            doSetCreatureOutfit(cid, janemba1, -1)

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

elseif getPlayerVocation(cid) == 350 then	
    if getPlayerLevel(cid) >= 150 then
      doPlayerSetVocation(cid,351) 
      addEvent(trans2,ext,cid) 
	  		doSendMagicEffect(getPlayerPosition(cid), 18) 
            doSetCreatureOutfit(cid, janemba2, -1)

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



elseif getPlayerVocation(cid) == 351 then	
    if getPlayerLevel(cid) >= 200 then
      doPlayerSetVocation(cid,352) 
      addEvent(trans3,ext,cid) 
	  		doSendMagicEffect(getPlayerPosition(cid), 243)   
            doSetCreatureOutfit(cid, janemba3, -1)

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


--- Reborn ---

elseif getPlayerVocation(cid) == 353 then	
    if getPlayerLevel(cid) >= 50 then
      doPlayerSetVocation(cid,354) 
      addEvent(trans4,ext,cid) 
	  	  		doSendMagicEffect(getPlayerPosition(cid), 7) 
            doSetCreatureOutfit(cid, janembas, -1)

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



elseif getPlayerVocation(cid) == 354 then	
    if getPlayerLevel(cid) >= 100 then
      doPlayerSetVocation(cid,355) 
      addEvent(trans5,ext,cid) 
	  	  	  		doSendMagicEffect(getPlayerPosition(cid), 33)   
            doSetCreatureOutfit(cid, janembas1, -1)

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

elseif getPlayerVocation(cid) == 355 then	
    if getPlayerLevel(cid) >= 150 then
      doPlayerSetVocation(cid,356) 
      addEvent(trans6,ext,cid) 
	  		doSendMagicEffect(getPlayerPosition(cid), 18) 
            doSetCreatureOutfit(cid, janembas2, -1)

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


elseif getPlayerVocation(cid) == 356 then	
    if getPlayerLevel(cid) >= 200 then
      doPlayerSetVocation(cid,357) 
      addEvent(trans7,ext,cid) 
	  		doSendMagicEffect(getPlayerPosition(cid), 243)   
            doSetCreatureOutfit(cid, janembas3, -1)

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


elseif getPlayerVocation(cid) == 357 then	
    if getPlayerLevel(cid) >= 500 then
      doPlayerSetVocation(cid,360) 
      addEvent(trans8,ext,cid) 
	  		doSendMagicEffect(getPlayerPosition(cid), 243)   
            doSetCreatureOutfit(cid, janembas4, -1)

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

---End Janemba? ---

else
doPlayerSendCancel(cid, "You cannot transform.")
		doSendMagicEffect(getPlayerPosition(cid), 2) 


end
end


A i co do tego Efektu transformacji, Czy można by było przesunąć grafike o 1 kratke w prawo ??Kumpel mi kiedyś do Aury dał takie cos i działą:

Code:
local pos = getCreaturePosition(cid)
pos.x = pos.x + 1

Efekt wygląda tak a powinien być 1 kratke w Prawo:
04214wku3vij.bmp


Ale nie działa w tym skrypcie :/
 
Last edited:
Code:
doSendMagicEffect(getPlayerPosition(cid), efekt_twojej_superowej_aury)
 
Back
Top