There is nothing wrong in your code. The only issue is that you used %player% instead of %player's uuid% (if you use %player% then if that player changes their name it won't save, If you use %player's uuid% it will save a id that's only for that minecraft account that never changes)
New Code:
on first join:
set {traveller::%player's uuid%} to 0
command /traveller:
trigger:
set {traveller::%player's uuid%} to 0
on right click on entity:
if {traveller::%player%} = 0:
if display name of entity contains "Traveller":
set {traveller::%player's uuid%} to 1
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7Mornin' sunshine, it seems ya finally woke from yer nap" to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player
wait 100 ticks
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7I found ye's unconscious with a nasty bump on yer head and a sole stick in ye hand. " to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player
wait 100 ticks
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7Yous was surrounded by zombies you were, if i hadn'ta found ya, ye sorry soul would be among the deads." to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player
wait 100 ticks
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7well yous should probably head over to the fortress infront of yous, I let Adam know ye comin'." to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player
wait 100 ticks
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7Where does that bastard live? Ah yes i had forgotten to tell yous, hes an odd lad who lives in a boulder." to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player
wait 100 ticks
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7Well go on now, ye just need to follow the road yous do and you'll be in the fortress in a jiffy." to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player
set {traveller::%player's uuid%} to 2
on right click on entity:
if display name of entity contains "Traveller":
if {traveller::%player's uuid%} = 2:
send "&4&lMGSRPG&0&l=======================================" to player
send "" to player
send "" to player
send "" to player
send "&6&lTraveller&8>>&7Be on yer way nows, I've got places to go I do." to player
send "" to player
send "" to player
send "" to player
send "&4&lMGSRPG&0&l=======================================" to player