• 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!

CreatureEvent NPC Grizzly Adams - almost how RL Tibia.

some1 help me, i receive the message, 05:44 Someone is currently fighting with The Many!, when i try to enter in a magic forcefield with uniqueid 5307.
 
Hello dudes how do i set the coordinates to tp_bossy.lua? Cuz I don't understand how I do.


I have to make teleports right? and then build one room for each teleport so you comes to the boss monster? and when you killed the boss monster then a teleport apear? Lets say if they need 20 points to enter a teleport if they got 20 points they can enter, or els they can't enter? or is level?

aww, help me dude and please help me understand the script!

tp_bossy.lua
Code:
 local storage = 10001
local adams = {
                [5300] = {
                         char = {effects = 10, global_storage = 5300, storage_value = 5, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Snapper", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5301] = {
                         char = {effects = 10, global_storage = 5301, storage_value = 9, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Hide", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5302] = {
                         char = {effects = 10, global_storage = 5302, storage_value = 15, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Bloodtusk", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5303] = {
                         char = {effects = 10, global_storage = 5303, storage_value = 18, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Shardhead", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5304] = {
                         char = {effects = 10, global_storage = 5304, storage_value = 24, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Thul", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5305] = {
                         char = {effects = 10, global_storage = 5305, storage_value = 36, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Esmeralda", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5306] = {
                         char = {effects = 10, global_storage = 5306, storage_value = 40, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Old Widow", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5307] = {
                         char = {effects = 10, global_storage = 5307, storage_value = 44, gdzie_nas_tp = {x = 890, y = 839, z = 7}},
                         [0] = {name = "The Many", pos_summona = {x = 894, y = 839, z = 7}, effect = 10},
                         },
                [5308] = {
                         char = {effects = 10, global_storage = 5308, storage_value = 48, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Leviathan", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5309] = {
                         char = {effects = 10, global_storage = 5309, storage_value = 52, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Stonecracker", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5310] = {
                         char = {effects = 10, global_storage = 5310, storage_value = 56, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Noxious Spawn", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         }
              }
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local adam = adams[item.uid]
if adam then
    if getPlayerStorageValue(cid, storage) == adam.char.storage_value then
        if getGlobalStorageValue(adam.global_storage) == -1 then
            setGlobalStorageValue(adam.global_storage, 1)
            doTeleportThing(cid, adam.char.gdzie_nas_tp)
            doSendMagicEffect(position, adam.char.effects)
            for i = 0, #adam do
                doCreateMonster(adam[i].name, adam[i].pos_summona)
                doSendMagicEffect(adam[i].gdzie_nas_tp, adam[i].effect)
            end
        else
            doPlayerSendTextMessage(cid, 22, "Ktos aktualnie walczy z "..adam[0].name.."!")
            doTeleportThing(cid, fromPosition)
        end
    else
        doPlayerSendTextMessage(cid, 22, "Nie masz prawa tutaj wejsc!")
        doTeleportThing(cid, fromPosition)
    end
end

local tp_wyjsciowe = {
                    [5311] = {global_storage = 5300, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5312] = {global_storage = 5301, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5313] = {global_storage = 5302, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5314] = {global_storage = 5303, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5315] = {global_storage = 5304, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5316] = {global_storage = 5305, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5317] = {global_storage = 5306, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5318] = {global_storage = 5307, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5319] = {global_storage = 5308, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5320] = {global_storage = 5309, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5321] = {global_storage = 5310, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}
                    }
local exits = tp_wyjsciowe[item.uid]
if exits then
    doTeleportThing(cid, exits.gdzie_nas_tp)
    doSendMagicEffect(exits.gdzie_nas_tp, 10)
    setGlobalStorageValue(exits.global_storage, -1)
end
return true
end


global_storage = 5306, storage_value = 40, [ Global_storage 5306? is that ID on the teleport?
gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, [ Is that where the teleport is? ]
pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, [ this coordinates is where the teleporter shall spawn after the monster is dead?]

help me dudes!

gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}, -- boss room position
pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10}, -- where monster has been summoned when we enter into tp
 
please help me, i make all correct and receive the message, 05:44 Someone is currently fighting with The Many!, when i try to enter in a magic forcefield with uniqueid 5307.
 
global storage 9972 = the many i look in my sql and the player received the storage but its 9972 -1, its correct? if this player try to enter in teleport its say have another people in the room

The global storage in teleport is 5307(aid). Its all correct

my tp_bossy
[5307] = {
char = {effects = 10, global_storage = 5307, storage_value = 44, gdzie_nas_tp = {x = 32233, y = 31748, z = 7}},
[0] = {name = "The Many", pos_summona = {x = 32241, y = 31752, z = 7}, effect = 10},
},

my boss_killing

["the many"] = {name = "The Many", storage = 9972, begin_storage_value = 44, finished_storage_value = 45, count = 1},

and my grizzly adams
["hydra"] = {storage = 9985, begin_storage_value = 42, finished_storage_value = 43, count = 800},

and grizzly.lua (npc)

[11] = {name = "hydras", storage = 9985, finish_storage_value = 43, begin_storage_value = 42, boss = "yes", after_kill_boss = 45, before_kill_boss = 44, talkstate = 12},


and in teleport i add action id 5307. But when i try to enter in teleport, i see the msg other people in the room...
 
Last edited:
Change your tp_bossy.lua file on this:
PHP:
local storage = 10001
local adams = {
                [5300] = {
                         char = {effects = 10, global_storage = 5300, storage_value = 5, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Snapper", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5301] = {
                         char = {effects = 10, global_storage = 5301, storage_value = 9, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Hide", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5302] = {
                         char = {effects = 10, global_storage = 5302, storage_value = 15, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Bloodtusk", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5303] = {
                         char = {effects = 10, global_storage = 5303, storage_value = 18, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Shardhead", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5304] = {
                         char = {effects = 10, global_storage = 5304, storage_value = 24, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Thul", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5305] = {
                         char = {effects = 10, global_storage = 5305, storage_value = 36, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Esmeralda", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5306] = {
                         char = {effects = 10, global_storage = 5306, storage_value = 40, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Old Widow", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5307] = {
                         char = {effects = 10, global_storage = 5307, storage_value = 44, gdzie_nas_tp = {x = 890, y = 839, z = 7}},
                         [0] = {name = "The Many", pos_summona = {x = 894, y = 839, z = 7}, effect = 10},
                         },
                [5308] = {
                         char = {effects = 10, global_storage = 5308, storage_value = 48, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Leviathan", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5309] = {
                         char = {effects = 10, global_storage = 5309, storage_value = 52, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "Stonecracker", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         },
                [5310] = {
                         char = {effects = 10, global_storage = 5310, storage_value = 56, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                         [0] = {name = "The Noxious Spawn", pos_summona = {x = 1000, y = 1000, z = 7}, effect = 10},
                         }
              }
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local adam = adams[item.uid]
if adam then
    if getPlayerStorageValue(cid, storage) == adam.char.storage_value then
        if getGlobalStorageValue(adam.global_storage) == 1 then
            setGlobalStorageValue(adam.global_storage, 1)
            doTeleportThing(cid, adam.char.gdzie_nas_tp)
            doSendMagicEffect(position, adam.char.effects)
            for i = 0, #adam do
                doCreateMonster(adam[i].name, adam[i].pos_summona)
                doSendMagicEffect(adam[i].gdzie_nas_tp, adam[i].effect)
            end
        else
            doPlayerSendTextMessage(cid, 22, "Ktos aktualnie walczy z "..adam[0].name.."!")
            doTeleportThing(cid, fromPosition)
        end
    else
        doPlayerSendTextMessage(cid, 22, "Nie masz prawa tutaj wejsc!")
        doTeleportThing(cid, fromPosition)
    end
end

local tp_wyjsciowe = {
                    [5311] = {global_storage = 5300, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5312] = {global_storage = 5301, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5313] = {global_storage = 5302, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5314] = {global_storage = 5303, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5315] = {global_storage = 5304, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5316] = {global_storage = 5305, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5317] = {global_storage = 5306, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5318] = {global_storage = 5307, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5319] = {global_storage = 5308, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5320] = {global_storage = 5309, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}},
                    [5321] = {global_storage = 5310, gdzie_nas_tp = {x = 1000, y = 1000, z = 7}}
                    }
local exits = tp_wyjsciowe[item.uid]
if exits then
    doTeleportThing(cid, exits.gdzie_nas_tp)
    doSendMagicEffect(exits.gdzie_nas_tp, 10)
    setGlobalStorageValue(exits.global_storage, -1)
end
return true
end
 
crap, trying to add an monster to the task, to be more precise, an task of killing trolls, what should I change to add a new task?

trying here but no results so far lol

thanks
 
nah u don't have to create the script

just tell me what I have to change for it to work, look what I've done:

creaturescripts/grizzly_adams.lua
Lua:
	["troll"] = {storage = 9998, begin_storage_value = 3, finished_storage_value = 4, count = 100},
	["troll champion"] = {storage = 9998, begin_storage_value = 3, finished_storage_value = 4, count = 100},
	["frost troll"] = {storage = 9998, begin_storage_value = 3, finished_storage_value = 4, count = 100},

npcs/scritps/grizzly_adams.lua

Lua:
			[1] = {name = "trolls", storage = 9998, expe = "yes", how_many = 100000, finish_storage_value = 4, begin_storage_value = 3, talkstate = 4},

Lua:
				elseif tasks[i].name == "trolls" then
					selfSay("Argh! Estes malditos trolls infestaram os bueiros da cidade. Mate {100 "..tasks[i].name.."} e lhe darei uma bela recompensa. Interessado?", cid)

So, I get the task, but when I kill a troll nothing happens.

What else should I change for it to work? Thanks a lot!
 
Why that other script is better?

This one have ranks, etc, no?

The other one doesn't seems to have, what's the difference betwen them?

Thanks
 
when i leave the room without kill boss, i can back in that room and will summon the second boss (2 BOSS) and if i leave room again i can back and will summon a third boss, please i need serious help. I using the correct uniqueids in exit teleport
i receive the error
[12/10/2010 05:33:16] [Error - MoveEvents Interface]
[12/10/2010 05:33:16] data/movements/scripts/tp_bossy.lua:eek:nStepIn
[12/10/2010 05:33:16] Description:
[12/10/2010 05:33:16] attempt to index a nil value
[12/10/2010 05:33:16] stack traceback:
[12/10/2010 05:33:16] [C]: in function 'doSendMagicEffect'
[12/10/2010 05:33:16] data/movements/scripts/tp_bossy.lua:58: in function <data/movements/scripts/tp_bossy.lua:48>

my line 48 is "function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)"

and my line 58 is "doSendMagicEffect(adam.gdzie_nas_tp, adam.effect)"


A question i need set the script dont create automatic exit teleport i need set it in map editor correct? here i dont see automatic teleport.

Its my last problem in the task system.
 
sorry for double post, but i want that when player leave room with exit uniqueid he cant back and i dont know if is possible but delete monster? double respawn is sux
 
Hi again, look this bug


05:17 Pandora [72]: task
05:17 Grizzly Adams: Good job, go kill boss.
05:17 Pandora [72]: yes
05:17 Grizzly Adams: Good show, old chap! Speak to me again when you are done hunting.

now he enters an infinite loop and never will end the task, unless he gives up, the npc leaved the mission asking for he to do again...
please can you fix it?



and other

05:55 Grizzly Adams: All right, what would you like to hunt? Ice golems, quara, elementals, mutated rats or giant spiders?
05:55 Pandora [91]: quara
05:55 Grizzly Adams: What do you want, quaras or quara scouts?
05:55 Pandora [91]: quara scouts
05:55 Grizzly Adams: Do you want kill 300 quara scouts?
05:55 Pandora [91]: yes
05:55 Grizzly Adams: Happy hunting, old chap! Come back to me when you are through with your task.
05:55 Pandora [91]: task
05:55 Grizzly Adams: All right, what would you like to hunt? Ice golems, quara, elementals, mutated rats or giant spiders?
05:55 Pandora [91]: quara
05:55 Grizzly Adams: What do you want, quaras or quara scouts?
05:56 Pandora [91]: quara scouts
05:56 Grizzly Adams: Do you want kill 300 quara scouts?
05:56 Pandora [91]: yes

Grizzly Adams never give the quara task... quaras or quara scouts.
 
Last edited:
Back
Top