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

TFS 1.0 onLookInShop crash...

vejin

I'm not an expert.
Joined
May 6, 2010
Messages
54
Reaction score
2
Location
Ultima
Hello.
TFS 1.0 edited by EvilHero90

When I try to look at any item in NPC shop it makes the server crash.

in events.xml lookinshop value is 1
<event class="Player" method="onLookInShop" enabled="1"/>
in player.lua:
Code:
function Player:onLookInShop(itemType, count)
   return true
end
I also had:
Code:
function Player:onLookInShop(itemType, count)
  self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
end

but I don't remember which one was first in this custom version of tfs

I searched the Internet for the solution, the only topic I found was report on github which gave me the answer of user: "Solved. It was because of change I made"

So I have no freakin idea what is causing the problem. It is really confusing.

I hope anyone knows how to deal with it.
 
I changed
Code:
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. item:getDescription(distance))
To
Code:
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. itemType:getName() .. "\n" .. itemType:getDescription())

It doesn't crash the server now but it doesn't view the attributes:
Code:
You see a battle hammer
There is no information about atk, def and arm, only additive description like:
Code:
You see heroic axe
This axe is only granted to a scrapper of the Svargrond area
 
you've tried this?

Code:
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. itemType:getDescription())
or
Code:
self:sendTextMessage(MESSAGE_INFO_DESCR, "You see " .. itemType:getDescription(distance))
 
You should use the official TFS 1.0 release.
Evil Hero's version was rushed and was outdated as soon as it was created.
 
regular tfs 1.0 did not have onAttack function which I need
I'll test these lines later, thanks a lot.

none of these lines did work.
 
Last edited:
Back
Top