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

Can i make unique party system?

mejo3

New Member
Joined
Apr 11, 2008
Messages
21
Reaction score
0
Hello i using TFS for 7.6 tibia client version and i need to make my own party system. Can i make this?
I need:
Leader party may invite five players who will get 10% exp mob whose leader killed to 90lvl. kill a leader for each monster killed of players will get 5x points virtualnych points which you can accumulate and then replace for items or gold.

Sorry for english, thanks a lot for helps Greetings!
 
Dumb question, but is the source code for various distributions of TFS available somewhere?

Well, you can get the latest source for tfs from the repository on github. And you can get sources for many other here:
http://otland.net/forums/distributions.18/
But this section is a bit messy in my opinion, some releases don't even include source, just the executable, and some are only datapack. you have to dig a bit to find something specific.
For 0.4's look here:
http://otland.net/threads/backup-of-some-old-sources.199436/
 
A Litte Hint that can help you
Code:
function onKill(cid, target,damage,flags)
if isPlayer(cid) and isMonster(target) and isInParty(cid) then
doPlayerAddExperience(cid, experince you want)
end
return true
end

the "isInParty" Code
Code:
function isInParty(cid)
   return type(getPartyMembers(cid)) == 'table'
end

add it in lib/100-shortcut
 
doPlayerAddExperience(cid, experince you want)

How to make exprience for % killing monster. example: rotworm give exp 100 players get 10% of exp = 10exp for each monster
thanks for up for ur helps tetra20
 
Good question. Its almost impossible to do it without source changes. But a bit messy method is:

for player exp - > doPlayerAddExperience(cid, RotwormEXP/5) -- for 5 players each get 20% of exp
for leader exp -> doPlayerAddExperience(cid, -RotwormEXP)
doPlayerAddExperience(cid, RotwormEXP/5)

dont remember how to gain monster exp reward, but its easy and possible.
 
Code:
doPlayerAddExperience(cid, math.floor(getMonsterInfo(getCreatureName(target))/100 * 10))
this will get the monster exp killed
I.E
Rotworm = 65 / 100 * 10 = 7

Or
doPlayerAddExperience(getPartyMembers(cid),exp)
 
Good question. Its almost impossible to do it without source changes. But a bit messy method is:

for player exp - > doPlayerAddExperience(cid, RotwormEXP/5) -- for 5 players each get 20% of exp
for leader exp -> doPlayerAddExperience(cid, -RotwormEXP)
doPlayerAddExperience(cid, RotwormEXP/5)

dont remember how to gain monster exp reward, but its easy and possible.
doesn't Need Source Edit.unless you want to make new lua functions,doAddPercent()
 
@tetra20 You are wrong Leader will get 40 above his head when he kills Rotworm, that is hardcoded in source I believe.


And your method returns

Leader 47 exp
Members 7 exp
 
In Source exp is separated like this
shareExperience /= memberList.size() + 1;
can't understand this code. a simple one
shareExperience = shareExperience / memberList.six() +1;

ShareExperience = MonsterExperience

so you can make it like this

ShareExperience = ShareExperience / 100 * 10;

try editing it in your source
 
Back
Top Bottom