Odp: Support - pomoc przy pisaniu skrypt?w
Mam problem ze skryptem Tairensa.
link do tematu
http://tibia.net.pl/talkactions/259879-tranform-stawiam-na-uniwersalnosc.html
A wiec Tairens napisal ze w tej lini trzeba dodac dane i bedzie dzialac:
local transform =
{
--[voc_id_before_trans] = {voc_id_after_trans, addedhealth, addedmana, outfit, required_level, required_mana}
}
Ja zamiast tych dan zmienilem na cos takiego:
local transform =
{
--[0] = {1, 5000, 5000, 59, 1, 0}
}
i niedziala niewiem czemu:S Skrypt caly wyglada tak plax help!!
local transform =
{
--[voc_id_before_trans] = {voc_id_after_trans, addedhealth, addedmana, outfit, required_level, required_mana}
}
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
doPlayerSendTextMessage(cid, 22, texts.level)
return true
end
if (getCreatureMana(cid) < Player[6]) then
doPlayerSendTextMessage(cid, 22, texts.mana)
return true
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
Jesli ktos moglby to zrobic na przykladzie to podam dane:
Lvl 1
Voc przed transem 0
Voc po transie 1
Mana dodana 5000
Mana odjeta 0
HP dodane 5000
Outfit 59
Dajcie czadu