Action Elemental Quest

Ezzam

New Member
Joined
Jan 16, 2008
Messages
213
Best answers
0
Reaction score
2
OBS: The script is NOT tested.

I made this script because i was boored to death, the script may be bugged but can easily be fixed by almost any scripter on this forum.

The community is always a option and if you ask for help you will probably get it, I have no time for fixing bugs atm.

But if any scripter reads this thread...
This is a free to edit/improve script, to help members with less LUA knowledge you can post a fixed and tested version and i will add it to the first post.

Hope you can find any use of this "junk".
Code:
[COLOR="Red"]Script and idea originally made by Ezzam for http://www.OtLand.net/[/COLOR]
function onUse(cid, item, fromPosition, itemEx, toPosition)

config = {
-----------------------------------------------------------------
--Basic things to setup: Global values for each elemental boss,--
--Global makes it possible only one boss of each element can be--
--summoned ad once.----------------------------------------------
-----------------------------------------------------------------
  globalValueFire = 25001,
  globalValueIce = 25002,
  globalValueEnergy = 25003,
  globalValueEarth = 25004,

-----------------------------------------------------------------
--UniqueID in the map (any item/ground).-------------------------
-----------------------------------------------------------------
  fireBoss = 25001,
  iceBoss = 25002,
  energyBoss = 25003,
  earthBoss = 25004,

-----------------------------------------------------------------
--Time in seconds between each element can be summoned.----------
-----------------------------------------------------------------
  resummonTime = 300
}



-----------------------------------------------------------------
---Positions where the elements spawn.---------------------------
-----------------------------------------------------------------
pos = {
  fireBoss = {x = 000, y = 000, z = 0},
  iceBoss = {x = 000, y = 000, z = 0},
  energyBoss = {x = 000, y = 000, z = 0},
  eathBoss = {x = 000, y = 000, z = 0}
}


-----------------------------------------------------------------
--Monster names of the elements.---------------------------------
-----------------------------------------------------------------
monster = {
  fire = Hell Guard,
  ice = Starlight,
  energy = Electro,
  earth = Mountain Troll
}


-----------------------------------------------------------------
--Error/success messages.----------------------------------------
-----------------------------------------------------------------
messages = {
  fireBossSummoned = "The fire elemental is already summoned. Elements can only me summoned once every 5th minute.",
  iceBossSummoned = "The ice elemental is already summoned. Elements can only me summoned once every 5th minute.",
  energyBossSummoned = "The energy elemental is already summoned. Elements can only me summoned once every 5th minute.",
  earthBossSummoned = "The earth elemental is already summoned. Elements can only me summoned once every 5th minute."
}


-----------------------------------------------------------------
---------------------DON'T MIND THIS PART------------------------
-----------------------------------------------------------------
misc = {
  getGlobalFire = getGlobalStorageValue(config.globalValueFire),
  getGlobalIce = getGlobalStorageValue(config.globalValueIce),
  getGlobalEnergy = getGlobalStorageValue(config.globalValueEnergy),
  getGlobalEarth = getGlobalStorageValue(config.globalValueEarth)
}
-----------------------------------------------------------------
-----------------------------------------------------------------
-----------------------------------------------------------------
-----------------------------------------------------------------
-----------------------------------------------------------------
--**CODE** DON'T EDIT UNLESS YOU KNOW WHAT YOU ARE DOING!--------
-----------------------------------------------------------------
-----------------------------------------------------------------



-----------------------------------------------------------------
-F-I-R-E---B-O-S-S-----------------------------------------------
-----------------------------------------------------------------
  if item.uid == config.fireBoss then
    if misc.getGlobalFire < 1 then
      doCreateMonster(monster.fire, pos.fireBoss)
      addEvent(fireGlobal ,config.resummonTime * 1000)
    else
      doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, fireBossSummoned)
    end
-----------------------------------------------------------------
-I-C-E---B-O-S-S-------------------------------------------------
-----------------------------------------------------------------
  elseif item.uid == config.iceBoss then
    if misc.getGlobalIce < 1 then
      doCreateMonster(monster.ice, pos.iceBoss)
      addEvent(iceGlobal ,config.resummonTime * 1000)
    else
      doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, iceBossSummoned)
    end
-----------------------------------------------------------------
-E-N-E-R-G-Y---B-O-S-S-------------------------------------------
-----------------------------------------------------------------
  elseif item.uid == config.energyBoss then
    if misc.getGlobalEnergy < 1 then
      doCreateMonster(monster.energy, pos.energyBoss)
      addEvent(energyGlobal ,config.resummonTime * 1000)
    else
      doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, energyBossSummoned)
    end
-----------------------------------------------------------------
-E-A-R-T-H---B-O-S-S---------------------------------------------
-----------------------------------------------------------------
  elseif item.uid == config.earthBoss then
    if misc.getGlobalEarth < 1 then
      doCreateMonster(monster.earth, pos.earthBoss)
      addEvent(earthGlobal ,config.resummonTime * 1000)
    else
      doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, earthBossSummoned)
    end
-----------------------------------------------------------------
--ENDING CODE----------------------------------------------------
-----------------------------------------------------------------
  end
  return TRUE
end









-----------------------------------------------------------------
-F-U-N-C-T-I-O-N-S---D-O---N-O-T---E-D-I-T-----------------------
-----------------------------------------------------------------
function fireGlobal()
  setGlobalFire = setGlobalStorageValue(config.globalValueFire, 0),
  return TRUE
end
-----------------------------------------------------------------
function iceGlobal()
  setGlobalIce = setGlobalStorageValue(config.globalValueIce, 0),
  return TRUE
end
-----------------------------------------------------------------
function energyGlobal()
  setGlobalEnergy = setGlobalStorageValue(config.globalValueEnergy, 0),
  return TRUE
end
-----------------------------------------------------------------
function earthGlobal()
  setGlobalEarth = setGlobalStorageValue(config.globalValueEarth, 0)
  return TRUE
end
 

frankfarmer

who'r ninja now
Joined
Aug 5, 2008
Messages
1,472
Best answers
0
Reaction score
30
Location
swe?
Is this; The Elemental Spheres Quest?

And, how do we get the elemental bosses?
 
OP
Ezzam

Ezzam

New Member
Joined
Jan 16, 2008
Messages
213
Best answers
0
Reaction score
2
The monsters are made up names, and the quest are too...

I just had some time and this was the result :|

I dont care what you do with the script...

Maybe i will fix it late, but for now i dont feel like it, i am kinda retired from OT, but still like the community.
But i dont release any things anymore. Maybe i release by INQ and POI for rl map.
The quests take ~1 hour in-game at lvl 200 with 5+ ppl.
They should be 90% like rl.

Btw, maybe i test and fix it today... just need some more scripts for my use of this script :p
 
Top