What's new

Efekt transa i revert

Status
Not open for further replies.

Cebal

Active User
Joined
Dec 23, 2008
Messages
62
Reaction score
0
Witam wszystkich.
U?ywam poni?szego skryptu na transform. Wszystko jest pi?knie dzia?a jak nale?y, ale mam kilka pyta? i mam nadziej?, ?e mi pomo?ecie. Mianowicie, chodzi mi o to, ?e potrzebuje, ?eby podczas przemiany pojawia? si? jaki? efekt czaru. Jestem ma?o obeznany w skryptach, nie chce namiesza? kombinuj?c, dlatego zwracam si? do Was o pomoc. Chcia?bym jeszcze, ?eby kto? kto potrafi napisa? mi do niego revert (odmian?), ?eby nie trzeba by?o czeka? okre?lonej ilo?ci czasu, tak jak jest w skrypcie.

-- Transformation System by Piotrek1447
local configuration =
{
playerVocation = {1},
playerNewVocation = 9,
playerNewLookType = 4,
playerLevel = 30,
manaCost = 10,
soulCost = 1,
timeActive = 30
}
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)
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, 1)
end
 
Status
Not open for further replies.
Top