• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Monster spawn only once per character

Etzi

New Member
Joined
May 19, 2014
Messages
28
Reaction score
1
TFS 0.3.6 (8.60) hello i need some help with a script this is what i need, a script so if you walk into a teleport a monster will spawn on a place and 1 char can only spawn it once thx for help :)
 
TFS 0.3.6 (8.60) hello i need some help with a script this is what i need, a script so if you walk into a teleport a monster will spawn on a place and 1 char can only spawn it once thx for help :)
Code:
local c = {
        topos = {x=555,y=555,z=5}, -- Where the player gets teleported
        monsterpos = {x=555,y=555,z=5}, -- Where the monster spawns
        monster = "demon" -- Monster name
    }

function onStepIn(cid, item, position, fromPosition)
    if not isPlayer(cid) then
        return false
    end
    if getCreatureStorage(cid, 12345) == 1 then
        doTeleportThing(cid, fromPosition)
        return false
    end
    doTeleportThing(cid, c.topos)
    doCreateMonster(c.monster, c.monsterpos)
    doCreatureSetStorage(cid, 12345, 1)
    return true
end

In the future, try to keep your requests in the designated request section.
 
Back
Top