• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Get specific summon from player

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
177
Location
Sweden
Hiya! I have an issue.. again.

I want to get the players specific summon (It needs to be a specific summon as im using this as a summoner/pet system and you can have several "summons")in a onKill script in creaturescripts, how do i do that? And check that it returns correct?

Here's the script so far, I got stuck at the "player:" as you can see. Its not done either so no harass about the code itself please. x)


Lua:
function onKill(player, target)
local monster = Monster(target)

if monster and monster:getMonsterLevel() > 0 then
monsterLevel = monster:getMonsterLevel()
calculation = monsterLevel/10

prePetLevel = player:setStorageValue(99999, (player:getStorageValue(99999) + calculation)) -- Calculate the storage aka pre-level recieved on kill.

local petLevelupConfig = {10, 40, 100, 200, 350, 500, 1000}

local summon = player:

for i = 1,#petLevelupConfig do
if prePetLevel == petLevelupConfig[i] then
summon:setLevel(summon:getMonsterLevel() + 1)
end


end
end
end

Edit: Using tfs 1.3
 
Back
Top