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

Lua doPlayerSetRate doesn't exist. TFS 0.2.11.2 (Mystic Spirit) - R3

skontan

New Member
Joined
Nov 21, 2009
Messages
30
Reaction score
0
Hi!

I am having some trouble getting a function/command work properly. I want VIP players to gain an additional 50% more exp, but the problem is that none of the "doPlayerSetRate", "doPlayerAddExpRate", "doPlayerSetExtraExpRate" and so on works.

It would mean alot to me if anybody could tell me what to write.

Here is the script:
Lua:
function onLogin(cid)
 if getPlayerVipDays(cid) > 0 then
  doPlayerSetRate(cid, SKILL__LEVEL, 2)
 end 
 return TRUE
end
getPlayerVipDays is a function that I've added myself and it's working fine.

Thanks!
 
Last edited:
This will be tricky on TFS 0.2.11

if that distro supports onKill, you could compare experience before-after kill, calculate 50% of difference and add it as an additional bonus.

(If it only supports onDeath, you need to do the same, but instead of using cid, use killer (since killer represents the player who killed the creature), and you need to edit every monster file and register the creature event.
 
Thank you for your answers guys!

@Loney I tried your function doPlayerAddSkillTry(cid, skillid, 2). First I checked the LUA_FUNCTIONS and i saw that the function were there, but when i try to use it in my script the server just messes up! If you try to log in at a character without VIP then there are no problem but if you try with a player with VIP then you gets unable to log in. Even non-VIP players gets unable to log in after I've tried to log in with the VIP. The worst thing is that the server leaves no error message! Do you have any idea what I'm doing wrong?

@Znote I have actually thought of your idea berfore, it's just that I'm not able to create such a script. Perhaps you are able and would like to create this script? I would be very thankfull!
 
Last edited:
Back
Top