Tibia - Z

Forum o Tibia i OTS

Ogłoszenie

Oficjalny Projekt : Harry Potter OTS MMORPG!! Jeśli wiesz że pomożesz,pisz na PW do adminów!!

#1 2009-01-16 16:07:41

Karas93

http://img102.imageshack.us/img102/9441/adminuj1.png                []D [] []V[] []D

2584099
Call me!
Skąd: Powiat Gibon
Zarejestrowany: 2009-01-11
Posty: 45
Punktów :   
Wiek: 16
WWW

Transformation By Karas

Skryp na Transformacje

Info:
playerVocation - tutaj wstawiasz ID profesji które mogą tego użyć
playerNewVocation - ID nowej profesji w którą się transformujesz
playerNewLookType - ID nowego outfitu
playerLevel - wymagany level
manaCost - wymagana ilość many
soulCost - wymagana ilość souli
timeActive - czas działania w sekundach

Installation:

Do Talkaction.xml dodajesz:

<talkaction words="!transform" script="transform.lua"/>

Folder data/talkaction/scripts/tranform.lua

-- Transformation System by Karas
local configuration =
{
    playerVocation = {1, 2, 5, 6},
    playerNewVocation = 9,
    playerNewLookType = 12,
    playerLevel = 10,
    manaCost = 100,
    soulCost = 2,
    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
            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, 0)
end

W creaturescritps/scripts podmień login.lua na to:

local VOCATION_STORAGE = 10000
function onLogin(cid)
    if(getPlayerStorageValue(cid, VOCATION_STORAGE) > 0) then
        doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
        setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
    end
    return TRUE
end

Mam nadzieję, że się przyda

Offline

 

#2 2009-01-16 20:32:40

Adus41

http://img102.imageshack.us/img102/9441/adminuj1.png

438525
Skąd: Płock
Zarejestrowany: 2009-01-11
Posty: 86
Punktów :   
Wiek: 14

Re: Transformation By Karas

Coś mi się zdaję ze to niejest by Karas Przyznaj się ze to ściągnąłeś.Bo widziałem już taki skrypt.

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.power-ranger-furia-dzungi.pun.pl www.trafnetypy.pun.pl www.haxball.pun.pl www.zabanet.pun.pl www.laptoptbakugan.pun.pl