• 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 TFS 1.1 ModalWindow Skill Point System

I don't know if it was intended on screenshot or not but:
return true -> command will be seen as normal message by caster and other players
return false -> command will be seen by caster only in server log
 
I don't know if it was intended on screenshot or not but:
return true -> command will be seen as normal message by caster and other players
return false -> command will be seen by caster only in server log

Yeah I was a bigger noob back then who thought I had done something awesome by converting the old code to work with the new, I kept return true because at that point I had thought for scripts in general it must return true for it to work. I realize now every event has different possibilities for return and different uses... Thanks for pointing that out for those who need to know how to fix that. I think I'm about to update this to 1.1 soon anyways, when I get the time, I want to remake everything in the signature... do it all better since no one else is and I can...
 
did you make the modal version yet? (i dont need it though, i got my own version of skillpoints with modalwindows)

Yo! When adding magic level, it goes BAzOOKA! from magic level 10 to magic level 109 when using 1 skill point! :D
change your congif.lua rates and see what happens, also change manaspent multipliers in vocation.xml and see what happens. i think they are off. But i might be wrong
 
did you make the modal version yet? (i dont need it though, i got my own version of skillpoints with modalwindows)


change your congif.lua rates and see what happens, also change manaspent multipliers in vocation.xml and see what happens. i think they are off. But i might be wrong
Yeah, I messed around a little with that. The thing is, I want players to gain hp, mana, skills only from using this system and not from training or getting levels. So I set config rates to 0. I tried every possible configuration in vocations.xml but it still adds several magic levels. Ill try to find a solution.
 
Code:
vocation = Vocation(player:getVocation():getId())
amount = vocation:getRequiredManaSpent(magicLevel)
player:addManaSpent(amount) --[[

not sure about amount
if it adds too much try:
player ml +1 in magicLevel,
player ml -1,
or
amount - player:getManaSpent() in amount
]]
 
did you make the modal version yet? (i dont need it though, i got my own version of skillpoints with modalwindows)


change your congif.lua rates and see what happens, also change manaspent multipliers in vocation.xml and see what happens. i think they are off. But i might be wrong
Yeah, I messed around a little with that. The thing is, I want players to gain hp, mana, skills only from using this system and not from training or getting levels. So I set config rates to 0. I tried every possible configuration in vocations.xml but it still adds several magic levels. Ill try to find a solution.

That's because the formula I didn't write and wasn't made to take in all the variables from TFS 1.x correctly, it was a formula from another server, and like I said, super noob back then, didn't know what I was doing...

@whitevo, if you have a modalwindow system that is converted for 1.1 of this, and it works all but that error, maybe you could share so I have a good start towards updating, I don't care either way, there will still be ALOT of reworking this system before re-releasing it...

Or it could be like zbizu said, I would try his way first, I was just assuming that was the problem, haven't looked at this code in a long time..
 
Code:
vocation = Vocation(player:getVocation():getId())
amount = vocation:getRequiredManaSpent(magicLevel)
player:addManaSpent(amount) --[[

not sure about amount
if it adds too much try:
player ml +1 in magicLevel,
player ml -1,
or
amount - player:getManaSpent() in amount
]]

If anyone gets the formula working correctly it would help me and everyone else who needs it, out alot if they shared the solution...
 
solution(progress in % will be lost, it's wip):
Code:
math.ceil((player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) - player:getManaSpent()) / configManager.getNumber(configKeys.RATE_MAGIC))
 
solution(progress in % will be lost, it's wip):
Code:
math.ceil((player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) - player:getManaSpent()) / configManager.getNumber(configKeys.RATE_MAGIC))

Litterlly jsut opened notepad to start having a look hahaha thanks man.
 
give me 30 minutes and I'll write it for you

edit:
done, now it keeps progress player made in ml himself
Code:
  player:addManaSpent(math.ceil((player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1)) / configManager.getNumber(configKeys.RATE_MAGIC)))
 
Last edited:
Thank you kind sir! Now if @whitevo would share her modalwindow or atleast tell me she isn't I would get started on the update today while I have free time :D
 
Yeah, I messed around a little with that. The thing is, I want players to gain hp, mana, skills only from using this system and not from training or getting levels. So I set config rates to 0. I tried every possible configuration in vocations.xml but it still adds several magic levels. Ill try to find a solution.
almost the same way in my server :D

use TFS 1.0
appareantly TFS 1.1 doesnt support anymore our unique approach

Thank you kind sir! Now if @whitevo would share her modalwindow or atleast tell me she isn't I would get started on the update today while I have free time :D

I haven't done the actual modal window system part for the points. (i just know how to do it)
Also its not something i can do in haste (prolly would take me entire day)
I only have the first part ready: skillpoint rewarding (in my game completing tasks give points)

since you guys so seem to want that useless script i will post it in the tutorial (will take me few minutes)
 
Last edited:
almost the same way in my server :D

use TFS 1.0
appareantly TFS 1.1 doesnt support anymore our unique approach
Cool! Would you mind sharing your modalwindow? Would be so awesome to get it working! And Im using 1.0 :D
 
almost the same way in my server :D

use TFS 1.0
appareantly TFS 1.1 doesnt support anymore our unique approach



I haven't done the actual modal window system part for the points. (i just know how to do it)
Also its not something i can do in haste (prolly would take me entire day)
I only have the first part ready: skillpoint rewarding (in my game completing tasks give points)

since you guys so seem to want that useless script i will post it in the tutorial (will take me few minutes)

Oh ok, I thought you had the interface of modalwindows with this system working. It's all good, I can do it. No problems. As for the way to use the system with tasks or something else, that is great idea to release tutorial. Thanks for contributing, I will start with this later tonight.
 
Big gif file, not sure how it's going to look if it will even show up right, but anyways I don't have much free time left today, will try to finish this by the weekend for you guys but here is a preview of it what I got working so far, the rest should move along faster...



appears the preview doesn't want to work, but if you click on it, it takes you to postimage.org where the image is saved and you can see it...
 
Big gif file, not sure how it's going to look if it will even show up right, but anyways I don't have much free time left today, will try to finish this by the weekend for you guys but here is a preview of it what I got working so far, the rest should move along faster...



appears the preview doesn't want to work, but if you click on it, it takes you to postimage.org where the image is saved and you can see it...
spointwindow.gif
 
@calveron @beastn @whitevo and everyone else who wants it. I stared working on modalwindow version, but it seems like there is a bug in the formula for adding skill levels and for adding magic levels. Should be fine for skills if the multiplier for that skill for that vocation in vocations.xml is not too high, tested with 1.1 for the multipliers and it works perfectly always. As for magic level, I added 5 at a time, 8 times in a row and it worked perfectly, on the 9th time it gave me 4 and a half magic levels. So the formula's aren't always perfect, the magic level should be fine if you don't add alot of magic levels over and over again. Anyways because this doesn't work perfectly, I am not going through the hassle of updating the main thread until this problem is solved, then I will finish the system. If you don't know how to install this then ask here, I will help when I get the chance, it's pretty simple, just replace the old talkaction with this one, and use the modalwindow script, register it in creaturescripts.xml.

creaturescript

PointWindow.lua

talkactions

pointsystem.lua

You will need to make sure the storage value is the same in both files, and same in your skill advance file, or whitevo's npc's or w/e...
 
I don't know where in sources it's multiplied by ml rate and why. If you tested my formula try it again using math.floor instead of math.ceil.
 
Back
Top