this is a working script that summons and deletes a dog
if somebody could add a minimum level to use this command and that it will cost 10 gold to summon the dog
thanx!
___/jikoe
script :
if somebody could add a minimum level to use this command and that it will cost 10 gold to summon the dog
thanx!
___/jikoe
script :
function doPlayerAddSummon(cid, name, pos)
local creature = doSummonCreature(name, pos)
doConvinceCreature(cid, creature)
return creature
end
function onSay(cid, words, param)
local petUid = 0
local pos = getCreaturePosition(cid)
local store = getPlayerStorageValue(cid, 1000)
if words == "!pet" then
if store == -1 then
if getTilePzInfo(pos) == FALSE then
petUid = doPlayerAddSummon(cid, "Dog", pos)
setPlayerStorageValue(cid, 1000, petUid)
else
doPlayerSendCancel(cid, "You can not call your pet in a protection zone.")
end
else
if isCreature(store) == TRUE then
doRemoveCreature(store)
setPlayerStorageValue(cid, 1000, 0)
else
if getTilePzInfo(pos) == FALSE then
petUid = doPlayerAddSummon(cid, "Dog", pos)
setPlayerStorageValue(cid, 1000, petUid)
else
doPlayerSendCancel(cid, "You can not call your pet in a protection zone.")
end
end
end
end
end