Greets fellow Scripters!
After being away from OpenTibia for about 2 years, I honestly got alot to Catch up on.
Therefor, I call upon you who go the knowledge to lead me!
My first process, to even get the server started, was actually harder then I thought, but finally made it.
From what I learned, the new TFS 1.0 will be the future, so thats what I will work with.
Im "converting" everything I did 2 years ago to get the server up-to-date and to get everything working that I already fixed for the server 2 years ago. I used 0.2 versions back then but now Believe 1.0 will support the most 0.3+ / 0.4+ functions (or soon will).
--------------------------------------------------------------
ACTIONS
*StatusBook Solved - Thanks Evil Hero!
CREATURESCRIPTS
This script should send a text in your logg to simply inform you on what spell you get upon Advance.
I found it and it seems to be for 0.3.7, but I can't see why it shouldn't work.
CreatureScripts.xml
SpellsInfo.lua
LOGG ERROR:
MOVEMENTS
TALKACTIONS
This script will show a highscore list, using uniform and ZnoteAAC if that helps.
TalkAction.xml
Highscores.lua
LOGG ERROR:
NPCS
POSTED ONE A FEW POSTS DOWN AS IT WAS TOO BIG HERE!
SPELLS:
My intention is the make the Magic Wall Rune show time ticks above it, 20, 19, 18 etc until its gone.
LOGG ERROR:
TALKING SIGNS FOR TFS 1.0, MAYBE SOMETHING THAT I COULD COMBINE FOR M-WALL?
OTHER/BIGGER:
MAIN SCRIPT IDEA FOR THE SERVER:
Here is my idea, feel free to bring new ones/change my thinking.
The server will be a Race against a Race, but I'll explain with normal Vocs to make it easy.
*I will create an NPC that sells you a certain item in each town for each voc. (Don't need help here)
*I'll also create a kind of "pedestal/sacrifice place" where you will place this item. (Don't need help here)
So what I need is a script that will let you drop the X item on this X, Y, Z place and you have simply "Conquered" that "area".
(A lever or whatever if the drop function wont work or is too hard to make)
The "Conquer" part can be 2 things unless you got a better idea:
1. Give every Vocation (example Druids AND Sorcerers) faster HP and MANA regeneration in the entire game. (Must be able to set how much). If someone then puts Another item, one for Knights AND Paladins, THEY will INSTEAD get the bonus!
2. Give every vocation hunting in that area from X, Y, Z to X, Y, Z a higher XP rate/Regeneration.
(I prefer nr 1 but Im happy with anything that can make you "Conquer" an area, it will be race against race)
Also:
-Delay: The outcome can't be changed within 30 Minutes to prevent mass drop and simply give an ownership for some time.
-Broadcast: If the X item was the Druids AND Sorcerer Item, it will send a Broadcast like "The Druids and Sorcerers now Conquered the Plains of Havoc and will get a higher HP/Mana Regeneration" and Vice-Versa for Knights AND Paladin Item. (Or something like that, would like this text to appear White on the screen like Raids do)
-Note that I will put 5-10 places like this on the map so Races want to Conquer areas!
The Bonus can be whatever fits and will work. The best thing would be alittle faster hp/mana regeneration to prevent any abuse.
Can also be skills, armor or whatever if thats what you can do!
Would be cool with some kind of cool effect when dropping the item, if possible!
Just tell me if anything is unclear!
-----------------------------------------------------------------
I will probably be adding/editing/deleting during any progress.
Thanks in Advance!
Kind Regards,
Eldin.
After being away from OpenTibia for about 2 years, I honestly got alot to Catch up on.
Therefor, I call upon you who go the knowledge to lead me!
My first process, to even get the server started, was actually harder then I thought, but finally made it.
From what I learned, the new TFS 1.0 will be the future, so thats what I will work with.
Im "converting" everything I did 2 years ago to get the server up-to-date and to get everything working that I already fixed for the server 2 years ago. I used 0.2 versions back then but now Believe 1.0 will support the most 0.3+ / 0.4+ functions (or soon will).
--------------------------------------------------------------
ACTIONS
*StatusBook Solved - Thanks Evil Hero!
CREATURESCRIPTS
This script should send a text in your logg to simply inform you on what spell you get upon Advance.
I found it and it seems to be for 0.3.7, but I can't see why it shouldn't work.
CreatureScripts.xml
Code:
<event type="advance" name="SpellsInfo" script="SpellsInfo.lua"/>
SpellsInfo.lua
Code:
local s = { --SETUP
repeatAfterDeath = false, -- true -> player will always get the msg at lvlup | false -> player will only get the 1st time the gets the new level
detailedInfo = true, -- true -> player will get name, words, mana & mana% info of spells | false -> player will only get the name and the words of the spells
-- storage below is where the newlevel will be stored ONLY IF YOU USE repeatAfterDeath
Storage = 15000,
messageType = 'channel', -- options: 'popUp' or 'channel'
--this one below only used if messageType = channel
channelClass = MESSAGE_STATUS_CONSOLE_ORANGE
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill ~= SKILL__LEVEL or not s.repeatAfterDeath and getCreatureStorage(cid, s.Storage) >= newlevel then
return true
end
local t = {}
for i = 0, getPlayerInstantSpellCount(cid) - 1 do
local spell = getPlayerInstantSpellInfo(cid, i)
if(spell.level ~= 0) and spell.level == newlevel then
if(spell.manapercent > 0) then
spell.mana = spell.manapercent .. '%'
end
table.insert(t, spell)
end
end
table.sort(t, function(a, b) return a.level < b.level end)
local text, prevLevel = '', -1
for i, spell in ipairs(t) do
local line = ''
if(prevLevel ~= spell.level) then
if(i ~= 1) then
line = '\n'
end
line = line .. 'You have just advanced to level '..newlevel..' and learned new spells!\n'
prevLevel = spell.level
end
text = text ..line..' ['..spell.name..'] "'..spell.words..'" '..(s.detailedInfo and 'Mana['..spell.mana..']'..(spell.mlevel > 0 and ' ML['..spell.mlevel..']' or '') or '')..'\n'
end
if text == '' then
return true
end
doCreatureSetStorage(cid, s.Storage, newlevel)
if s.messageType == 'popUp' then
doShowTextDialog(cid, 2175, text)
elseif s.messageType == 'channel' then
doPlayerSendTextMessage(cid, s.channelClass, text)
end
return true
end
LOGG ERROR:
Code:
None
MOVEMENTS
TALKACTIONS
This script will show a highscore list, using uniform and ZnoteAAC if that helps.
TalkAction.xml
Code:
<talkaction words="!highscores" script="Highscores.lua"/>
Highscores.lua
Code:
local highscores = {
['fist'] = {0},
['club'] = {1},
['sword'] = {2},
['axe'] = {3},
['distance'] = {4},
['shield'] = {5},
['fish'] = {6},
['magic'] = {7},
['level'] = {8},
}
function onSay(cid, words, param)
local msg = string.lower(param)
if highscores[msg] ~= nil then
str = getHighscoreString((highscores[msg][1]))
else
str = getHighscoreString((8))
end
doShowTextDialog(cid,6500, str)
return TRUE
end
LOGG ERROR:
Code:
Lua Script Error: [Action Interface]
data/talkactions/script/Highscores.lua :onSay
data/talkactions/script/Highscores.lua :22: atempt to call global 'getHighscoreString' <a nil value>
stack traceback:
[C]: in function 'getHighscoreString'
data/talkactions/script/Highscores.lua :22: in function <data/talkactions/script/Highscores.lua :16:>
NPCS
POSTED ONE A FEW POSTS DOWN AS IT WAS TOO BIG HERE!
SPELLS:
My intention is the make the Magic Wall Rune show time ticks above it, 20, 19, 18 etc until its gone.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
function onCastSpell(cid, var)
function MagicWallTime(pos, delay)
doSendAnimatedText(pos, delay, 145)
if delay ~= 1 then addEvent(MagicWallTime, 1000, pos, delay -1) end
end
local pos,duration = variantToPosition(var),20
MagicWallTime(pos,duration)
return doCombat(cid, combat, var)
end
LOGG ERROR:
Code:
The error pointed towards "doSendAnimatedText" and I changed it to: doCreatureSay instead.
I had no error but the MagicWall wont show tics. Anyone? :)
TALKING SIGNS FOR TFS 1.0, MAYBE SOMETHING THAT I COULD COMBINE FOR M-WALL?
Code:
local t = {
{"test", {x=1000, y=1000, z=7}, CONST_ME_TELEPORT},
{"test2", {x=1001, y=1000, z=7}, CONST_ME_GIFT_WRAPS},
{"test3", {x=1002, y=1000, z=7}, CONST_ME_POFF}
}
function onThink(interval)
local people = getOnlinePlayers()
if #people == 0 then
return true
end
for i = 1, #t do
local v = t[i]
doCreatureSay(people[1], v[1], TALKTYPE_ORANGE_1, false, 0, v[2])
doSendMagicEffect(v[2], v[3])
end
return true
end
OTHER/BIGGER:
MAIN SCRIPT IDEA FOR THE SERVER:
Here is my idea, feel free to bring new ones/change my thinking.
The server will be a Race against a Race, but I'll explain with normal Vocs to make it easy.
*I will create an NPC that sells you a certain item in each town for each voc. (Don't need help here)
*I'll also create a kind of "pedestal/sacrifice place" where you will place this item. (Don't need help here)
So what I need is a script that will let you drop the X item on this X, Y, Z place and you have simply "Conquered" that "area".
(A lever or whatever if the drop function wont work or is too hard to make)
The "Conquer" part can be 2 things unless you got a better idea:
1. Give every Vocation (example Druids AND Sorcerers) faster HP and MANA regeneration in the entire game. (Must be able to set how much). If someone then puts Another item, one for Knights AND Paladins, THEY will INSTEAD get the bonus!
2. Give every vocation hunting in that area from X, Y, Z to X, Y, Z a higher XP rate/Regeneration.
(I prefer nr 1 but Im happy with anything that can make you "Conquer" an area, it will be race against race)
Also:
-Delay: The outcome can't be changed within 30 Minutes to prevent mass drop and simply give an ownership for some time.
-Broadcast: If the X item was the Druids AND Sorcerer Item, it will send a Broadcast like "The Druids and Sorcerers now Conquered the Plains of Havoc and will get a higher HP/Mana Regeneration" and Vice-Versa for Knights AND Paladin Item. (Or something like that, would like this text to appear White on the screen like Raids do)
-Note that I will put 5-10 places like this on the map so Races want to Conquer areas!
The Bonus can be whatever fits and will work. The best thing would be alittle faster hp/mana regeneration to prevent any abuse.
Can also be skills, armor or whatever if thats what you can do!
Would be cool with some kind of cool effect when dropping the item, if possible!
Just tell me if anything is unclear!
-----------------------------------------------------------------
I will probably be adding/editing/deleting during any progress.
Thanks in Advance!
Kind Regards,
Eldin.
Last edited: