Ziomster44
New Member
- Joined
- Jan 10, 2013
- Messages
- 5
- Reaction score
- 0
Rather than starting a new topic for every question I came across (that I could not figure out nor find anywhere using the search function nor even google) I thought it might be a good idea to create one topic and ask these questions. They're random and might help sharpen your critical thinking skills 
Note: I am using TFS 0.2.14
So here are a few for a start:
1. According to an online Tibia damage calculator, a lvl 6 character with 20 axe skill and 21 weapon attack should do a maximum 37 damage in attack mode... why did my character do 62 damage to a white deer?
2. Why can't I sell food to NPCs? The choices exist for that specific NPC and I specified the exact itemid to be sold by the NPC. Other items could be sold to that NPC without a problem except for food.
3. This one is two parts:
... so the following is my starting skills script:
where doPlayerSetSkill, which is located in global.lua, does the following:
a) Is there a way I could do the above without having the player get spammed with messages that he has leveled up to blabla level #?
b) Is there a way to also "doPlayerSetSkill" for a magic level in this version of TFS?
Thank you everyone in advance, rep to anyone that helps me out!
Note: I am using TFS 0.2.14
So here are a few for a start:
1. According to an online Tibia damage calculator, a lvl 6 character with 20 axe skill and 21 weapon attack should do a maximum 37 damage in attack mode... why did my character do 62 damage to a white deer?
2. Why can't I sell food to NPCs? The choices exist for that specific NPC and I specified the exact itemid to be sold by the NPC. Other items could be sold to that NPC without a problem except for food.
3. This one is two parts:
... so the following is my starting skills script:
Code:
function onLogin(cid)
local playerVoc = getPlayerVocation(cid)
local reqTries = getPlayerRequiredSkillTries
local skillStor = 56364
local gotSkills = getPlayerStorageValue(cid, 56364)
if playerVoc == 0 and gotSkills == -1 then
doPlayerSetSkill(cid, SKILL_FIST, 20)
doPlayerSetSkill(cid, SKILL_AXE, 20)
doPlayerSetSkill(cid, SKILL_SWORD, 20)
doPlayerSetSkill(cid, SKILL_CLUB, 20)
doPlayerSetSkill(cid, SKILL_SHIELD, 20)
doPlayerSetSkill(cid, SKILL_DISTANCE, 20)
doPlayerSetSkill(cid, SKILL_SHIELD, 20)
doPlayerSetSkill(cid, SKILL_FISHING, 20)
setPlayerStorageValue(cid, skillStor, 1)
end
return TRUE
end
where doPlayerSetSkill, which is located in global.lua, does the following:
Code:
function doPlayerSetSkill(cid, skillid, skill)
if getPlayerSkill(cid, skillid) >= skill then
return TRUE
end
local cskill = getPlayerSkill(cid, skillid)
while cskill < skill do
doPlayerAddSkillTry(cid, skillid, 1)
cskill = getPlayerSkill(cid, skillid)
end
return TRUE
end
a) Is there a way I could do the above without having the player get spammed with messages that he has leveled up to blabla level #?
b) Is there a way to also "doPlayerSetSkill" for a magic level in this version of TFS?
Thank you everyone in advance, rep to anyone that helps me out!
Last edited: