Tibia Mod
Forum zostało Przeniesione tutaj:
http://tibiamod.xaa.pl/

Zapraszam.

Join the forum, it's quick and easy

Tibia Mod
Forum zostało Przeniesione tutaj:
http://tibiamod.xaa.pl/

Zapraszam.
Tibia Mod
Czy chcesz zareagować na tę wiadomość? Zarejestruj się na forum za pomocą kilku kliknięć lub zaloguj się, aby kontynuować.

[TalkActions] Transform System

2 posters

Go down

[TalkActions] Transform System Empty [TalkActions] Transform System

Pisanie by $wirus Pią Lis 16, 2012 11:05 pm

Kod:
local transform =
{
    --[1] = {2, 0, 0, 6, 30, 5}
}
local texts =
{
    level = "You don\'t have enough level.",
    mana = "You don\'t have enough mana.",
    transform = "You transform to "
}
function onSay(cid, param, words)
    local Player = transform[getPlayerVocation(cid)]
    if (Player == nil) then
        return true
    end
    if (getPlayerLevel(cid) < Player[5]) then
        return doPlayerSendTextMessage(cid, 22, texts.level)     
    elseif (getCreatureMana(cid) < Player[6]) then
        return doPlayerSendTextMessage(cid, 22, texts.mana)
    end
   
        doPlayerSetVocation(cid, Player[1])
        doCreatureAddMana(cid, -Player[6])
        doSetCreatureOutfit(cid, Player[4], -1)
        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + Player[2])
        setCreatureMaxMana(cid, getCreatureMaxMana(cid) + Player[3])
        doPlayerSendTextMessage(cid, 22, ""..texts.transform..""..getVocationInfo(Player[1]).name..".")
    return true
end 

i talkactions.xml
Kod:
<talkaction words="tekst" event="script" value="nazwa.lua"/>

8.2+ Na starszych tez moze zadziala

$wirus
Uploader

Liczba postów : 35
Join date : 16/11/2012

Powrót do góry Go down

[TalkActions] Transform System Empty Re: [TalkActions] Transform System

Pisanie by Ferdek Pią Lis 23, 2012 3:05 pm

Siemanko. Czy moglbys wytlumaczyc " --[1] = {2, 0, 0, 6, 30, 5} " ??

I czy dla nastepnej postaci wystarczy tylko dodac :
" --[1] = {2, 0, 0, 6, 30, 5};
--[2] = {2, 0, 0, 6, 30, 5}; "

??

Ferdek
User

Liczba postów : 1
Join date : 23/11/2012

Powrót do góry Go down

Powrót do góry

- Similar topics

 
Permissions in this forum:
Nie możesz odpowiadać w tematach