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

Raid System

GOD Esteve

New Member
Joined
May 18, 2011
Messages
87
Reaction score
1
Hello guys,

I try to make one globalevents to make a raid system hour by hour

Script work, the only problem that allways that come the time of globalevent summon and send all message of the list.

Here is the script

Code:
local respawpositions = {
{x = 370, y = 105, z = 7},
{x = 384, y = 94, z = 7},
{x = 402, y = 90, z = 7},
{x = 411, y = 95, z = 7},
{x = 435, y = 112, z = 7},
{x = 421, y = 124, z = 7},
{x = 403, y = 121, z = 7},
{x = 383, y = 121, z = 7},
{x = 386, y = 108, z = 7},
{x = 398, y = 100, z = 7},
{x = 406, y = 106, z = 7},
{x = 398, y = 111, z = 7},
{x = 394, y = 125, z = 7}
}


local monsters = {
[1] = {text = {"INVASION: Brutus"}, monster = {'Brutus Bloodbeard'}},
[2] = {text = {"INVASION: Deadeye"}, monster = {'Deadeye Devious'}},
[3] = {text = {"INVASION: Demodras"}, monster = {'Demodras'}},
[4] = {text = {"INVASION: Ushuriel"}, monster = {'Ushuriel'}},
[5] = {text = {"INVASION: Ferumbras"}, monster = {'Ferumbras'}},
[6] = {text = {"INVASION: Rotworm Queen"}, monster = {'Rotworm Queen'}},
[7] = {text = {"INVASION: Tiquandas Revenge"}, monster = {'Tiquandas Revenge'}},
[8] = {text = {"INVASION: The Horned Fox"}, monster = {'The Horned Fox'}},
[9] = {text = {"INVASION: Ron The Ripper"}, monster = {'Ron The Ripper'}},
[10] = {text = {"INVASION: Necropharus"}, monster = {'Necropharus'}},
[11] = {text = {"INVASION: The Old Widow"}, monster = {'The Old Widow'}},
[12] = {text = {"INVASION: Lethal Lissy"}, monster = {'Lethal Lissy'}}
}     

function onThink(cid, interval, lastExecution)
    for _, area in pairs(monsters) do

Game.broadcastMessage(area.text[1], MESSAGE_STATUS_WARNING)
Game.createMonster(area.monster[1], respawpositions[math.random(#respawpositions)])   

    end
return TRUE
end

Can somebody help me, monter should be only one and random like the position.



Thank You
 
Why won't execute a raid instead create the monster? Eg: Every hour will execute a random raid, and maybe with chance?
 
Allways will have chance every hour of summon but alleatory monster in alleatory position, and the normal raid system don't work in TFS 1.0
 
local randomRaidID = math.random(1, #monsters)
local monsterT = monsters[randomRaidID]

first line makes random number. based of your monsters table.
second line replaces your local monsters table with a specific table

loose you for loop you don't need it anymore
 
I try what u say but i don't khown if i make correct, don't send erro at TFS but don't summon =/

Code:
local respawpositions = {

{x = 370, y = 105, z = 7},
{x = 384, y = 94, z = 7},
{x = 402, y = 90, z = 7},
{x = 411, y = 95, z = 7},
{x = 435, y = 112, z = 7},
{x = 421, y = 124, z = 7},
{x = 403, y = 121, z = 7},
{x = 383, y = 121, z = 7},
{x = 386, y = 108, z = 7},
{x = 398, y = 100, z = 7},
{x = 406, y = 106, z = 7},
{x = 398, y = 111, z = 7},
{x = 394, y = 125, z = 7}
}


local monsters = {
[1] = {text = {"INVASION: Brutus"}, monster = {'Brutus Bloodbeard'}},
[2] = {text = {"INVASION: Deadeye"}, monster = {'Deadeye Devious'}},
[3] = {text = {"INVASION: Demodras"}, monster = {'Demodras'}},
[4] = {text = {"INVASION: Ushuriel"}, monster = {'Ushuriel'}},
[5] = {text = {"INVASION: Ferumbras"}, monster = {'Ferumbras'}},
[6] = {text = {"INVASION: Rotworm Queen"}, monster = {'Rotworm Queen'}},
[7] = {text = {"INVASION: Tiquandas Revenge"}, monster = {'Tiquandas Revenge'}},
[8] = {text = {"INVASION: The Horned Fox"}, monster = {'The Horned Fox'}},
[9] = {text = {"INVASION: Ron The Ripper"}, monster = {'Ron The Ripper'}},
[10] = {text = {"INVASION: Necropharus"}, monster = {'Necropharus'}},
[11] = {text = {"INVASION: The Old Widow"}, monster = {'The Old Widow'}},
[12] = {text = {"INVASION: Lethal Lissy"}, monster = {'Lethal Lissy'}}
}     



function onThink(cid, interval, lastExecution)
local randomRaidID = math.random(1, #monsters)
local monsterT = monsters[randomRaidID]

Game.createMonster(monsterT, respawpositions[math.random(#respawpositions)])   

return TRUE
end

I also try with
Game.createMonster(randomRaidID, respawpositions[math.random(#respawpositions)])
 
Hell here is,

Untitled.jpg
Untitled.jpg
 
exactly..
does it look like creature name to you?
Now use that table like you used it before and take the monster name out of it.
 
N6yuqOX.jpg


Whell i think it's working, now im not at home to test the summon but i will try at home.

Code:
local respawpositions = {
{x = 370, y = 105, z = 7},
{x = 384, y = 94, z = 7},
{x = 402, y = 90, z = 7},
{x = 411, y = 95, z = 7},
{x = 435, y = 112, z = 7},
{x = 421, y = 124, z = 7},
{x = 403, y = 121, z = 7},
{x = 383, y = 121, z = 7},
{x = 386, y = 108, z = 7},
{x = 398, y = 100, z = 7},
{x = 406, y = 106, z = 7},
{x = 398, y = 111, z = 7},
{x = 394, y = 125, z = 7}
}


local monsters = {
[1] = {text = {"INVASION: Brutus"}, monster = {'Brutus Bloodbeard'}},
[2] = {text = {"INVASION: Deadeye"}, monster = {'Deadeye Devious'}},
[3] = {text = {"INVASION: Demodras"}, monster = {'Demodras'}},
[4] = {text = {"INVASION: Ushuriel"}, monster = {'Ushuriel'}},
[5] = {text = {"INVASION: Ferumbras"}, monster = {'Ferumbras'}},
[6] = {text = {"INVASION: Rotworm Queen"}, monster = {'Rotworm Queen'}},
[7] = {text = {"INVASION: Tiquandas Revenge"}, monster = {'Tiquandas Revenge'}},
[8] = {text = {"INVASION: The Horned Fox"}, monster = {'The Horned Fox'}},
[9] = {text = {"INVASION: Ron The Ripper"}, monster = {'Ron The Ripper'}},
[10] = {text = {"INVASION: Necropharus"}, monster = {'Necropharus'}},
[11] = {text = {"INVASION: The Old Widow"}, monster = {'The Old Widow'}},
[12] = {text = {"INVASION: Lethal Lissy"}, monster = {'Lethal Lissy'}}
}    

function onThink(cid, interval, lastExecution)
local randomRaidID = math.random(1, #monsters)
local RaidID = monsters[randomRaidID]

Game.broadcastMessage(RaidID.text[1], MESSAGE_STATUS_WARNING)
Game.createMonster(RaidID.monster[1], respawpositions[math.random(#respawpositions)])   
return TRUE
end

I Will edit with de answer after i test the summon !!


EDITED



Works man !! You Rock


Thank You and Merry Christmans
 
Last edited:
Back
Top