Joe Rod
Discord: joerod1
Hi guys, with this you would greet the npc and open its shop (if has) only target it!
Tested on OTX3, it will work on TFS 1.x i guess
combat.cpp
find:
now go to a line who look like this (4 lines below):
and replace it with this:
data/events/scripts/creature.lua
find:
now find something who look like this
below that paste this:
If you liked it you could give a feedback
Tested on OTX3, it will work on TFS 1.x i guess
combat.cpp
find:
Code:
if (player->hasFlag(PlayerFlag_CannotUseCombat) || !target->isAttackable()) {
now go to a line who look like this (4 lines below):
Code:
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;
and replace it with this:
Code:
if (!target->getNpc())
return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE;
data/events/scripts/creature.lua
find:
Code:
function Creature:onTargetCombat(target)
now find something who look like this
Code:
if not self then
return true
end
below that paste this:
Code:
if (self:isPlayer() and target:isNpc()) then
self:say("hi", TALKTYPE_PRIVATE_PN, false, target)
self:say("trade", TALKTYPE_PRIVATE_PN, false, target)
return RETURNVALUE_NOTPOSSIBLE
end
If you liked it you could give a feedback