Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/pets/!pet.lua: onSay
data/talkactions/scripts/pets/!pet.lua:45: attempt to call global 'getCreatureBaseSpeed' (a nil value)
:: server save.. [done]
Its not work. :/
And too..
I use !pet And summoned and He atk mee!. :O
HAHAHAHAHA
Help? :wub:
when u have your pet and give him 100 of something for example i gave my pet 100 throwing stars to hold and it gave me back a magic sword whenever its 100 of something changes the item it seems dose anyone know how to fix this?
dofile("./petConfig.lua")
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
local daPet = getPlayerStorageValue(cid, storages.petUid)
if isCreature(daPet) == 1 then
if param ~= "" then
param = tonumber(param)
if type(param) == "number" then
if param <= maxItems then
if getPlayerStorageValue(cid, petItems[param]) ~= 0 and getPlayerStorageValue(cid, petItems[param]) ~= -1 then
local that = getPlayerStorageValue(cid, petItems[param])
local item = math.floor(that/1000)
local count = that-item*1000
doPlayerAddItem(cid, item, count)
if count == 1 then
doCreatureSay(daPet, 'Here is your ' .. getItemName(item) .. '', TALKTYPE_ORANGE_1)
else
doCreatureSay(daPet, 'Here are your ' .. count .. ' ' .. getItemName(item) .. 's', TALKTYPE_ORANGE_1)
end
setPlayerStorageValue(cid, petItems[param], 0)
end
end
end
end
end
return setExhausted(cid)
end
dofile("./petConfig.lua")
function onSay(cid, words, param)
if isExhausted(cid) == 1 then
return 0
end
local mySto = 0
local daPet = getPlayerStorageValue(cid, storages.petUid)
if isCreature(daPet) == 1 then
local pos = getCreaturePosition(daPet)
local a = 1
while a < 10 do
if getItemWeight(getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = a}).itemid, 1) ~= 0 then
break
end
a = a + 1
end
local carryingItem = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = a})
if getItemWeight(carryingItem.itemid, 1) ~= 0 then
if isContainer(carryingItem.uid) == 0 then
for b = 1, #petItems do
if getPlayerStorageValue(cid, petItems[b]) == 0 or getPlayerStorageValue(cid, petItems[b]) == -1 then
mySto = b
break
end
end
local count = 1
if mySto ~= 0 then
local theID = carryingItem.itemid
if isItemStackable(theID) == 1 then
count = carryingItem.type
doRemoveItem(carryingItem.uid, carryingItem.type)
else
doRemoveItem(carryingItem.uid, 1)
end
setPlayerStorageValue(cid, petItems[mySto], theID*1000+count)
if count == 1 then
doCreatureSay(daPet, 'Hmm, a ' .. getItemName(theID) .. ', I\'ll save it on my bag number ' .. mySto .. '!', TALKTYPE_ORANGE_1)
else
doCreatureSay(daPet, 'Hmm, ' .. count .. ' ' .. getItemName(theID) .. 's, I\'ll save them on my bag number ' .. mySto .. '!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'I have no space!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'I can\'t take containers!', TALKTYPE_ORANGE_1)
end
else
doCreatureSay(daPet, 'I can\'t see any item!', TALKTYPE_ORANGE_1)
end
else
doPlayerSendCancel(cid, 'You haven\'t call your pet!')
end
return setExhausted(cid)
end
When I attack a player or a monste with the pet, it just stands there and attacks only if the monster/player is beside it.. How do I make the pet to run to his foe and attack?
When im lvl 100 and ive got maybe 550hp the rat still have 20hp! anyway the attack is also still the same... im using last tfs 8.22Pet hp and mana depends on your level.
Damage formula depends on pet's magic level, and owner level
[05/10/2008 12:50:02] Lua Script Error: [TalkAction Interface]
[05/10/2008 12:50:02] in a timer event called from:
[05/10/2008 12:50:02] data/talkactions/scripts/pets/!pet.luanSay
[05/10/2008 12:50:02] luaGetPlayerStorageValue(). Player not found
[05/10/2008 12:50:02] Lua Script Error: [TalkAction Interface]
[05/10/2008 12:50:02] in a timer event called from:
[05/10/2008 12:50:02] data/talkactions/scripts/pets/!pet.luanSay
[05/10/2008 12:50:02] luaSetPlayerStorageValue(). Player not found