Profesja

Status
Zamknięty.

mateusz202

User
Zarejestrowany
Dołączył
Marzec 30, 2009
Posty
14
Liczba reakcji
0
Wiem ?e temat taki by? ale ja mam inny a wi?c do ots/data/talkactions talkactions wklej :
Kod:
<talkaction words="!antyprofesja" script="antyprofesja.lua"/>
<talkaction words="!eliteknight" script="elite knight.lua"/>
<talkaction words="!royalpaladin" script="royalepaladin.lua"/>
<talkaction words="!elderdruid" script="elder druid.lua"/>
<talkaction words="!mastersorcerer" script="master sorcerer.lua"/>
<talkaction words="!knight" script="knight.lua"/>
<talkaction words="!paladin" script="paladin.lua"/>
<talkaction words="!druid" script="druid.lua"/>
<talkaction words="!sorcerer" script="sorcerer.lua"/>
a w scripts zr?b pliki :
-elite knight.lua
-master sorcerer.lua
-royal paladin.lua
-elder druid.lua
-driud.lua
-sorcerer.lua
-paladin.lua
-knight.lua
i wklej do ka?dego dam osobno
-Master Sorcerer
Kod:
local config =
{
    neededLevel = 250,
    requiredVocation = {0,1, 2, 3, 4, 5, 6, 7, 8},
    changeVocation = "yes",
    newVocation = 5,
    changeOutfit = "yes",
    newOutfit = 2,
    removeSoulPoints = "yes",
    removeSoulPointsCount = 20
}
 
local VOCATION_STORAGE = 10000
local outfit = {lookType = config.newOutfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
 
function onSay(cid, words, param)
    if(getPlayerLevel(cid) <= config.neededLevel) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
        return TRUE
    end
    if(isInArray(config.requiredVocation, getPlayerVocation(cid)) ~= TRUE) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
        return TRUE
    end
    setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
    if(config.changeVocation == "yes") then
        doPlayerSetVocation(cid, config.newVocation)
    end
    if(config.changeOutfit == "yes") then
        doSetCreatureOutfit(cid, outfit, -1)
    end
    if(config.removeSoulPoints == "yes") then
        if(getPlayerSoul(cid) >= config.removeSoulPointsCount) then
            doPlayerAddSoul(cid, - config.removeSoulPointsCount)
        else
            doPlayerSendCancel(cid, "Sorry, you don\'t have required count of soul points.")
        end
    end
    addEvent(removeMana, 1000, cid)
    return TRUE
end
 
function removeMana(cid)
    doCreatureAddMana(cid, -1)
    if(getCreatureMana(cid) > 0) then
        addEvent(removeMana, 1000, cid)
    else
        doRemoveCondition(cid, CONDITION_OUTFIT)
        transformBack(cid)
    end
    return TRUE
end
 
function transformBack(cid)
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
    setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
    return TRUE
end
-Elder Druid
Kod:
local config =
{
    neededLevel = 8,
    requiredVocation = {0,1, 2, 3, 4, 5, 6, 7, 8, 13},
    changeVocation = "yes",
    newVocation = 6,
    changeOutfit = "yes",
    newOutfit = 2,
    removeSoulPoints = "yes",
    removeSoulPointsCount = 20
}
 
local VOCATION_STORAGE = 10000
local outfit = {lookType = config.newOutfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
 
function onSay(cid, words, param)
    if(getPlayerLevel(cid) <= config.neededLevel) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
        return TRUE
    end
    if(isInArray(config.requiredVocation, getPlayerVocation(cid)) ~= TRUE) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
        return TRUE
    end
    setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
    if(config.changeVocation == "yes") then
        doPlayerSetVocation(cid, config.newVocation)
    end
    if(config.changeOutfit == "yes") then
        doSetCreatureOutfit(cid, outfit, -1)
    end
    if(config.removeSoulPoints == "yes") then
        if(getPlayerSoul(cid) >= config.removeSoulPointsCount) then
            doPlayerAddSoul(cid, - config.removeSoulPointsCount)
        else
            doPlayerSendCancel(cid, "Sorry, you don\'t have required count of soul points.")
        end
    end
    addEvent(removeMana, 1000, cid)
    return TRUE
end
 
function removeMana(cid)
    doCreatureAddMana(cid, -1)
    if(getCreatureMana(cid) > 0) then
        addEvent(removeMana, 1000, cid)
    else
        doRemoveCondition(cid, CONDITION_OUTFIT)
        transformBack(cid)
    end
    return TRUE
end
 
function transformBack(cid)
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
    setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
    return TRUE
end
-Royal Paladin
Kod:
local config =
{
    neededLevel = 8,
    requiredVocation = {0,1, 2, 3, 4, 5, 6, 7, 8, 13},
    changeVocation = "yes",
    newVocation = 7,
    changeOutfit = "yes",
    newOutfit = 2,
    removeSoulPoints = "yes",
    removeSoulPointsCount = 20
}
 
local VOCATION_STORAGE = 10000
local outfit = {lookType = config.newOutfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
 
function onSay(cid, words, param)
    if(getPlayerLevel(cid) <= config.neededLevel) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
        return TRUE
    end
    if(isInArray(config.requiredVocation, getPlayerVocation(cid)) ~= TRUE) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
        return TRUE
    end
    setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
    if(config.changeVocation == "yes") then
        doPlayerSetVocation(cid, config.newVocation)
    end
    if(config.changeOutfit == "yes") then
        doSetCreatureOutfit(cid, outfit, -1)
    end
    if(config.removeSoulPoints == "yes") then
        if(getPlayerSoul(cid) >= config.removeSoulPointsCount) then
            doPlayerAddSoul(cid, - config.removeSoulPointsCount)
        else
            doPlayerSendCancel(cid, "Sorry, you don\'t have required count of soul points.")
        end
    end
    addEvent(removeMana, 1000, cid)
    return TRUE
end
 
function removeMana(cid)
    doCreatureAddMana(cid, -1)
    if(getCreatureMana(cid) > 0) then
        addEvent(removeMana, 1000, cid)
    else
        doRemoveCondition(cid, CONDITION_OUTFIT)
        transformBack(cid)
    end
    return TRUE
end
 
function transformBack(cid)
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
    setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
    return TRUE
end
-Elite Knight
Kod:
local config =
{
    neededLevel = 8,
    requiredVocation = {0,1, 2, 3, 4, 5, 6, 7, 8, 13},
    changeVocation = "yes",
    newVocation = 8,
    changeOutfit = "yes",
    newOutfit = 2,
    removeSoulPoints = "yes",
    removeSoulPointsCount = 20
}
 
local VOCATION_STORAGE = 10000
local outfit = {lookType = config.newOutfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
 
function onSay(cid, words, param)
    if(getPlayerLevel(cid) <= config.neededLevel) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
        return TRUE
    end
    if(isInArray(config.requiredVocation, getPlayerVocation(cid)) ~= TRUE) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
        return TRUE
    end
    setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
    if(config.changeVocation == "yes") then
        doPlayerSetVocation(cid, config.newVocation)
    end
    if(config.changeOutfit == "yes") then
        doSetCreatureOutfit(cid, outfit, -1)
    end
    if(config.removeSoulPoints == "yes") then
        if(getPlayerSoul(cid) >= config.removeSoulPointsCount) then
            doPlayerAddSoul(cid, - config.removeSoulPointsCount)
        else
            doPlayerSendCancel(cid, "Sorry, you don\'t have required count of soul points.")
        end
    end
    addEvent(removeMana, 1000, cid)
    return TRUE
end
 
function removeMana(cid)
    doCreatureAddMana(cid, -1)
    if(getCreatureMana(cid) > 0) then
        addEvent(removeMana, 1000, cid)
    else
        doRemoveCondition(cid, CONDITION_OUTFIT)
        transformBack(cid)
    end
    return TRUE
end
 
function transformBack(cid)
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
    setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
    return TRUE
end
-Stworzona dla knight?w i palk?w do skilowania (niema lag?w) ANTYPROFESJA
Kod:
local config =
{
    neededLevel = 8,
    requiredVocation = {0,1, 2, 3, 4, 5, 6, 7, 8, 13},
    changeVocation = "yes",
    newVocation = 0,
    changeOutfit = "yes",
    newOutfit = 2,
    removeSoulPoints = "yes",
    removeSoulPointsCount = 20
}
 
local VOCATION_STORAGE = 10000
local outfit = {lookType = config.newOutfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
 
function onSay(cid, words, param)
    if(getPlayerLevel(cid) <= config.neededLevel) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required level.")
        return TRUE
    end
    if(isInArray(config.requiredVocation, getPlayerVocation(cid)) ~= TRUE) then
        doPlayerSendCancel(cid, "Sorry, you don\'t have required vocation.")
        return TRUE
    end
    setPlayerStorageValue(cid, VOCATION_STORAGE, getPlayerVocation(cid))
    if(config.changeVocation == "yes") then
        doPlayerSetVocation(cid, config.newVocation)
    end
    if(config.changeOutfit == "yes") then
        doSetCreatureOutfit(cid, outfit, -1)
    end
    if(config.removeSoulPoints == "yes") then
        if(getPlayerSoul(cid) >= config.removeSoulPointsCount) then
            doPlayerAddSoul(cid, - config.removeSoulPointsCount)
        else
            doPlayerSendCancel(cid, "Sorry, you don\'t have required count of soul points.")
        end
    end
    addEvent(removeMana, 1000, cid)
    return TRUE
end
 
function removeMana(cid)
    doCreatureAddMana(cid, -1)
    if(getCreatureMana(cid) > 0) then
        addEvent(removeMana, 1000, cid)
    else
        doRemoveCondition(cid, CONDITION_OUTFIT)
        transformBack(cid)
    end
    return TRUE
end
 
function transformBack(cid)
    doPlayerSetVocation(cid, getPlayerStorageValue(cid, VOCATION_STORAGE))
    setPlayerStorageValue(cid, VOCATION_STORAGE, 0)
    return TRUE
end
reszte dodam potem ale mam wi?cej
Legenda
-requiredVocation = {0<--antyprofesja,1, 2, 3, 4, 5, 6, 7, 8, 13<--profesja GMa jak zrobi??wklej w OTS/data/vocations to:
Kod:
<vocation id="13" name="Game Master" description="an GM" gaincap="25" gainhp="15" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="4" gainmanaamount="100" gainsoulticks="15" gainsoulamount="1" manamultiplier="3.0" attackspeed="500" prevoc="4" basespeed="100">
	<diepercent experience="7" magic="7" skill="7" equipment="7" container="100"/>
	<formula damage="1.2" defense="1.1" armor="1.1"/>
	<skill id="0" multiplier="1.0"/>
	<skill id="1" multiplier="1.0"/>
	<skill id="2" multiplier="1.0"/>
	<skill id="3" multiplier="1.0"/>
	<skill id="4" multiplier="1.0"/>
	<skill id="5" multiplier="1.0"/>
	<skill id="6" multiplier="1.0"/>
</vocation>
i ciesz si? now? profesj? po?niej dam dla GMa(chodzi o profesj? a i ?eby?cie nie my?leju ?e to prawdziwy GM bo to nie prawda) czary
 
Status
Zamknięty.
Back
Do góry